imx6: image: Split imx6-sdcard image for reusability

I'm going to reuse the imx6-sdcard image commands for building of Apalis
eMMC images.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
openwrt-19.07
Petr Štetiar 2018-11-23 09:25:13 +01:00
parent adb0a420e5
commit dc1a73984e
1 changed files with 16 additions and 3 deletions

View File

@ -58,11 +58,16 @@ define Build/boot-scr
$(BIN_DIR)/boot.scr $(BIN_DIR)/boot.scr
endef endef
define Build/imx6-sdcard define Build/imx6-combined-image-prepare
rm -rf $@.boot rm -rf $@.boot
mkdir -p $@.boot mkdir -p $@.boot
endef
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img $@.boot/u-boot.img define Build/imx6-combined-image-clean
rm -rf $@.boot $@.fs
endef
define Build/imx6-combined-image
$(CP) $(IMAGE_KERNEL) $@.boot/uImage $(CP) $(IMAGE_KERNEL) $@.boot/uImage
$(foreach dts,$(DEVICE_DTS), \ $(foreach dts,$(DEVICE_DTS), \
@ -84,10 +89,18 @@ define Build/imx6-sdcard
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \
$@.fs \ $@.fs \
1024 1024
endef
define Build/imx6-sdcard
$(Build/imx6-combined-image-prepare)
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img $@.boot/u-boot.img
$(Build/imx6-combined-image)
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
rm -rf $@.boot $@.fs $(Build/imx6-combined-image-clean)
endef
endef endef
################################################# #################################################