diff options
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -26,7 +26,7 @@ include ./env export .PHONY: all -all: +all: load_boot load_rootfs .PHONY: sd_format sd_partition sd_format: state/sdcard_fmt @@ -52,7 +52,6 @@ state/sdcard_fmt: state/sdcard_part bootloader/.config: state/submodules state/container_img $(CTRIZE) $(MAKE) -C bootloader am335x_evm_config -.PHONY: build_bootloader build_bootloader: bootloader/.config state/container_img $(CTRIZE) $(MAKE) -C bootloader uboot.env: uboot.txt @@ -66,13 +65,22 @@ $(BOOTLOADER_FILES): build_bootloader kernel/.config: state/submodules state/container_img $(CTRIZE) $(MAKE) -C kernel bb.org_defconfig -.PHONY: build_kernel build_kernel: kernel/.config state/container_img $(CTRIZE) $(MAKE) -C kernel zImage am335x-boneblack.dtb KERNEL_FILES += kernel/arch/$(ARCH)/boot/dts/am335x-boneblack.dtb KERNEL_FILES += kernel/arch/$(ARCH)/boot/zImage $(KERNEL_FILES): build_kernel +busybox/.config: state/submodules state/container_img + $(CTRIZE) $(MAKE) -C busybox defconfig + sed -i 's/^[# ]*CONFIG_STATIC\>.*$$/CONFIG_STATIC=y/' $@ + sed -i 's/^[# ]*CONFIG_PREFIX\>.*$$/CONFIG_PREFIX=".\/rootfs"/' $@ +busybox/busybox: busybox/.config state/container_img + $(CTRIZE) $(MAKE) -C busybox +busybox/_install: busybox/busybox state/container_img + $(CTRIZE) $(MAKE) -C busybox install +build_busybox: busybox/busybox + # NOTE: ordering is important! FILES_PART_BOOT += $(BOOTLOADER_FILES) FILES_PART_BOOT += $(KERNEL_FILES) @@ -84,12 +92,12 @@ load_boot: $(FILES_PART_BOOT) state/sdcard_fmt $(AS_ROOT) sync $(AS_ROOT) umount mnt/boot -# TODO -# FILES_PART_ROOTFS += .... -load_rootfs: state/sdcard_fmt +FILES_PART_ROOTFS += $(shell find rootfs) +FILES_PART_ROOTFS += busybox/rootfs +load_rootfs: $(FILES_PART_ROOTFS) state/sdcard_fmt mkdir -p mnt/rootfs $(AS_ROOT) mount $(SDCARD_PART_ROOTFS) mnt/rootfs - $(AS_ROOT) cp $(FILES_PART_ROOTFS) mnt/boot + $(AS_ROOT) util/mkrootfs mnt/rootfs $(AS_ROOT) sync $(AS_ROOT) umount mnt/rootfs |