From: Otavio Salvador Date: Mon, 10 Dec 2012 12:14:25 +0000 (-0200) Subject: image_types_fsl.bbclass: Add support to install boot scripts X-Git-Tag: 2.1~1587 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=1d78db4d08aa3f6fd6840a0d3a85f3299b439b3d;p=meta-freescale.git image_types_fsl.bbclass: Add support to install boot scripts Some machines might want to provide boot scripts for use. This now can be accomplished using BOOT_SCRIPTS variable in following format: : Thus any file in deploy directory can be installed in the boot partition of the sdcard, easily. Change-Id: Ic1eafd2be3559b5c9da43dcc6f54f1b480dbc647 Signed-off-by: Otavio Salvador --- diff --git a/meta-fsl-arm/classes/image_types_fsl.bbclass b/meta-fsl-arm/classes/image_types_fsl.bbclass index 8414848c..8a9fde4f 100644 --- a/meta-fsl-arm/classes/image_types_fsl.bbclass +++ b/meta-fsl-arm/classes/image_types_fsl.bbclass @@ -119,6 +119,16 @@ generate_imx_sdcard () { | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }') mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ::/uImage + + # Copy boot scripts + for item in ${BOOT_SCRIPTS}; do + src=`echo $item | awk -F':' '{ print $1 }'` + dst=`echo $item | awk -F':' '{ print $2 }'` + + mcopy -i ${WORKDIR}/boot.img -s $src ::/$dst + done + + # Copy device tree file if [ -e "${KERNEL_IMAGETYPE}-${MACHINE}.dtb" ]; then kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`" kernel_dtb="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.dtb`"