Collection of scripts to automate VM creation for testing Linux kernel builds.
- Pull the Linux source code
$ git submodule update --init -- src/linux
- Create rootfs and host configurations
$ ./tools/create-rootfs.sh
- Make default kernel config
$ ./tools/make-defconfig.sh
- Build the Linux kernel
$ ./tools/build-kernel.sh
- Start VM
$ ./tools/start-vm.sh
- SSH into vm
$ ssh test
- Stop VM
$ ./tools/stop-vm.sh
Optional arguments to start-vm.sh
:
-c: CPU security related parameters (smep, smap)
-k: Kernel security (kpti=1, kaslr)
Examples:
$ ./tools/start-vm.sh -c smep
$ ./tools/start-vm.sh -c smap
$ ./tools/start-vm.sh -c smep,smap
$ ./tools/start-vm.sh -k kpti=1
$ ./tools/start-vm.sh -k kaslr
$ ./tools/start-vm.sh -k kpti=1,kaslr
$ ./tools/start-vm.sh -c smep,smap -k kpti=1,kaslr