mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Question related to multiple UBI volumes in UBI image
@ 2016-10-26  8:16 Guillermo Rodriguez Garcia
  2016-10-26  9:10 ` Guillermo Rodriguez Garcia
  2016-10-26  9:15 ` Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-26  8:16 UTC (permalink / raw)
  To: ptxdist

Hello all,

I have two questions related to handling of multiple UBI volumes in ptxdist.

1. I see it is possible to create an additional "data" volume. Is it
possible to tell ptxdist what to put in this additional volume? Or is
it always empty?

2. It looks like the autoresize flag is always set in the ubinize
config file that is used to generate the ubi images. Is it possible to
configure this?
Related: How does ubi handle an image that has more than one volume
with the autoresize flag set in all of them?

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Question related to multiple UBI volumes in UBI image
  2016-10-26  8:16 [ptxdist] Question related to multiple UBI volumes in UBI image Guillermo Rodriguez Garcia
@ 2016-10-26  9:10 ` Guillermo Rodriguez Garcia
  2016-10-26  9:15 ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-26  9:10 UTC (permalink / raw)
  To: ptxdist

Partially answering myself:

2016-10-26 10:16 GMT+02:00 Guillermo Rodriguez Garcia
<guille.rodriguez@gmail.com>:
> Hello all,
>
> I have two questions related to handling of multiple UBI volumes in ptxdist.
>
> 1. I see it is possible to create an additional "data" volume. Is it
> possible to tell ptxdist what to put in this additional volume? Or is
> it always empty?
>
> 2. It looks like the autoresize flag is always set in the ubinize
> config file that is used to generate the ubi images. Is it possible to
> configure this?
> Related: How does ubi handle an image that has more than one volume
> with the autoresize flag set in all of them?

I now see that the autoresize flag is only set for the "root" UBI
volume, but not for the "data" volume. So the ubi image does not
actually contains two volumes with the autoresize flag set.

However the two questions still remain. I would actually like to
disable autoresize for both volumes, and to put some initial data in
the "data" volume. Does ptxdist support this?

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Question related to multiple UBI volumes in UBI image
  2016-10-26  8:16 [ptxdist] Question related to multiple UBI volumes in UBI image Guillermo Rodriguez Garcia
  2016-10-26  9:10 ` Guillermo Rodriguez Garcia
@ 2016-10-26  9:15 ` Michael Olbrich
  2016-10-26 14:53   ` Guillermo Rodriguez Garcia
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2016-10-26  9:15 UTC (permalink / raw)
  To: ptxdist

Hi,

On Wed, Oct 26, 2016 at 10:16:05AM +0200, Guillermo Rodriguez Garcia wrote:
> I have two questions related to handling of multiple UBI volumes in ptxdist.
> 
> 1. I see it is possible to create an additional "data" volume. Is it
> possible to tell ptxdist what to put in this additional volume? Or is
> it always empty?

If you use the new image mechanism, then that's possible. The config file
is config/images/ubi.config and you just need to copy it to the same
location in your BSP and add another 'partition' with the data ubifs image.

You should also overwrite the .in file (platforms/image-root-ubi.in) to add
the dependency to your data image.

> 2. It looks like the autoresize flag is always set in the ubinize
> config file that is used to generate the ubi images. Is it possible to
> configure this?
> Related: How does ubi handle an image that has more than one volume
> with the autoresize flag set in all of them?

I think ubinize will fail. Afaik only one autoresize volume is supported by
ubi.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Question related to multiple UBI volumes in UBI image
  2016-10-26  9:15 ` Michael Olbrich
@ 2016-10-26 14:53   ` Guillermo Rodriguez Garcia
  2016-10-26 15:02     ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-26 14:53 UTC (permalink / raw)
  To: ptxdist, Michael Olbrich

Hi Michael,

2016-10-26 11:15 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> Hi,
>
> On Wed, Oct 26, 2016 at 10:16:05AM +0200, Guillermo Rodriguez Garcia wrote:
>> I have two questions related to handling of multiple UBI volumes in ptxdist.
>>
>> 1. I see it is possible to create an additional "data" volume. Is it
>> possible to tell ptxdist what to put in this additional volume? Or is
>> it always empty?
>
> If you use the new image mechanism, then that's possible. The config file
> is config/images/ubi.config and you just need to copy it to the same
> location in your BSP and add another 'partition' with the data ubifs image.
>
> You should also overwrite the .in file (platforms/image-root-ubi.in) to add
> the dependency to your data image.

Thank you for your answer, I didn't know about the "new image mechanism".

I see it depends on an external 'genimage' tool. I am a bit nervous
about switching at this stage. What I ended up doing is creating a
local  rules/post/image_ubi.make file in my BSP. This just redefines
the $(IMAGEDIR)/root.ubi target so that instead of using the default
ubi.ini file from ptxdist, it will use a custom ubi.ini file.

I assume that I can override a .make file in rules/post just I would
override a .make file in rules/. I have confirmed that this works -- I
just want to make sure it is not working just out of luck :-)

Do you see any obvious problems with this approach?

Thank you.

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Question related to multiple UBI volumes in UBI image
  2016-10-26 14:53   ` Guillermo Rodriguez Garcia
@ 2016-10-26 15:02     ` Michael Olbrich
  2016-10-26 15:11       ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2016-10-26 15:02 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 26, 2016 at 04:53:21PM +0200, Guillermo Rodriguez Garcia wrote:
> 2016-10-26 11:15 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > On Wed, Oct 26, 2016 at 10:16:05AM +0200, Guillermo Rodriguez Garcia wrote:
> >> I have two questions related to handling of multiple UBI volumes in ptxdist.
> >>
> >> 1. I see it is possible to create an additional "data" volume. Is it
> >> possible to tell ptxdist what to put in this additional volume? Or is
> >> it always empty?
> >
> > If you use the new image mechanism, then that's possible. The config file
> > is config/images/ubi.config and you just need to copy it to the same
> > location in your BSP and add another 'partition' with the data ubifs image.
> >
> > You should also overwrite the .in file (platforms/image-root-ubi.in) to add
> > the dependency to your data image.
> 
> Thank you for your answer, I didn't know about the "new image mechanism".
> 
> I see it depends on an external 'genimage' tool. I am a bit nervous
> about switching at this stage. What I ended up doing is creating a
> local  rules/post/image_ubi.make file in my BSP. This just redefines
> the $(IMAGEDIR)/root.ubi target so that instead of using the default
> ubi.ini file from ptxdist, it will use a custom ubi.ini file.
> 
> I assume that I can override a .make file in rules/post just I would
> override a .make file in rules/. I have confirmed that this works -- I
> just want to make sure it is not working just out of luck :-)
> 
> Do you see any obvious problems with this approach?

rules/post/ works differently. You don't replace files from ptxdist. So
you'll get some ugly 'warning: overriding recipe for target ...' warnings,
right? That was one of the reasons for the new image mechanism.

Other than that it should work fine. Your files in rules/post/ will always
be sourced last.

Michael


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Question related to multiple UBI volumes in UBI image
  2016-10-26 15:02     ` Michael Olbrich
@ 2016-10-26 15:11       ` Guillermo Rodriguez Garcia
  0 siblings, 0 replies; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-26 15:11 UTC (permalink / raw)
  To: ptxdist

2016-10-26 17:02 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> On Wed, Oct 26, 2016 at 04:53:21PM +0200, Guillermo Rodriguez Garcia wrote:
>> 2016-10-26 11:15 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>:
>> > On Wed, Oct 26, 2016 at 10:16:05AM +0200, Guillermo Rodriguez Garcia wrote:
>> >> I have two questions related to handling of multiple UBI volumes in ptxdist.
>> >>
>> >> 1. I see it is possible to create an additional "data" volume. Is it
>> >> possible to tell ptxdist what to put in this additional volume? Or is
>> >> it always empty?
>> >
>> > If you use the new image mechanism, then that's possible. The config file
>> > is config/images/ubi.config and you just need to copy it to the same
>> > location in your BSP and add another 'partition' with the data ubifs image.
>> >
>> > You should also overwrite the .in file (platforms/image-root-ubi.in) to add
>> > the dependency to your data image.
>>
>> Thank you for your answer, I didn't know about the "new image mechanism".
>>
>> I see it depends on an external 'genimage' tool. I am a bit nervous
>> about switching at this stage. What I ended up doing is creating a
>> local  rules/post/image_ubi.make file in my BSP. This just redefines
>> the $(IMAGEDIR)/root.ubi target so that instead of using the default
>> ubi.ini file from ptxdist, it will use a custom ubi.ini file.
>>
>> I assume that I can override a .make file in rules/post just I would
>> override a .make file in rules/. I have confirmed that this works -- I
>> just want to make sure it is not working just out of luck :-)
>>
>> Do you see any obvious problems with this approach?
>
> rules/post/ works differently. You don't replace files from ptxdist. So
> you'll get some ugly 'warning: overriding recipe for target ...' warnings,
> right? That was one of the reasons for the new image mechanism.

Yes, that's right. I do get a warning from make.

>
> Other than that it should work fine. Your files in rules/post/ will always
> be sourced last.

Great. Thank you for the feedback and advice!

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-10-26 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26  8:16 [ptxdist] Question related to multiple UBI volumes in UBI image Guillermo Rodriguez Garcia
2016-10-26  9:10 ` Guillermo Rodriguez Garcia
2016-10-26  9:15 ` Michael Olbrich
2016-10-26 14:53   ` Guillermo Rodriguez Garcia
2016-10-26 15:02     ` Michael Olbrich
2016-10-26 15:11       ` Guillermo Rodriguez Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox