Flexibilize sdcard generation
cover Flexibilize sdcard generation
There're some use cases where we might need to have an sdcard with no bootloader (as it might be provided in the board in SPI NOR, for example) and use of boot scripts. This patchset adds this flexibility to iMX machines.
Otavio Salvador (2):
image_types_fsl.bbclass: Add support to not use bootloader for iMX image_types_fsl.bbclass: Add support to install boot scripts
classes/image_types_fsl.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Signature · 1 line
1.7.10.4
PATCH 1/2 image_types_fsl.bbclass: Add support to not use bootloader for iMX
Some machines might come with a bootloader in an internal flash (a SPI NOR, for example) so not requiring a boot loader in the image.
--- classes/image_types_fsl.bbclass | 2 ++ 1 file changed, 2 insertions(+)
classes/image_types_fsl.bbclass +2 -0
@@ -106,6 +106,8 @@ generate_imx_sdcard () { dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512 dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 bs=512k ;; + "") + ;; *) bberror "Unkown IMAGE_BOOTLOADER value" exit 1
Signature · 1 line
1.7.10.4
PATCH 2/2 image_types_fsl.bbclass: Add support to install boot scripts
In reply to Otavio SalvadorSome 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.
--- classes/image_types_fsl.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+)
classes/image_types_fsl.bbclass +10 -0
@@ -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`"
Signature · 1 line
1.7.10.4
Otavio Salvador
AppliedQuoted 8 lines · Otavio Salvador
There're some use cases where we might need to have an sdcard with no bootloader (as it might be provided in the board in SPI NOR, for example) and use of boot scripts. This patchset adds this flexibility to iMX machines.
Otavio Salvador (2):
image_types_fsl.bbclass: Add support to not use bootloader for iMX image_types_fsl.bbclass: Add support to install boot scripts
Merged to master.
--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br