After cloning repository with all submodules run:
make linux
- compile linux kernelmake buildroot
- compile buildroot and build rootfs with rootfs-overlaymake vm-debug
- launch qemu with modified NILFS kernel module and modified nilfs-utils.
Makefile commands:
make linux
- compile linux kernelmake buildroot
- compile buildroot and build rootfs with rootfs-overlaymake vm-debug
- launch qemu with kernel debug supportmake gdb-debug
- launch gdb with presseding ingdb/gdbcmd
In one terminal:
make vm-debug
In the second one:
make gdb-debug
Then set breakpoint in gdb, for ex. b ext2_fill_super
and input continue
Launch qemu with: make vm-debug
After each change in kernel code run
make linux
There is a usefull utility: workflow/linux/scripts/decode_stacktrace.sh
which
allows to decode generated kernel stacktrace. It can be invoked by:
sh scripts/decode_stacktrace.sh vmlinux < stacktrace.log
where stacktrace.log
is file with copied stacktrace content.
If any configuration changed, remember to replace ./.config-*
files
with changed ones.