All of lore.kernel.org
 help / color / mirror / Atom feed
* using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8
@ 2019-10-05  0:03 Davis Roman
  2019-10-05  2:58 ` Joshua Watt
  0 siblings, 1 reply; 4+ messages in thread
From: Davis Roman @ 2019-10-05  0:03 UTC (permalink / raw)
  To: Yocto discussion list

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

Hello,

We're working on a Linux distro for two systems where one is based on
NXP i.mx6(32-bit,armv7) and the other i.mx8(64-bit,armv8).

I have two machine types defined in Yocto so individually I can build
either one however our goal is to create a single distro that can run on
both processors.

So the idea is to use BBMULTICONFIG(
https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-BBMULTICONFIG
)
to build two separate images,

1) a 32-bit distro for an i.mx6
2) a 64-bit distro for an i.mx8

and then finally, take the 32-bit distro and add the 64-bit kernel+modules
and u-boot.

---------------------------------------
|--------------------------------------|
||           32-bit rootfs            ||
|--------------------------------------|
|-----------------   ----------------- |
|| 32-bit kernel |   |  64-bit kernel ||
|-----------------   ----------------- |
|-----------------   ----------------- |
|| 32-bit u-boot |   |  64-bit u-boot ||
|-----------------   ----------------- |
---------------------------------------
   i.mx6solo             i.mx8m mini

We've already tried our existing 32-bit rootfs + 64-bit kernel/u-boot on
the i.mx8 and the system runs.
So in theory, it should just be a matter of getting yocto to assemble all
the pieces together.

I don't have much experience with BBMULTICONFIG so any ideas or comments on
how to proceed would be appreciated.

Thank you,

Davis

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

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

* Re: using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8
  2019-10-05  0:03 using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8 Davis Roman
@ 2019-10-05  2:58 ` Joshua Watt
  2019-10-15 19:03   ` Davis Roman
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2019-10-05  2:58 UTC (permalink / raw)
  To: Davis Roman; +Cc: Yocto list discussion

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

On Fri, Oct 4, 2019, 7:04 PM Davis Roman <davis.roman84@gmail.com> wrote:

> Hello,
>
> We're working on a Linux distro for two systems where one is based on
> NXP i.mx6(32-bit,armv7) and the other i.mx8(64-bit,armv8).
>
> I have two machine types defined in Yocto so individually I can build
> either one however our goal is to create a single distro that can run on
> both processors.
>
> So the idea is to use BBMULTICONFIG(
> https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-BBMULTICONFIG
> )
> to build two separate images,
>
> 1) a 32-bit distro for an i.mx6
> 2) a 64-bit distro for an i.mx8
>
> and then finally, take the 32-bit distro and add the 64-bit kernel+modules
> and u-boot.
>
> ---------------------------------------
> |--------------------------------------|
> ||           32-bit rootfs            ||
> |--------------------------------------|
> |-----------------   ----------------- |
> || 32-bit kernel |   |  64-bit kernel ||
> |-----------------   ----------------- |
> |-----------------   ----------------- |
> || 32-bit u-boot |   |  64-bit u-boot ||
> |-----------------   ----------------- |
> ---------------------------------------
>    i.mx6solo             i.mx8m mini
>
> We've already tried our existing 32-bit rootfs + 64-bit kernel/u-boot on
> the i.mx8 and the system runs.
> So in theory, it should just be a matter of getting yocto to assemble all
> the pieces together.
>
> I don't have much experience with BBMULTICONFIG so any ideas or comments
> on how to proceed would be appreciated.
>

You are on the right track. Create two multiconfig files one for each
machine, then user mcdepends (
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-enabling-multiple-configuration-build-dependencies)
to pull the 64 bit kernel, etc. into the 32 bit image.

BBMULTICONFIG is used in local.conf to select which multiconfigs you want
to enable. In your case it would have to list both of the ones that you
define.


> Thank you,
>
> Davis
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

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

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

* Re: using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8
  2019-10-05  2:58 ` Joshua Watt
@ 2019-10-15 19:03   ` Davis Roman
  2019-10-15 19:46     ` Joshua Watt
  0 siblings, 1 reply; 4+ messages in thread
From: Davis Roman @ 2019-10-15 19:03 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Yocto list discussion

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

Hi Joshua,

Thank you for replying.

Since my last email, I enabled BBMULTICONFIG and was able to build both
32bit and 64bit machine types successfully and so i have both packages
available in their corresponding build folders.

build/tmp-imx6sxsabresd/deploy/rpm/imx6sxsabresd/kernel-4.14.98-r0.imx6sxsabresd.rpm
build/tmp-imx8mmevk/deploy/rpm/imx8mmevk/kernel-4.14.98-r0.imx8mmevk.rpm

I checked out mcdepends however I don't believe this helps me to do the
last piece which is to pull the 64-bit kernel package into my 32-bit image.
According to the yocto docs, mcdepends ensures that imageA is built only
after imageB has finished building (or at least that's how I understand it).

In parallel, I'm studying a patch that was upstreamed in 2017 for adding
support for multiple kernel packages (
http://lists.openembedded.org/pipermail/openembedded-core/2017-October/143674.html
)
This appears to be in line with what I'm looking to do however the wrinkle
is that I'm dealing with two kernels from two different machine types
whereas the patch dealt with two kernels of the same machine type.
I'm still trying to understand the implications of this. My feeling is that
I need a hybrid approach of bbmulticonfig and the above patch for adding
multiple kernel packages.

Please let me know if you have any thoughts.

Thanks,

Davis

On Fri, Oct 4, 2019 at 10:59 PM Joshua Watt <jpewhacker@gmail.com> wrote:

>
>
> On Fri, Oct 4, 2019, 7:04 PM Davis Roman <davis.roman84@gmail.com> wrote:
>
>> Hello,
>>
>> We're working on a Linux distro for two systems where one is based on
>> NXP i.mx6(32-bit,armv7) and the other i.mx8(64-bit,armv8).
>>
>> I have two machine types defined in Yocto so individually I can build
>> either one however our goal is to create a single distro that can run on
>> both processors.
>>
>> So the idea is to use BBMULTICONFIG(
>> https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-BBMULTICONFIG
>> )
>> to build two separate images,
>>
>> 1) a 32-bit distro for an i.mx6
>> 2) a 64-bit distro for an i.mx8
>>
>> and then finally, take the 32-bit distro and add the 64-bit
>> kernel+modules and u-boot.
>>
>> ---------------------------------------
>> |--------------------------------------|
>> ||           32-bit rootfs            ||
>> |--------------------------------------|
>> |-----------------   ----------------- |
>> || 32-bit kernel |   |  64-bit kernel ||
>> |-----------------   ----------------- |
>> |-----------------   ----------------- |
>> || 32-bit u-boot |   |  64-bit u-boot ||
>> |-----------------   ----------------- |
>> ---------------------------------------
>>    i.mx6solo             i.mx8m mini
>>
>> We've already tried our existing 32-bit rootfs + 64-bit kernel/u-boot on
>> the i.mx8 and the system runs.
>> So in theory, it should just be a matter of getting yocto to assemble
>> all the pieces together.
>>
>> I don't have much experience with BBMULTICONFIG so any ideas or comments
>> on how to proceed would be appreciated.
>>
>
> You are on the right track. Create two multiconfig files one for each
> machine, then user mcdepends (
> https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-enabling-multiple-configuration-build-dependencies)
> to pull the 64 bit kernel, etc. into the 32 bit image.
>
> BBMULTICONFIG is used in local.conf to select which multiconfigs you want
> to enable. In your case it would have to list both of the ones that you
> define.
>
>
>> Thank you,
>>
>> Davis
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>

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

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

* Re: using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8
  2019-10-15 19:03   ` Davis Roman
@ 2019-10-15 19:46     ` Joshua Watt
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-10-15 19:46 UTC (permalink / raw)
  To: Davis Roman; +Cc: Yocto list discussion


On 10/15/19 2:03 PM, Davis Roman wrote:
> Hi Joshua,
>
> Thank you for replying.
>
> Since my last email, I enabled BBMULTICONFIG and was able to build 
> both 32bit and 64bit machine types successfully and so i have both 
> packages available in their corresponding build folders.
>
> build/tmp-imx6sxsabresd/deploy/rpm/imx6sxsabresd/kernel-4.14.98-r0.imx6sxsabresd.rpm
> build/tmp-imx8mmevk/deploy/rpm/imx8mmevk/kernel-4.14.98-r0.imx8mmevk.rpm
>
> I checked out mcdepends however I don't believe this helps me to do 
> the last piece which is to pull the 64-bit kernel package into my 
> 32-bit image.
> According to the yocto docs, mcdepends ensures that imageA is built 
> only after imageB has finished building (or at least that's how I 
> understand it).

The documentation might be a little misleading; mcdepends allows a 
*task* from one multiconfig to depend on a *task* from another. Using 
the image creation task (do_rootfs) is just an example.

I think one way to do what you want is write a recipe that mcdepends on 
the do_deploy task from the 64-bit kernel recipe, pulls the deployed 
kernel image, repackage it, and then install that recipe's package into 
the 32-bit rootfs. There might be other ways that someone knows about 
that would be better/cleaner, but that's what I would do.

>
> In parallel, I'm studying a patch that was upstreamed in 2017 for 
> adding support for multiple kernel packages 
> (http://lists.openembedded.org/pipermail/openembedded-core/2017-October/143674.html)
> This appears to be in line with what I'm looking to do however the 
> wrinkle is that I'm dealing with two kernels from two different 
> machine types whereas the patch dealt with two kernels of the same 
> machine type.
> I'm still trying to understand the implications of this. My feeling is 
> that I need a hybrid approach of bbmulticonfig and the above patch for 
> adding multiple kernel packages.

Ya, you might be able to do that if your new recipes looks like a kernel 
"flavor" described in that patch.... I'm not quite clear on what the 
advantage of doing that in this case would be; not that there isn't one 
to be had, I just can't see it with a cursory glance :).

>
> Please let me know if you have any thoughts.
>
> Thanks,
>
> Davis
>
> On Fri, Oct 4, 2019 at 10:59 PM Joshua Watt <jpewhacker@gmail.com 
> <mailto:jpewhacker@gmail.com>> wrote:
>
>
>
>     On Fri, Oct 4, 2019, 7:04 PM Davis Roman <davis.roman84@gmail.com
>     <mailto:davis.roman84@gmail.com>> wrote:
>
>         Hello,
>
>         We're working on a Linux distro for two systems where one is
>         based on
>         NXP i.mx6(32-bit,armv7) and the other i.mx8(64-bit,armv8).
>
>         I have two machine types defined in Yocto so individually I
>         can build
>         either one however our goal is to create a single distro that
>         can run on both processors.
>
>         So the idea is to use
>         BBMULTICONFIG(https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-BBMULTICONFIG)
>
>         to build two separate images,
>
>         1) a 32-bit distro for an i.mx6
>         2) a 64-bit distro for an i.mx8
>
>         and then finally, take the 32-bit distro and add the 64-bit
>         kernel+modules and u-boot.
>
>         ---------------------------------------
>         |--------------------------------------|
>         ||           32-bit rootfs            ||
>         |--------------------------------------|
>         |-----------------   ----------------- |
>         || 32-bit kernel |   |  64-bit kernel ||
>         |-----------------   ----------------- |
>         |-----------------   ----------------- |
>         || 32-bit u-boot |   |  64-bit u-boot ||
>         |-----------------   ----------------- |
>         ---------------------------------------
>            i.mx6solo             i.mx8m mini
>
>         We've already tried our existing 32-bit rootfs + 64-bit
>         kernel/u-boot on the i.mx8 and the system runs.
>         So in theory, it should just be a matter of getting yocto to
>         assemble all the pieces together.
>
>         I don't have much experience with BBMULTICONFIG so any ideas
>         or comments on how to proceed would be appreciated.
>
>
>     You are on the right track. Create two multiconfig files one for
>     each machine, then user mcdepends
>     (https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-enabling-multiple-configuration-build-dependencies)
>     to pull the 64 bit kernel, etc. into the 32 bit image.
>
>     BBMULTICONFIG is used in local.conf to select which multiconfigs
>     you want to enable. In your case it would have to list both of the
>     ones that you define.
>
>
>         Thank you,
>
>         Davis
>         -- 
>         _______________________________________________
>         yocto mailing list
>         yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>         https://lists.yoctoproject.org/listinfo/yocto
>


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

end of thread, other threads:[~2019-10-15 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05  0:03 using BBMULTICONFIG to create a 32-bit rootfs, kernel, u-boot that also includes a 64-bit kernel, u-boot for NXP i.mx6/i.mx8 Davis Roman
2019-10-05  2:58 ` Joshua Watt
2019-10-15 19:03   ` Davis Roman
2019-10-15 19:46     ` Joshua Watt

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.