[PATCH openbmc v6 04/18] image_types_uboot: Don't truncate when assembling flash
Andrew Jeffery
andrew at aj.id.au
Thu Jun 23 14:25:14 AEST 2016
On Wed, 2016-06-22 at 19:30 -0500, OpenBMC Patches wrote:
> From: "Milton D. Miller II" <miltonm at us.ibm.com>
>
> The generate_flash_image step was creating a file then using dd to
> fill in the pieces, but missed adding the conv=notrunc flag, so each
> step was shortening the file to its output.
>
> Add the forgotten conversion flag to each dd command.
>
> Signed-off-by: Milton Miller <miltonm at us.ibm.com>
> ---
> meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
> index adb86e0..164d1ed 100644
> --- a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
> +++ b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
> @@ -76,11 +76,11 @@ do_generate_flash() {
> dst="${ddir}/${FLASH_IMAGE_NAME}"
> rm -rf $dst
> mk_nor_image ${dst} ${FLASH_SIZE}
> - dd if=${ddir}/${uboot} of=${dst} bs=1k seek=${FLASH_UBOOT_OFFSET}
> - dd if=${ddir}/${kernel} of=${dst} bs=1k seek=${FLASH_KERNEL_OFFSET}
> - dd if=${ddir}/${uinitrd} of=${dst} bs=1k seek=${FLASH_INITRD_OFFSET}
> - dd if=${ddir}/${rootfs} of=${dst} bs=1k seek=${FLASH_ROFS_OFFSET}
> - dd if=${ddir}/${rwfs} of=${dst} bs=1k seek=${FLASH_RWFS_OFFSET}
> + dd if=${ddir}/${uboot} of=${dst} conv=notrunc bs=1k seek=${FLASH_UBOOT_OFFSET}
Would be good to keep the option ordering consistent here (conv=notrunc
is after bs=1k on the remaining dd invocations). That's a minor issue
though and this is a good catch, so:
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
> + dd if=${ddir}/${kernel} of=${dst} bs=1k conv=notrunc seek=${FLASH_KERNEL_OFFSET}
> + dd if=${ddir}/${uinitrd} of=${dst} bs=1k conv=notrunc seek=${FLASH_INITRD_OFFSET}
> + dd if=${ddir}/${rootfs} of=${dst} bs=1k conv=notrunc seek=${FLASH_ROFS_OFFSET}
> + dd if=${ddir}/${rwfs} of=${dst} bs=1k conv=notrunc seek=${FLASH_RWFS_OFFSET}
> dstlink="${ddir}/${FLASH_IMAGE_LINK}"
> rm -rf $dstlink
> ln -sf ${FLASH_IMAGE_NAME} $dstlink
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160623/29b918b7/attachment.sig>
More information about the openbmc
mailing list