Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
  • Loading branch information
fujita committed Sep 19, 2022
0 parents commit 2b88260
Show file tree
Hide file tree
Showing 8 changed files with 3,650 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

.rust*

*modules.order*
rust_e1000.d
rust_e1000.mod*

*.o
*.ko
.Module*
Module.symvers
3 changes: 3 additions & 0 deletions Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-m := rust_e1000.o
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0

KDIR ?= /lib/modules/`uname -r`/build

default:
$(MAKE) -C $(KDIR) M=$$PWD

clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rust simple e1000 device driver (Intel ethernet adapter)

This is for figuring out proper Rust PCI, DMA, network abstraction APIs for NIC drivers.

This driver works on QEMU, howerver nothing else works.

[Rust-for-Linux tree](https://github.com/Rust-for-Linux/linux) doesn't support necessary abstraction APIs (PCI, DMA, network, etc) yet. This driver is tested with [my fork](https://github.com/fujita/linux/tree/rust-e1000). I'll work for upstreaming.

```bash
$ make KDIR=~/git/linux LLVM=1
```
Loading

0 comments on commit 2b88260

Please sign in to comment.