All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image_types_fsl: Fix sdcard build error
@ 2015-06-14 18:08 Gary Thomas
  2015-06-15 10:59 ` Daiane Angolini
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-06-14 18:08 UTC (permalink / raw)
  To: meta-freescale; +Cc: Gary Thomas

Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
it an error to overwrite an image using mkfs.vfat.  This patch fixes
that problem by removing any old/stale images, thus starting from scratch.

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
 classes/image_types_fsl.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index 1ebcb06..b542549 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -152,6 +152,7 @@ generate_imx_sdcard () {
 	# Create boot partition image
 	BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
 	                  | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }')
+        rm -f ${WORKDIR}/boot.img
 	mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
 	mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
 
@@ -255,6 +256,7 @@ generate_mxs_sdcard () {
 		BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
 	        | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
 
+		rm -f ${WORKDIR}/boot.img
 		mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
 		if test -n "${KERNEL_DEVICETREE}"; then
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] image_types_fsl: Fix sdcard build error
  2015-06-14 18:08 [PATCH] image_types_fsl: Fix sdcard build error Gary Thomas
@ 2015-06-15 10:59 ` Daiane Angolini
  2015-06-15 12:11   ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Daiane Angolini @ 2015-06-15 10:59 UTC (permalink / raw)
  To: Gary Thomas; +Cc: meta-freescale@yoctoproject.org

On Sun, Jun 14, 2015 at 3:08 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
> it an error to overwrite an image using mkfs.vfat.  This patch fixes
> that problem by removing any old/stale images, thus starting from scratch.

Hi Gary,

Would you mind to share the symptom which made you think about this patch?

I faced some crazy errors last week I though was caused by my sdcard
adaptor (which is not exactly reliable) and I want to double check.

No problem with your patch... only asking


Daiane
>
> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> ---
>  classes/image_types_fsl.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
> index 1ebcb06..b542549 100644
> --- a/classes/image_types_fsl.bbclass
> +++ b/classes/image_types_fsl.bbclass
> @@ -152,6 +152,7 @@ generate_imx_sdcard () {
>         # Create boot partition image
>         BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
>                           | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }')
> +        rm -f ${WORKDIR}/boot.img
>         mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
>         mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
>
> @@ -255,6 +256,7 @@ generate_mxs_sdcard () {
>                 BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
>                 | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
>
> +               rm -f ${WORKDIR}/boot.img
>                 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
>                 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
>                 if test -n "${KERNEL_DEVICETREE}"; then
> --
> 1.9.1
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] image_types_fsl: Fix sdcard build error
  2015-06-15 10:59 ` Daiane Angolini
@ 2015-06-15 12:11   ` Gary Thomas
  2015-06-15 13:06     ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-06-15 12:11 UTC (permalink / raw)
  To: Daiane Angolini; +Cc: meta-freescale@yoctoproject.org

On 2015-06-15 04:59, Daiane Angolini wrote:
> On Sun, Jun 14, 2015 at 3:08 PM, Gary Thomas <gary@mlbassoc.com> wrote:
>> Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
>> it an error to overwrite an image using mkfs.vfat.  This patch fixes
>> that problem by removing any old/stale images, thus starting from scratch.
>
> Hi Gary,
>
> Would you mind to share the symptom which made you think about this patch?
>
> I faced some crazy errors last week I though was caused by my sdcard
> adaptor (which is not exactly reliable) and I want to double check.
>
> No problem with your patch... only asking

Without the patch, generating the .sdcard image failed (i.e. big red error!)
in the do_rootfs step.

>>
>> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
>> ---
>>   classes/image_types_fsl.bbclass | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
>> index 1ebcb06..b542549 100644
>> --- a/classes/image_types_fsl.bbclass
>> +++ b/classes/image_types_fsl.bbclass
>> @@ -152,6 +152,7 @@ generate_imx_sdcard () {
>>          # Create boot partition image
>>          BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
>>                            | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }')
>> +        rm -f ${WORKDIR}/boot.img
>>          mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
>>          mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
>>
>> @@ -255,6 +256,7 @@ generate_mxs_sdcard () {
>>                  BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
>>                  | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
>>
>> +               rm -f ${WORKDIR}/boot.img
>>                  mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
>>                  mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
>>                  if test -n "${KERNEL_DEVICETREE}"; then
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] image_types_fsl: Fix sdcard build error
  2015-06-15 12:11   ` Gary Thomas
@ 2015-06-15 13:06     ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2015-06-15 13:06 UTC (permalink / raw)
  To: Gary Thomas; +Cc: meta-freescale@yoctoproject.org

On Mon, Jun 15, 2015 at 9:11 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2015-06-15 04:59, Daiane Angolini wrote:
>>
>> On Sun, Jun 14, 2015 at 3:08 PM, Gary Thomas <gary@mlbassoc.com> wrote:
>>>
>>> Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
>>> it an error to overwrite an image using mkfs.vfat.  This patch fixes
>>> that problem by removing any old/stale images, thus starting from
>>> scratch.
>>
>>
>> Hi Gary,
>>
>> Would you mind to share the symptom which made you think about this patch?
>>
>> I faced some crazy errors last week I though was caused by my sdcard
>> adaptor (which is not exactly reliable) and I want to double check.
>>
>> No problem with your patch... only asking
>
>
> Without the patch, generating the .sdcard image failed (i.e. big red error!)
> in the do_rootfs step.

Can you include the error message in the commit log? It does help to
have good and accurate commit log messages.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-15 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-14 18:08 [PATCH] image_types_fsl: Fix sdcard build error Gary Thomas
2015-06-15 10:59 ` Daiane Angolini
2015-06-15 12:11   ` Gary Thomas
2015-06-15 13:06     ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.