Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Article for the German Linux magazine
@ 2022-05-13  8:45 Arnout Vandecappelle
  2022-05-13  9:02 ` Romain Naour
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-05-13  8:45 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Jens-Christoph Brendel

  Hi all,

  About two weeks ago, we got a mail on the list asking for a volunteer to write 
an introductory article about Buildroot for the IoT-themed issue of the German 
Linux magazine. I volunteered two rite such an article.

  I have an outline or rough draft below. It's just bullet points (though I 
ended up writing sentences for most of it). I'd like to get feedback on:

- Is there anything missing that I should mention in the article?

- Is there something in here which is incorrect?

- Is there something here that we actually don't want to draw attention to?

  Please *do not* pay attention to style or spelling or little details that are 
missing.


  Thank you for your help!


  Regards,
  Arnout


Buildroot for IoT

For IoT distro is important:
- getting a basic system up and running quickly;
- small footprint (sometimes only 64MB of flash)
- control over what you build;
- support for all major cloud services
- easy integration of own components;
- attention for security issues.

Buildroot is a build system that grew out of uClinux and busybox, so with a 
focus on very small systems.
Meanwhile, it supports all kinds of different use cases, ranging from (still) 
systems with only a few MB of flash, over docker images for cloud deployments, 
to complex systems with a graphical stack, database, etc.
The principles of Buildroot are
- simplicity;
- flexibility to build exactly the system you want;
- reproducibility: if you rebuild the same configuration years later, you should 
get the same result bit-for-bit;
- maintainability.

With Buildroot, you can build a system by choosing which packages you want and 
some other options in a menu system (based on that of the Linux kernel).
On that basis, Buildroot will download and build the source code of the selected 
packages and compile it into the root file system.
You can also add your own extra files, for example configuration files or your 
own application.
To get you started, there are sample configurations for about 230 boards that 
you can buy off-the-shelf, plus about 40 configurations for simulation in qemu.
However, it is easy enough to make your own configuration, as long as you know 
which CPU variant you have and which bootloader and kernel options (device tree) 
to use.

In practice, however, you will almost always want to add your own application.
For that, you can generate an SDK that you can use to build the application, 
e.g. in an IDE.
But it is also very easy to create a new package for your application.
If you use one of the supported build systems (meson, cmake, autotools, qmake, 
waf, cargo, go, python, rebar), a few lines are usually enough.

Apart from the flexibility of the choice of packages (e.g. 4 different init 
systems, 3 different C libraries, 15 different root file systems, more than 10 
different web servers or web frameworks), the flexibility is mainly in the 
possibilities to modify the root file system, to add configuration files, etc. 
Because of the large amount of freedom, the choice of packages is often limited 
to a few lines. However, with so much freedom, there is no standard way to 
implement some common use cases, e.g., readonly root file system with a separate 
partition for persistence, or a verified boot process with hardware TPM. It is 
possible to implement all these things, but you have to figure out how.

There are some projects that use buildroot to build a more managed (and thus 
less flexible) "distro": SkiffOS, dahliaOS, Batocera Linux, Home Assistant 
Operating System.

For security issues, buildroot has a system that automatically detects CVEs. The 
list of packages is updated weekly on 
http://autobuild.buildroot.net/stats/master.html. A mail is also sent to the 
people who signed up as developers for the package.
In addition, Buildroot offers the classical global hardening options: stack 
smashing protection, PIC/PIE, RELRO, buffer overflow detection.

Internally, Buildroot uses GNU make to drive the build, supported by shell 
scripts and some C code (mostly copied and adapted from elsewhere).
The infrastructure consists of about 5000 lines GNU make, 5000 lines shell 
scripts, and 20000 lines C code (mainly for the Kconfig infrastructure). The 
make code is not so easy to understand (because make is a strange language), but 
it is still manageable. Moreover, adjustments to the core code are rarely needed 
- most evolution is in the packages themselves.

Buildroot is maintained by volunteers. There are 4 maintainers, i.e. people with 
commit access. However, the biggest contribution is made by about 100 other 
people who add about 1500 changesets each release. Releases are made every 3 
months (20XX.02, 20XX.05, 20XX.08, 20XX.11). The last month of a cycle is a 
stability phase where only fixes are applied - but new evolutions still end up 
in the 'next' branch. Twice a year there is a developer meeting, although due to 
the known circumstances this has not taken place since February 2020. The 
community is mainly on the mailing list (lists.buildroot.org) and on IRC 
(#buildroot on OFTC).


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-15 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13  8:45 [Buildroot] Article for the German Linux magazine Arnout Vandecappelle
2022-05-13  9:02 ` Romain Naour
2022-05-13 20:23   ` Arnout Vandecappelle
2022-05-13 10:33 ` Baruch Siach via buildroot
2022-05-13 20:26   ` Arnout Vandecappelle
2022-06-15 10:31 ` Alexander Dahl
2022-06-15 16:06 ` Heiko Thiery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox