Add BGA driver stub
This commit is contained in:
parent
0b04c9e3b4
commit
034a9388f5
12
Makefile
12
Makefile
|
@ -238,6 +238,10 @@ build/livedisk.iso: build/livedisk.bin.gz
|
|||
qemu: build/harddrive.bin
|
||||
$(QEMU) $(QEMUFLAGS) -drive file=$<,format=raw
|
||||
|
||||
qemu_extra: build/harddrive.bin
|
||||
dd if=/dev/zero of=build/extra.bin bs=1G count=8
|
||||
$(QEMU) $(QEMUFLAGS) -drive file=$<,format=raw -drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_no_build:
|
||||
$(QEMU) $(QEMUFLAGS) -drive file=build/harddrive.bin,format=raw
|
||||
|
||||
|
@ -374,6 +378,7 @@ initfs/bin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
|
|||
$(BUILD)/initfs.rs: \
|
||||
initfs/bin/init \
|
||||
initfs/bin/ahcid \
|
||||
initfs/bin/bgad \
|
||||
initfs/bin/pcid \
|
||||
initfs/bin/ps2d \
|
||||
initfs/bin/redoxfs \
|
||||
|
@ -445,6 +450,11 @@ filesystem/sbin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
|
|||
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
|
||||
strip $@
|
||||
|
||||
filesystem/sbin/redoxfs-mkfs: schemes/redoxfs/Cargo.toml schemes/redoxfs/src/** $(BUILD)/libstd.rlib
|
||||
mkdir -p filesystem/bin
|
||||
$(CARGO) rustc --manifest-path $< --bin redoxfs-mkfs $(CARGOFLAGS) -o $@
|
||||
strip $@
|
||||
|
||||
drivers: \
|
||||
filesystem/sbin/pcid \
|
||||
filesystem/sbin/e1000d \
|
||||
|
@ -543,6 +553,8 @@ schemes: \
|
|||
filesystem/sbin/orbital \
|
||||
filesystem/sbin/ptyd \
|
||||
filesystem/sbin/randd \
|
||||
filesystem/sbin/redoxfs \
|
||||
filesystem/sbin/redoxfs-mkfs \
|
||||
filesystem/sbin/tcpd \
|
||||
filesystem/sbin/udpd
|
||||
|
||||
|
|
3
drivers/bgad/Cargo.toml
Normal file
3
drivers/bgad/Cargo.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[package]
|
||||
name = "rtl8168d"
|
||||
version = "0.1.0"
|
13
drivers/bgad/src/main.rs
Normal file
13
drivers/bgad/src/main.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let mut args = env::args().skip(1);
|
||||
|
||||
let mut name = args.next().expect("bgad: no name provided");
|
||||
name.push_str("_bga");
|
||||
|
||||
let bar_str = args.next().expect("bgad: no address provided");
|
||||
let bar = usize::from_str_radix(&bar_str, 16).expect("bgad: failed to parse address");
|
||||
|
||||
print!("{}", format!(" + BGA {} on: {:X}\n", name, bar));
|
||||
}
|
|
@ -2,4 +2,18 @@
|
|||
name = "AHCI storage"
|
||||
class = 1
|
||||
subclass = 6
|
||||
command = ["initfs:bin/ahcid", "$NAME", "$BAR5", "$IRQ"]
|
||||
command = ["ahcid", "$NAME", "$BAR5", "$IRQ"]
|
||||
|
||||
[[drivers]]
|
||||
name = "Bochs Graphics Array"
|
||||
class = 3
|
||||
vendor = 4660
|
||||
device = 4369
|
||||
command = ["bgad", "$NAME", "$BAR0"]
|
||||
|
||||
[[drivers]]
|
||||
name = "Bochs Graphics Array"
|
||||
class = 3
|
||||
vendor = 33006
|
||||
device = 48879
|
||||
command = ["bgad", "$NAME", "$BAR0"]
|
||||
|
|
Loading…
Reference in a new issue