From: dv@pseudoterminal.org Date: Fri, 24 Jan 2014 16:49:35 +0000 (+0100) Subject: image_types_fsl.bbclass: Add U-Boot SPL support X-Git-Tag: 2.1~1094 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=6818e74dd5febac34574e5e5f1aaf9789ff643a2;p=meta-freescale.git image_types_fsl.bbclass: Add U-Boot SPL support 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 --- diff --git a/meta-fsl-arm/classes/image_types_fsl.bbclass b/meta-fsl-arm/classes/image_types_fsl.bbclass index 7fd6a29d..443abf7e 100644 --- a/meta-fsl-arm/classes/image_types_fsl.bbclass +++ b/meta-fsl-arm/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