All of lore.kernel.org
 help / color / mirror / Atom feed
* custom image_types bbclass approach and errors
@ 2018-11-13 20:50 Bryan Fishell
  2018-11-18 21:12 ` Otavio Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Bryan Fishell @ 2018-11-13 20:50 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1561 bytes --]

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

* Re: custom image_types bbclass approach and errors
  2018-11-13 20:50 custom image_types bbclass approach and errors Bryan Fishell
@ 2018-11-18 21:12 ` Otavio Salvador
  2018-11-18 21:20   ` Bryan Fishell
  0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2018-11-18 21:12 UTC (permalink / raw)
  To: bryan.fishell; +Cc: meta-freescale Mailing List

On Tue, Nov 13, 2018 at 6:51 PM Bryan Fishell <bryan.fishell@gmail.com> wrote:
> 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


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

* Re: custom image_types bbclass approach and errors
  2018-11-18 21:12 ` Otavio Salvador
@ 2018-11-18 21:20   ` Bryan Fishell
  2018-11-18 21:21     ` Otavio Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Bryan Fishell @ 2018-11-18 21:20 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

Is this still recommended even though I am in the Morty branch of yocto where the image_types_fsl.bbclass doesn’t use wic?
> On Nov 18, 2018, at 4:12 PM, Otavio Salvador <otavio.salvador@ossystems.com.br> wrote:
> 
>> On Tue, Nov 13, 2018 at 6:51 PM Bryan Fishell <bryan.fishell@gmail.com> wrote:
>> 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


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

* Re: custom image_types bbclass approach and errors
  2018-11-18 21:20   ` Bryan Fishell
@ 2018-11-18 21:21     ` Otavio Salvador
  2018-11-18 21:31       ` Bryan Fishell
  0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2018-11-18 21:21 UTC (permalink / raw)
  To: bryan.fishell; +Cc: meta-freescale Mailing List

On Sun, Nov 18, 2018 at 7:20 PM Bryan Fishell <bryan.fishell@gmail.com> wrote:
> 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


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

* Re: custom image_types bbclass approach and errors
  2018-11-18 21:21     ` Otavio Salvador
@ 2018-11-18 21:31       ` Bryan Fishell
  0 siblings, 0 replies; 5+ messages in thread
From: Bryan Fishell @ 2018-11-18 21:31 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

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 
> On Nov 18, 2018, at 4:21 PM, Otavio Salvador <otavio.salvador@ossystems.com.br> wrote:
> 
>> On Sun, Nov 18, 2018 at 7:20 PM Bryan Fishell <bryan.fishell@gmail.com> wrote:
>> 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


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

end of thread, other threads:[~2018-11-18 21:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 20:50 custom image_types bbclass approach and errors Bryan Fishell
2018-11-18 21:12 ` Otavio Salvador
2018-11-18 21:20   ` Bryan Fishell
2018-11-18 21:21     ` Otavio Salvador
2018-11-18 21:31       ` Bryan Fishell

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.