Raspberry: buildroot setup

When searching for some information on setting up a buildroot environement for the rpi 3, i did come across a simple but complete post from "Christophe Blaess". So here is just a ripped version with a few personnal customizations (mainly targeted to homebrew support like hardware accelerated sdl2 without X). If you are looking for a complete and up to date publication, you should really take a look at Christophe Blaess page.

Download latest LTS buildroot version

mkdir -p /opt/buildroot
sudo chown -R $USER:$USER /opt/buildroot
cd /opt/buildroot
mkdir -p board/rpi3/
wget http://www.buildroot.org/downloads/buildroot-2019.02.3.tar.bz2
tar xf buildroot-2019.02.3.tar.bz2
cd buildroot-2019.02.3

Setup a toolchain build

make raspberrypi3_defconfig
make menuconfig
  • Build options:
    • Download dir: $(TOPDIR)/../dl
    • Host dir: $(TOPDIR)/../board/rpi3/cross
  • Toolchain:
    • C library : glibc
    • Kernel Headers: Linux 4.14.x kernel headers
  • System configuration:
    • Init system: None
    • Custom scripts to run before creating filesystem images: ()
    • Custom scripts to run after creating filesystem images: ()
  • Kernel:
    • Linux Kernel: [ ]
  • Target packages:
    • BusyBox: [ ]
  • Filesystem images:
    • ext2/3/4 root filesystem: [ ]

Build the toolchain

cp .config ../board/rpi3/buildroot-2019.02.3-toolchain.config
make toolchain

Build a complete system

cd ..
rm -rf buildroot-2019.02.3
tar xf buildroot-2019.02.3.tar.bz2 && cd buildroot-2019.02.3
make raspberrypi3_defconfig
make menuconfig
  • Build options:
    • Download dir : $(TOPDIR)/../dl
  • Toolchain:
    • Toolchain type: External toolchain
    • Toolchain : Custom toolchain
    • Toolchain origin: Pre-installed toolchain
    • Toolchain path: $(TOPDIR)/../board/rpi3/cross/usr
    • External toolchain gcc version: 7.x
    • External toolchain kernel headers series: 4.14.x
    • External toolchain C library: glibc/eglibc
    • Toolchain has C++ support: [*]
  • Target Packages:
    • Graphics libraries and applications:
      • mesa3d:
        • Gallium vc4 driver
        • OESMesa library
        • OpenGL EGL
        • OpenGL ES
      • sdl2:
        • KMS/DRM video driver
        • OpenGL ES
    • Networking Applications
      • openssh

Build final image

cp .config ../board/rpi3/buildroot-2019.02.3-system-01.config

Previous Post Next Post