This procedure builds a kernel and it’s modules, packages them, builds a local apt repository to serve them and installs them using apt.
apt is slow but keeps the package managers database correct. For debugging quickly (for instance when bisecting) you might not care about the package managers database. In that case go to installing an alternate kernel fast.The kernel version must be different from the one already installed.
Build kernel and initrd using make image. This will also build the entire image.
Now create a package index and serve the repository as described here.
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
If you rebuild your kernel without changing the kernel version you can update it on Edison:
meta-intel-edison/utils/flash/btrfsFlashOta.sh -u
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.
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
reboot
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.
Setting boot_count to 1, will force U-Boot to booting the old kernel.
fw_setenv boot_count 1
reboot
© 2018 Ferry Toth