build: add initial Bootloader implementation

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-01-23 21:43:03 +02:00
parent a4c5ab7ef3
commit a8ff50541a
30 changed files with 1424 additions and 25 deletions

View File

@ -101,13 +101,17 @@ endif
tools:
make --quiet -C tools all
setup:
prepare:
make --quiet -C Kernel prepare
make --quiet -C Bootloader prepare
make --quiet -C Drivers prepare
make --quiet -C Userspace prepare
setup:
$(MAKE) prepare
$(MAKE) tools
build: build_kernel build_userspace build_drivers build_image
build: build_kernel build_bootloader build_userspace build_drivers build_image
dump:
make --quiet -C Kernel dump
@ -123,9 +127,9 @@ ifeq ($(BUILD_KERNEL), 1)
make -j$(shell nproc) $(MAKE_QUIET_FLAG) -C Kernel build
endif
build_userspace:
ifeq ($(BUILD_USERSPACE), 1)
make $(MAKE_QUIET_FLAG) -C Userspace build
build_bootloader:
ifeq ($(BUILD_BOOTLOADER), 1)
make $(MAKE_QUIET_FLAG) -C Bootloader build
endif
build_drivers:
@ -133,6 +137,11 @@ ifeq ($(BUILD_DRIVERS), 1)
make $(MAKE_QUIET_FLAG) -C Drivers build
endif
build_userspace:
ifeq ($(BUILD_USERSPACE), 1)
make $(MAKE_QUIET_FLAG) -C Userspace build
endif
build_image:
mkdir -p iso_tmp_data
mkdir -p initrd_tmp_data
@ -171,6 +180,7 @@ ifeq ($(BOOTLOADER), grub)
endif
ifneq ($(filter aarch64 arm,$(OSARCH)),)
$(__CONF_OBJCOPY) Kernel/fennix.elf -O binary $(OSNAME).img
# cp Bootloader/boot.bin $(OSNAME).img
endif
ifeq ($(OSARCH), amd64)