Skip to contentSkip to conversation

"sub" machine types?

DISCUSSION Steffen Sledz 5 participants 9 messages Sep 4, 2015 – Sep 9, 2015

lore
Share & tools
lore
#0 lore raw

We have some products which differ in bootloaders (u-boot) and kernel device trees only. They use the same kernel and root filesystem.

Does OE have concepts for this? Or any suggestions to realize this without building for many machines?

Steffen

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
#1 lore raw
Quoted 3 lines · Steffen Sledz

We have some products which differ in bootloaders (u-boot) and kernel device trees only. They use the same kernel and root filesystem.

Does OE have concepts for this? Or any suggestions to realize this without building for many machines?

most BSP layers use SOC_FAMILY, see [1] for this type of things, such that you can create 'SOC' specific packages that are reused across multiple (OE) machines. That sounds like that would help in your situation.

[1] http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-SOC_FAMILY

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 04.09.2015 um 09:45 schrieb Nicolas Dechesne:

Quoted 8 lines · Steffen Sledz
Quoted 3 lines

We have some products which differ in bootloaders (u-boot) and kernel device trees only. They use the same kernel and root filesystem.

Does OE have concepts for this? Or any suggestions to realize this without building for many machines?

most BSP layers use SOC_FAMILY, see [1] for this type of things, such that you can create 'SOC' specific packages that are reused across multiple (OE) machines. That sounds like that would help in your situation.

[1] http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-SOC_FAMILY

I'm not really sure if this is what we need. You suggest to use different MACHINEs of one SOC_FAMILY, Right?

But if I bitbake the root filesystem for each MACHINE an *own* image is created. And not *one* usable for all of them.

What we wish is one image containing one kernel and device tree files for each product.

In addition a u-boot image for each product so that we can use a boot setup running different u-boot images starting the same kernel and root filesystem with different parameters (e.g. for the device trees).

- --
DResearch Fahrzeugelektronik GmbH Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle; Amtsgericht Berlin Charlottenburg; HRB 130120 B; Ust.-IDNr. DE273952058
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJV6o9aAAoJEIz5slJ1krPhF9UP/0cp0JrohbZOeRen1ksJfGIr J3kGKKEqBlw4s+0ugsPIMSp3pR2La/7/IgGV938H5mc6+88CobTpQU25TaE31ukq hgfoG/SHuZCucp1TpTahANkt+d8OmrDOTDLYTzEmWD47VGRp64PiMzlQBKIg27Bo NUdG3cFoUzPrS6tu24LR/EiM+ve2+ItZ8/pEXY0RiCYD/vhehP8qq2Yunow5cvyj xvy1kxbJYCYvjXQF52z9L+R68vvZVzXFF7VrTeT00DJlj99KP5R97vvbIyHzFsHK 1YJfmRkkSx5d41QGegM9GHJGaGOKxHQekh/V5PgwfgQKBxgXq/5slWAvIzH7l6Fq udkqX9goeeEmkztiUhK1VbEQr8wd5SyRI/9wfEJD8AuJPiV460JZrC2lhh/dOxnf sEOGzgNMe/lddcGty6ns5Jn9ztJhnaYNtYK1NFdY/aGUPASgcXCCcPxUNW00KEsp yCwmVEUE37vIGJltqJ2XfUCPhIZ4eiuPZOkzYHo4s+CtArKHiWlzWWREXSrNREql 92FDTuOCkBuYDrmiRMbIuHRxO7gguE2ZS8YPCSRbGsE/VwwUhlMAtRddnGr5QA1G FL1qnW+28wrqwHZlVfzFzO+qUnAo7/LqfnF525ABObdlF6sk4/b9r2MeTEoPwLkx qd2HFZDh4HBu2h4t6E1s
=m/r6
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 1 line · Steffen Sledz

What we wish is one image containing one kernel and device tree files for each product.

If these devices all use the same kernel and the same rootfs then it sounds like, as far as OE is concerned, they are the same MACHINE. If you need to build device trees and different bootloaders for particular variants then you can do that easily enough with custom recipes.

p.

#4 lore raw
In reply to Steffen Sledz
Quoted 3 lines · Steffen Sledz

We have some products which differ in bootloaders (u-boot) and kernel device trees only. They use the same kernel and root filesystem.

Does OE have concepts for this? Or any suggestions to realize this without building for many machines?

The way I handled this was to make it so that all machines have the same MACHINE_ARCH, but MACHINE has some suffixes. This combines the kernels and such. Only problem with that approach is that OE will erase the kernel for a previous machine if you build for the next one, so you have to copy the resulting images to another location at the end of the build.

For your case, I think you can just use a single MACHINE. You can just supply multiple devicetrees, and I think the u-boot recipe recently learned to have multiple targets, so you can build multiple bootloaders for a single machine too.

Signature · 1 line
Mike Looijmans
#5 lore raw
Quoted 1 line · Mike Looijmans

... and I think the u-boot recipe recently learned to have multiple targets, so you can build multiple bootloaders for a single machine too.

That sounds great. Can someone give a pointer to some documentation or examples for that?

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
#6 lore raw
Quoted 4 lines · Steffen Sledz
Quoted 1 line · Mike Looijmans

... and I think the u-boot recipe recently learned to have multiple targets, so you can build multiple bootloaders for a single machine too.

That sounds great. Can someone give a pointer to some documentation or examples for that?

Is it correct to just replace the UBOOT_MACHINE item in the machine config with something like this?

UBOOT_CONFIG ??= "sub1 sub2 sub3" UBOOT_CONFIG[sub1] = "mymachine_sub1_config" UBOOT_CONFIG[sub2] = "mymachine_sub2_config" UBOOT_CONFIG[sub3] = "mymachine_sub3_config"

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
#7 lore raw
Quoted 8 lines · Steffen Sledz
Quoted 2 lines · Steffen Sledz
Quoted 1 line · Mike Looijmans

... and I think the u-boot recipe recently learned to have multiple

targets, so you can build multiple bootloaders for a single machine too.

Quoted 2 lines

That sounds great. Can someone give a pointer to some documentation or

examples for that?

Quoted 9 lines

Is it correct to just replace the UBOOT_MACHINE item in the machine config with something like this?

UBOOT_CONFIG ??= "sub1 sub2 sub3"
UBOOT_CONFIG[sub1] = "mymachine_sub1_config"
UBOOT_CONFIG[sub2] = "mymachine_sub2_config"
UBOOT_CONFIG[sub3] = "mymachine_sub3_config"

Looks right.

I think you may also want to add something like:

KERNEL_DEVICETREE ??= "sub1.dtb sub2.dtb sub3.dtb"

#8 lore raw
Quoted 11 lines · Lee Nipper

On Mon, Sep 7, 2015 at 7:08 AM, Steffen Sledz <[email protected] <mailto:[email protected]>> wrote:

On 07.09.2015 09:09, Steffen Sledz wrote:
> On 05.09.2015 13:29, Mike Looijmans wrote:
>> ... and I think the u-boot recipe recently learned to have multiple targets, so you can build multiple bootloaders for a single machine too. >
> That sounds great. Can someone give a pointer to some documentation or examples for that?

Is it correct to just replace the UBOOT_MACHINE item in the machine config with something like this?

Quoted 7 lines

UBOOT_CONFIG ??= "sub1 sub2 sub3"
UBOOT_CONFIG[sub1] = "mymachine_sub1_config"
UBOOT_CONFIG[sub2] = "mymachine_sub2_config"
UBOOT_CONFIG[sub3] = "mymachine_sub3_config"

Looks right.

What about the u-boot-fw-utils? Is the recipe ready for this too?

What about the artefacts? Is there one binary usable for all u-boot images?

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058