Pi Kernel Compilation
Tough Stuff
Archive LinuxI’ve been messing around with the software aspect of the Raspberry Pi lately, trying to break free from the standard images provided by the foundation (as awesome as they are). I figured it’s a great way to really understand the Linux boot process.
If like me, you’ve decided to grab yourself a vanilla copy of some ARM Linux distribution and boot from it, you’ll quickly discover it won’t work, including the Debian ARM port – this is because the Raspberry Pi does require its own kernel modifications to manage the hardware specifics. Any Linux kernel simply won’t do.
Fortunately the foundation has provided all the firmware and modules required, including binary releases being maintained constantly, if you know what you’re doing, you can find them here:
https://github.com/raspberrypi/firmware
The next challenge is to use this firmware in a standard Linux kernel compiled from scratch. Things get a little tricky when you throw in the ARM architecture to contend with, not to mention organising the kernel compilation to include your custom Pi firmware.
So far I’ve only found one decent example of where this has worked:
http://www.linuxsystems.it/2012/06/debian-wheezy-raspberry-pi-minimal-image/
This is an image produced by a member of the Pi forums (thanks darkbasic!) and is based on the new Debian Wheezy distribution, and building this requires “compiling an arm toolchain and building a qemu snapshot from git statically”. Not something I’ve done recently.
My first goal for the Pi is to build a custom Linux kernel, probably based on the Debian Wheezy image, then onto more interesting hacking, exciting times!