The latest kernel for BBB is 6.18.1-bone11. How/where do I download and compile this? I can find standard Linux kernel. But, I need all the Beaglebone additions and patches.
1. Suppose version goes up to 6.18.9, yet I want to download/compile 6.18.1, do I adjust version.sh accordingly?
2. Right now, make menuconfig is being skipped, because AUTO_BUILD=1. If I want “make menuconfig”, do I set AUTO_BUILD=0 ? And, where? in system.sh.gitlab where it’s being set now, or add to version.sh?
Every release is tagged… Tags · RobertCNelson/bb-kernel · GitHub which helps as long as you have a host in the same era.. (As tags from a few years ago might need an old verison of ubuntu to build…)
Don’t enable AUTO_BUILD unless you are buiding in CI or want to build it as-is..
But, I need access to “make menuconfig”. I want to move all USB Gadget modules into modules, not builtin as they’re now.
I’m using “usb_f_hid”, and it works most of the time with “g_multi” loaded but not enabled, but there are corner cases I can’t track down. And, don’t have time anymore.
But, with “g_multi” as modules and blacklisted, it works all the time. But, that’s with standard Linux kernel, without your BBB additions/patches.
So, I want all your BBB additions/patches, but with USB Gadget re-compiled as modules. For that, I need access to “make menuconfig”.
I was wrong. I only looked at the files, and didn’t run build_deb.sh (which later took 1hour git + 5hours compile) when I wrote this. system.sh is copied from system.sh.sample which doesn’t set AUTO_BUILD, so make menuconfig does pop up. Good.
Now, after compiling few kernels, here is one customer’s feedback:
1.
curl --follow -OJ https://github.com/RobertCNelson/bb-kernel/archive/refs/tags/6.18.1-bone11.zip
unzip bb-kernel-6.18.1-bone11.zip
cd bb-kernel-6.18.1-bone11
./build_kernel.sh
error – “fatal: --local can only be used inside a git repository”
2.
git clone -b am33x-v6.18 https://github.com/RobertCNelson/bb-kernel.git
cd bb-kernel
./build_deb.sh
Git took 1 hour… lots of “deltas”.
system.sh.sample , therefore system.sh eventually, doesn’t define CC= (cross compile variable). So, it was downloading/using CC=arm-linux-gnueabi-. I have arm-linux-gnueabihf- already installed. I copied over CC=arm-linux-gnueabihf- from system.sh.gitlab.
I had to edit version.sh to change version from factory kernel. I don’t want to step on the factory image.
It automatically changes uname_r= line in /boot/uEnv.txt . It seems it has problems with lines with non-existing kernels (installed, removed from system, but leftover in uEnv.txt).
BBB booted okay.
3.
curl --follow -OJ https://github.com/RobertCNelson/linux-stable-rcn-ee/archive/refs/tags/6.18.1-bone11.zip
unzip linux-stable-rcn-ee-6.18.1-bone11.zip
cd linux-stable-rcn-ee-6.18.1-bone11
make rcn-ee_defconfig
make menuconfig
Actually, this is what I’m familiar with, and it doesn’t step on factory images. So, I’ll go with this method.
Correction and Update:
I was wrong about my USB Gadget problems. The root cause was wrong kernel configs, not kernel modules stepping on each other. The 2 relevant configs from factory images are:
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS=y
where CONFIGFS is one level below GADGET. I changed to
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS=m
As long as one of them is ‘m’, the resulting kernel modules are the same. But, on few kernels, I had,
CONFIG_USB_GADGET=m
CONFIG_USB_CONFIGFS=m
This makes no difference on kernel modules. But, GADGET=m will flip ‘musb_hdrc’ (Inventra Highspeed Dual Role Controller) from ‘Dual Role’ mode into ‘Host-only’ mode. As you know, USB Gadget relies on USB device mode. Arrgh… one month of wild goose chase!