English / Deutsch | Print version Plop Linux  

<< Previous
Differences to i486, x86_64

Table of Contents

Next >>
Raspberry Pi, GPU userland apps and camera tools

QEMU


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


Required files:

ploplinux-24.2-arm.img.xz ~1.5 GB, the image file
arm-qemu-zImage ARMv6l Linux Kernel for QEMU
arm-qemu-boot.sh Start script


Uncompress the image file with 'xz -d ploplinux-24.2-arm.img.xz'. Note: This file became a size of 10GB.

Start QEMU with 'sh arm-qemu-boot.sh arm-qemu-zImage ploplinux-24.2-arm.img'.


Compile the Linux Kernel for ARMv6l to run in QEMU


Required files:

tools.tar.gz Cross compile tool chain
shell.sh Environment setup
linux-4.2.8.tar.xz Linux Kernel
arm-qemu-linux-4.2.8.patch ARMV6l config patch
config-add Additional config settings


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.



<< Previous
Differences to i486, x86_64

Table of Contents

Next >>
Raspberry Pi, GPU userland apps and camera tools


© 2024 by Elmar Hanlhofer