Skip to contentSkip to conversation

Approach for generating two WIC files at once

DISCUSSION Konstantin Kletschke 2 participants 5 messages Jun 7, 2023 – Jun 12, 2023

lore
Share & tools
lore
#0 lore raw

Can the build system be extended to generate two WIC files for on run, is that possible?

I need the same rootfs once with a boot partition

part /boot
part /

and one image only with rootfs

part /

so I can write sdcards with same rootfs for older systems expecting root on mmcblk0p1 (BBB debian based) and newer ones expecting it on mmcblk0p2 (BBB yocto based).

Is that possible, how could one approach such a config?

Kind Regards
Konstantin

Signature · 14 lines
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

[email protected]
http://www.inside-m2m.de 

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover
#1 lore raw

The easiest is probably to make two image recipes pointing to different wic files, but sharing everything else via .inc.

Alex

Quoted 49 lines · Konstantin Kletschke

Can the build system be extended to generate two WIC files for on run, is that possible?

I need the same rootfs once with a boot partition

part /boot
part /

and one image only with rootfs

part /

so I can write sdcards with same rootfs for older systems expecting root on mmcblk0p1 (BBB debian based) and newer ones expecting it on mmcblk0p2 (BBB yocto based).

Is that possible, how could one approach such a config?

Kind Regards
Konstantin

--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

[email protected]
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60203): https://lists.yoctoproject.org/g/yocto/message/60203
Mute This Topic: https://lists.yoctoproject.org/mt/99383108/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 2 lines · Alexander Kanavin

The easiest is probably to make two image recipes pointing to different wic files, but sharing everything else via .inc.

You mean moving my current meta-insidem2m/recipes-core/images/sdcard.bb to something like meta-insidem2m/recipes-core/images/sdcard_base.bb, creating two new ones like sdcard_d.bb and sdcard_y.bb among the sdcard_base.bb, require the sdcard_base.bb from sdcard_d.bb and sdcard_y.bb and having the latter files overwrite the variable WKS_FILE with different ones?

According to preliminary tests the search path for wks files also include meta-insidem2m/recipes-core/images where the sdcard*.bb are located and could ne put right there.

This way? I will test, that sounds convenient.

Kind Regards
Konstantin

#3 lore raw

sdcard-base.inc is better, because sdcard-base.bb is a recipe in itself, but you don't want to build that (or others to get confused about its purpose).

Alex

Quoted 20 lines · Konstantin Kletschke
Quoted 2 lines · Alexander Kanavin

The easiest is probably to make two image recipes pointing to different wic files, but sharing everything else via .inc.

You mean moving my current meta-insidem2m/recipes-core/images/sdcard.bb to something like meta-insidem2m/recipes-core/images/sdcard_base.bb, creating two new ones like sdcard_d.bb and sdcard_y.bb among the sdcard_base.bb, require the sdcard_base.bb from sdcard_d.bb and sdcard_y.bb and having the latter files overwrite the variable WKS_FILE with different ones?

According to preliminary tests the search path for wks files also include meta-insidem2m/recipes-core/images where the sdcard*.bb are located and could ne put right there.

This way? I will test, that sounds convenient.

Kind Regards
Konstantin

#4 lore raw

Meanwhile I tested my proposed approach and it works well...

Quoted 3 lines · Alexander Kanavin

sdcard-base.inc is better, because sdcard-base.bb is a recipe in itself, but you don't want to build that (or others to get confused about its purpose).

... but this is a nice hint! Thank you very much!

I was bothered colleagues trying to build the base "image" indeed :-)