Selaa lähdekoodia

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 <[email protected]>
Petr Štetiar 7 vuotta sitten
vanhempi
sitoutus
dc1a73984e
1 muutettua tiedostoa jossa 16 lisäystä ja 3 poistoa
  1. 16 3
      target/linux/imx6/image/Makefile

+ 16 - 3
target/linux/imx6/image/Makefile

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