aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/makefile b/makefile
index e3a1564..f29ed2a 100644
--- a/makefile
+++ b/makefile
@@ -55,37 +55,42 @@ state/sdcard_fmt: state/sdcard_part
$(AS_ROOT) mkfs.ext4 -L ROOTFS -F $(SDCARD_PART_ROOTFS)
touch $@
-bootloader/.config: state/submodules
+bootloader/.config: state/submodules state/container_img
$(CTRIZE) $(MAKE) -C bootloader am335x_evm_config
.PHONY: build_bootloader
-build_bootloader: bootloader/.config
+build_bootloader: bootloader/.config state/container_img
$(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/.config: state/submodules
+kernel/.config: state/submodules state/container_img
$(CTRIZE) $(MAKE) -C kernel bb.org_defconfig
.PHONY: build_kernel
-build_kernel: kernel/.config
+build_kernel: kernel/.config state/container_img
$(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
+FILES_PART_BOOT += $(BOOTLOADER_FILES)
+FILES_PART_BOOT += $(KERNEL_FILES)
.PHONY: load_boot load_rootfs
-load_boot: $(BOOTLOADER_FILES)# $(KERNEL_FILES)
+load_boot: $(FILES_PART_BOOT) state/sdcard_fmt
mkdir -p mnt/boot
$(MOUNT) $(SDCARD_PART_BOOT) mnt/boot
- $(AS_ROOT) $(CP) $^ mnt/boot
+ $(AS_ROOT) $(CP) $(FILES_PART_BOOT) mnt/boot
$(AS_ROOT) sync
$(UMOUNT) mnt/boot
-load_rootfs:
+# TODO
+# FILES_PART_ROOTFS += ....
+load_rootfs: state/sdcard_fmt
mkdir -p mnt/rootfs
$(MOUNT) $(SDCARD_PART_ROOTFS) mnt/rootfs
- # TODO
+ $(AS_ROOT) $(CP) $(FILES_PART_ROOTFS) mnt/boot
+ $(AS_ROOT) sync
$(UMOUNT) mnt/rootfs
.PHONY: status