Buildroot:DeveloperDaysELCE2024
Buildroot Developers Meeting, 14-15 September 2024, Vienna
The Buildroot Developers meeting is a 2-day event for Buildroot developers and contributors. It allows Buildroot developers and contributors to discuss the hot topics in the Buildroot development, work on patches, and generally meet each other, facilitating further online discussions. Attending the event is free, after registration.
It is also possible to attend virtually, if there is interest in it. There will not be a livestream or recording.
Location and date
The next Buildroot Developers meeting will take place on September 14 and 15 (Saturday/Sunday), right before the Open Source Summit Europe 2024.
The meeting will take place in the hackerspace metalab, Rathausstraße 6, 1010 Wien (Vienna). It will be held in the Bibliothek (Library) room.
The meeting will start each day at 9:00 AM.
Participants
If you plan to attend virtually, please indicate at what times as well.
If you will not attend the entire time, please indicate which topics you are interested it, so we can schedule things accordingly.
- Thomas Petazzoni, on both days
- Arnout Vandecappelle, on both days
- Peter Korsgaard, on both days, but only from around 12h on Saturday
- Yann E. MORIN, on both days
- Dario Binacchi, on both days
- Hugo Cornelis, on both days
- Thomas Perale, on both days
- Parthiban Nallathambi, on Saturday
Who can attend ?
This meeting is opened to all Buildroot users and developers. The event is free. However, we make it clear that it is not a training event about Buildroot aimed at newcomers. It is a meeting for Buildroot developers to make progress about various topics in Buildroot. It is recommended to already be a Buildroot contributor to participate to the event.
Report
Buildroot sponsoring
The information document that we currently have is not worded very well. Hugo Cornelis will review and improve it.
This information should be public and more associated with Buildroot than with Mind. Therefore, it will be put on the buildroot website. Arnout will do that once the wording has improved.
The email address should also be an @buildroot.org address. Arnout will ask OSUOSL to make lts@buildroot.org.
We will create a wiki page that describes the processes for LTS maintenance. Arnout will start this page.
SBoM stuff
- CycloneDX should be generated from show-info output.
- show-info should be extended with all the required info.
- Script to convert show-info to CycloneDX should be part of Buildroot, because show-info output is not standard.
- Patch series should include a documentation update that shows how to use the CycloneDX output. For example, a reference to the DependencyTrack document that says how to "docker-compose up" it, and an explanation of how to upload Buildroot's CycloneDX file.
- Ideally it should be possible to generate show-info and CycloneDX for all packages (with no .config). This is a bit difficult in practice - the way pkg-stats does it is not so easy to reuse.
- Nobody knows of any tool that can do CVE tracking other than DependencyTrack.
- PURLs turn out not to be used by DependencyTrack (they are shown but not used in vulnerability search). So it's not useful to add them for now.
Rules for defconfigs
The way that defconfigs are organised currently is very inconsistent. Let's define some rules and guidelines.
Currently it's quite difficult to discover information about how to use Buildroot with a specific board (or if Buildroot is "supported" on that board). The solution is to add documentation about the boards to the manual. We can do that by collecting the readme.txt files, converting them to asciidoc, markdown or ReStructuredText, and generating HTML from it. Since the manual is already quite heavy, the idea is to do that separately.
Side track: it would be nice to convert the manual to md or rst and put it on ReadTheDocs, which is more navigable than the current big manual. Actually we don't need ReadTheDocs, we just need a styling that has a sidebar for easy navigation. If we have the choice between rst and md, we should probably use md because that's what most people are familiar with. So we just need to find a processor that generates nice webpages from md. For example mkdocs.
When the readme of a board is more discoverable, we can put everything beyond the minimal board config in there, e.g. which OpenGL libraries you need to enable to get a graphics stack working. That way our defconfigs can stay minimal.
Defconfigs that haven't been updated for a long time will be removed. When one of the maintainers feels like is, they'll make a script to check when a defconfig was touched for the last time, and if it was more than two years ago it is marked for removal. A mail is sent to the mailing list to announce its removal, and if there's no update within two weeks it is removed.
Here are the agreed rules and guidelines for defconfigs. We will normally not change existing defconfigs, but we will point to these guidelines for new defconfigs and updates. Arnout will update the manual with these guidelines.
- defconfigs are saved with `make savedefconfig`, so without comments etc. Yann will make a script that recreates the existing defconfigs like this, and apply it to all in a single mega-patch.
- The defconfig should be minimal, i.e. just bootable. If there is ethernet, it should run DHCP for it. Firmware for Bluetooth, WiFi and other chips should be included (note that no userspace tool for loading firmware should be needed any more, but there are exceptions). No wpa_supplicant or bluez5_utils should be included; instead this should be mentioned in the readme. Same for the graphics stack.
- The defconfig should use a Bootlin toolchain (stable, glibc) if that is available and works.
- The linux kernel configuration is up to the contributor. Ideally, it is a custom config that enables (as y, not m) only the hardware that is actually available on the board, and possibly hotpluggable and non-hardware drivers (filesystems, networking) as modules. However, it's also accepted to use an upstream defconfig. Again preferred is if there's a fragment that converts y to m for everything that is on the board, or at least for the essentials (like network interface). But again it's acceptable to just keep the upstream defconfig unchanged, if it boots.
- If the kernel config builds modules, and the board has hotpluggable hardware (USB), then it makes sense to also enable mdev. There normally shouldn't be a reason to enable udev, so mdev is preferred.
- There is often a choice between vendor kernel (and U-Boot, and graphics) or mainline kernel (and U-Boot, and mesa3d). It's up to the contributor to choose. We can also have two defconfigs for the same board, one vendor and one mainline. In that case, the vendor variant should be called <board>_vendor_defconfig. Nobody volunteered to do this rename for the existing defconfigs.
- For the bootloader, we have a lot of preferences but none of them are really required:
- Even if there's a separate flash that contains the bootloader (so not on SD card), still build a bootloader and give instructions of how to flash it (and replace the builtin one). Note that this can be a big increase in build time because it may pull in host-python3, but that's worth it.
- If multiple board variants can be supported with a single defconfig because the bootloader in flash chooses the correct dts file, prefer a single defconfig rather than several defconfigs for the different variants.
- If U-Boot supports the extlinux method of booting (i.e. kernel, dts and extlinux.conf in the rootfs), then preferably use this method. But don't go patching U-Boot for this.
- If the board has UEFI firmware built in, prefer no bootloader at all. Instead create an efi partition with the kernel as boot0.bin and add the EFI stub to the kernel.
- In the genimage configuration, there are several ways that partition offsets can be specified: by giving a fixed offset, by sizing the preceding partition, or by giving an alignment constraint. If it is possible to rely only on alignment constraint, we prefer that. If that is not enough, we prefer if it can be specified by sizing the partition - this is relevant e.g. for leaving space for the U-Boot environment. Finally, if something is expected at a fixed offset (by the boot ROM or e.g. for the U-Boot environment), then we should use the offset explicitly.
For speeding up the CI builds, it would be good if we could also share the download directory. Ideally, it's possible to have a shared download directory on each runner that gets mounted into the job container. To be seen if and how this is possible with gitlab CI. Once this works, we can also consider enabling ccache in CI.
Switch to git downloads
We're in the process of switching to git downloads for gitlab and github generated tarballs (github and gitlab helpers).
Once this is done, we should also look at PyPI packages. Although they are reproducible, there is no clear path to the original source. Therefore, we'd prefer to download from the original (git) source for these as well. This will be a bit of manual work and a rework of the scanpypi script.
We could also consider changing to git downloads for the Linux kernel. Many vendor kernels currently use the github helper so they'll get converted anyway. We could also change the mainline kernels (BR2_LINUX_KERNEL_LATEST_VERSION, BR2_LINUX_KERNEL_CUSTOM_VERSION) to use git download. This saves a lot of bandwidth if you download several kernel versions.
If we switch more things to git downloads, it makes it more important to make sure that the download directory is reused and shared. We should probably make it more clear in the manual that it's best to but the download directory somewhere else and export BR2_DL_DIR.
Agenda
Rules for defconfigs (Arnout)
We have too many defconfigs, and the way they are organized varies a lot. What can we do about this? Below are some ideas.
- Remove the "demo" defconfigs with additional packages. Perhaps create a few fragments for some use cases?
- Switch everything to Bootlin toolchains (to reduce build time). Does this need to be tested?
- Remove defconfigs that haven't been updated in a long time. How long?
- Format of defconfig: 'savedefconfig' output or with comments?
- Linux config: create a custom minimal defconfig. This takes a lot of effort though. What about USB devices?
- E.g. this patch that introduces eudev for dynamic module loading, so we can use the upstream kernel defconfig without need for config fragment. Do we want that?
- Vendor kernel, mainline kernel, or both?
- Graphics stack: include in defconfig or not? To what extent to include it? Probably up to GL provider. If multiple GL stacks can be enabled, which ones to include?
- What about wifi and bluetooth support? Does it make sense to include bluez_utils?
- `genimage` configurations: align vs. offset vs. size (Yann)
- use of extlinux ? (Thomas)
If we come to conclusions, people can also start hacking on solutions.
Switch to git downloads (Arnout)
It happens fairly often that upstreams change the tarballs without changing version numbers. This is of course particularly true for automatically generated archives from github etc. Should we switch to git downloads wherever possible?
SBoM stuff (Arnout)
There's a patch series by Thomas Perale that adds CycloneDX output to Buildroot.
- Series should be re-implemented using show-info and post-processing with a Python script.
- DependencyTrack server: can we put it on our own server and let that replace pkg-stats?
- Demo with full show-info output (not for specific .config).
- Is there some other (non-gui) tool that we can use to offload CVE tracking?
- Are PURLs useful at all?
Patchwork backlog handling
Going through the pending patches in patchwork, and review/merge patches to reduce the backlog. It will be useful to identify here ahead of the meeting the patches or patch series that need discussion during the meeting.