public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* multi MACHINE build for same DISTRO_ARCH
@ 2019-07-01 14:41 Benedikt Niedermayr
  2019-07-01 14:51 ` Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Benedikt Niedermayr @ 2019-07-01 14:41 UTC (permalink / raw)
  To: isar-users

Hi guys,

before I send some patches to you I would like to discuss this a bit.

The problem is to run multi machine builds for the same DISTRO_ARCH.

We have for example a BSP layer which supports imx6, imx7 and imx8 
architectures, and we like to be able to run

those builds within a single bitbake command:


bitbake multiconfig:imx6-stretch:isar-image-base \

              multiconfig:imx7-stretch:isar-image-base \

              multiconfig:imx8-stretch:isar-image-base


The build runs fine if DISTRO_ARCH differs between targets. But it does 
not run successfully if only MACHINE differs and DISTRO_ARCH is the same.


I think running multi machine build within one bitbake build folder 
makes a lot of sense, especially when it comes to build time and CI.

I don't like it to create a new build folder for every MACHINE, although 
everything (rootfs, buildchroot, etc.) stays almost the same among 
DISTRO_ARCHs.



Is anybody familiar with this behavior?



Thanks,

Benni





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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-01 14:41 multi MACHINE build for same DISTRO_ARCH Benedikt Niedermayr
@ 2019-07-01 14:51 ` Jan Kiszka
  2019-07-01 17:03   ` Benedikt Niedermayr
  2019-07-02 10:21 ` Henning Schild
  2019-07-05 16:12 ` Baurzhan Ismagulov
  2 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2019-07-01 14:51 UTC (permalink / raw)
  To: Benedikt Niedermayr, isar-users

On 01.07.19 16:41, 'Benedikt Niedermayr' via isar-users wrote:
> Hi guys,
> 
> before I send some patches to you I would like to discuss this a bit.
> 
> The problem is to run multi machine builds for the same DISTRO_ARCH.
> 
> We have for example a BSP layer which supports imx6, imx7 and imx8 
> architectures, and we like to be able to run
> 
> those builds within a single bitbake command:
> 
> 
> bitbake multiconfig:imx6-stretch:isar-image-base \
> 
>               multiconfig:imx7-stretch:isar-image-base \
> 
>               multiconfig:imx8-stretch:isar-image-base
> 
> 
> The build runs fine if DISTRO_ARCH differs between targets. But it does not run 
> successfully if only MACHINE differs and DISTRO_ARCH is the same.
> 
> 
> I think running multi machine build within one bitbake build folder makes a lot 
> of sense, especially when it comes to build time and CI.
> 
> I don't like it to create a new build folder for every MACHINE, although 
> everything (rootfs, buildchroot, etc.) stays almost the same among DISTRO_ARCHs.
> 
> 
> 
> Is anybody familiar with this behavior?
> 

You may want to study https://github.com/siemens/jailhouse-images for a working 
pattern. May not be the only possible one, but already that required some 
careful balancing.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-01 14:51 ` Jan Kiszka
@ 2019-07-01 17:03   ` Benedikt Niedermayr
  0 siblings, 0 replies; 8+ messages in thread
From: Benedikt Niedermayr @ 2019-07-01 17:03 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

Am 01.07.19 um 16:51 schrieb Jan Kiszka:
> On 01.07.19 16:41, 'Benedikt Niedermayr' via isar-users wrote:
>> Hi guys,
>>
>> before I send some patches to you I would like to discuss this a bit.
>>
>> The problem is to run multi machine builds for the same DISTRO_ARCH.
>>
>> We have for example a BSP layer which supports imx6, imx7 and imx8 
>> architectures, and we like to be able to run
>>
>> those builds within a single bitbake command:
>>
>>
>> bitbake multiconfig:imx6-stretch:isar-image-base \
>>
>>               multiconfig:imx7-stretch:isar-image-base \
>>
>>               multiconfig:imx8-stretch:isar-image-base
>>
>>
>> The build runs fine if DISTRO_ARCH differs between targets. But it 
>> does not run successfully if only MACHINE differs and DISTRO_ARCH is 
>> the same.
>>
>>
>> I think running multi machine build within one bitbake build folder 
>> makes a lot of sense, especially when it comes to build time and CI.
>>
>> I don't like it to create a new build folder for every MACHINE, 
>> although everything (rootfs, buildchroot, etc.) stays almost the same 
>> among DISTRO_ARCHs.
>>
>>
>>
>> Is anybody familiar with this behavior?
>>
>
> You may want to study https://github.com/siemens/jailhouse-images for 
> a working pattern. May not be the only possible one, but already that 
> required some careful balancing.
>
> Jan
>

Hi Jan,

thanks.


I will take a look at it and reply ASAP.








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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-01 14:41 multi MACHINE build for same DISTRO_ARCH Benedikt Niedermayr
  2019-07-01 14:51 ` Jan Kiszka
@ 2019-07-02 10:21 ` Henning Schild
  2019-07-05 16:12 ` Baurzhan Ismagulov
  2 siblings, 0 replies; 8+ messages in thread
From: Henning Schild @ 2019-07-02 10:21 UTC (permalink / raw)
  To: 'Benedikt Niedermayr' via isar-users; +Cc: Benedikt Niedermayr

Hi,

the key is to get the split between machine and distro configs right.
And to make sure all your recipes create generic enough packages that
can be shared or differ in name/version where not.

The great sharing potential, reducing build time and size, but also
means a high risk of false sharing if you make a mistake. I
personally avoid multiconfig builds for that reason.

Henning

Am Mon, 1 Jul 2019 16:41:36 +0200
schrieb 'Benedikt Niedermayr' via isar-users
<isar-users@googlegroups.com>:

> Hi guys,
> 
> before I send some patches to you I would like to discuss this a bit.
> 
> The problem is to run multi machine builds for the same DISTRO_ARCH.
> 
> We have for example a BSP layer which supports imx6, imx7 and imx8 
> architectures, and we like to be able to run
> 
> those builds within a single bitbake command:
> 
> 
> bitbake multiconfig:imx6-stretch:isar-image-base \
> 
>               multiconfig:imx7-stretch:isar-image-base \
> 
>               multiconfig:imx8-stretch:isar-image-base
> 
> 
> The build runs fine if DISTRO_ARCH differs between targets. But it
> does not run successfully if only MACHINE differs and DISTRO_ARCH is
> the same.
> 
> 
> I think running multi machine build within one bitbake build folder 
> makes a lot of sense, especially when it comes to build time and CI.
> 
> I don't like it to create a new build folder for every MACHINE,
> although everything (rootfs, buildchroot, etc.) stays almost the same
> among DISTRO_ARCHs.
> 
> 
> 
> Is anybody familiar with this behavior?
> 
> 
> 
> Thanks,
> 
> Benni
> 
> 
> 
> 


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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-01 14:41 multi MACHINE build for same DISTRO_ARCH Benedikt Niedermayr
  2019-07-01 14:51 ` Jan Kiszka
  2019-07-02 10:21 ` Henning Schild
@ 2019-07-05 16:12 ` Baurzhan Ismagulov
  2019-07-10 18:52   ` benbrenson89
  2 siblings, 1 reply; 8+ messages in thread
From: Baurzhan Ismagulov @ 2019-07-05 16:12 UTC (permalink / raw)
  To: isar-users

Hello Benedikt,

On Mon, Jul 01, 2019 at 04:41:36PM +0200, 'Benedikt Niedermayr' via isar-users wrote:
> bitbake multiconfig:imx6-stretch:isar-image-base \
> � � � � � �� multiconfig:imx7-stretch:isar-image-base \
> � � � � � �� multiconfig:imx8-stretch:isar-image-base
> 
> The build runs fine if DISTRO_ARCH differs between targets. But it does not
> run successfully if only MACHINE differs and DISTRO_ARCH is the same.

Where does it fail?

Which Isar revision?


> I think running multi machine build within one bitbake build folder makes a
> lot of sense, especially when it comes to build time and CI.

Yes, we are interested in that use case.


> Is anybody familiar with this behavior?

We used to have issues with qemuarm-stretch and de0-nano-soc-stretch at least
in cross-build, but it didn't occur in recent revisions (enabled in CI in
56cc472).


With kind regards,
Baurzhan.

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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-05 16:12 ` Baurzhan Ismagulov
@ 2019-07-10 18:52   ` benbrenson89
  2019-07-10 19:09     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: benbrenson89 @ 2019-07-10 18:52 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 592 bytes --]

> Where does it fail? 
It fails on different points within the build. In my custom layer 
configuration it fails when building the u-boot-script recipe.

IMHO the problem appears due to running those recipes in parallel (for each 
multiconfig) and  some races appear
when mounting/unmounting the WORKDIR into the rootfs.

The next problem may appear if created packages of one MACHINE will 
overwritten by the same package of another MACHINE.
Packages must contain a machine specific suffix in order to fix that. 


> Which Isar revision? 
I ran those builds with the current next branch.




[-- Attachment #1.2: Type: text/html, Size: 823 bytes --]

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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-10 18:52   ` benbrenson89
@ 2019-07-10 19:09     ` Jan Kiszka
  2019-07-11 17:09       ` Henning Schild
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2019-07-10 19:09 UTC (permalink / raw)
  To: benbrenson89, isar-users

On 10.07.19 20:52, benbrenson89 via isar-users wrote:
>> Where does it fail?
> It fails on different points within the build. In my custom layer configuration
> it fails when building the u-boot-script recipe.
> 
> IMHO the problem appears due to running those recipes in parallel (for each
> multiconfig) and  some races appear
> when mounting/unmounting the WORKDIR into the rootfs.
> 

Vanilla u-boot-script is only built once per target arch. All normal specifics
are in the u-boot env. Or in /etc/default/u-boot-script that can be adjusted by
a machine-specific customization package. If you do the adjustment via
u-boot-script directly, you need to make that package in your overlay
machine-specific:

PN .= "-${MACHINE}"

> The next problem may appear if created packages of one MACHINE will overwritten
> by the same package of another MACHINE.
> Packages must contain a machine specific suffix in order to fix that.
> 

See above if you are deviating from the default.

Again, please study jailhouse-images carefully. It contains working pattern and
- to my best knowledge - has no multiconfig issues.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* Re: multi MACHINE build for same DISTRO_ARCH
  2019-07-10 19:09     ` Jan Kiszka
@ 2019-07-11 17:09       ` Henning Schild
  0 siblings, 0 replies; 8+ messages in thread
From: Henning Schild @ 2019-07-11 17:09 UTC (permalink / raw)
  To: [ext] Jan Kiszka; +Cc: benbrenson89, isar-users

Am Wed, 10 Jul 2019 21:09:21 +0200
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:

> On 10.07.19 20:52, benbrenson89 via isar-users wrote:
> >> Where does it fail?  
> > It fails on different points within the build. In my custom layer
> > configuration it fails when building the u-boot-script recipe.
> > 
> > IMHO the problem appears due to running those recipes in parallel
> > (for each multiconfig) and  some races appear
> > when mounting/unmounting the WORKDIR into the rootfs.
> >   
> 
> Vanilla u-boot-script is only built once per target arch. All normal
> specifics are in the u-boot env. Or in /etc/default/u-boot-script
> that can be adjusted by a machine-specific customization package. If
> you do the adjustment via u-boot-script directly, you need to make
> that package in your overlay machine-specific:
> 
> PN .= "-${MACHINE}"
> 
> > The next problem may appear if created packages of one MACHINE will
> > overwritten by the same package of another MACHINE.
> > Packages must contain a machine specific suffix in order to fix
> > that. 
>
> See above if you are deviating from the default.

And only for those that actually can not be shared. If you do that for
all your packages you might as well not use multiconfig because your
sharing goes down to nothing but buildchroot.

Henning

> Again, please study jailhouse-images carefully. It contains working
> pattern and
> - to my best knowledge - has no multiconfig issues.
> 
> Jan
> 


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

end of thread, other threads:[~2019-07-11 17:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 14:41 multi MACHINE build for same DISTRO_ARCH Benedikt Niedermayr
2019-07-01 14:51 ` Jan Kiszka
2019-07-01 17:03   ` Benedikt Niedermayr
2019-07-02 10:21 ` Henning Schild
2019-07-05 16:12 ` Baurzhan Ismagulov
2019-07-10 18:52   ` benbrenson89
2019-07-10 19:09     ` Jan Kiszka
2019-07-11 17:09       ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox