How can I modify, build and install Kernel in BeagleBone AI?

Hello,

I want to install a new driver in BeagleBone AI’s kernel but I have no clue on how to do it. So what do I need to do to modify some files in /sound/soc/codecs, rebuild the kernel and update it?

Thanks in advance,
Mike

Hi @Mikel which kernel are you booting the BeagleBone AI today?

Hello @RobertCNelson currently im using 4.14.108-ti-rt-r144but I have tried also with the non rt version. I have made the changes in the codec files and rebuilt the kernel. And tried with different root file systems such as the minimal debian 10, or the beagleboard imagesfor BB AI(by mounting them and copying the file system to the sd card). However, I always get problems such as, directly not booting, or booting but things like wifi not working(even if I install the “bb-bbai-firmware”, or when I make sudo upgrade it always gets stuck in “Updating node-red user to group dialout”… but even if I solve that with dkpg, then when I reboot the board it becomes unreacheable by ssh. So I am really lost in this.

My real question should be, how to modify a codec/driver for BB AI and still have all the benefits of the Beagleboard images.

Thanks in advance.

Don’t bother with RT on the BBAI, the out of tree patches that make brcmfmac driver work in non-RT, completly fail and lock up on RT enabled Kernel’s…

Regards,

@RobertCNelson thank you. Anyways I still had same problems with non RT version. So I would appreciate if you provided some general steps in order to achieve modifying a codec/driver for BB AI and still have all the benefits of the Beagleboard images.

Thanks

Since your on, 4.14.x-ti…

git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git
cd ./ti-linux-kernel-dev/
git checkout ti-linux-4.14.y -b tmp
./build_deb.sh

Boot into board, copy ./deploy/linux-image*.deb and install via “sudo dpkg -i linux-image*.deb”

You can make changes to the kernel source under “./KERNEL/”

then run:

“./tools/rebuild_deb.sh”

To rebuild the *.deb with your kernel changes…

Regards,

1 Like

I followed steps mentioned above and got package built, now I am getting following error ,on BB-AI64

debian@BeagleBone:~/scratch_may_24_2023$ sudo dpkg -i linux-image-5.10.168-ti-r62_1xross_armhf.deb

[sudo] password for debian:

dpkg: error processing archive linux-image-5.10.168-ti-r62_1xross_armhf.deb (–install):

package architecture (armhf) does not match system (arm64)

Errors were encountered while processing:

linux-image-5.10.168-ti-r62_1xross_armhf.deb

debian@BeagleBone:~/scratch_may_24_2023$ echo $?

1

debian@BeagleBone:~/scratch_may_24_2023$ ls -la

total 33600

drwxr-xr-x 2 debian debian 4096 May 24 20:36 .

drwxr-xr-x 15 debian debian 4096 May 24 20:36

-rw-r–r-- 1 debian debian 34396676 May 24 20:36 linux-image-5.10.168-ti-r62_1xross_armhf.deb

debian@BeagleBone:~/scratch_may_24_2023$

Hi @Alok_Kumar_Mishra The BBAI and BBAI64 are different hardware.

For the BBAI64, you need to build the arm64 kernel, all the old ‘legacy’ branches don’t have an arch indicator, but for the arm64, i’m making sure to have it in the branch name…

git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git
cd ./ti-linux-kernel-dev/
git checkout ti-linux-arm64-5.10.y -b tmp
./build_deb.sh

Regards,

1 Like

thanks , it works