Summary
This post describes my experience following the second tutorial in the Linux kernel development series from FLUSP. The tutorial walks through how to build and boot a custom Linux kernel for an ARM64 virtual machine using kw (kworkflow) to streamline the process. In practice, it covers installing kw, cloning the IIO kernel tree, configuring a local kw context for the VM, preparing a lean kernel .config, cross-compiling the kernel for ARM64, deploying modules to the VM, and finally booting the VM with the newly built kernel.
My Experience
Installing kw was the first part where I had trouble. One of its dependencies could not be installed on my system, so I had to remove b4 from the Debian dependencies used by kw. After that adjustment, the installation worked. However, kw was still not being added to the PATH variable automatically. To fix that, I added the following lines to the activate.sh script:
export KW_DIR="${LK_DEV_DIR}/kw" and
export PATH="$PATH:$KW_DIR". That solved the issue. Cloning the IIO tree worked well, and configuring kw for the local kernel tree and ARM64 target also went smoothly.
The main issue appeared after compiling the custom kernel and trying to boot it in the VM. For some reason, once the VM loaded the custom kernel, I could no longer interact with it properly through the terminal console: input and output there were not working as expected. Fortunately, SSH access to the VM was still working, so I continued interacting with the guest through SSH instead. That allowed me to keep testing the environment, deploy modules, and verify the custom kernel even though the direct terminal console was not behaving correctly.