commit
ab6d6a35c4
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -49,9 +49,9 @@
|
||||||
[submodule "crates/docgen"]
|
[submodule "crates/docgen"]
|
||||||
path = crates/docgen
|
path = crates/docgen
|
||||||
url = https://github.com/redox-os/docgen.git
|
url = https://github.com/redox-os/docgen.git
|
||||||
[submodule "libstd_real/openlibm"]
|
[submodule "libstd/openlibm"]
|
||||||
path = libstd/openlibm
|
path = libstd/openlibm
|
||||||
url = https://github.com/redox-os/openlibm.git
|
url = https://github.com/JuliaLang/openlibm.git
|
||||||
[submodule "programs/binutils"]
|
[submodule "programs/binutils"]
|
||||||
path = programs/binutils
|
path = programs/binutils
|
||||||
url = https://github.com/redox-os/binutils.git
|
url = https://github.com/redox-os/binutils.git
|
||||||
|
|
|
@ -13,7 +13,7 @@ spin = "*"
|
||||||
redox_syscall = { path = "syscall/" }
|
redox_syscall = { path = "syscall/" }
|
||||||
|
|
||||||
[dependencies.goblin]
|
[dependencies.goblin]
|
||||||
git = "https://github.com/redox-os/goblin.git"
|
git = "https://github.com/m4b/goblin.git"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["elf32", "elf64"]
|
features = ["elf32", "elf64"]
|
||||||
|
|
||||||
|
|
25
Makefile
25
Makefile
|
@ -19,7 +19,7 @@ CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo
|
||||||
CARGOFLAGS=--target $(TARGET) --release --
|
CARGOFLAGS=--target $(TARGET) --release --
|
||||||
|
|
||||||
# Default targets
|
# 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
|
all: build/harddrive.bin
|
||||||
|
|
||||||
|
@ -148,6 +148,14 @@ update:
|
||||||
cargo update --manifest-path schemes/tcpd/Cargo.toml
|
cargo update --manifest-path schemes/tcpd/Cargo.toml
|
||||||
cargo update --manifest-path schemes/udpd/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
|
# Emulation
|
||||||
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(ARCH)
|
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(ARCH)
|
||||||
QEMUFLAGS=-serial mon:stdio -d cpu_reset -d guest_errors
|
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: build/harddrive.bin
|
||||||
$(QEMU) $(QEMUFLAGS) -drive file=$<,format=raw
|
$(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_no_build:
|
||||||
$(QEMU) $(QEMUFLAGS) -drive file=build/harddrive.bin,format=raw
|
$(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 --mouse ps2
|
||||||
$(VBM) modifyvm Redox --audio $(VB_AUDIO)
|
$(VBM) modifyvm Redox --audio $(VB_AUDIO)
|
||||||
$(VBM) modifyvm Redox --audiocontroller ac97
|
$(VBM) modifyvm Redox --audiocontroller ac97
|
||||||
|
$(VBM) modifyvm Redox --nestedpaging off
|
||||||
echo "Create Disk"
|
echo "Create Disk"
|
||||||
$(VBM) convertfromraw $< build/harddrive.vdi
|
$(VBM) convertfromraw $< build/harddrive.vdi
|
||||||
echo "Attach Disk"
|
echo "Attach Disk"
|
||||||
|
@ -346,7 +359,7 @@ $(BUILD)/libstd_unicode.rlib: rust/src/libstd_unicode/lib.rs $(BUILD)/libcore.rl
|
||||||
$(RUSTC) $(RUSTCFLAGS) -o $@ $<
|
$(RUSTC) $(RUSTCFLAGS) -o $@ $<
|
||||||
|
|
||||||
libstd/openlibm/libopenlibm.a:
|
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
|
$(BUILD)/libopenlibm.a: libstd/openlibm/libopenlibm.a
|
||||||
mkdir -p $(BUILD)
|
mkdir -p $(BUILD)
|
||||||
|
@ -374,6 +387,7 @@ initfs/bin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
|
||||||
$(BUILD)/initfs.rs: \
|
$(BUILD)/initfs.rs: \
|
||||||
initfs/bin/init \
|
initfs/bin/init \
|
||||||
initfs/bin/ahcid \
|
initfs/bin/ahcid \
|
||||||
|
initfs/bin/bgad \
|
||||||
initfs/bin/pcid \
|
initfs/bin/pcid \
|
||||||
initfs/bin/ps2d \
|
initfs/bin/ps2d \
|
||||||
initfs/bin/redoxfs \
|
initfs/bin/redoxfs \
|
||||||
|
@ -445,6 +459,11 @@ filesystem/sbin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
|
||||||
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
|
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
|
||||||
strip $@
|
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: \
|
drivers: \
|
||||||
filesystem/sbin/pcid \
|
filesystem/sbin/pcid \
|
||||||
filesystem/sbin/e1000d \
|
filesystem/sbin/e1000d \
|
||||||
|
@ -543,6 +562,8 @@ schemes: \
|
||||||
filesystem/sbin/orbital \
|
filesystem/sbin/orbital \
|
||||||
filesystem/sbin/ptyd \
|
filesystem/sbin/ptyd \
|
||||||
filesystem/sbin/randd \
|
filesystem/sbin/randd \
|
||||||
|
filesystem/sbin/redoxfs \
|
||||||
|
filesystem/sbin/redoxfs-mkfs \
|
||||||
filesystem/sbin/tcpd \
|
filesystem/sbin/tcpd \
|
||||||
filesystem/sbin/udpd
|
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"
|
name = "AHCI storage"
|
||||||
class = 1
|
class = 1
|
||||||
subclass = 6
|
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"]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3c837e79655c4be724efb945a6345ec97c07635c
|
Subproject commit 1581174c85f7b645b15ba1ac1c3a98fb601f0fe7
|
2
rust
2
rust
|
@ -1 +1 @@
|
||||||
Subproject commit 98432be1e5b8500354f939cfd6e6c811d42f4f25
|
Subproject commit 3e15dc108c66891da04aa8c3f77162746fab4277
|
2
syscall
2
syscall
|
@ -1 +1 @@
|
||||||
Subproject commit 1908eea7e91142a058ae99c06edb2a9dd7efd692
|
Subproject commit 3377a5cd2ddfd453de5ba12f064403f21f240b65
|
Loading…
Reference in a new issue