bb-kernel.git patch failed/missing

I am battling to setup and cross compile beaglebone black 5.10.168-ti-r83

When following procedure outlined below on a vagrant box running bento/ubuntu-24.04 and cloned bb-kernel project I get several errors

dir: external/wireless_regdb
Applying: Add wireless-regdb regulatory database file
dir: external/bbb.io
Applying: Add BeagleBoard.org Device Tree Changes
error: patch failed: arch/arm/boot/dts/omap3-cpu-thermal.dtsi:1
error: arch/arm/boot/dts/omap3-cpu-thermal.dtsi: patch does not apply
error: patch failed: arch/arm/boot/dts/omap4-cpu-thermal.dtsi:15
error: arch/arm/boot/dts/omap4-cpu-thermal.dtsi: patch does not apply
error: patch failed: arch/arm/boot/dts/omap443x.dtsi:72
error: arch/arm/boot/dts/omap443x.dtsi: patch does not apply
error: patch failed: arch/arm/boot/dts/omap4460.dtsi:89
error: arch/arm/boot/dts/omap4460.dtsi: patch does not apply
Patch failed at 0001 Add BeagleBoard.org Device Tree Changes
hint: Use 'git am --show-current-patch=diff' to see the failed patch

In addition I am unable to find any BB-BONE-AUDI-02 overlays to cater for the Audio Cape. I do see BB-BONE-AUDI-02-000A.dts source file on my flashed BBB so I know it must exist but don’t understand why it it’s not anywhere in my cloned bb-image project after building, unless it’s related to errors I am seeing.

Steps followed:

- git clone https://github.com/RobertCNelson/bb-kernel.git

    ```
    vagrant@vagrant:~/bb-kernel$ git branch
    * am33x-v6.12
    ```

- git checkout am33x-v5.10

- modify bb-kernel/version.sh's kernel and kernel_rt

    ```
    KERNEL_REL=5.10
    KERNEL_TAG=${KERNEL_REL}.168
    #https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.10/
    kernel_rt=".168-rt83"
    #Kernel Build
    BUILD=${build_prefix}80
    ```
- ./build_kernel.sh

No… Those variables are not for users to randomly change..

Top of v5.10 is v5.10.240-bone80 Commits · RobertCNelson/bb-kernel · GitHub

If you want to cross 5.10.168-ti-r83 grab: https://github.com/beagleboard/linux/releases/tag/5.10.168-ti-r83

Regards,

Well that would explain that!

I had looked at this project but didn’t find the dts overlays so was flummoxed.

Do you offhand know of link that would assist in process?

Thanks Robert!

If all you are doing is rebuilding an overlay, all you need to do is add it to the https://github.com/beagleboard/BeagleBoard-DeviceTrees project (with a matching kernel branch)..

5.10.168-ti-r83 = v5.10.x-ti-unified overlays for armhf are under src/arm/overlays and have the dts extension..

Then run ./build_n_install.sh on the host and both the device tree’s and overlays for your kernel version will be built and installed locally..

  • hint build on target with ./build_n_install.sh

Regards,

At some point I will simply be compiling dts file on either via cross compile or on the beaglebone itself.

What concerns me is that in a branch/tag that I want to build and flash to beaglebone surely I should have all necessary files in the project so that there can be one build to do all - I am pretty sure back in the day when I built the 3.8.13.x kernel with some changes to some drivers (eg. touch screen) that I used the bb-kernel project (which I can’t do here now) with corresponding branch/tag, patched my tsc driver, ran necessary build script and simply copied image across. I have no recollection of having to separately add the dtb/dtbo files.

Confusion is the winner this week (my side).

~C

With respects to drivers, if you want to avoid the kernel tainted message
then you are correct; you’ll need those driver files at compile-time.

I might not have been clear enough when trying to explain overlays though:
Their very concept is such that they are not required to be present at compile-time,
so your insistence on them being present in the kernel project is non-sensical.

You add them at u-boot time and they’re merged with whatever the kernel DTS has already.

This being said, I do agree that it does feel a bit odd that we’re not able
to locate the origin of your AUDI overlay.

that’s here: GitHub - RobertCNelson/ti-linux-kernel-dev at ti-linux-5.10.y

Regards,

They may not be required but there are many dts overlays defined in git repo https://github.com/beagleboard/linux.git when checking out a specific branch of device - see arch/arm/boot/dts/overlays.

What worried/worries me is that some are missing (e.g. BB-BONE-AUDI-02-00AA) from prior versions so I was not sure if I was in right repo or not.

I am finding coming from really old distro to newer versions that there have been substantial changes and so many repos :slight_smile:

Ah, so I’d use this in place of the other BB-KERNEL repo.

I see the dts files, but again not the AUDI-02 files which I am seeing on the SD card I create from downloaded image.

When building on the beaglebone I see it places the dtbo files under /boot/dtbs/<uname…>. What would be correct procedure - do I simply add it to /boot/uEnv.txt referring to the boot folder or do I copy compiled dtbo file to /lib/firmware and then reference /lib/firmware/myfancy.dtbo file in /boot/uEnv.txt?

~Colin

Do not prepend the file name, u-boot knows exactly where to search based off the uname variable

Thanks Robert, where is correct place for the compiled dtbo file, in /boot/dtbs/5.10.168-ti-r83/ or must they be copied to the /lib/firmware folder?

The build script will install them to the proper place