]> code.ossystems Code Review - meta-freescale.git/commitdiff
image_types_fsl.bbclass: Add support to install boot scripts
authorOtavio Salvador <otavio@ossystems.com.br>
Mon, 10 Dec 2012 12:14:25 +0000 (10:14 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 12 Dec 2012 17:29:38 +0000 (15:29 -0200)
Some machines might want to provide boot scripts for use. This now can
be accomplished using BOOT_SCRIPTS variable in following format:

  <source>:<destination>

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 <otavio@ossystems.com.br>
meta-fsl-arm/classes/image_types_fsl.bbclass

index 8414848ca76d15af6119b7cb16cd30b977f416fa..8a9fde4f5f0ea04d72696d109d3ce96562773adf 100644 (file)
@@ -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`"