Raspberry Pi Bare Bones: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
→‎Hello World kernel: QEMU instructions.
Line 472:
*** system halting ***
</source>
 
===Running the kernel under QEMU===
 
Although vanilla QEMU does not yet support the RaspberryPi hardware, there is [https://github.com/Torlus/qemu/tree/rpi a fork by Torlus] that emulates the RPi hardware sufficiently enough to get started with ARM kernel development. To build QEMU on linux, do as follows:
 
<source lang=text>
mkdir qemu-build
cd qemu-build
git clone https://github.com/Torlus/qemu/tree/rpi src
mkdir build
cd build
../src/configure --prefix=$YOURINSTALLLOCATION --target-list=arm-softmmu,arm-linux-user,armeb-linux-user --enable-sdl
make && sudo make install
</source>
 
With qemu you do not need to objcopy the kernel into a plain binary; QEMU also supports ELF kernels:
 
<source lang=text>
$YOURINSTALLLOCATION/bin/qemu-system-arm -kernel kernel.elf -cpu arm1176 -m 256 -M raspi -serial stdio
</source>
 
Note that currently the QEMU "raspi" emulation may incorrectly load the kernel binaries at 0x10000 instead of 0x8000, so if you do not see any output, try adjusting the base address constant in the linker script.
 
==Echo kernel==