Libreboot Build System Audit 4

Leah Rowe

31 December 2023


Return to index

Article published by: Leah Rowe

Date of publication: 31 December 2023

NOTE: Libreboot standardises on flashprog now, as of 27 January 2024, which is a fork of flashrom.

Introduction

This article pertains to the current Libreboot (lbmk) revision at this time of writing, which is 11a821637d8a36f4a72001ef8d8c41952f066cc3 from 31 December 2023. A release is also being considered for some time in January of 2024, based on this audit and new features that are planned, plus new boards. To compliment this audit, the TODO page, which now lists what tasks the project is interested in or working on at any given time.

A lot of work has gone into Libreboot since Libreboot Build System Audit 3, which coincided with the Libreboot 20231021 release, right up to Libreboot 20231106.

Modest code size reduction

The main purpose of audit 4 has been to finish audit 3. More logic has been generalised, and another sloccount reduction has been observed: 1618 SLOC in the shell scripts, versus 1744 as of audit 3, with increased (not decreased) functionality. This accounts for a 7.22% decrease in the complexity of lbmk, which is the Libreboot build system.

Summarised changes since 20231106

These and subsequent changes will be present in the next Libreboot release, after Libreboot 20231106, but they can already be obtained now, if you compile Libreboot from source via lbmk.git.

Although audit 3 was the previous audit, several changes were made after that, up to the Libreboot 20231106 release. Therefore, this audit changelog is relative to Libreboot 20231106, not audit 3. Most of this is minor code cleanup patches that, together, account for the moderate code size reduction, but there are some new features and bug fixes too.

Not all of these are actually audit-related, but are still nice changes, and will be included in the release changelog, for the next release after Libreboot 20231106. The changes are, from newest to oldest:

In addition to specific changes listed below, there are several commits part of the audit titled “general code cleanup”, which go through the entire build system, sweeping it for bad or unclean code, cleaning up the coding style, removing obsolete code or generally improving the coding style/quality, to make the code more readable. Such has been the main focus of this audit.

And now, specific changes:

Exact git log, relative to 20231106:

* 11a82163 Bump GRUB to 2.12 release
* f3098f56 git.sh multi-tree: grab submodules *after* patches 
* 5fb6e36f update/trees: clean up the coreboot-version check 
* 4c9ee172 update/trees: support custom make/autogen argument 
* c6a0e495 update/trees: generic cmake handling 
* 30337b8f update/trees: avoid namespace clash in function 
* b0615581 update/trees: dont hardcode autoconf/bootstrap arg 
* eb3a8e2b unify script/update/trees and script/build/grub 
* 34ded35f lbmk scripts: general code cleanup 
* 4e067799 disable u-boot on x86 qemu 
* bc87b5f6 lbmk scripts: general code cleanup 
* 0c1d08d8 build/serprog: err if basename fails 
* eff9130b update/trees: further simplify crossgcc handling 
* 6752780f coreboot: update hp elitebook configs 
*   15298985 Merge pull request 'Add HP 8300 CMT port' (#173) from Riku_V/lbmk:hp8300cmt into master 
|\  
| * 74147ea4 Add HP 8300 CMT port 
|/  
* 0aca6332 lbmk scripts: shorter code lines 
* 575332f2 fix flashprog build error (implicit enum typecast) 
* b4ab3057 lbmk scripts: general code cleanup 
* 38a7aa31 build/roms: rename two functions for clarity 
* 746d9cad build: remove test command 
* 655d3cdc lbmk scripts: general code cleanup/optimisation 
* 25f9d948 git/pico-serprog: update revision again 
* e0fee7a4 git/pico-serprog: update revision 
* a48b3841 build/roms: improved error handling for roms 
* 33695a56 build/roms: remove redundant check 
* d5f8f657 dell/e6400nvidia_4mb: new configuration (nvidia) 
* 9d5d98eb set version/projectname properly 
* aa525142 update/trees: fix infinite loop 
* 465077bc vendor/download: check whether configs exist first 
* 39293279 vendor/inject: fix dodgy error check (cd command) 
* f44b99c8 don't delete microcode updates in rom images 
* 72cd169e update/release: don't test ./vendor inject 
* e8eb52f8 update/release: don't insert crossgcc tarballs 
* b0e5fc9d lbmk scripts: general code cleanup 
* b111f484 build/serprog: general code cleanup 
* 2f98ca6d build: simplified TMPDIR handling 
* ab65ea4c general code cleanup 
* fa25414b mrc.sh: run debugfs from extract_partition 
* 8a875722 mrc.sh: general code cleanup 
*   12e644b3 Merge pull request 'hp-ec-fw' (#172) from Riku_V/lbmk:hp-ec-fw into master 
|\  
| * 584c66e9 rename hp elitebook ec fw after rom families 
| * f7fda791 document hp laptop rom families 
|/  
* 92986f0c build/roms: remove modify_coreboot_rom() 
* 493ebdfb mrc.sh: remove redundant extraction logic 
* 1153bc3b mrc.sh: don't run the shellball. use unzip. 
*   28dfd91a Merge pull request 'hp8460pintel: actually enable vbt' (#171) from Riku_V/lbmk:vbt8460p into master 
|\  
| * aa4160e3 hp8460pintel: actually enable vbt 
|/  
* 3ccf1941 update coreboot configs 
* 95788059 update/trees crossgcc: call err if arch isn't set 
* 90ac30b1 update/trees: simplified crossgcc handling 
*   4711098e Merge pull request 'config/ifd/xx30: Fix 16_ifd component density and count' (#170) from nic3-14159/lbmk:xx30_16_ifd_fix into master 
|\  
| * dbec5bf3 config/ifd/xx30: Fix 16_ifd component density and count 
* |   4fb48595 Merge pull request 'Add HP EliteBook 8460p' (#169) from Riku_V/lbmk:hp8460p into master 
|\ \  
| |/  
|/|   
| * b0b4f86b Add HP EliteBook 8460p 
* | 7f98ab8e git.sh: simplify submodule handling 
* | 124b5beb build initialise_command: simplify handling 
* | 9c00746b update/release: minor cleanup 
* | f6ebab57 option.sh scan_config: clean up if/else block 
* | 3b7009aa option.sh: print error on stderr, not stdout 
* | c75ca20c option.sh: don't rely on zero status on printf 
* | 578f105d git.sh git_am_patches: reduce indentation 
* | cbd19d81 git.sh fetch_config: simplify tree name check 
|/  
* b9f69f26 grub.cfg syslinux: support scanning /boot/EFI/ 
* 766bb46c grub.cfg: fix path 
* 430918ee grub.cfg: handle btrfs subvols for extlinux.conf 
* d74c6c71 grub.cfg: scan extlinux/extlinux.conf 
* f1d6c143 grub.cfg: support grub and extlinux on ata/ahci 
* 6db94c1a grub.cfg: merge isolinux/grub usb menuentries 
* c4544e04 grub.cfg: handle extlinux in the default menuentry 
* eaa1341b grub.cfg syslinux: support ESP and extlinux.conf 
* b817001e grub.cfg: don't boot linux without a grub.cfg 
* 2d6e5ca4 grub.cfg: scan lvm volumes last 
* 49eed9ac Revert "grub.cfg: try luks2/crypto-lvm before non-crypto" 
*   aed4dff8 Merge pull request 'Dell-flash-unlock README updates from upstream' (#168) from nic3-14159/lbmk:dell-flash-unlock-updates into master 
|\  
| * d207e9bc README.html: Add possibly not working systems 
| * ab59f912 README.html: Add E6500, E6420, and E6530 as supported 
| * ca28255d README.html: Add instructions for relaxing memory permissions 
| * f4819081 README.html: Add references to Open Security Training 
* | 20389655 grub.cfg: try luks2/crypto-lvm before non-crypto 
* |   3a36c827 Merge pull request 'master' (#165) from risapav/lbmk:master into master 
|\ \  
| * | 15226f9e added x220edp_8mb 
| * | 1c337ac7 added x220edp_8mb 
| * | e6629606 added x220edp_8mb 
| |/  
* |   0a8ef113 Merge pull request 'Update config/grub/config/grub.cfg' (#167) from semigel/lbmk:semigel-btrfs-subvol-patch-1 into master 
|\ \  
| |/  
|/|   
| * ababbc09 Update config/grub/config/grub.cfg 
|/  
* 39a3de57 remove DEBUG handling in lbmk (not needed) 
* 1eb4df67 fix several shellcheck warnings 
*   54ca5f24 Merge pull request 'config/dependencies/debian: add unifont-bin & xfonts-unifont' (#163) from Riku_V/lbmk:debgrub into master 
|\  
| * 2e6073f2 config/dependencies/debian: add unifont-bin & xfonts-unifont 
* | 2e779a54 handle errors on exits from subshells 
* | 9558e2fc improved safety/error handling on multitree git-am 
* | 7af200a1 Merge pull request 'fix void dependencies: openssl-devel' (#161) from Riku_V/lbmk:fixvoid into master 
|\| 
| * 6d8d2e75 fix void dependencies: openssl-devel 
|/  
*   cb3fad07 Merge pull request 'fix void dependencies: freetype-devel' (#160) from Riku_V/lbmk:fixvoid into master 
|\  
| * 01a82431 fix void dependencies: freetype-devel 
|/  
*   5a6dec97 Merge pull request 'fix void dependencies typo' (#159) from Riku_V/lbmk:fivoid into master 
|\  
| * 50bfe1ca fix void dependencies typo 
|/  
* 4e00ac00 revert flashprog back to version 1.2 
* 83c8248f dependencies/debian: fix libfreetype-dev 
* 39aad578 grub: re-add fat/nt file system modules 
* 47ef411e Bump GRUB revision to 8 November 2023 revision 
* ce1176f5 fix typo in help text 
* 70882902 build: set --author when running git init 
* 5af3ae05 lbmk: don't use status for unconditional returns 
* 64f93374 lbmk: support showing the revision in help text 
* f4b2a588 build: don't generate version/versiondate as root 
* c4d90087 add grub mods: diskfilter,hashsum,loadenv,setjmp 
* d0d6decb re-add grub modules: f2fs, json, read, scsi, sleep 
*   f60286a3 Merge pull request 'Dell Latitude E6530 support' (#151) from nic3-14159/lbmk:e6530 into master 
|\  
| * 36d4c906 Add Dell Latitude E6530 support 
| * 8bb95639 config/ifd: Rename e6430 to dell_ivybridge 
*   4d7cb99c Merge pull request 'config/coreboot/e6430_12mb: Fix configs' (#150) from nic3-14159/lbmk:e6430-config-fixes into master 
|\  
| * a02c7e31 config/coreboot/e6430_12mb: Fix configs 
* d3ade208 Merge pull request 'nvmhelp' (#152) from Riku_V/lbmk:nvmhelp into master 
* 86608721 nvmutil: print usage 
* f12f5c3a nvmutil: fix makefile 

This is 117 changes, since Libreboot 20231106.

Markdown file for this page: https://libreboot.org/news/audit4.md

Subscribe to RSS for this site

Site map

This HTML page was generated by the Untitled Static Site Generator.