Thursday, February 28, 2013

buildroot for raspberrypi

I bought a raspberrypi to try some interseting ideas on.
raspberry_pi_image
raspberrypi provides several images for downloading, but they are too large and exceeds my needs. My desired raspberrypi image should meet:
  1. fully customizing capabilities on kernel and user applications
  2. python support
  3. standard c&c++ libiaries
  4. serial port communication with peripheral devices
Luckily, here is a buildroot project customized for raspberrypi. With buildroot, all my requirements can be easily satisfied. So I forked from the repository and made some changes, to make the targe image minimal.
  1. disable Qt5 library
  2. disable boost library
  3. change kernel to the official one maintained by raspberrypi team
To build the target image, run commands below:
cp configs/raspberry_simple_defconfig .config
make
After the build is finished. I just need to copy the output/build/linux-rpi-3.6.y/arch/arm/boot/Image to kernel.img on boot partition on the sd card, and untar output/images/rootfs.tar to root filesystem partition.
Power on, and now raspberry pi should be running our own system.