diff --git a/.gitmodules b/.gitmodules index c1243a2..1582c66 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,25 +3,25 @@ url = https://gitlab.redox-os.org/redox-os/bootstrap.git [submodule "components/sources/drivers"] path = components/sources/drivers - url = https://gitlab.redox-os.org/redox-os/drivers.git + url = https://gitlab.redox-os.org/redox-os/drivers [submodule "components/sources/init"] path = components/sources/init - url = https://gitlab.redox-os.org/redox-os/init.git + url = https://gitlab.redox-os.org/redox-os/init [submodule "components/sources/logd"] path = components/sources/logd - url = https://gitlab.redox-os.org/redox-os/logd.git + url = https://gitlab.redox-os.org/redox-os/logd [submodule "components/sources/ramfs"] path = components/sources/ramfs - url = https://gitlab.redox-os.org/redox-os/ramfs.git + url = https://gitlab.redox-os.org/redox-os/ramfs [submodule "components/sources/randd"] path = components/sources/randd - url = https://gitlab.redox-os.org/redox-os/randd.git + url = https://gitlab.redox-os.org/redox-os/randd [submodule "components/sources/redoxfs"] path = components/sources/redoxfs - url = https://gitlab.redox-os.org/redox-os/redoxfs.git + url = https://gitlab.redox-os.org/redox-os/redoxfs [submodule "components/sources/zerod"] path = components/sources/zerod - url = https://gitlab.redox-os.org/redox-os/zerod.git + url = https://gitlab.redox-os.org/redox-os/zerod [submodule "tools/initfs"] path = tools/initfs url = https://gitlab.redox-os.org/redox-os/redox-initfs.git diff --git a/components/Makefile b/components/Makefile index a3e7fa7..f526457 100644 --- a/components/Makefile +++ b/components/Makefile @@ -19,20 +19,22 @@ export TARGET=x86_64-unknown-redox all: \ $(BUILD)/bin/init $(BUILD)/bin/logd \ $(BUILD)/bin/ramfs $(BUILD)/bin/randd \ - $(BUILD)/bin/redoxfs $(BUILD)/bin/zerod \ + $(BUILD)/bin/redoxfs $(BUILD)/bin/zerod $(BUILD)/bin/nulld \ $(BUILD)/boot/bootstrap \ $(BUILD)/bin/acpid $(BUILD)/bin/fbcond \ $(BUILD)/bin/inputd $(BUILD)/bin/lived \ - $(BUILD)/bin/nvmed $(BUILD)/bin/pcid \ + $(BUILD)/lib/drivers/nvmed $(BUILD)/bin/pcid \ $(BUILD)/bin/vesad \ - $(BUILD)/bin/ahcid $(BUILD)/bin/ided \ + $(BUILD)/lib/drivers/ahcid $(BUILD)/lib/drivers/ided \ $(BUILD)/bin/ps2d \ - $(BUILD)/bin/virtio-blkd $(BUILD)/bin/virtio-gpud \ - $(BUILD)/etc/pcid/initfs.toml - - + $(BUILD)/lib/drivers/virtio-blkd $(BUILD)/lib/drivers/virtio-gpud \ + $(BUILD)/etc/pcid/initfs.toml \ + $(BUILD)/etc/init.rc include make/simple include make/bootstrap include make/drivers -include make/zerod \ No newline at end of file + +$(BUILD)/etc/init.rc: ./init.rc + @mkdir -p $(BUILD)/etc + cp -v "init.rc" "$@" diff --git a/components/init.rc b/components/init.rc new file mode 100644 index 0000000..bdeb376 --- /dev/null +++ b/components/init.rc @@ -0,0 +1,24 @@ +export PATH /bin +export RUST_BACKTRACE 1 +nulld +zerod +randd +inputd +vesad G G G +unset FRAMEBUFFER_ADDR FRAMEBUFFER_VIRT FRAMEBUFFER_WIDTH FRAMEBUFFER_HEIGHT FRAMEBUFFER_STRIDE +#TODO: unset FRAMEBUFFER1 and beyond? +fbcond 1 2 +logd /scheme/debug /scheme/fbcon/1 +stdio /scheme/log +ramfs logging +ps2d us +acpid +pcid /etc/pcid/initfs.toml +lived +unset DISK_LIVE_ADDR DISK_LIVE_SIZE +redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK +unset REDOXFS_UUID REDOXFS_BLOCK REDOXFS_PASSWORD_ADDR REDOXFS_PASSWORD_SIZE +set-default-scheme file +cd / +export PATH /usr/bin +run.d /usr/lib/init.d /etc/init.d diff --git a/components/make/drivers b/components/make/drivers index 8ffd5bf..5503e56 100644 --- a/components/make/drivers +++ b/components/make/drivers @@ -1,12 +1,16 @@ +# These are special + $(BUILD)/etc/pcid/initfs.toml: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/etc/pcid cp sources/drivers/initfs.toml $@ -$(BUILD)/bin/acpid: $(shell find ./sources/drivers -type f -not -path "*/target/*") +# These go in bin + +$(BUILD)/bin/pcid: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p acpid - cp sources/drivers/target/x86_64-unknown-redox/release/acpid $@ + $(CARGO) build --release --target x86_64-unknown-redox -p pcid + cp sources/drivers/target/x86_64-unknown-redox/release/pcid $@ $(BUILD)/bin/fbcond: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin @@ -20,41 +24,17 @@ $(BUILD)/bin/inputd: $(shell find ./sources/drivers -type f -not -path "*/target $(CARGO) build --release --target x86_64-unknown-redox -p inputd cp sources/drivers/target/x86_64-unknown-redox/release/inputd $@ -$(BUILD)/bin/lived: $(shell find ./sources/drivers -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p lived - cp sources/drivers/target/x86_64-unknown-redox/release/lived $@ - -$(BUILD)/bin/nvmed: $(shell find ./sources/drivers -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p nvmed - cp sources/drivers/target/x86_64-unknown-redox/release/nvmed $@ - -$(BUILD)/bin/pcid: $(shell find ./sources/drivers -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p pcid - cp sources/drivers/target/x86_64-unknown-redox/release/pcid $@ - $(BUILD)/bin/vesad: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin cd sources/drivers && \ $(CARGO) build --release --target x86_64-unknown-redox -p vesad cp sources/drivers/target/x86_64-unknown-redox/release/vesad $@ -$(BUILD)/bin/ahcid: $(shell find ./sources/drivers -type f -not -path "*/target/*") +$(BUILD)/bin/lived: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p ahcid - cp sources/drivers/target/x86_64-unknown-redox/release/ahcid $@ - -$(BUILD)/bin/ided: $(shell find ./sources/drivers -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/drivers && \ - $(CARGO) build --release --target x86_64-unknown-redox -p ided - cp sources/drivers/target/x86_64-unknown-redox/release/ided $@ + $(CARGO) build --release --target x86_64-unknown-redox -p lived + cp sources/drivers/target/x86_64-unknown-redox/release/lived $@ $(BUILD)/bin/ps2d: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin @@ -62,14 +42,41 @@ $(BUILD)/bin/ps2d: $(shell find ./sources/drivers -type f -not -path "*/target/* $(CARGO) build --release --target x86_64-unknown-redox -p ps2d cp sources/drivers/target/x86_64-unknown-redox/release/ps2d $@ -$(BUILD)/bin/virtio-blkd: $(shell find ./sources/drivers -type f -not -path "*/target/*") +$(BUILD)/bin/acpid: $(shell find ./sources/drivers -type f -not -path "*/target/*") @mkdir -p $(BUILD)/bin + cd sources/drivers && \ + $(CARGO) build --release --target x86_64-unknown-redox -p acpid + cp sources/drivers/target/x86_64-unknown-redox/release/acpid $@ + +# These go in lib + +$(BUILD)/lib/drivers/nvmed: $(shell find ./sources/drivers -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/lib/drivers + cd sources/drivers && \ + $(CARGO) build --release --target x86_64-unknown-redox -p nvmed + cp sources/drivers/target/x86_64-unknown-redox/release/nvmed $@ + + +$(BUILD)/lib/drivers/ahcid: $(shell find ./sources/drivers -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/lib/drivers + cd sources/drivers && \ + $(CARGO) build --release --target x86_64-unknown-redox -p ahcid + cp sources/drivers/target/x86_64-unknown-redox/release/ahcid $@ + +$(BUILD)/lib/drivers/ided: $(shell find ./sources/drivers -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/lib/drivers + cd sources/drivers && \ + $(CARGO) build --release --target x86_64-unknown-redox -p ided + cp sources/drivers/target/x86_64-unknown-redox/release/ided $@ + +$(BUILD)/lib/drivers/virtio-blkd: $(shell find ./sources/drivers -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/lib/drivers cd sources/drivers && \ $(CARGO) build --release --target x86_64-unknown-redox -p virtio-blkd cp sources/drivers/target/x86_64-unknown-redox/release/virtio-blkd $@ -$(BUILD)/bin/virtio-gpud: $(shell find ./sources/drivers -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin +$(BUILD)/lib/drivers/virtio-gpud: $(shell find ./sources/drivers -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/lib/drivers cd sources/drivers && \ $(CARGO) build --release --target x86_64-unknown-redox -p virtio-gpud cp sources/drivers/target/x86_64-unknown-redox/release/virtio-gpud $@ \ No newline at end of file diff --git a/components/make/simple b/components/make/simple index 7a633bf..895e1e8 100644 --- a/components/make/simple +++ b/components/make/simple @@ -33,3 +33,9 @@ $(BUILD)/bin/zerod: $(shell find ./sources/zerod -type f -not -path "*/target/*" cd sources/zerod && \ $(CARGO) build --release --target x86_64-unknown-redox --bin zerod cp sources/zerod/target/x86_64-unknown-redox/release/zerod $@ + +$(BUILD)/bin/nulld: $(shell find ./sources/zerod -type f -not -path "*/target/*") + @mkdir -p $(BUILD)/bin + cd sources/zerod && \ + $(CARGO) build --release --target x86_64-unknown-redox --bin zerod + cp sources/zerod/target/x86_64-unknown-redox/release/zerod $@ diff --git a/components/make/zerod b/components/make/zerod deleted file mode 100644 index 64a4025..0000000 --- a/components/make/zerod +++ /dev/null @@ -1,29 +0,0 @@ -$(BUILD)/bin/init: $(shell find ./sources/init -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/init && \ - $(CARGO) build --release --target x86_64-unknown-redox - cp sources/init/target/x86_64-unknown-redox/release/init $@ - -$(BUILD)/bin/logd: $(shell find ./sources/logd -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/logd && \ - $(CARGO) build --release --target x86_64-unknown-redox - cp sources/logd/target/x86_64-unknown-redox/release/logd $@ - -$(BUILD)/bin/ramfs: $(shell find ./sources/ramfs -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/ramfs && \ - $(CARGO) build --release --target x86_64-unknown-redox - cp sources/ramfs/target/x86_64-unknown-redox/release/ramfs $@ - -$(BUILD)/bin/randd: $(shell find ./sources/randd -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/randd && \ - $(CARGO) build --release --target x86_64-unknown-redox - cp sources/randd/target/x86_64-unknown-redox/release/randd $@ - -$(BUILD)/bin/redoxfs: $(shell find ./sources/redoxfs -type f -not -path "*/target/*") - @mkdir -p $(BUILD)/bin - cd sources/redoxfs && \ - $(CARGO) build --release --target x86_64-unknown-redox - cp sources/redoxfs/target/x86_64-unknown-redox/release/redoxfs $@ diff --git a/components/sources/bootstrap b/components/sources/bootstrap new file mode 160000 index 0000000..3891c09 --- /dev/null +++ b/components/sources/bootstrap @@ -0,0 +1 @@ +Subproject commit 3891c09081b2cb678a8ac28994a0ee4398ed79e1 diff --git a/components/sources/drivers b/components/sources/drivers new file mode 160000 index 0000000..5cf8bfd --- /dev/null +++ b/components/sources/drivers @@ -0,0 +1 @@ +Subproject commit 5cf8bfda72b526d32eac6d8f094c4f37b1a7e555 diff --git a/components/sources/init b/components/sources/init new file mode 160000 index 0000000..e9d755a --- /dev/null +++ b/components/sources/init @@ -0,0 +1 @@ +Subproject commit e9d755a281c6a2b94efcca756a40916f4ba6de64 diff --git a/components/sources/logd b/components/sources/logd new file mode 160000 index 0000000..ff730a4 --- /dev/null +++ b/components/sources/logd @@ -0,0 +1 @@ +Subproject commit ff730a41b2c458f46a26a658f06ce92be4723153 diff --git a/components/sources/ramfs b/components/sources/ramfs new file mode 160000 index 0000000..10e38e1 --- /dev/null +++ b/components/sources/ramfs @@ -0,0 +1 @@ +Subproject commit 10e38e1571c82a73c98efb0edd32b45a9ff2fb7e diff --git a/components/sources/randd b/components/sources/randd new file mode 160000 index 0000000..fab7a65 --- /dev/null +++ b/components/sources/randd @@ -0,0 +1 @@ +Subproject commit fab7a65ee3ab1d0814c93f667e502b8e58eaee7d diff --git a/components/sources/redoxfs b/components/sources/redoxfs new file mode 160000 index 0000000..90fbcab --- /dev/null +++ b/components/sources/redoxfs @@ -0,0 +1 @@ +Subproject commit 90fbcab52e861a3c9d2187f70d6a50d518ef9d97 diff --git a/components/sources/zerod b/components/sources/zerod new file mode 160000 index 0000000..d355a74 --- /dev/null +++ b/components/sources/zerod @@ -0,0 +1 @@ +Subproject commit d355a74e99c140bc56843291fe4a27db59617008 diff --git a/tools/.gitignore b/tools/.gitignore index ba077a4..0c885a5 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1 +1,2 @@ -bin +bin/redox-initfs-ar +bin/redox-initfs-dump diff --git a/tools/bin/redox-initfs-ar b/tools/bin/redox-initfs-ar deleted file mode 100755 index 8cf4f5c..0000000 Binary files a/tools/bin/redox-initfs-ar and /dev/null differ diff --git a/tools/bin/redox-initfs-dump b/tools/bin/redox-initfs-dump deleted file mode 100755 index 2f12120..0000000 Binary files a/tools/bin/redox-initfs-dump and /dev/null differ