Understanding the whole Yocto/Linux stack for the BB

Hello,

I’m using a BeagleBone as a base to develop a custom board. I’ve read pages and pages of doc and I feel I need some highlights to make sense of it all. Note that I’m mainly trying to understand the custom Linux distribution workflow at the lowest level here, for instance to be able to recreate from scratch the OE BeagleBoard stack… and I’m confused by all the available resources.

So, here is my question spree to shed some light on these matters, not necessarily specific to the BeagleBone but it’s a great platform to understand it all. Feel free to contribute even if you don’t have all the answers.

I don’t understand why is the meta-beagleboard layer that huge. First, why is it using the kernel 3.8 where the meta-ti layer supports 4.1? (is meta-beagleboard depending on meta-ti in the first place, and if not, why? There are references to the BB in the meta-ti tree, why is an other layer even needed?) What’s the difference with the layer meta-bbb?

Then, why is recipes-kernel so full of all kind of patches? Where do those come from, why does the kernel need so much patching? Then, if those patches are here to “fix” the mainline kernel for the BB, what is exactly the RobertCNelson/bb-kernel repo? And the beagleboard/linux repo? What’s the relationship between all those projects?

Also, I’ve read the DeviceTree story, but it seems that the actual BeagleBone DTS is in the kernel (arch/arm/boot/dts/am335x-bone-common.dtsi)… yet I thought the whole point of the DTS transition was not to add all ARM board files to the kernel. Moreover, many mach-omap2/ and DTS files are patched in bb-kernel and in meta-beagleboard… is it just because they’ve not been merged back to mainline yet?

When it comes to customizing the DTS, I’ve seen for instance a reference to https://github.com/bradfa/beaglebone_pinmux_tables/blob/master/beaglebone_pins_p8 or https://github.com/jadonk/bonescript/blob/master/src/bone.js to find out the actual pin numbers. How are these files have even been generated?

I know I am mixing up different concepts here but they all coexist in the different docs… so I thought I’d give it a try here. Some resources clearing that up would be great too.

Thank you for any clue that’ll help me to see through this forest!
Baptiste

Hello,

I’m using a BeagleBone as a base to develop a custom board. I’ve read pages
and pages of doc and I feel I need some highlights to make sense of it all.
Note that I’m mainly trying to understand the custom Linux distribution
workflow at the lowest level here, for instance to be able to recreate from
scratch the OE BeagleBoard stack… and I’m confused by all the available
resources.

So, here is my question spree to shed some light on these matters, not
necessarily specific to the BeagleBone but it's a great platform to
understand it all. Feel free to contribute even if you don’t have all the
answers.

I don’t understand why is the meta-beagleboard layer that huge. First, why
is it using the kernel 3.8 where the meta-ti layer supports 4.1? (is
meta-beagleboard depending on meta-ti in the first place, and if not, why?
There are references to the BB in the meta-ti tree, why is an other layer
even needed?) What's the difference with the layer meta-bbb?

"meta-beagleboard" has been 'un-maintained' for over a year now
(actually 2 years..), consider it dead...

Then, why is recipes-kernel so full of all kind of patches? Where do those
come from, why does the kernel need so much patching? Then, if those patches
are here to “fix” the mainline kernel for the BB, what is exactly the
RobertCNelson/bb-kernel repo? And the beagleboard/linux repo? What’s the
relationship between all those projects?

It depends on the branch...

https://github.com/RobertCNelson/bb-kernel/tree/am33x-v3.8 ->
beagleboard/linux (3.8)

https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-3.14.y
-> beagleboard/linux (3.14)

https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.1.y
-> beagleboard/linux (4.1)

Also, I’ve read the DeviceTree story, but it seems that the actual
BeagleBone DTS is in the kernel
(arch/arm/boot/dts/am335x-bone-common.dtsi)... yet I thought the whole point
of the DTS transition was not to add all ARM board files to the kernel.
Moreover, many mach-omap2/ and DTS files are patched in bb-kernel and in
meta-beagleboard... is it just because they’ve not been merged back to
mainline yet?

Yet again, 3.8 was over two years ago.. Look again at the "v4.3.0" kernel..

When it comes to customizing the DTS, I’ve seen for instance a reference to
https://github.com/bradfa/beaglebone_pinmux_tables/blob/master/beaglebone_pins_p8
or https://github.com/jadonk/bonescript/blob/master/src/bone.js to find out
the actual pin numbers. How are these files have even been generated?

I know I am mixing up different concepts here but they all coexist in the
different docs… so I thought I’d give it a try here. Some resources clearing
that up would be great too.

Regards,

FWIW: For the reason other meta's seem to me either unmaintained for
long time or bloated or both, I created another very simple layer [1]
with current beagleboard.org kernel and dt.overlays. No meta-ti
dependency / only sw-rendered mesa - works just fine for me.

[1] https://github.com/schnitzeltony/meta-bbone

Andreas

And i probally break it weekly:

https://github.com/schnitzeltony/meta-bbone/blob/master/recipes-kernel/linux/linux-bbone_4.1.bb#L12

I never got it working 100%, but you should be able to use the git tag's

https://github.com/RobertCNelson/meta-beagleboard-kernel/blob/master/recipes-kernel/linux/linux-beagleboard.org_4.1.bb#L46-L58

So it'll break less often..

Regards,

Hello,

I’m using a BeagleBone as a base to develop a custom board. I’ve read pages
and pages of doc and I feel I need some highlights to make sense of it all.
Note that I’m mainly trying to understand the custom Linux distribution
workflow at the lowest level here, for instance to be able to recreate from
scratch the OE BeagleBoard stack… and I’m confused by all the available
resources.

So, here is my question spree to shed some light on these matters, not
necessarily specific to the BeagleBone but it's a great platform to
understand it all. Feel free to contribute even if you don’t have all the
answers.

I don’t understand why is the meta-beagleboard layer that huge. First, why
is it using the kernel 3.8 where the meta-ti layer supports 4.1? (is
meta-beagleboard depending on meta-ti in the first place, and if not, why?
There are references to the BB in the meta-ti tree, why is an other layer
even needed?) What's the difference with the layer meta-bbb?

Then, why is recipes-kernel so full of all kind of patches? Where do those
come from, why does the kernel need so much patching? Then, if those patches
are here to “fix” the mainline kernel for the BB, what is exactly the
RobertCNelson/bb-kernel repo? And the beagleboard/linux repo? What’s the
relationship between all those projects?

Also, I’ve read the DeviceTree story, but it seems that the actual
BeagleBone DTS is in the kernel
(arch/arm/boot/dts/am335x-bone-common.dtsi)... yet I thought the whole point
of the DTS transition was not to add all ARM board files to the kernel.
Moreover, many mach-omap2/ and DTS files are patched in bb-kernel and in
meta-beagleboard... is it just because they’ve not been merged back to
mainline yet?

When it comes to customizing the DTS, I’ve seen for instance a reference to
https://github.com/bradfa/beaglebone_pinmux_tables/blob/master/beaglebone_pins_p8
or https://github.com/jadonk/bonescript/blob/master/src/bone.js to find out
the actual pin numbers. How are these files have even been generated?

I know I am mixing up different concepts here but they all coexist in the
different docs… so I thought I’d give it a try here. Some resources clearing
that up would be great too.

Thank you for any clue that’ll help me to see through this forest!
Baptiste

FWIW: For the reason other meta's seem to me either unmaintained for
long time or bloated or both, I created another very simple layer [1]
with current beagleboard.org kernel and dt.overlays. No meta-ti
dependency / only sw-rendered mesa - works just fine for me.

[1] https://github.com/schnitzeltony/meta-bbone

And i probally break it weekly:

Yes I noticed that already when building on different machines trying
to checkout non existent commits. Up to now I thought that happened by
accident.

https://github.com/schnitzeltony/meta-bbone/blob/master/recipes-kernel/linux/linux-bbone_4.1.bb#L12

I never got it working 100%, but you should be able to use the git tag's

As far as I can remember: tags in yocto SRC_URI are causing trouble -
something like a broken or weak network connection causes recipe
parsing to fail - even when building for another machine.

https://github.com/RobertCNelson/meta-beagleboard-kernel/blob/master/recipes-kernel/linux/linux-beagleboard.org_4.1.bb#L46-L58

Wow - so many people doing the same thing - what a waste of resources.
My excuse: We have many different machines to build images for and use
yocto for very long time. Now I was forced to get something to work on
bbb...

So it'll break less often..

Is there a more stable source available (probably in near future)?

Andreas

FWIW: For the reason other meta's seem to me either unmaintained for
long time or bloated or both, I created another very simple layer [1]
with current beagleboard.org kernel and dt.overlays. No meta-ti
dependency / only sw-rendered mesa - works just fine for me.

[1] https://github.com/schnitzeltony/meta-bbone

And i probally break it weekly:

Yes I noticed that already when building on different machines trying
to checkout non existent commits. Up to now I thought that happened by
accident.

https://github.com/schnitzeltony/meta-bbone/blob/master/recipes-kernel/linux/linux-bbone_4.1.bb#L12

I never got it working 100%, but you should be able to use the git tag's

As far as I can remember: tags in yocto SRC_URI are causing trouble -
something like a broken or weak network connection causes recipe
parsing to fail - even when building for another machine.

https://github.com/RobertCNelson/meta-beagleboard-kernel/blob/master/recipes-kernel/linux/linux-beagleboard.org_4.1.bb#L46-L58

Wow - so many people doing the same thing - what a waste of resources.
My excuse: We have many different machines to build images for and use
yocto for very long time. Now I was forced to get something to work on
bbb...

I just setup it for an example.. (haven't touched *.bb files in years)

So it'll break less often..

Is there a more stable source available (probably in near future)?

The "4.1" branch get's rebased every thursday... The git tag's
"4.1.12-ti-r26" will never be modified after they are pushed..

Regards,

Hmm I am not sure if bitbake's git fetcher can get a commit not
belonging to a branch. If not I'll create a mirror so I'll update
sources and recipe at the same time. Whatever I have more information
than before :slight_smile:

Andreas