All of lore.kernel.org
 help / color / mirror / Atom feed
* UBIFS images
@ 2011-07-11 14:13 Gary Thomas
  2011-07-11 14:20 ` Gary Thomas
  2011-07-11 15:07 ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Gary Thomas @ 2011-07-11 14:13 UTC (permalink / raw)
  To: Poky Project

I'm trying to use UBIFS on my target and I found that the images
are not quite right.  The soft-link points to the wrong file.

$ ls -l tmp/deploy/images/*ubi*
-rw-r--r-- 1 gthomas gthomas 7483392 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target-20110711135454.ubifs.img
lrwxrwxrwx 1 gthomas gthomas      62 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target.ubifs -> my_distro-console-image-my_target-20110711135454.rootfs.ubifs

I've looked through meta/classes/image_types.bbclass but it's not
clear to me [yet] where that soft-link gets built and why it gets
it wrong.

Any pointers?

Thanks

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


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

* Re: UBIFS images
  2011-07-11 14:13 UBIFS images Gary Thomas
@ 2011-07-11 14:20 ` Gary Thomas
  2011-07-11 15:07 ` Richard Purdie
  1 sibling, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2011-07-11 14:20 UTC (permalink / raw)
  To: Poky Project

On 07/11/2011 08:13 AM, Gary Thomas wrote:
> I'm trying to use UBIFS on my target and I found that the images
> are not quite right. The soft-link points to the wrong file.
>
> $ ls -l tmp/deploy/images/*ubi*
> -rw-r--r-- 1 gthomas gthomas 7483392 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target-20110711135454.ubifs.img
> lrwxrwxrwx 1 gthomas gthomas 62 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target.ubifs -> my_distro-console-image-my_target-20110711135454.rootfs.ubifs
>
> I've looked through meta/classes/image_types.bbclass but it's not
> clear to me [yet] where that soft-link gets built and why it gets
> it wrong.
>
> Any pointers?

Following up on my own question, this patch seems to fix it.

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 8c86227..629d5ec 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -67,7 +67,7 @@ IMAGE_CMD_ubi () {
         echo vol_flags=autoresize >> ubinize.cfg
         mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${D
  }
-IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
+IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"

  EXTRA_IMAGECMD = ""
  EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x40000"

If this looks reasonable, I'll send it on to oe-core

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


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

* Re: UBIFS images
  2011-07-11 14:13 UBIFS images Gary Thomas
  2011-07-11 14:20 ` Gary Thomas
@ 2011-07-11 15:07 ` Richard Purdie
  2011-07-11 15:15   ` Gary Thomas
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2011-07-11 15:07 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Poky Project

On Mon, 2011-07-11 at 08:13 -0600, Gary Thomas wrote:
> I'm trying to use UBIFS on my target and I found that the images
> are not quite right.  The soft-link points to the wrong file.
> 
> $ ls -l tmp/deploy/images/*ubi*
> -rw-r--r-- 1 gthomas gthomas 7483392 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target-20110711135454.ubifs.img
> lrwxrwxrwx 1 gthomas gthomas      62 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target.ubifs -> my_distro-console-image-my_target-20110711135454.rootfs.ubifs
> 
> I've looked through meta/classes/image_types.bbclass but it's not
> clear to me [yet] where that soft-link gets built and why it gets
> it wrong.
> 
> Any pointers?

image_types.bbclass:

ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}

The problem is that $type=ubifs but the extenstion the ubifs image
generates is ubifs.img:

IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"

and we don't support generating image types where the image extension
and the type name differ...

I'd guess the quick fix is s/ubifs.img/ubifs/ in the above...

Cheers,

Richard



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

* Re: UBIFS images
  2011-07-11 15:07 ` Richard Purdie
@ 2011-07-11 15:15   ` Gary Thomas
  2011-07-11 16:15     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2011-07-11 15:15 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Poky Project

On 07/11/2011 09:07 AM, Richard Purdie wrote:
> On Mon, 2011-07-11 at 08:13 -0600, Gary Thomas wrote:
>> I'm trying to use UBIFS on my target and I found that the images
>> are not quite right.  The soft-link points to the wrong file.
>>
>> $ ls -l tmp/deploy/images/*ubi*
>> -rw-r--r-- 1 gthomas gthomas 7483392 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target-20110711135454.ubifs.img
>> lrwxrwxrwx 1 gthomas gthomas      62 Jul 11 07:56 tmp/deploy/images/my_distro-console-image-my_target.ubifs ->  my_distro-console-image-my_target-20110711135454.rootfs.ubifs
>>
>> I've looked through meta/classes/image_types.bbclass but it's not
>> clear to me [yet] where that soft-link gets built and why it gets
>> it wrong.
>>
>> Any pointers?
>
> image_types.bbclass:
>
> ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
>
> The problem is that $type=ubifs but the extenstion the ubifs image
> generates is ubifs.img:
>
> IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
>
> and we don't support generating image types where the image extension
> and the type name differ...
>
> I'd guess the quick fix is s/ubifs.img/ubifs/ in the above...

Thanks

A bigger question is why is there an unused image command (IMAGE_CMD_ubi)
which seems to do it right and also sets up a proper volume layout vs
the current command (IMAGE_CMD_ubifs) which is incorrect?

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


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

* Re: UBIFS images
  2011-07-11 15:15   ` Gary Thomas
@ 2011-07-11 16:15     ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2011-07-11 16:15 UTC (permalink / raw)
  To: poky

On 07/11/2011 08:15 AM, Gary Thomas wrote:
> On 07/11/2011 09:07 AM, Richard Purdie wrote:
>> On Mon, 2011-07-11 at 08:13 -0600, Gary Thomas wrote:
>>> I'm trying to use UBIFS on my target and I found that the images
>>> are not quite right.  The soft-link points to the wrong file.
>>>
>>> $ ls -l tmp/deploy/images/*ubi*
>>> -rw-r--r-- 1 gthomas gthomas 7483392 Jul 11 07:56
>>> tmp/deploy/images/my_distro-console-image-my_target-20110711135454.ubifs.img
>>>
>>> lrwxrwxrwx 1 gthomas gthomas      62 Jul 11 07:56
>>> tmp/deploy/images/my_distro-console-image-my_target.ubifs -> 
>>> my_distro-console-image-my_target-20110711135454.rootfs.ubifs
>>>
>>> I've looked through meta/classes/image_types.bbclass but it's not
>>> clear to me [yet] where that soft-link gets built and why it gets
>>> it wrong.
>>>
>>> Any pointers?
>>
>> image_types.bbclass:
>>
>> ln -s ${IMAGE_NAME}.rootfs.${type}
>> ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
>>
>> The problem is that $type=ubifs but the extenstion the ubifs image
>> generates is ubifs.img:
>>
>> IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o
>> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
>>
>> and we don't support generating image types where the image extension
>> and the type name differ...

This might be a little problematic, or maybe it's all just in my head
since we want a way to try and encourage folks to use the right part of
the ubi dance and not the wrong part (which is to say the image that
contains the ubifs and not just the ubifs itself).

>> I'd guess the quick fix is s/ubifs.img/ubifs/ in the above...
> 
> Thanks
> 
> A bigger question is why is there an unused image command (IMAGE_CMD_ubi)
> which seems to do it right and also sets up a proper volume layout vs
> the current command (IMAGE_CMD_ubifs) which is incorrect?

I think part of the problem is that oe-core and oe-classic are out of
sync here as there was a symlink problem a while back.

-- 
Tom Rini
Mentor Graphics Corporation


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

end of thread, other threads:[~2011-07-11 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 14:13 UBIFS images Gary Thomas
2011-07-11 14:20 ` Gary Thomas
2011-07-11 15:07 ` Richard Purdie
2011-07-11 15:15   ` Gary Thomas
2011-07-11 16:15     ` Tom Rini

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.