Discussion:
[meta-freescale] custom image_types bbclass approach and errors
Bryan Fishell
2018-11-13 20:50:04 UTC
Permalink
I am relatively new to Yocto, but have a need to create a custom
image_types_x.bbclass extending the image_types_fsl.bbclass that simply
adds two ext4 partitions of size PARTITION_SIZE to the end of an .sdcard
image.

The approach I took - created an entirely new image_types_mycustom.bbclass
based on the image_types_fsl.bbclass, and overrode the creation of the
.sdcard file into a file called .mysdcard.

Note that I still have sdcard in IMAGE_FSTYPES. I thought this wouldn't
pose a problem, but I keep getting errors when a dependent step (creation
of an .ext4 image prior to the .mysdcard task) was getting skipped, but the
do_image_mysdcard task did not reuse the (valid and already existing) .ext4
image, indicating that my parallel bbclass could not find the file with a
slightly different timestamp than the first (note that I added a # to my
bbclass to invalidate the basehash).

1. For my approach, is there something I could do to force my bbclass to
not re-evaluate the DATETIME if bitbake was smart enough to know that the
do_image_ext4 task can be reused? (i.e. how do I pass the older, but valid
DATETIME from the pre-existing .ext4 image so my custom image can be
generated successfully?)

2. I assume I could work around this by simply extending the existing
image_types_fsl.bbclass function generate_imx_sdcard to resize the .sdcard
file and generate the partitions, is that right?

TIA
Otavio Salvador
2018-11-18 21:12:42 UTC
Permalink
I am relatively new to Yocto, but have a need to create a custom image_types_x.bbclass extending the image_types_fsl.bbclass that simply adds two ext4 partitions of size PARTITION_SIZE to the end of an .sdcard image.
The approach I took - created an entirely new image_types_mycustom.bbclass based on the image_types_fsl.bbclass, and overrode the creation of the .sdcard file into a file called .mysdcard.
This is the wrong approach, instead, make use of 'wic' to generate the
disk image for you to use.

For an example of how to make multiple partitions, for i.MX machines,
look at https://github.com/UpdateHub/meta-updatehub-freescale/tree/master/wic
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
--
Bryan Fishell
2018-11-18 21:20:21 UTC
Permalink
Is this still recommended even though I am in the Morty branch of yocto where the image_types_fsl.bbclass doesn’t use wic?

Sent from my iPhone
Post by Otavio Salvador
I am relatively new to Yocto, but have a need to create a custom image_types_x.bbclass extending the image_types_fsl.bbclass that simply adds two ext4 partitions of size PARTITION_SIZE to the end of an .sdcard image.
The approach I took - created an entirely new image_types_mycustom.bbclass based on the image_types_fsl.bbclass, and overrode the creation of the .sdcard file into a file called .mysdcard.
This is the wrong approach, instead, make use of 'wic' to generate the
disk image for you to use.
For an example of how to make multiple partitions, for i.MX machines,
look at https://github.com/UpdateHub/meta-updatehub-freescale/tree/master/wic
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
--
Otavio Salvador
2018-11-18 21:21:51 UTC
Permalink
Post by Bryan Fishell
Is this still recommended even though I am in the Morty branch of yocto where the image_types_fsl.bbclass doesn’t use wic?
In this case, it is not. However, is there any reason to stay on morty?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
--
Bryan Fishell
2018-11-18 21:31:33 UTC
Permalink
I guess not, but we are using boot2qt and I thought for some reason there was some coupling between boot2qt and the meta-Freescale layer. I’ll give it a shot

Sent from my iPhone
Post by Otavio Salvador
Post by Bryan Fishell
Is this still recommended even though I am in the Morty branch of yocto where the image_types_fsl.bbclass doesn’t use wic?
In this case, it is not. However, is there any reason to stay on morty?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
--

Loading...