This section describes how you run Plop Linux for ARM in QEMU and how to build an ARMv6l Kernel to boot with QEMU.
Linux Kernel version: 4.2.8
Boot Plop Linux for ARM in QEMU
ploplinux-23.4-arm.img.gz ~900MB, the image file
Uncompress the image file with 'gunzip ploplinux-23.4-arm.img.gz'. Note: This file became a size of 10GB.
Start QEMU with 'sh arm-qemu-boot.sh arm-qemu-zImage ploplinux-23.4-arm.img'.
Compile the Linux Kernel for ARMv6l to run in QEMU
tools.tar.gz Cross compile tool chain
You have to setup the Cross Compile Tool Chain. See Cross compile Linux Kernel.
Start 'shell.sh' to open the cross compile shell.
Extract the Linux Kernel.
You have to patch the Kernel config to create an ARMv6l Kernel. When you don't patch then you get a ARMv5l Kernel.
Patch the Kernel: patch -p1 < arm-qemu-linux-4.2.8.patch
Create the base configuration: make versatile_defconfig
Add additional config settings: cat config-add > .config
Run 'make menuconfig'.
If required add drivers.
Exit the configuration program and save the configuration.
Run 'make zImage' to compile the Kernel.
You find the Linux Kernel file in 'arch/arm/boot/'. The file name is 'zImage'. Rename it to 'arm-qemu-zImage' and use it to boot with QEMU.
Note: To compile the modules run 'make modules && make modules_install'. You find the modules in the directory 'kernel-modules/' where you started 'shell.sh'.
Linux Kernel compile error: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
This happens when you patch the kernel with the QEMU patch after you already configured the kernel. Just run 'make clean' to cleanup and then reconfigure the kernel. After that, the compile should run flawless.
© 2023 by