. ./ulk kernel=6.9.6
Note that qemu is started with -S flags, so the system will continue bootup only when gdb is connected and run continue command.
. ./scripts/gdb
Do not use root, we mount current directory to /home/qwert/ ...
ssh [email protected]
ssh [email protected]
. ./scripts/connect
. ./scripts/monitor
vim .config
CONFIG_KCOV=y
CONFIG_DEBUG_INFO=y
CONFIG_KASAN=y
CONFIG_KASAN_INLINE=y
CONFIG_CONFIGFS_FS=y
CONFIG_SECURITYFS=y
# CONFIG_RANDOMIZE_BASE is not set
make savedefconfig
rm -rf $RELEASE.id_rsa.pub
. ./ulk
. ./scripts/gdb
Remove -S flags from qemu
Check "chroot/debootstrap/debootstrap.log"
rm -rf $RELEASE.id_rsa*
sudo rm -rf chroot/{bin,sbin,lib,lib32,lib64,libx32,etc,usr,tmp,sys,srv,dev,mnt,proc,opt,run,home,boot}
Crash should be compiled after login to guest os.
Our current directory is mapped into /home/qwert.
cd crash && make && make install
It is really too slow to build crash in guest. So we keep a prebuild version in bins/$ARCH/crash
qemu-aarch64-static -L /usr/aarch64-linux-gnu/ ./main
With -L
option we can change the library search path for app run in qemu. This will fix the lib* cannot find issue.