diff --git a/.gitmodules b/.gitmodules index 3335d1a..57d3758 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,9 +49,9 @@ [submodule "crates/docgen"] path = crates/docgen url = https://github.com/redox-os/docgen.git -[submodule "libstd_real/openlibm"] +[submodule "libstd/openlibm"] path = libstd/openlibm - url = https://github.com/redox-os/openlibm.git + url = https://github.com/JuliaLang/openlibm.git [submodule "programs/binutils"] path = programs/binutils url = https://github.com/redox-os/binutils.git diff --git a/Cargo.toml b/Cargo.toml index 95e2c73..5c3c138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ spin = "*" redox_syscall = { path = "syscall/" } [dependencies.goblin] -git = "https://github.com/redox-os/goblin.git" +git = "https://github.com/m4b/goblin.git" default-features = false features = ["elf32", "elf64"] diff --git a/Makefile b/Makefile index 15dc6aa..1d7c319 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo CARGOFLAGS=--target $(TARGET) --release -- # Default targets -.PHONY: all live iso clean doc ref test update qemu bochs drivers schemes binutils coreutils extrautils netutils userutils wireshark FORCE +.PHONY: all live iso clean doc ref test update pull qemu bochs drivers schemes binutils coreutils extrautils netutils userutils wireshark FORCE all: build/harddrive.bin @@ -148,6 +148,14 @@ update: cargo update --manifest-path schemes/tcpd/Cargo.toml cargo update --manifest-path schemes/udpd/Cargo.toml +pull: + git pull --rebase --recurse-submodules + git clean -X -f -d + git submodule sync + git submodule update --recursive --init + make clean + make update + # Emulation QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(ARCH) QEMUFLAGS=-serial mon:stdio -d cpu_reset -d guest_errors @@ -238,6 +246,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 @@ -291,6 +303,7 @@ virtualbox: build/harddrive.bin $(VBM) modifyvm Redox --mouse ps2 $(VBM) modifyvm Redox --audio $(VB_AUDIO) $(VBM) modifyvm Redox --audiocontroller ac97 + $(VBM) modifyvm Redox --nestedpaging off echo "Create Disk" $(VBM) convertfromraw $< build/harddrive.vdi echo "Attach Disk" @@ -346,7 +359,7 @@ $(BUILD)/libstd_unicode.rlib: rust/src/libstd_unicode/lib.rs $(BUILD)/libcore.rl $(RUSTC) $(RUSTCFLAGS) -o $@ $< libstd/openlibm/libopenlibm.a: - CROSSCC=$(CC) CFLAGS=-fno-stack-protector make -C libstd/openlibm libopenlibm.a + CFLAGS=-fno-stack-protector make -C libstd/openlibm libopenlibm.a $(BUILD)/libopenlibm.a: libstd/openlibm/libopenlibm.a mkdir -p $(BUILD) @@ -374,6 +387,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 +459,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 +562,8 @@ schemes: \ filesystem/sbin/orbital \ filesystem/sbin/ptyd \ filesystem/sbin/randd \ + filesystem/sbin/redoxfs \ + filesystem/sbin/redoxfs-mkfs \ filesystem/sbin/tcpd \ filesystem/sbin/udpd diff --git a/drivers/bgad/Cargo.toml b/drivers/bgad/Cargo.toml new file mode 100644 index 0000000..cc9ce26 --- /dev/null +++ b/drivers/bgad/Cargo.toml @@ -0,0 +1,3 @@ +[package] +name = "rtl8168d" +version = "0.1.0" diff --git a/drivers/bgad/src/main.rs b/drivers/bgad/src/main.rs new file mode 100644 index 0000000..48d75d7 --- /dev/null +++ b/drivers/bgad/src/main.rs @@ -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)); +} diff --git a/initfs/etc/pcid.toml b/initfs/etc/pcid.toml index 0be2b78..65813a7 100644 --- a/initfs/etc/pcid.toml +++ b/initfs/etc/pcid.toml @@ -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"] diff --git a/libstd/openlibm b/libstd/openlibm index 3c837e7..1581174 160000 --- a/libstd/openlibm +++ b/libstd/openlibm @@ -1 +1 @@ -Subproject commit 3c837e79655c4be724efb945a6345ec97c07635c +Subproject commit 1581174c85f7b645b15ba1ac1c3a98fb601f0fe7 diff --git a/rust b/rust index 98432be..3e15dc1 160000 --- a/rust +++ b/rust @@ -1 +1 @@ -Subproject commit 98432be1e5b8500354f939cfd6e6c811d42f4f25 +Subproject commit 3e15dc108c66891da04aa8c3f77162746fab4277 diff --git a/syscall b/syscall index 1908eea..3377a5c 160000 --- a/syscall +++ b/syscall @@ -1 +1 @@ -Subproject commit 1908eea7e91142a058ae99c06edb2a9dd7efd692 +Subproject commit 3377a5cd2ddfd453de5ba12f064403f21f240b65