How to boot from another kernel in BeagleBone Black

How can I boot from another kernel on BeagleBone Black?

Online reading says, /boot/uEnv.txt should have

#uname_r=5.10.168-ti-r83
uname_r=5.10.168-kb

I cross-compiled a new kernel, using “config” file from factory image as starting point, of course changing -ti-r83 to -kb to tell them apart.

But, it doesn’t work. 4 LEDs lights up, then flickers once, then on solid from there.

My setup:

  • old 2GB BeagleBone Black
  • am335x-debian-13.1-base-v5.10-ti-armhf-2025-10-29-4gb.img.xz
  • am335x-debian-13.1-base-v6.17-armhf-2025-10-29-4gb.img.xz

I can boot both factory images, from SD and eMMC. Heck, I can even boot them with initrd.img deleted. So, no problem with the factory images.

My problem is, USB Gadget modules, usb_f_acm and usb_f_serial are built into the kernel. I want them moved to module, because they conflict with usb_f_hid which is what I want to access.

My attempt:

I cross-compiled a new kernel with the following changes,

  • CONFIG_LOCALVERSION=“” → “-kb”
  • CONFIG_USB_F_ACM=y → m
  • CONFIG_USB_F_SERIAL=y → m
  • CONFIG_USB_CONFIGFS_SERIAL=y → n
  • CONFIG_USB_CONFIGFS_ACM=y → n

It compiles okay, and initrd.img builds okay, though it’s not really needed.

Booting is the problem. The only way to make it boot, is to copy my new kernel to the factory kernel,

sudo mv vmlinuz-5.10.168-kb vmlinuz-5.10.168-ti-r83

That is, both vmlinuz-5.10.168-kb and vmlinuz-5.10.168-kb are the same file. But,

  • If it boots with vmlinuz-5.10.168-ti-r83, it works.
  • If it boots with vmlinuz-5.10.168-kb, it doesn’t.

Yes, their modules are installed in

  • /lib/modules/5.10.168-kb
  • /lib/modules/5.10.168-ti-r83

Somehow, the kernel name is hardcoded somewhere in the bootloader. Bootloader and Firmware are not my area. Hence, my question…

My reason:

I’m trying to make BeagleBone Black into “scriptable” keyboard, so that I can send out key presses to USB Host. It’s for QA testing. :slight_smile:

So close! 2 out of 3 file locations..

u-boot is also looking for the device tree:

/boot/dtbs/`uname -r`/*.dtb

In the cross building script, run the ./build_deb.sh and you’ll get a debian package you can install directly on the board and it’ll make sure all 3 files locations are setup..

ps, you’ll also want to remove bbb.io-kernel-5.10-ti-am335x and bbb.io-kernel-5.10-ti

sudo apt-get remove bbb.io-kernel-5.10-ti-am335x bbb.io-kernel-5.10-ti

So that regular updates (well 5.10.x doesn’t see much..) doesn’t upgrade you over your build..

Regards,

Thank you! I got it working.

  • I see /boot/dtbs/… is like /lib/modules/…
  • I learned that kernel has make dtbs_install which I never used on PC.

I now have all my versions of 5.10.168, 6.12.55, 6.17.5 (on Debian 13.1) working on my BeagleBone Black. Even the latest 6.17.7 is working, also.

Regarding being overwritten… All my install are tagged with -kb (for “keyboard”) in

  • /boot
  • /boot/dtbs
  • /lib/modules

so they shouldn’t be affected by any system upgrades.

I will write up a documentation on my GitHub Pages (NOTES | NOTES from my computer).

I wrote up something: BeagleBone Black (BBB) related stuffs | NOTES

1 Like