<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lbmk.git/resources/scripts/build/boot, branch 20241206</title>
<subtitle>libreboot build system (LibreBoot MaKe)
</subtitle>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/'/>
<entry>
<title>move resources/scripts/ to script/</title>
<updated>2023-08-27T16:19:36+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-27T16:19:36+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=355eb765ff47b0855a6f5655312608d3264e70bf'/>
<id>355eb765ff47b0855a6f5655312608d3264e70bf</id>
<content type='text'>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unified list command for all scripts</title>
<updated>2023-08-27T13:24:20+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-27T13:14:49+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=9457d6be52e5f409566dabc10dd5435102b2e760'/>
<id>9457d6be52e5f409566dabc10dd5435102b2e760</id>
<content type='text'>
e.g. ./build boot roms list
./update blobs inject listboards
./build boot list
./build clean list

also this is now possible:
./build list
or maybe
./update list
^ would list directories in resources/scripts/build
and resources/scripts/update respectively

this script is added:
resources/scripts/build/command/options

call it like so, e.g.
./build command options resources/coreboot

this script is now used, for list functions in
other scripts.

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
e.g. ./build boot roms list
./update blobs inject listboards
./build boot list
./build clean list

also this is now possible:
./build list
or maybe
./update list
^ would list directories in resources/scripts/build
and resources/scripts/update respectively

this script is added:
resources/scripts/build/command/options

call it like so, e.g.
./build command options resources/coreboot

this script is now used, for list functions in
other scripts.

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>handle/config/file: rename to handle/make/config</title>
<updated>2023-08-27T11:24:05+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-27T11:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=ebbefa6030000137016b7a66209c313b91f72fc8'/>
<id>ebbefa6030000137016b7a66209c313b91f72fc8</id>
<content type='text'>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build/src/for: rename to handle/make/file</title>
<updated>2023-08-27T10:42:20+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-27T10:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=29a8193eb2f5dfc79b9b4baa8db2345dc93f91a5'/>
<id>29a8193eb2f5dfc79b9b4baa8db2345dc93f91a5</id>
<content type='text'>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: put quotes around file/directory names</title>
<updated>2023-08-27T08:25:50+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-27T08:25:50+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=5a47c01b11a7fc25f7fae0685d288a78220b954a'/>
<id>5a47c01b11a7fc25f7fae0685d288a78220b954a</id>
<content type='text'>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>much, much stricter, more verbose error handling</title>
<updated>2023-08-26T15:58:32+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-24T19:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=1c8401be25e4749a2eee5ddc77ce7c6ac880c910'/>
<id>1c8401be25e4749a2eee5ddc77ce7c6ac880c910</id>
<content type='text'>
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.

also: in "fetch", remove the downloaded program
if fail() was called.

this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.

where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.

also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.

also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout

as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error

mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.

certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds

certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.

doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.

also: in "fetch", remove the downloaded program
if fail() was called.

this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.

where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.

also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.

also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout

as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error

mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.

certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds

certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.

doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: never exit 1, always call err instead</title>
<updated>2023-08-23T20:34:02+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-23T18:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=4c6c7d1088eb9dc0c9b2eeeb64febeeb78038583'/>
<id>4c6c7d1088eb9dc0c9b2eeeb64febeeb78038583</id>
<content type='text'>
this same change has been applied, selectively, to
certain return statements. the general rule is this:
the return statement should only be used to direct
logic within a script, where certain non-errors
states are used to skip certain actions; the exit
command should *never* be used to return non-zero,
except by err(). in so doing, we ensure easier
debugging of the build system

also: strip_rom_image in build/release/roms was
running "continue" when a rom file didn't exist,
despite not being a while/for loop. i make it
return (non-error condition) instead

it's ok for a script to exit 0, where appropriate,
but perhaps a function could also be written for it

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this same change has been applied, selectively, to
certain return statements. the general rule is this:
the return statement should only be used to direct
logic within a script, where certain non-errors
states are used to skip certain actions; the exit
command should *never* be used to return non-zero,
except by err(). in so doing, we ensure easier
debugging of the build system

also: strip_rom_image in build/release/roms was
running "continue" when a rom file didn't exist,
despite not being a while/for loop. i make it
return (non-error condition) instead

it's ok for a script to exit 0, where appropriate,
but perhaps a function could also be written for it

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unify err functions across scripts</title>
<updated>2023-08-23T18:12:00+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-23T17:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=57adbc6eb1f961ee9116904b667f30efb3f2de4f'/>
<id>57adbc6eb1f961ee9116904b667f30efb3f2de4f</id>
<content type='text'>
include/err.sh

this new handling also does mundane things,
such as tell you what script b0rked

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
include/err.sh

this new handling also does mundane things,
such as tell you what script b0rked

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>memtest86+ v6.20</title>
<updated>2023-08-22T13:43:13+00:00</updated>
<author>
<name>Riku Viitanen</name>
<email>riku.viitanen@protonmail.com</email>
</author>
<published>2023-08-21T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=fa926632148b78ed327f5d674dad9a5ee243af9a'/>
<id>fa926632148b78ed327f5d674dad9a5ee243af9a</id>
<content type='text'>
uses 32-bit variant for x86_32 arch. 64-bit for x86_64.

resources/scripts/build/src/for:
modified it a bit. when building e.g. "memtest86plus/build32"
it correctly fetches "memtest86plus" instead.

but builds memtest86plus/build32, which is inside that git repo

Signed-off-by: Riku Viitanen &lt;riku.viitanen@protonmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
uses 32-bit variant for x86_32 arch. 64-bit for x86_64.

resources/scripts/build/src/for:
modified it a bit. when building e.g. "memtest86plus/build32"
it correctly fetches "memtest86plus" instead.

but builds memtest86plus/build32, which is inside that git repo

Signed-off-by: Riku Viitanen &lt;riku.viitanen@protonmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>general code cleanup on lbmk shell scripts</title>
<updated>2023-08-21T21:38:00+00:00</updated>
<author>
<name>Leah Rowe</name>
<email>leah@libreboot.org</email>
</author>
<published>2023-08-21T18:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://browse.libreboot.org/lbmk.git/commit/?id=62f23123cb2a5ef594f405053d0b111c6e01de87'/>
<id>62f23123cb2a5ef594f405053d0b111c6e01de87</id>
<content type='text'>
in update/blobs/download, i saw instances where
appdir was being deleted with rm -r, but the more
appropriate command would rm -Rf. this is now fixed.

other than that, i've mostly just simplified a bunch
of if statements and consolidated some duplicated
logic (e.g. if/else block for dependencies in
build_dependencies() of update/blobs/download

one or two functions and/or variables have been
renamed, for greater clarity in the code, also
removed a few messages that were redundant

used printf instead of echo, in a few places, also
fixed up the indentation in a few places

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in update/blobs/download, i saw instances where
appdir was being deleted with rm -r, but the more
appropriate command would rm -Rf. this is now fixed.

other than that, i've mostly just simplified a bunch
of if statements and consolidated some duplicated
logic (e.g. if/else block for dependencies in
build_dependencies() of update/blobs/download

one or two functions and/or variables have been
renamed, for greater clarity in the code, also
removed a few messages that were redundant

used printf instead of echo, in a few places, also
fixed up the indentation in a few places

Signed-off-by: Leah Rowe &lt;leah@libreboot.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
