Compare commits
4 Commits
7b4a5fabb4
...
0f42691db8
Author | SHA1 | Date | |
---|---|---|---|
0f42691db8 | |||
b156510422 | |||
067992221f | |||
786af6f2e6 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/build
|
||||
**/target
|
||||
*.ignore
|
||||
|
27
.gitmodules
vendored
Normal file
27
.gitmodules
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
[submodule "components/sources/bootstrap"]
|
||||
path = components/sources/bootstrap
|
||||
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
|
||||
[submodule "components/sources/init"]
|
||||
path = components/sources/init
|
||||
url = https://gitlab.redox-os.org/redox-os/init.git
|
||||
[submodule "components/sources/logd"]
|
||||
path = components/sources/logd
|
||||
url = https://gitlab.redox-os.org/redox-os/logd.git
|
||||
[submodule "components/sources/ramfs"]
|
||||
path = components/sources/ramfs
|
||||
url = https://gitlab.redox-os.org/redox-os/ramfs.git
|
||||
[submodule "components/sources/randd"]
|
||||
path = components/sources/randd
|
||||
url = https://gitlab.redox-os.org/redox-os/randd.git
|
||||
[submodule "components/sources/redoxfs"]
|
||||
path = components/sources/redoxfs
|
||||
url = https://gitlab.redox-os.org/redox-os/redoxfs.git
|
||||
[submodule "components/sources/zerod"]
|
||||
path = components/sources/zerod
|
||||
url = https://gitlab.redox-os.org/redox-os/zerod.git
|
||||
[submodule "tools/initfs"]
|
||||
path = tools/initfs
|
||||
url = https://gitlab.redox-os.org/redox-os/redox-initfs.git
|
1
components/.gitignore
vendored
Normal file
1
components/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build
|
38
components/Makefile
Normal file
38
components/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
BUILD=./build
|
||||
|
||||
TOOLCHAIN = $(CURDIR)/../tools/bin/x86_64-unknown-redox/toolchain
|
||||
CARGO = $(TOOLCHAIN)/bin/cargo
|
||||
PATH := $(TOOLCHAIN)/bin:$(PATH)
|
||||
|
||||
export AR_x86_64_unknown_redox=x86_64-unknown-redox-ar
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_REDOX_LINKER=x86_64-unknown-redox-gcc
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUNNER=../../redoxer/target/release/redoxer exec --folder .
|
||||
export CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
|
||||
export CFLAGS_riscv64gc_unknown_redox=-march=rv64gc -mabi=lp64d
|
||||
export CXX_x86_64_unknown_redox=x86_64-unknown-redox-g++
|
||||
export GNU_TARGET=x86_64-unknown-redox
|
||||
export RUSTFLAGS=-L native=${TOOLCHAIN}/lib
|
||||
export RUSTUP_TOOLCHAIN=${TOOLCHAIN}
|
||||
export TARGET=x86_64-unknown-redox
|
||||
|
||||
.PHONY: all
|
||||
all: \
|
||||
$(BUILD)/bin/init $(BUILD)/bin/logd \
|
||||
$(BUILD)/bin/ramfs $(BUILD)/bin/randd \
|
||||
$(BUILD)/bin/redoxfs $(BUILD)/bin/zerod \
|
||||
$(BUILD)/boot/bootstrap \
|
||||
$(BUILD)/bin/acpid $(BUILD)/bin/fbcond \
|
||||
$(BUILD)/bin/inputd $(BUILD)/bin/lived \
|
||||
$(BUILD)/bin/nvmed $(BUILD)/bin/pcid \
|
||||
$(BUILD)/bin/vesad \
|
||||
$(BUILD)/bin/ahcid $(BUILD)/bin/ided \
|
||||
$(BUILD)/bin/ps2d \
|
||||
$(BUILD)/bin/virtio-blkd $(BUILD)/bin/virtio-gpud \
|
||||
$(BUILD)/etc/pcid/initfs.toml
|
||||
|
||||
|
||||
|
||||
include make/simple
|
||||
include make/bootstrap
|
||||
include make/drivers
|
||||
include make/zerod
|
19
components/make/bootstrap
Normal file
19
components/make/bootstrap
Normal file
@ -0,0 +1,19 @@
|
||||
$(BUILD)/.inter/libbootstrap.a: $(shell find ./sources/bootstrap -type f -not -path "*/target/*")
|
||||
@mkdir -p $(BUILD)/.inter
|
||||
cd sources/bootstrap && \
|
||||
$(CARGO) \
|
||||
-Zbuild-std=core,alloc,compiler_builtins \
|
||||
-Zbuild-std-features=compiler-builtins-mem rustc \
|
||||
--target "x86_64-unknown-redox" \
|
||||
--release \
|
||||
-- \
|
||||
--emit link="../../$(BUILD)/.inter/libbootstrap.a"
|
||||
|
||||
$(BUILD)/boot/bootstrap: $(BUILD)/.inter/libbootstrap.a
|
||||
@mkdir -p $(BUILD)/boot
|
||||
x86_64-unknown-redox-ld \
|
||||
-o "$(BUILD)/boot/bootstrap" \
|
||||
--gc-sections \
|
||||
-T "./sources/bootstrap/src/x86_64.ld" \
|
||||
-z max-page-size=4096 \
|
||||
"$(BUILD)/.inter/libbootstrap.a"
|
75
components/make/drivers
Normal file
75
components/make/drivers
Normal file
@ -0,0 +1,75 @@
|
||||
$(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/*")
|
||||
@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 $@
|
||||
|
||||
$(BUILD)/bin/fbcond: $(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 fbcond
|
||||
cp sources/drivers/target/x86_64-unknown-redox/release/fbcond $@
|
||||
|
||||
$(BUILD)/bin/inputd: $(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 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/*")
|
||||
@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 $@
|
||||
|
||||
$(BUILD)/bin/ps2d: $(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 ps2d
|
||||
cp sources/drivers/target/x86_64-unknown-redox/release/ps2d $@
|
||||
|
||||
$(BUILD)/bin/virtio-blkd: $(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 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
|
||||
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 $@
|
35
components/make/simple
Normal file
35
components/make/simple
Normal file
@ -0,0 +1,35 @@
|
||||
$(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 $@
|
||||
|
||||
$(BUILD)/bin/zerod: $(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 $@
|
29
components/make/zerod
Normal file
29
components/make/zerod
Normal file
@ -0,0 +1,29 @@
|
||||
$(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 $@
|
@ -1,13 +1,19 @@
|
||||
$(BUILD_DIR)/filesystem:
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
rm -f $@.partial
|
||||
mkdir $@.partial
|
||||
fallocate -l 1MiB $@.partial/kernel
|
||||
mv $@.partial $@
|
||||
$(BUILD_DIR)/filesystem/boot/initfs: $(shell find ./components -type f -not -path "*/target/*")
|
||||
@mkdir -p $(BUILD_DIR)/filesystem/boot
|
||||
rm -f $@
|
||||
make -C tools
|
||||
make -C components
|
||||
./tools/bin/redox-initfs-ar --output $@ ./components/build
|
||||
|
||||
$(BUILD_DIR)/filesystem.img: $(BUILD_DIR)/filesystem
|
||||
$(BUILD_DIR)/filesystem/boot/kernel:
|
||||
@mkdir -p $(BUILD_DIR)/filesystem/boot
|
||||
rm -f $@
|
||||
fallocate -l 1MiB $(BUILD_DIR)/filesystem/boot/kernel
|
||||
|
||||
|
||||
$(BUILD_DIR)/filesystem.img: $(BUILD_DIR)/filesystem/boot/kernel $(BUILD_DIR)/filesystem/boot/initfs
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
rm -f $@.partial
|
||||
fallocate -l 254MiB $@.partial
|
||||
redoxfs-ar $@.partial $<
|
||||
redoxfs-ar $@.partial $(BUILD_DIR)/filesystem
|
||||
mv $@.partial $@
|
1
tools/.gitignore
vendored
Normal file
1
tools/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin
|
14
tools/Makefile
Normal file
14
tools/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
.PHONY: all
|
||||
all: bin/redox-initfs-ar bin/redox-initfs-dump
|
||||
|
||||
bin/redox-initfs-ar: $(shell find ./initfs -type f -not -path "*/target/*")
|
||||
@mkdir -p bin
|
||||
cd initfs/tools && \
|
||||
cargo build --release --bin redox-initfs-ar
|
||||
cp initfs/target/release/redox-initfs-ar $@
|
||||
|
||||
bin/redox-initfs-dump: $(shell find ./initfs -type f -not -path "*/target/*")
|
||||
@mkdir -p bin
|
||||
cd initfs/tools && \
|
||||
cargo build --release --bin redox-initfs-dump
|
||||
cp initfs/target/release/redox-initfs-dump $@
|
1
tools/initfs
Submodule
1
tools/initfs
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d0802237d7894881df7ddd338dfc64220d0646ff
|
Loading…
x
Reference in New Issue
Block a user