It's been awhile since we've had to make any changes to AethOS Build Dist, but recently I was asked to upgrade the kernel version.

It actually turned out to be very simple. First, I duplicated the appropriate files under br2_external/board/aethos and name the new files appropriately, such as linux-5.1-full.config for the full config using the Linux 5.1 kernel.

Next, I update the defconfig default config file. This was pretty easy to do since I could use the menuconfig editor using:

abd config

I updated the kernel version number, and pointed the kernel config file to the newly created file from the duplicate made earlier. The Toolchain item also has some kernel version information for the headers, so I had to remember to update those as well.

I also had to get rid of some deprecated configuration items before the configuration tool was happy. Since I committed and pushed my changes then you probably won't have to do this.

Updating the kernel configuration file was also simple.

abd kconfig

I made a few minor tweaks and saved the config file, but I don't think any of the tweaks were actually necessary.

Voila, that's it. I was ready to build a new AethOS distrubution with an updated Linux kernel.

abd build

Lessons Learned

If you're going to do this yourself, here are a few lessons I learned that might help you through some of the errors I encountered.

If you're getting an error that states something like Incorrect selection of kernel headers: expected x.x.x, got x.x.x, then probably you changed the kernel version but you didn't change the kernel header version. In abd config, make sure you updated Kernel Headers and Custom kernel headers series in Toolchain.

It's also important to note that if you're going to try to run AethOS as a guest within a Linux container, your kernel versions should be the same, so use uname -a to determine the kernel version you're running.

You might be able to get away with minor version differences, but you'll know they don't match when you try to start your container and you get an error:

root@ubuntu:~#
sudo lxc-start node000 -F
FATAL: kernel too old

Be sure to use the most recent version of AethOS Build Dist because I had to make some minor tweaks to get things to work correctly.