Giter VIP home page Giter VIP logo

minimal_raspberrypi_buildroot's Introduction

Minimal Raspberry Pi 3 Linux configuration and Buildroot image

I was tired to get more than 100 MB of Linux modules by using the bcm2709 Linux kernel defconfig from the Raspberry Pi official Linux repository, so I have created a minimal Linux configuration for the Raspberry Pi 3 and then adapted Buildroot 2018.02-git to get an embedded system with a small footprint.

Result:

  • Kernel: 2.4 MB
  • Rootfs: 3.7 MB (651 kB for the kernel modules)

What do I have for that amount of bytes?

  • Working HDMI + serial consoles
  • Working Ethernet with DHCP
  • Working internal Wifi with wpa_supplicant and DHCP
  • A very simple GNU/Linux system that boots (from end of bootloader to start of init scripts) in 1.4 sec, you even have vi installed!

What is missing?

  • Bluetooth
  • Almost all modules, so you will have to had the ones you need
  • GPU related stuff

How to use it?

Instead of making changes directly in Buildroot's tree, I have prepared a simple BR2_EXTERNAL which can live alongside mainline Buildroot.

Get Buildroot

Download or clone Buildroot in the parent directory

$ git clone git://git.buildroot.net/buildroot

Build the image

Create a new directory for the build (to keep the Buildroot tree clean), next to the freshly cloned buildroot directory

$ mkdir build

To avoid duplicates in the downloaded files, I recommend using a separate directory for the downloads, so create another directory buildroot_dl

$ mkdir buildroot_dl

Select your config

$ cd build
$ make BR2_EXTERNAL=../minimal_raspberrypi_buildroot/ O=$PWD -C ../buildroot/ raspberrypi3_minimal_defconfig

Then make

$ make

After a while, the SD card image is ready in images/sdcard.img, you can then flash it with dd or Etcher for example.

FAQ

  • Why stripping everything to get a system barely functional? Just because we can
  • Why using musl as C library? Just to give it a try
  • Why not using "x, y" repository already available? Ah! interesting, I did not found it when I looked for it, please give me the URL to have a look
  • I have tried you image and the system do not boot in 1.4 sec? This time was measured with the quiet argument given to the kernel, otherwise, the logs through the serial line slow down the boot. And by boot, I only mean the kernel boot, not the userspace (load network drivers then DHCP...)

minimal_raspberrypi_buildroot's People

Contributors

romainreignier avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.