[meta-freescale] [meta-fsl-arm][PATCH] image_types_fsl.bbclass: Add U-Boot SPL support

Carlos Rafael Giani dv at pseudoterminal.org
Fri Jan 24 08:49:35 PST 2014


If the SPL_BINARY value is not empty, then the class will use
an alternative code path for copying U-Boot on the SD card.
u-boot.img is used (not .imx), and the SPL binary is prepended.
With empty SPL_BINARY values, the behavior is just like before.

Signed-off-by: Carlos Rafael Giani <dv at pseudoterminal.org>
---
 classes/image_types_fsl.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index 7fd6a29..443abf7 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -115,7 +115,12 @@ generate_imx_sdcard () {
 		exit 1
 		;;
 		u-boot)
-		dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512
+		if [ -n "${SPL_BINARY}" ]; then
+			dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=2 bs=512
+			dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=42 bs=1K
+		else
+			dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512
+		fi
 		;;
 		barebox)
 		dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512
-- 
1.8.5.2



More information about the meta-freescale mailing list