Custom Kernels

Custom Kernels #

Kernel version in BurmillaOS #

BurmillaOS basically uses the standard Linux kernel, but we maintain a kernel config ourselves. Due to various feature support and security fixes, we are constantly updating the kernel version.

BurmillaOSKernel
=v2.0.x5.9.x
=v1.9.x4.14.x

Building and Packaging a Kernel to be used in BurmillaOS #

We build the kernel for BurmillaOS at the os-kernel repository. You can use this repository to help package your own custom kernel to be used in BurmillaOS.

Create a clone of the os-kernel repository to your local machine using git clone.

$ git clone https://github.com/burmilla/os-kernel.git

If you want to build kernel v4.14.53, you can refer to the following command. After the build is completed, a ./dist/kernel directory will be created with the freshly built kernel tarball and headers.

$ git tag v4.14.53-burmilla
$ KERNEL_TAG=4.14.53 make release
...snip...
./dist/kernel/extra-linux-4.14.53-burmilla-x86.tar.gz
./dist/kernel/build-linux-4.14.53-burmilla-x86.tar.gz
./dist/kernel/linux-4.14.53-burmilla-x86.tar.gz
./dist/kernel/config
...snip...
Images ready to push:
burmilla/os-extras:4.14.53-burmilla
burmilla/os-headers:4.14.53-burmilla

For some users who need a custom kernel, the following information is very useful to you:

  1. The modules defined in modules.list will be packaged into the built-in modules.
  2. The modules defined in modules-extra.list will be packaged into the extra modules.
  3. You can modify config/kernel-config to build the kernel modules you need.
  4. You can add your patches in the patches directory, and os-kernel will update these patches after downloading the kernel source.

Now you need to either upload the ./dist/kernel/linux-4.14.53-burmilla-x86.tar.gz file to somewhere, or copy that file into your clone of the burmilla/os repo, as assets/kernel.tar.gz.

The build-<name>.tar.gz and extra-<name>.tar.gz files are used to build the burmilla/os-extras and burmilla/os-headers images for your BurmillaOS release - which you will need to tag them with a different organisation name, push them to a registry, and create custom service.yml files.

Your kernel should be packaged and published as a set of files of the following format:

  1. <kernel-name-and-version>.tar.gz is the one KERNEL_URL in burmilla/os should point to. It contains the kernel binary, core modules and firmware.

  2. build-<kernel-name-and-version>.tar.gz contains build headers to build additional modules: it is a subset of the kernel sources tarball. These files will be installed into /usr/src/<os-kernel-tag> using the kernel-headers-system-docker and kernel-headers services.

  3. extra-<kernel-name-and-version>.tar.gz contains extra modules and firmware for your kernel and should be built into a kernel-extras service.

Building a BurmillaOS release using the Packaged kernel files. #

By default, BurmillaOS ships with the kernel provided by the os-kernel repository. Swapping out the default kernel can by done by building your own custom BurmillaOS ISO.

Create a clone of the main BurmillaOS repository to your local machine with a git clone.

$ git clone https://github.com/burmilla/os.git

In the root of the repository, the “General Configuration” section of Dockerfile.dapper will need to be updated. Using your favorite editor, replace the appropriate KERNEL_URL value with a URL of your compiled custom kernel tarball. Ideally, the URL will use HTTPS.

# Update the URL to your own custom kernel tarball
ARG KERNEL_VERSION_amd64=4.14.63-burmilla
ARG KERNEL_URL_amd64=https://link/xxxx

After you’ve replaced the URL with your custom kernel, you can follow the steps in building your own custom BurmillaOS ISO.

Note: KERNEL_URL settings should point to a Linux kernel, compiled and packaged in a specific way. You can fork os-kernel repository to package your own kernel.