[yocto] [meta-raspberrypi][PATCH 2/3] sdcard_image-rpi.bbclass: include boot.scr if present

Jonathan Liu net147 at gmail.com
Sun Oct 25 23:46:26 PDT 2015


Allows including a script to use for U-Boot.

Signed-off-by: Jonathan Liu <net147 at gmail.com>
---
 classes/sdcard_image-rpi.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 2efc36d..c6995b6 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -128,6 +128,9 @@ IMAGE_CMD_rpi-sdimg () {
 	"uImage")
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::${SDIMG_KERNELIMAGE}
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
+		if [ -e "${DEPLOY_DIR_IMAGE}/boot.scr" ]; then
+			mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr
+		fi
 		;;
 	*)
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
-- 
2.6.1




More information about the yocto mailing list