From 6818e74dd5febac34574e5e5f1aaf9789ff643a2 Mon Sep 17 00:00:00 2001 From: "dv@pseudoterminal.org" Date: Fri, 24 Jan 2014 17:49:35 +0100 Subject: [PATCH] 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 --- meta-fsl-arm/classes/image_types_fsl.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.40.1