diff --git a/.gitmodules b/.gitmodules index 2f687c1..c1243a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "tools/initfs"] path = tools/initfs url = https://gitlab.redox-os.org/redox-os/redox-initfs.git +[submodule "kernel"] + path = kernel + url = https://gitlab.redox-os.org/redox-os/kernel.git diff --git a/Makefile b/Makefile index c75189e..de529a0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ BUILD_DIR=./build export QEMU?=qemu-system-x86_64 +TOOLCHAIN = $(CURDIR)/tools/bin/x86_64-unknown-redox/toolchain +export PATH := $(TOOLCHAIN)/bin:$(PATH) +export CARGO := $(TOOLCHAIN)/bin/cargo + # Default rule .PHONY: default default: bios diff --git a/kernel b/kernel new file mode 160000 index 0000000..d4797bb --- /dev/null +++ b/kernel @@ -0,0 +1 @@ +Subproject commit d4797bbf50aa294bce404b30570f0ab6d45753ed diff --git a/make/filesystem b/make/filesystem index b495d3f..123b4b0 100644 --- a/make/filesystem +++ b/make/filesystem @@ -5,10 +5,10 @@ $(BUILD_DIR)/filesystem/boot/initfs: $(shell find ./components -type f -not -pat make -C components ./tools/bin/redox-initfs-ar --output $@ ./components/build -$(BUILD_DIR)/filesystem/boot/kernel: +$(BUILD_DIR)/filesystem/boot/kernel: $(shell find ./kernel -type f -not -path "*/target/*") @mkdir -p $(BUILD_DIR)/filesystem/boot - rm -f $@ - fallocate -l 1MiB $(BUILD_DIR)/filesystem/boot/kernel + cd ./kernel && make + cp -v kernel/kernel "$@" $(BUILD_DIR)/filesystem.img: $(BUILD_DIR)/filesystem/boot/kernel $(BUILD_DIR)/filesystem/boot/initfs