Skip to content
This repository has been archived by the owner on Dec 4, 2021. It is now read-only.

cellux/rpi-buildroot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Buildroot add-on for building a Raspberry Pi root filesystem

Note: the 2015.05 release of Buildroot includes support for Raspberry Pi (all variants) which makes this project unnecessary. The blog post detailing how it works might be still interesting, although it's rather outdated. If you want to build your own rootfs/bootfs, I recommend using Buildroot directly.

The following commands should be executed as an ordinary user (NOT root):

# create folder for ccache and dl directories
# (must be at this location, the buildroot config refers to it)
mkdir $HOME/.buildroot

# create a temp directory for build (may be anywhere)
mkdir -p /tmp/buildroot
cd /tmp/buildroot

# clone this repo
git clone https://github.com/cellux/rpi-buildroot.git

# download and extract buildroot
wget http://buildroot.uclibc.org/downloads/buildroot-2012.11.1.tar.gz
tar xvzf buildroot-2012.11.1.tar.gz
cd buildroot-2012.11.1

# create symlinks for board-specific scripts and add-on packages
for p in board/rpi package/rpi; do
  ln -s $(readlink -f ../rpi-buildroot/$p) $p
done

# override packages which have been customized
for p in luajit; do
  rm -rf package/$p
  ln -s $(readlink -f ../rpi-buildroot/package/$p) package/$p
done

# add the following stanza above the last 'endmenu' line in package/Config.in:
source "package/rpi/Config.in"

# install customized buildroot config
cp ../rpi-buildroot/.config .

# configure (optional)
make menuconfig

# configure command line parameters for the Linux kernel
# (see BR2_PACKAGE_RPI_CONFIG_CMDLINE variable in .config)

# create root filesystem
#
# (warning: this step will download about 1 GB of
# packages and may burn the CPU for several hours)
make clean all

The resulting files are:

  • output/images/bootfs.tar.gz
  • output/images/rootfs.tar.gz

The first one should be extracted to the first (FAT32) partition of the SD card, the second one to the root partition (wherever it is).

About

Buildroot add-on for building a minimal Raspberry Pi root filesystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published