summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2018-04-21 05:40:20 +0000
committerPraneeth Bajjuri <praneeth@ti.com>2018-04-20 18:58:59 -0500
commit7fbafa51ada11ae6aafdc63a73205496793dda43 (patch)
tree393ae87abe9154905ef675d0dddf36949c852a4d
parentbedeca515f161f6e90f70788e2041b8911a74ee6 (diff)
downloadam57xevm-7fbafa51ada11ae6aafdc63a73205496793dda43.tar.gz
am57xevm: Build FIT image
In addition to already generated regular boot.img, build also FIT image containing: - zImage - ramdisk - dtb files - dtbo files - boards configurations info Resulting image will be named boot_fit.img and will be placed to $(PRODUCT_OUT) dir. One can disable the generation of FIT boot image by disabling TARGET_BOOTIMAGE_FIT option in BoardConfig.mk file. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rw-r--r--BoardConfig.mk1
-rw-r--r--build/tasks/boot_fit.mk25
2 files changed, 26 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index f49a357..5f2ea2e 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -21,6 +21,7 @@ TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
+TARGET_BOOTIMAGE_FIT := true
TARGET_NO_BOOTLOADER := true # We use externally built U-Boot
ENABLE_CPUSETS := true
diff --git a/build/tasks/boot_fit.mk b/build/tasks/boot_fit.mk
new file mode 100644
index 0000000..a5441d7
--- /dev/null
+++ b/build/tasks/boot_fit.mk
@@ -0,0 +1,25 @@
+ifneq ($(filter am57xevm%, $(TARGET_DEVICE)),)
+ifeq ($(TARGET_BOOTIMAGE_FIT), true)
+
+MKIMAGE := $(shell type -path mkimage)
+DTC_FLAGS_MKIMAGE = -I dts -O dtb -p 500 -Wno-unit_address_vs_reg \
+ -i arch/arm/boot/dts/ti
+BOARD_DIR := device/ti/am57xevm
+FIT_DIR := $(PRODUCT_OUT)/obj/fit
+ITS := am57xx-evm.its
+BOOTIMG_FIT := $(PRODUCT_OUT)/boot_fit.img
+
+$(BOOTIMG_FIT): $(INSTALLED_KERNEL_TARGET) $(INSTALLED_RAMDISK_TARGET)
+# $@ is referring to $(BOOTIMG_FIT)
+ mkdir -p $(FIT_DIR)
+ cp $(BOARD_DIR)/$(ITS) $(FIT_DIR)
+ cp $(PRODUCT_OUT)/ramdisk.img $(FIT_DIR)
+ cp $(KERNELDIR)/arch/arm/boot/zImage $(FIT_DIR)
+ cp $(KERNELDIR)/arch/arm/boot/dts/ti/*.dtb $(FIT_DIR)
+ cp $(KERNELDIR)/arch/arm/boot/dts/ti/*.dtbo $(FIT_DIR)
+ $(MKIMAGE) -D "$(DTC_FLAGS_MKIMAGE)" -f $(FIT_DIR)/$(ITS) $(BOOTIMG_FIT)
+
+droidcore: $(BOOTIMG_FIT)
+
+endif
+endif