1
0
Fork 0

Build kernel

main
Mark 2024-12-16 20:50:27 -08:00
parent 0f42691db8
commit a6f7d459d1
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
4 changed files with 11 additions and 3 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -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

1
kernel Submodule

@ -0,0 +1 @@
Subproject commit d4797bbf50aa294bce404b30570f0ab6d45753ed

View File

@ -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