Difference between revisions of "Buildroot"

From eLinux.org
Jump to: navigation, search
(Packages: ratpoison & libcgi had some recent work)
(Testing infrastructure: working on parallel jobs)
Line 112: Line 112:
 
=== Testing infrastructure ===
 
=== Testing infrastructure ===
  
* Improve run-test with a -j option to select the number of parallel jobs. It then sets a BR2_JLEVEL value in a smart way, dividing the number of cores by the number of parallel cores
+
* Improve run-test with a -j option to select the number of parallel jobs. It then sets a BR2_JLEVEL value in a smart way, dividing the number of cores by the number of parallel cores - Ricardo Martincoski is working on this
 
* Fix run-tests to use a config file for download and output directories, can be overridden in the environment
 
* Fix run-tests to use a config file for download and output directories, can be overridden in the environment
* Fix the Qemu emulation to use stdio and not telnet
+
* Fix the Qemu emulation to use stdio and not telnet - Ricardo Martincoski is working on this
 
* Documentation on how to add a test, including naming convention
 
* Documentation on how to add a test, including naming convention
 
* Folder on autobuild.buildroot.org to store artefacts needed to run tests
 
* Folder on autobuild.buildroot.org to store artefacts needed to run tests

Revision as of 17:42, 14 May 2017

Buildroot is a nice, simple, and efficient embedded Linux build system.

Important links

Developer days

Future:

  • Buildroot Developers Days, before or after the Embedded Linux Conference in Prague (October 2017). Details to be announced.

Past:

Talks

This section gathers the list of talks given about Buildroot, as well as the slides and video when available.

Past:

  • "Buildroot: a deep dive into the core", Thomas Petazzoni, Embedded Linux Conference Europe, 13-15 October 2014, Düsseldorf, Germany. Slides.
  • Buildroot: what's new, Thomas Petazzoni, Embedded Linux Conference, 1 May 2014, San Jose, United States. Slides, HD video, Low-res video, Audio only
  • "Buildroot: what is new", Peter Korsgaard, Embedded Linux Conference Europe, 25 October 2013, Edinburgh, UK. Slides, Video.

Accounting

This section gathers all the income and expenses of the Buildroot project.

Current balance: + €381.04

  • 2015-01-08: + €423.14 : Google paid €423.14 ($500) for mentoring a student for the GSoC 2014
  • 2016-02-07: - € 42.10 : thank-you gift to Niel for helping host the DevDays in Brussels the past few years (T-Shirt: €24.50, Mug: €10.00, shipping: €14.50, rebate: €6.90)

Notes: until we have a legal entity representing Buildroot, that money is held by Yann E. MORIN on behalf the Buildroot project. Accounting is handled in Euro. Update 2017-05-14: funds have been transfered to the association's account.

List of forks

  • [1]. A Rasberry-Pi related fork.
  • [2]. Another RPi related fork, with a lot of focus on Qt5 and GStreamer.
  • [3]. Not a fork, but a convenience layer on top of buildroot.
  • [4]. Another wrapper around Buildroot, to help manage projects.

Todo list

This is a list of improvements that we would like to see in buildroot. Feel free to add suggestions here. If you're working on one of these items, put your name and the date behind it, to avoid duplicate work.

There are a number of patches that have been determined to be useful but for various reasons nobody currently has time to review or test them. Anybody, especially a person new to buildroot, is welcome to adopt these patches and resubmit them to the mailing list. These patches can be viewed by looking at the following link - http://patchwork.ozlabs.org/project/buildroot/list/?state=1&delegate=7151

Packages

Note: if you start working on any of these packages, please edit this section to indicate it. If the package is proposed in a bug report, please also update the bug report. Sending a mail to the mailing list also never hurts, you never know that someone else started working on it without following this guideline.

Toolchain

Documentation

Core Buildroot infrastructure

  • Several improvements are possible in the download infrastructure (even after all the improvements that were already done):
    • Rename the downloaded files so they include the package name and version. Special care has to be taken for primary and secondary sites, and for extra downloads (including patches).
    • Split between FOO_SITE and FOO_SOURCE shouldn't be necessary. Or it could be made optional, i.e. make it possible to specify the full path in FOO_SOURCE.
    • Conserve downloaded git/hg trees, so that you can change the FOO_VERSION and avoid a re-download. This requires using 'git fetch URL' instead of 'git clone URL' when the .git directory exists already. And a lot more complexity.
  • It would be nice to add a br-configure script in host/usr/bin for autotools-based packages. Run ...BUILDROOTSDK/usr/bin/br-configure --enable-foo --disable-bar, and the br-configure script would call the ./configure script in the current directory passing all the right options (--host, and all environment variables CC, LD, AS, AR and such).
  • Make the HOST-directory a relocatable SDK:
    • Make sure that all binaries and libraries built for the host are built with a rpath pointing to host/usr/lib. Normally, this should already be the case, but it's worth checking.
    • Change the rpath value to $ORIGIN/../lib instead of the current absolute path $(O)/host/usr/lib.
    • Modify/patch the pkg-config wrapper script so that instead of having a fixed location for the PKG_CONFIG_PATH and PKG_CONFIG_SYSROOT_DIR, those are deduced from the location of the pkg-config wrapper script. This will allow a pkg-config binary that has been moved to still operate properly, without having to set any environment variable.
    • Write a shell script, installed in host/usr/bin, which would munge the libtool .la files, the qmake.conf file and the CMake toolchain file to set the correct path. This script reads a file (can be host/usr/share/buildroot/location) which contains the original location of the SDK. This allows the script to do the right modifications on all the libtool, qmake.conf and cmake files (toolchainfile.cmake is already relocatable, but package-installed .cmake files may not be). Once this is done, the script changes the host/usr/share/buildroot/location file so that it contains the new location.
    • Modify the external toolchain wrapper so that it bails out and warns the user if the directory it is executed in doesn't match the location of host/usr/share/buildroot/location.
  • Properly detect thread and TLS support in external toolchains, or make TLS knob driven by thread availability in the toolchain. See the discussion in http://patchwork.ozlabs.org/patch/288051/ as reference)
  • Add instrumentation scripts to analyse package installed files:
    • find libraries with wrong RPATH/RUNPATH tags
    • detect unused .so libs (eg. shared libs that are not DT_NEEDED by anything - note: only detect those libs, don't remove: can be used as plugin (dlopen), or used by an application built outside Buildroot)
  • A script that checks consistency of depends/select for packages. Maybe it can be integrated to the current check-package.

Testing infrastructure

  • Improve run-test with a -j option to select the number of parallel jobs. It then sets a BR2_JLEVEL value in a smart way, dividing the number of cores by the number of parallel cores - Ricardo Martincoski is working on this
  • Fix run-tests to use a config file for download and output directories, can be overridden in the environment
  • Fix the Qemu emulation to use stdio and not telnet - Ricardo Martincoski is working on this
  • Documentation on how to add a test, including naming convention
  • Folder on autobuild.buildroot.org to store artefacts needed to run tests

TODO items under discussion

Here are some nice-to-have's for which it is not entirely clear if and how they could be implemented:

  • Out-of-tree builds, which allows the package source to be shared between different output directories and between host and target compiles.
  • It would be nice if you could run a buildroot command that prepares a local copy of a package's source, and allows you to generate patches for it later. This could use git or quilt to keep track of the patches.
  • It would be nice if there was a make target to reinstall everything to the target (i.e. remove all the target-installed stamps, remove the root stamp, maybe remove the target too). However, what is missing is the copying of the toolchain support files (libc.so etc.). It's not obvious that this can be done in a reliable way.
  • To facilitate debugging, all packages should be installed to the staging directory. The target directory should in fact be a subset of the staging directory. See the FOSDEM 2013 discussion at http://elinux.org/Buildroot:DeveloperDaysFOSDEM2013, and the discussion around patch http://patchwork.ozlabs.org/patch/252718/. This is however a significant change in Buildroot, so probably difficult to implement, and will raise a number of quite complicated questions.