[meta-freescale] [meta-fsl-arm][PATCH 2/2] image_types_fsl.bbclass: Add support to install boot scripts
Otavio Salvador
otavio at ossystems.com.br
Mon Dec 10 08:06:17 PST 2012
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.
This can be placed in the machine definition or the image.
Change-Id: Ic1eafd2be3559b5c9da43dcc6f54f1b480dbc647
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
classes/image_types_fsl.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index 8414848..8a9fde4 100644
--- a/classes/image_types_fsl.bbclass
+++ b/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`"
--
1.7.10.4
More information about the meta-freescale
mailing list