From 4f8507ff8756cac446a01d7d3a28bdf4f963adf5 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 4 Feb 2024 10:25:01 +0100 Subject: more build system cleanup --- makefile | 25 ++++++++++++++++--------- util/part | 1 + 2 files changed, 17 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: diff --git a/util/part b/util/part index cf9abe5..ea4e62b 100755 --- a/util/part +++ b/util/part @@ -23,3 +23,4 @@ label: dos ,64M,0C,* ,+ ,83, EOF + -- cgit v1.2.3