File site/news/audit5.md changed (mode: 100644) (index 66a40e7..29effdf) |
... |
... |
what the Libreboot releases are built with. The *lbmk* build system essentially |
17 |
17 |
implements a *coreboot distro*, the same way you might think of a Linux |
implements a *coreboot distro*, the same way you might think of a Linux |
18 |
18 |
distribution. |
distribution. |
19 |
19 |
|
|
20 |
|
Extensive auditing has been performed on that build system (lbmk) since |
|
21 |
|
last month's release, the Libreboot 20240504 release. The purpose |
|
22 |
|
of these audits is to fix bugs, reduce code bloat and generally improve |
|
23 |
|
efficiency, adding new features and refining everything in the most careful |
|
24 |
|
and conservative way possible, with a focus on providing *clean code*. Remember |
|
25 |
|
always, these three magic words: code equals bugs. |
|
26 |
|
|
|
27 |
|
This article pertains to the current Libreboot (lbmk) revision at this time |
|
28 |
|
of writing, which is `2ee186aee3aa3ab9619ed9549bd3b82909dcfbd0` from 9 |
|
29 |
|
June 2024. A *release* is also being considered for some time in June |
|
30 |
|
of 2024, based on this audit and new features that are planned, plus new |
|
31 |
|
boards. The focus *now*, post-audit, shall be on hardware testing; lots of new |
|
32 |
|
board ports are planned for the next Libreboot release. |
|
33 |
|
|
|
34 |
|
There are *211* changes in this audit, relative to Libreboot 20250504 from which |
|
35 |
|
the audit immediately started. Vast improvements have been made to the build |
|
36 |
|
system in terms of reliability, stability and safety; there are many changes, |
|
37 |
|
which will be listed in the following sections. |
|
38 |
|
|
|
39 |
|
This is Libreboot Build System Audit **5**. The previous audit can be read in |
|
40 |
|
the article for [Libreboot Build System Audit 4](audit4.md). |
|
41 |
|
|
|
42 |
|
All of the following changes, which you are about to learn of, will be included |
|
43 |
|
in the next Libreboot release (after Libreboot 20240504). |
|
|
20 |
|
Extensive auditing has been performed on lbmk, since the Libreboot 20240504 |
|
21 |
|
release. These audits fix bugs, reduce code bloat and generally improve the |
|
22 |
|
efficiency of lbmk, adding and removing features in a careful, conservative |
|
23 |
|
way, with a focus on *clean code*. Remember the magic words: code equals bugs. |
44 |
24 |
|
|
45 |
|
Modest code size reduction |
|
46 |
|
-------------------------- |
|
47 |
|
|
|
48 |
|
Code size (of lbmk) is counted by running David A. Wheeler's *sloccount* |
|
49 |
|
utility, with the following command: `sloccount build script/ include/`. This |
|
50 |
|
counts the number of *source lines* and, based on this, the code size has been |
|
51 |
|
reduced by *198 lines*. |
|
|
25 |
|
This article covers changes from Libreboot 20240504, up to |
|
26 |
|
revision `2ee186aee3aa3ab9619ed9549bd3b82909dcfbd0` from 9 June 2024. |
52 |
27 |
|
|
53 |
|
The build system is vastly more efficient, with the shell scripts now counting |
|
54 |
|
at *1482 lines* of shell script, down from *1680 lines* in Libreboot 20240504. |
|
55 |
|
This represents an approximate *12% reduction* in code size. |
|
|
28 |
|
You can read about the *previous* audit in the article |
|
29 |
|
for [Libreboot Build System Audit 4](audit4.md). |
56 |
30 |
|
|
57 |
|
Shell scripts?? Libreboot's build system is implemented *entirely* with POSIX |
|
58 |
|
compliant shell scripts. Not BASH, not ZSH, not KSH, just good old `sh`. You |
|
59 |
|
can read more about it in the [lbmk maintenance manual](../docs/maintain/). |
|
60 |
|
|
|
61 |
|
Libreboot's build system, lbmk, is essentially a *source-based package manager* |
|
62 |
|
which downloads, patches and builds various sources, to then automatically |
|
63 |
|
provide binary images for easy installation. This is how Libreboot releases are |
|
64 |
|
made, so it goes without saying: lbmk is the beating heart of Libreboot. |
|
|
31 |
|
Modest code size reduction |
|
32 |
|
-------------------------- |
65 |
33 |
|
|
66 |
|
Despite this reduction by 198 lines, there are *many* new features. Line for |
|
67 |
|
line, lbmk is now much more powerful. NOTE: there are changes between *audit 4* |
|
68 |
|
and Libreboot 20240504, but those are covered in the release announcements for |
|
69 |
|
Libreboot 20240126, 20240225 and 20240504. |
|
|
34 |
|
There are 1482 lines of shell script in the build system, versus 1680 in the |
|
35 |
|
Libreboot 20240504 release. Libreboot's build system is written purely in |
|
36 |
|
POSIX sh; not BASH, not KSH, not ZSH, jush sh! |
70 |
37 |
|
|
71 |
|
That code reduction may seem impressive, or maybe small; now you will see all |
|
72 |
|
of the changes that yielded this result. It's a lot! |
|
|
38 |
|
This is a difference of 198 lines, or a 12% reduction. Despite the reduction, |
|
39 |
|
numerous features have been added and a large number of bugs were fixed. |
73 |
40 |
|
|
74 |
41 |
Summarised list of changes |
Summarised list of changes |
75 |
42 |
========================== |
========================== |
76 |
43 |
|
|
77 |
|
Together, all of these changes are substantial, but the most interesting and |
|
78 |
|
useful changes are highlighted in **bold**. |
|
79 |
|
|
|
80 |
|
These and subsequent changes will be present in the *next Libreboot release*, |
|
81 |
|
after Libreboot 20240504, but they can already be obtained now, if you compile |
|
82 |
|
Libreboot [from source via lbmk.git](../docs/build/). |
|
83 |
|
|
|
84 |
|
Not all of these are actually audit-related, but are still nice changes, and |
|
85 |
|
will be included in the release changelog, for the next release |
|
86 |
|
after Libreboot 20240504. The changes are, from newest to oldest: |
|
87 |
|
|
|
88 |
|
NOTE: The changes *per category* are in order from latest on top, and earliest |
|
89 |
|
changes on the bottom, but if you're reading top down (in this article), please |
|
90 |
|
note that the changes between categories are *not* in order. |
|
91 |
|
|
|
92 |
|
For the purpose of this article, I've split the changes into different |
|
93 |
|
categories e.g. bugfixes, general code cleanup, features and so on. |
|
|
44 |
|
Changes are in order per category, from newest to oldest: |
94 |
45 |
|
|
95 |
46 |
Feature changes |
Feature changes |
96 |
47 |
--------------- |
--------------- |