Embedded Linux system for Raspberry Pi with Buildroot


This post shows how easy it is to make a custom embedded Linux system for Raspberry Pi using Buildroot. I used an Ubuntu 13.04 VM for Parallels Desktop 9 to perform the build.

The Ubuntu VM required only two dependencies and I could go ahead with the build. These I installed by executing

sudo apt-get install ncurses-dev git g++

I then obtained Buildroot release buildroot-2014.05.tar.gz and extracted it to a local folder using tar xvzf buildroot-2014.05.tar.gz. The procedure to perform the build and prepare an SD card is well documented in file board/raspberrypi/readme.txt.

I headed into the buildroot-2014.05 folder and prepared the appropriate .config file required by buildroot

cd buildroot-2014.05
make raspberrypi_defconfig

Since I wanted to generate a persistent root file system, I followed that by executing

make

The build takes a while to finish. Once done, I followed the steps in readme.txt mentioned above to prepare an SD card. I already had an appropriately formatted SD card so I copied the relevant output files

rm /media/parallels/boot/*
cp output/images/rpi-firmware/* /media/parallels/boot/
cp output/images/zImage /media/parallels/boot/
sudo rm -rf /media/parallels/fc254b57-8fff-4f96-9609-ea202d871acf/*
sudo tar xf output/images/rootfs.tar -C /media/parallels/fc254b57-8fff-4f96-9609-ea202d871acf/

I was able to boot Raspberry Pi with the newly minted headless embedded Linux system, use an HDMI display to log in, and bring up the ethernet interface eth0.

9 thoughts on “Embedded Linux system for Raspberry Pi with Buildroot

  1. I have compiled the “buildroot-2014.05” for the raspberry pi device by using raspberrypi_defconfig which is provided by them and successfully booted with the new fresh kernel but, unable to connect to the internet connection from the newly booted kernel and also not having access to the basic tools like shell and similar kind of tools. So, my question is this will it be possible to compile the kernel with our specified configuration so that I can choose the packages in which I am interested. In my case, internet connection is most important thing for the fresh kernel build.

    If you know anything about it, please reply.
    Thanks in advance…

  2. Thanks for the quick reply, but the first link which you send is not working for me. actually there is absense of line: “iface eth0 inet dhcp” in, /etc/network/interfaces. and the second link provided is not for the built for raspberry pi, So I was looking for the links which help me to build the kernel for raspberry pi with basic functionality.

  3. Not working for me. I followed the steps provided in the file board/raspberrypi/readme.txt but, I am unable to connect to the ethernet and not getting the access for the basic commands as well. My question is this, will it be possible for me to modify the config file, configs/raspberrypi_defconfig, so that I can add my own dependencies which I am intrested and if it’s possible then tell me the solution for the same, through which I can add the contents for modifying this file.

  4. Can you send me your raspberrypi_defconfig file? I am not able to access some basic functionality after the build performed for raspberry pi.

    1. As far as I can tell, there is no Buildroot config for doing that. What do you want to do that for? Why not use cross-compilation toolchain to build whatever you need on the host? You can always use a full-blown Linux distribution such as Raspbian.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s