From 2d11b1612d5c5584f97d3245b88ce2ec34822bc6 Mon Sep 17 00:00:00 2001 From: "dv@pseudoterminal.org" Date: Fri, 24 Jan 2014 17:49:35 +0100 Subject: 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 --- classes/image_types_fsl.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'classes') 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 -- cgit v1.2.3-54-g00ecf