aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-04 10:25:01 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-04 10:25:01 +0100
commit4f8507ff8756cac446a01d7d3a28bdf4f963adf5 (patch)
tree5fdeb7eb894d6fb182334f9b76ef2ef99573c554 /makefile
parent68d85131156484d88c9a9fb07aeb4d56043692c3 (diff)
more build system cleanup
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
1 files changed, 16 insertions, 9 deletions
diff --git a/makefile b/makefile
index 102536b..bd6754f 100644
--- a/makefile
+++ b/makefile
@@ -12,7 +12,9 @@ GIT := git
CTR_IMG_TAG := avans-linux
-CTRIZE := $(CTR) run --rm --interactive --tty
+CTRIZE := $(CTR) run
+CTRIZE += --rm
+CTRIZE += --tty
CTRIZE += --volume /tmp:/tmp:rw
CTRIZE += --volume .:/workdir:rw
CTRIZE += --env-file ./env
@@ -53,26 +55,31 @@ state/sdcard_fmt: state/sdcard_part
$(AS_ROOT) mkfs.ext4 -L ROOTFS -F $(SDCARD_PART_ROOTFS)
touch $@
-BOOTLOADER_FILES += bootloader/MLO
-BOOTLOADER_FILES += bootloader/u-boot.img
-BOOTLOADER_FILES += bootloader/u-boot.dtb
bootloader/.config: state/submodules
$(CTRIZE) $(MAKE) -C bootloader am335x_evm_config
-$(BOOTLOADER_FILES): bootloader/.config
+.PHONY: build_bootloader
+build_bootloader: bootloader/.config
$(CTRIZE) $(MAKE) -C bootloader
+BOOTLOADER_FILES += bootloader/u-boot.img
+BOOTLOADER_FILES += bootloader/u-boot.dtb
+BOOTLOADER_FILES += bootloader/MLO
+$(BOOTLOADER_FILES): build_bootloader
-KERNEL_FILES += kernel/arch/arm/boot/dts/am335x-boneblack.dtb
-KERNEL_FILES += kernel/arch/arm/boot/zImage
kernel/.config: state/submodules
$(CTRIZE) $(MAKE) -C kernel bb.org_defconfig
-$(KERNEL_FILES): kernel/.config
+.PHONY: build_kernel
+build_kernel: kernel/.config
$(CTRIZE) $(MAKE) -C kernel zImage
+KERNEL_FILES += kernel/arch/$(ARCH)/boot/dts/am335x-boneblack.dtb
+KERNEL_FILES += kernel/arch/$(ARCH)/boot/zImage
+$(KERNEL_FILES): build_kernel
.PHONY: load_boot load_rootfs
-load_boot: $(BOOTLOADER_FILES) $(KERNEL_FILES)
+load_boot: $(BOOTLOADER_FILES)# $(KERNEL_FILES)
mkdir -p mnt/boot
$(MOUNT) $(SDCARD_PART_BOOT) mnt/boot
$(AS_ROOT) $(CP) $^ mnt/boot
+ $(AS_ROOT) sync
$(UMOUNT) mnt/boot
load_rootfs: