<div dir="ltr"><div>Perfect, thank you!</div><div><br></div><div>Gabriele<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 6 mag 2019 alle ore 14:15 Ulrich Ölmann <<a href="mailto:u.oelmann@pengutronix.de">u.oelmann@pengutronix.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Gabriele,<br>
<br>
On Mon, May 06 2019 at 13:32 +0200, Gabriele Zampieri <<a href="mailto:gabbla.malist@gmail.com" target="_blank">gabbla.malist@gmail.com</a>> wrote:<br>
> thank you very much for your explanation. The provided genimage.config<br>
> looks similar to mine, so I guess it is ok. I will try when I come back to<br>
> the office. The point I missed was that I need to call: bitbake<br>
> your-customized-ubi and not bitbake my-custom-image, right?<br>
<br>
correct - "my-custom-image" will indirectly become a dependency via the<br>
variable GENIMAGE_ROOTFS_IMAGE, see [1].<br>
<br>
Best regards<br>
Ulrich<br>
<br>
<br>
[1] <a href="https://github.com/pengutronix/meta-ptx/blob/master/classes/genimage.bbclass#L88" rel="noreferrer" target="_blank">https://github.com/pengutronix/meta-ptx/blob/master/classes/genimage.bbclass#L88</a><br>
<br>
> Thank you again,<br>
> Gabriele<br>
><br>
><br>
> Il giorno ven 3 mag 2019 alle ore 07:59 Ulrich Ölmann <<br>
> <a href="mailto:u.oelmann@pengutronix.de" target="_blank">u.oelmann@pengutronix.de</a>> ha scritto:<br>
><br>
>> Hi Gabriele,<br>
>><br>
>> On Thu, May 02 2019 at 13:25 +0200, Gabriele Zampieri <<br>
>> <a href="mailto:gabbla.malist@gmail.com" target="_blank">gabbla.malist@gmail.com</a>> wrote:<br>
>> > ok, I guess I miss-understand how that class works. I thought that I<br>
>> > had to add the customization on my own image recipe.<br>
>> > So the correct way is to write a 'customization recipe' and install<br>
>> > via IMAGE_INSTALL? Can you provide an example?<br>
>><br>
>> use your custom image recipe as before to just produce your root-<br>
>> filesystem which results in a (compressed) tar-file in ${DEPLOY_DIR_<br>
>> IMAGE}. It will be referenced from the genimage recipe without any file<br>
>> extension via GENIMAGE_ROOTFS_IMAGE. Now your UBI-recipe (e.g. 'your-<br>
>> <a href="http://customized-ubi.bb" rel="noreferrer" target="_blank">customized-ubi.bb</a>') could look like<br>
>><br>
>>Â Â Â inherit genimage<br>
>>Â Â Â LICENSE = "MIT"<br>
>>Â Â Â LIC_FILES_CHKSUM =<br>
>> "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"<br>
>><br>
>>Â Â Â SRC_URI += "file://genimage.config"<br>
>><br>
>>Â Â Â # to not confuse the flashable UBI-image ('ubi')<br>
>>Â Â Â # with the UBI-filesystems ('ubifs') it contains<br>
>>Â Â Â GENIMAGE_IMAGE_SUFFIX = "ubi"<br>
>><br>
>>Â Â Â # the name of the root-filesystem genimage should use<br>
>>Â Â Â GENIMAGE_ROOTFS_IMAGE = "your-customized-rootfs"<br>
>><br>
>> with the accompanying 'genimage.config' for example as follows<br>
>><br>
>>Â Â Â #<br>
>>Â Â Â # Manufacturer ID: 0x2c, Chip ID: 0xda<br>
>>Â Â Â # -> Micron MT29F2G08ABAEAWP<br>
>>Â Â Â # 256 MiB, SLC<br>
>>Â Â Â #<br>
>>Â Â Â flash nand {<br>
>>Â Â Â Â Â pebsize = 131072<br>
>>Â Â Â Â Â lebsize = 126976<br>
>>Â Â Â Â Â numpebs = 2044<br>
>>Â Â Â Â Â minimum-io-unit-size = 2048<br>
>>Â Â Â Â Â sub-page-size = 2048<br>
>>Â Â Â }<br>
>><br>
>>Â Â Â image @IMAGE@ {<br>
>>Â Â Â Â Â flashtype = "nand"<br>
>>Â Â Â Â Â ubi {<br>
>>Â Â Â Â Â }<br>
>><br>
>>Â Â Â Â Â partition rootfs {<br>
>>Â Â Â Â Â Â Â Â Â image = rootfs.ubifs<br>
>>Â Â Â Â Â Â Â Â Â size = 64MiB<br>
>>Â Â Â Â Â }<br>
>><br>
>>Â Â Â Â Â partition opt {<br>
>>Â Â Â Â Â Â Â Â Â image = opt.ubifs<br>
>>Â Â Â Â Â Â Â Â Â size = 32MiB<br>
>>Â Â Â Â Â }<br>
>><br>
>>Â Â Â Â Â partition data {<br>
>>Â Â Â Â Â Â Â Â Â image = data.ubifs<br>
>>Â Â Â Â Â Â Â Â Â autoresize = true<br>
>>Â Â Â Â Â }<br>
>>Â Â Â }<br>
>><br>
>>Â Â Â image rootfs.ubifs {<br>
>>Â Â Â Â Â flashtype = "nand"<br>
>>Â Â Â Â Â ubifs {<br>
>>Â Â Â Â Â Â Â Â Â extraargs = "-x lzo"<br>
>>Â Â Â Â Â Â Â Â Â max-size = 64MiB<br>
>>Â Â Â Â Â }<br>
>>Â Â Â Â Â mountpoint = "/"<br>
>>Â Â Â }<br>
>><br>
>>Â Â Â image opt.ubifs {<br>
>>Â Â Â Â Â flashtype = "nand"<br>
>>Â Â Â Â Â ubifs {<br>
>>Â Â Â Â Â Â Â Â Â extraargs = "-x lzo"<br>
>>Â Â Â Â Â Â Â Â Â max-size = 32MiB<br>
>>Â Â Â Â Â }<br>
>>Â Â Â Â Â mountpoint = "/opt"<br>
>>Â Â Â }<br>
>><br>
>>Â Â Â image data.ubifs {<br>
>>Â Â Â Â Â flashtype = "nand"<br>
>>Â Â Â Â Â ubifs {<br>
>>Â Â Â Â Â Â Â Â Â extraargs = "-x lzo"<br>
>>Â Â Â Â Â Â Â Â Â max-size = 192MiB<br>
>>Â Â Â Â Â }<br>
>>Â Â Â Â Â mountpoint = "/data"<br>
>>Â Â Â }<br>
>><br>
>> In a UBI-image almost all UBI-volumes need to have a fixed size and only<br>
>> one is allowed to use the autoresize mechanism which blows it up to use<br>
>> the remaining space when it is UBI-attached for the first time. Distinct<br>
>> from that is the UBI-filesystem's max-size parameter which prescribes<br>
>> the maximum size of an UBI-volume that shall be addressable by this<br>
>> filesystem. This means that if you would re-use 'data.ubifs' in a volume<br>
>> that has been autoresized to e.g. 1024MiB the filesystem would not be<br>
>> able to make use of it.<br>
>><br>
>> I neither tested the recipe nor the genimage.config, so please give some<br>
>> feedback.<br>
>><br>
>> Best regards<br>
>> Ulrich<br>
>><br>
>><br>
>> > Thanks,<br>
>> > Gabriele<br>
>> ><br>
>> > Il giorno mer 24 apr 2019 alle ore 15:15 Ulrich Ölmann <<br>
>> > <a href="mailto:u.oelmann@pengutronix.de" target="_blank">u.oelmann@pengutronix.de</a>> ha scritto:<br>
>> ><br>
>> >> Hi Gabriele,<br>
>> >><br>
>> >> On Wed, Apr 24 2019 at 14:06 +0200, Gabriele Zampieri <<br>
>> >> <a href="mailto:gabbla.malist@gmail.com" target="_blank">gabbla.malist@gmail.com</a>> wrote:<br>
>> >> > I'm now testing genimage via meta-ptx in my Yocto workflow, but I<br>
>> found a<br>
>> >> > problem: I cannot set a SRC_URI in my custom image recipe (that<br>
>> inherit<br>
>> >> > from core-image which in turn inherit from image) because do_fetch and<br>
>> >> > do_unpack tasks have noexec set to 1. If I specify the SRC_URI with my<br>
>> >> > genimage.config, bitbake exits, complaining about LIC_FILE_CHECKSUM<br>
>> (that<br>
>> >> > is correctly specified). If I hack image.bbclass and comment out<br>
>> >> ><br>
>> >> > #do_fetch[noexec] = "1"<br>
>> >> ><br>
>> >> ><br>
>> >> > #do_unpack[noexec] = "1"<br>
>> >> ><br>
>> >> > The process start correctly. Is there a way to avoid touching<br>
>> >> image.bbclass<br>
>> >> > and install my configuration from the image recipe?<br>
>> >> ><br>
>> >> > Thanks,<br>
>> >> > Gabriele<br>
>> >><br>
>> >> you need one or more recipe(s) that construct(s) your filesystem(s) and<br>
>> >> a separate one that makes a flashable image out of that (see the<br>
>> >> introductory documentation in 'genimage.bbclass'). In the former you<br>
>> >> inherit 'core-image' and only in the latter which inherits 'genimage'<br>
>> >> you have to set the SRC_URI to point to your 'genimage.config'.<br>
>> >><br>
>> >> Best regards<br>
>> >> Ulrich<br>
>> >><br>
>> >><br>
>> >> > Il giorno mer 13 mar 2019 alle ore 16:14 Gabriele Zampieri <<br>
>> >> > <a href="mailto:gabbla.malist@gmail.com" target="_blank">gabbla.malist@gmail.com</a>> ha scritto:<br>
>> >> ><br>
>> >> >> Hi all,<br>
>> >> >><br>
>> >> >> thank you very much for the suggestion, I will check genimage and<br>
>> test<br>
>> >> it.<br>
>> >> >><br>
>> >> >> Gabriele<br>
>> >> >><br>
>> >> >> Il giorno gio 7 mar 2019 alle ore 16:23 Ulrich Ölmann <<br>
>> >> >> <a href="mailto:u.oelmann@pengutronix.de" target="_blank">u.oelmann@pengutronix.de</a>> ha scritto:<br>
>> >> >><br>
>> >> >>> Hi there,<br>
>> >> >>><br>
>> >> >>> On Thu, Mar 07 2019 at 15:11 +0100, Stelling2 Carsten <<br>
>> >> >>> <a href="mailto:Carsten.Stelling2@goerlitz.com" target="_blank">Carsten.Stelling2@goerlitz.com</a>> wrote:<br>
>> >> >>> > Have you seen <a href="https://github.com/pengutronix/genimage" rel="noreferrer" target="_blank">https://github.com/pengutronix/genimage</a>?<br>
>> >> >>><br>
>> >> >>> you can find it included within<br>
>> >> <a href="https://github.com/pengutronix/meta-ptx" rel="noreferrer" target="_blank">https://github.com/pengutronix/meta-ptx</a><br>
>> >> >>> with an accompanying genimage.bbclass.<br>
>> >> >>><br>
>> >> >>> Best regards<br>
>> >> >>> Ulrich<br>
>> >> >>><br>
>> >> >>> > Regards,<br>
>> >> >>> ><br>
>> >> >>> > Carsten<br>
>> >> >>> ><br>
>> >> >>> > Von: <a href="mailto:yocto-bounces@yoctoproject.org" target="_blank">yocto-bounces@yoctoproject.org</a> [mailto:<br>
>> >> >>> <a href="mailto:yocto-bounces@yoctoproject.org" target="_blank">yocto-bounces@yoctoproject.org</a>] Im Auftrag von Gabriele Zampieri<br>
>> >> >>> > Gesendet: Montag, 4. März 2019 12:17<br>
>> >> >>> > An: <a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><br>
>> >> >>> > Betreff: [yocto] Multiple ubifs partition<br>
>> >> >>> ><br>
>> >> >>> > Hi all,<br>
>> >> >>> ><br>
>> >> >>> > I'm trying to build a distribution that has multiple partitions.<br>
>> The<br>
>> >> >>> desiderata is something like:<br>
>> >> >>> ><br>
>> >> >>> > - rootfs.ubifs mounted on /<br>
>> >> >>> > - data.ubifs mounted on /data<br>
>> >> >>> > - opt.ubifs mounted on /opt<br>
>> >> >>> ><br>
>> >> >>> > I was wondering if there is a standard way to achieve the goal. I<br>
>> see<br>
>> >> >>> that there is a tool called wic, but it does not seems to support<br>
>> >> ubifs. I<br>
>> >> >>> could post process the tarball image and doing stuff with my<br>
>> scripts,<br>
>> >> but<br>
>> >> >>> I'd prefer doing this in a single bitbake run. Can you suggest<br>
>> >> something?<br>
>> >> >>> ><br>
>> >> >>> > Thanks,<br>
>> >> >>> > Gabriele<br>
>> >> >>><br>
>> >> >>><br>
>> >> >>> --<br>
>> >> >>> Pengutronix e.K.              | Ulrich Ölmann<br>
>> >>Â Â |<br>
>> >> >>> Industrial Linux Solutions         |<br>
>> >> <a href="http://www.pengutronix.de/" rel="noreferrer" target="_blank">http://www.pengutronix.de/</a><br>
>> >> >>> |<br>
>> >> >>> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone:<br>
>> +49-5121-206917-0<br>
>> >>Â Â |<br>
>> >> >>> Amtsgericht Hildesheim, HRA 2686Â Â Â Â Â Â | Fax:<br>
>> >>Â +49-5121-206917-5555 |<br>
>> >> >>><br>
>> >> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Pengutronix e.K.              | Ulrich Ölmann<br>
>>Â |<br>
>> >> Industrial Linux Solutions         | <a href="http://www.pengutronix.de/" rel="noreferrer" target="_blank">http://www.pengutronix.de/</a><br>
>> |<br>
>> >> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0<br>
>>Â Â |<br>
>> >> Amtsgericht Hildesheim, HRA 2686Â Â Â Â Â Â | Fax:<br>
>>Â +49-5121-206917-5555 |<br>
>> >><br>
>><br>
>><br>
>> --<br>
>> Pengutronix e.K.              | Ulrich Ölmann        |<br>
>> Industrial Linux Solutions         | <a href="http://www.pengutronix.de/" rel="noreferrer" target="_blank">http://www.pengutronix.de/</a> |<br>
>> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0Â Â |<br>
>> Amtsgericht Hildesheim, HRA 2686Â Â Â Â Â Â | Fax:Â Â +49-5121-206917-5555 |<br>
>><br>
<br>
<br>
--<br>
Pengutronix e.K.              | Ulrich Ölmann        |<br>
Industrial Linux Solutions         | <a href="http://www.pengutronix.de/" rel="noreferrer" target="_blank">http://www.pengutronix.de/</a> |<br>
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0Â Â |<br>
Amtsgericht Hildesheim, HRA 2686Â Â Â Â Â Â | Fax:Â Â +49-5121-206917-5555 |<br>
</blockquote></div>