]> code.ossystems Code Review - meta-freescale.git/commitdiff
image_types_fsl.bbclass: avoid use of 'sed' to change partition type
authorOtavio Salvador <otavio@ossystems.com.br>
Mon, 30 Apr 2012 21:04:04 +0000 (18:04 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 30 Apr 2012 21:08:56 +0000 (18:08 -0300)
The 'sed' might fail in some systems due user right and restrictions
so we use 'dd' and 'echo' to do the same trick.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reported-by: "John Passaniti" <jpassaniti@ashly.com>
meta-fsl-arm/classes/image_types_fsl.bbclass

index 5d213e51a04ae69788f504d9c1a7545df0ac6bc3..a6248f9368024d7e50f0ea09e68dc56b8f29555f 100644 (file)
@@ -66,7 +66,7 @@ IMAGE_CMD_sdcard () {
        # Change partition type for mxs processor family
        if [ "${SOC_FAMILY}" = "mxs" ]; then
                bbnote "Setting partition type to 0x53 as required for mxs' SoC family."
-               sed -i 's,.,\x53,450' ${SDCARD}
+               echo -n S | dd of=${SDCARD} bs=1 count=1 seek=450 conv=notrunc
        fi
 
        case "${IMAGE_BOOTLOADER}" in