ποΈ Building and booting a custom Linux kernel with kw
tl;dr
kwto develop and build a custom Linux kernel.IIOLinux kernel tree.- Linux kernel compilation.
- Booting the custom Linux kernel.
Commands
kw ssh # initiate an SSH connection to the default remote
cd "$IIO_TREE" # go to the IIO tree directory
kw build --menu # safely modify `.config` w/ a TUI
kw build # compile Linux kernel from source considering local configurations
kw deploy --modules # only install modules into the VM
Notes
In this class Iβve installed the kw tool to build and boot a custom Linux kernel. The IIO (Industrial I/O subsystem) Linux kernel tree was also cloned and built.
The resulting setup for this class was:
/home
βββ lk_dev
β βββ iio
β βββ kw
β βββ shared_arm64
β βββ vm
β βββ arm64_boot
β β βββ initrd.img-6.1.0-43-arm64
β β βββ vmlinuz-6.1.0-43-arm64
β βββ arm64_img.qcow2
β βββ base_arm64_img.qcow2
βββ pietro
βββ github
βββ open-source-development
βββ lk_dev
βββ activate.sh
π
kwcan update itself using theself-updatecommand.kw self-update # update with master branch kw self-update --unstable # update with unstable branch.
β οΈ When a new VM is launched with virsh, update the IP addess in
kwconfiguration.sudo virsh net-dhcp-leases default cd "$IIO_TREE" kw remote --add arm64 root@<VM-IP-address> --set-default
The kw ssh --get '~/vm_mod_list' command didnβt work for me, so I had to use scp root@<VM-IP-address>:~/vm_mod_list .
Sometimes, sudo virsh shutdown arm64 doesnβt work. In these cases I have to force it with sudo virsh destroy arm64