Build kernel
parent
0f42691db8
commit
a6f7d459d1
|
@ -25,3 +25,6 @@
|
||||||
[submodule "tools/initfs"]
|
[submodule "tools/initfs"]
|
||||||
path = tools/initfs
|
path = tools/initfs
|
||||||
url = https://gitlab.redox-os.org/redox-os/redox-initfs.git
|
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
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -1,6 +1,10 @@
|
||||||
BUILD_DIR=./build
|
BUILD_DIR=./build
|
||||||
export QEMU?=qemu-system-x86_64
|
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
|
# Default rule
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
default: bios
|
default: bios
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d4797bbf50aa294bce404b30570f0ab6d45753ed
|
|
@ -5,10 +5,10 @@ $(BUILD_DIR)/filesystem/boot/initfs: $(shell find ./components -type f -not -pat
|
||||||
make -C components
|
make -C components
|
||||||
./tools/bin/redox-initfs-ar --output $@ ./components/build
|
./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
|
@mkdir -p $(BUILD_DIR)/filesystem/boot
|
||||||
rm -f $@
|
cd ./kernel && make
|
||||||
fallocate -l 1MiB $(BUILD_DIR)/filesystem/boot/kernel
|
cp -v kernel/kernel "$@"
|
||||||
|
|
||||||
|
|
||||||
$(BUILD_DIR)/filesystem.img: $(BUILD_DIR)/filesystem/boot/kernel $(BUILD_DIR)/filesystem/boot/initfs
|
$(BUILD_DIR)/filesystem.img: $(BUILD_DIR)/filesystem/boot/kernel $(BUILD_DIR)/filesystem/boot/initfs
|
||||||
|
|
Loading…
Reference in New Issue