Home  >  Edison  >  Moving to btrfs

Installing an alternate kernel

Building an alternative kernel

The kernel version must be different from the one already installed.

Build kernel and initrd using make image. This will also rebuild the entire image.

Start the apt repository

Now create a package index and serve the repository as described here.

Modifying Edison’s installed kernels

Install kernel and kernel modules

This can be updated over-the-air (OTA) to a booted Edison assuming it is accessible with ssh root@edison.local:

meta-intel-edison/utils/flash/btrfsFlashOta.sh -k

Update kernel and kernel modules

If you rebuild your kernel without changing the kernel version you can update it on Edison:

meta-intel-edison/utils/flash/btrfsFlashOta.sh -u

Remove kernel and kernel modules

If you want to remove an installed kernel:

meta-intel-edison/utils/flash/btrfsFlashOta.sh -r=5.10.0

Here 5.10.0 is an example of a string that represents a part of the kernel package name that uniquely removes only one kernel.

Boot into the new kernel

Set the U-Boot environment variable switch to 1 so that U-Boot will try to boot the new kernel on reboot.

From linux

fw_setenv switch 1

U-Boot will change the kernel, set the U-Boot environment variable boot_count to 1. A successfully booted kernel will set boot_count to 0. If on boot boot_count == 1, U-Boot will recognize that booting the new kernel failed and will automatically revert to the old kernel.

Reverting back to the old kernel

Setting boot_count to 1, will force U-Boot to booting the old kernel.

fw_setenv boot_count 1