Problem With Beaglebone Kernel Source Files.

Hello,

I’ve been doing a lot of work with the beaglebone and a beaglebone based custom board, but have just run into trouble with the most basic task of recreating my build environment - basically I can’t get the right linux kernel source files to appear/build.

I run the following steps on my build machine:

git clone git://github.com/Angstrom-distribution/setup-scripts.git

cd setup-scripts
MACHINE=beaglebone ./oebb.sh config beaglebone MACHINE=beaglebone ./oebb.sh update
Here I comment out the +rm_work line from ./conf/local.conf and also source '~/.oe/environment-angstromv2012.12’ (previously this was 2012.05) MACHINE=beaglebone ./oebb.sh bitbake systemd-image

The build succeeds, but when I look in ‘setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/beaglebone-angstrom-linux-gnueabi/’ expecting to find a directory like ‘linux-ti33x-psp-3.2…/git/’ containing the kernel source files, I instead find a ‘linux-mainline-3.8’ (or 3.6, I can’t recall exactly) with kernel source files but, importantly, no ‘arch/arm/mach-omap2/board-am335xevm.c’, which I am expecting to patch with some code for my custom board.

So it looks like I’m somehow not building for the beaglebone target and retrieving the wrong set of files, despite passing ‘MACHINE=beaglebone’ at every step. I’m expecting a 3.2 linux kernel with patches up to 3.2.42 but am getting the mainline.

I have no idea what is going wrong in this series of very simple steps. It is no doubt a very simple mistake that I’m making, but I’m at the stage, to quote from the movie Zoolander, where “…I feel like I’m taking crazy pills!”

Any help would be much appreciated.

Regards,
Andrew.

It's building the correct thing, there are no boardfiles for AM335x devices in 3.8 anymore, it's all devicetree.

Ok, thanks.

Is there anyway to tell Angstrom/bitbake to use the beaglebone-3.2 branch? I am working on a wifi device and am particularly keen on patches related to support for the wl1273 capes added recently.

And I’ve done a lot of work around getting my custom board to work with modifications to the board-am335xevm.c and am hoping to keep all of this - and I know nothing about devicetree at the moment.

Would you expect the 3.8 kernel to have as much up to date support for beaglebone capes as the 3.2 branch?

Regards,
Andrew.

OK, so I’ve manged to get the ti-33x-psp-3.2.42 kernel built, but I’m pretty sure I haven’t followed best practice in achieving this.

What I did was:

  1. Edited ‘/conf/local.conf’ and add the lines: ‘PREFERRED_PROVIDER_virtual/kernel = “linux-ti33x-psp”’ and ‘PREFERRED_VERSION_linux-ti33x-psp = 3.2.42"’
    This made no difference, the 3.8.6 mainline was still built.

  2. Edited ‘/sources/meta-ti/recipes-kernel/linux/linux-ti33x-psp_3.2.bb’ and changed COMPATIBLE_MACHINE from “(ti33x)” to “(ti33x|beaglebone)”
    This made no difference. I also tried configuring with MACHINE=ti33x but this failed.

  3. Edited ‘/sources/meta-beagleboard/common-bsp/recipes-kernel/linux/linux-mainline_3.8.bb’ and removed ‘beaglebone’ from the COMPATIBLE_MACHINE setting.
    This caused mainline 3.7 to be built.

  4. Edited ‘/sources/meta-beagleboard/common-bsp/recipes-kernel/linux/linux-mainline_3.7.bb’ and removed ‘beaglebone’ from the COMPATIBLE_MACHINE setting.
    This caused the ‘ti-33x-psp-3.2.42’ kernel to be built, so successful-ish.

This is clearly a very ugly way of achieving this outcome, so a couple of questions with regards to finding a tidier way to get the ‘ti-33x-psp-3.2.42’ kernel built for the beaglebone:

  1. When there are multiple recipes with the same machines listed under COMPATIBLE_MACHINE, what determines which recipe is built?

  2. Is there a way of setting the PREFERRED_… settings in ‘local.conf’ to achieve force the ti-33x kernel to be built?

  3. Should I be posting this to the angstrom-distro mailing list instead :slight_smile:

The reason I don’t want to use the mainline 3.8.6 kernel is that I had everything working well on the 3.2.30 kernel I was using except for a few problem with a custom tiwi-r2 interface I was working on, and it looked like this might have been improved upon with the patches for 3.2.42. So at this stage I’m trying to avoid starting from scratch with the mainline/devicetree.

Regards,

Andrew.

One extra point: My ‘ugly’ way of getting the linux-ti33x-psp-3.2 kernel to build breaks the ‘systemd-image’ and ‘console-image’ builds (and no doubt others), as these are dependent on ‘kernel-devicetree-overlays’ which is only build in the later mainline kernel version.

So I guess my question is: Is it possible to roll my entire angstrom package back to be compatible with the 3.2.42 kernel?

Cheers

One extra point: My 'ugly' way of getting the linux-ti33x-psp-3.2 kernel to build breaks the 'systemd-image' and 'console-image' builds (and no doubt others), as these are dependent on 'kernel-devicetree-overlays' which is only build in the later mainline kernel version.

So I guess my question is: Is it possible to roll my entire angstrom package back to be compatible with the 3.2.42 kernel?

Sure, checkout the v2012.05 branch of the setupscripts. The question is why? 3.2.x is abandonware by TI right now.

OK. So would I be correct in assuming the latest 3.8.6 mainline kernel and associated device tree configuration has at least as good support for the Tiwi-5E cape as the 3.2.42 version? Was the recent set of patches for 3.2.x just a backport from 3.8?

If so I guess it’s to,e to learn about device tree - would you recommend any good wikis/blogs?