summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-27blobs/download: simplify fetch_update()Leah Rowe
Do not specifically name types of firmware. Instead, pass the URLs and checksum as direct arguments. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27blobs/download: greatly simplify sources handlingLeah Rowe
remove the giant case/esac list, and set variables directly. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27include/blobutil: simplify setting empty stringsLeah Rowe
use a for loop and eval to set them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27blobs/download: simplify defconfig handlingLeah Rowe
use the variable names directly, as defined in defconfig. do not hardcode the if/else chain in detect_firmware, use eval instead. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-26handle/make/config: check project in main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-26handle/make/config: split up main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-26simplify getopts loops in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25only update git submodules in project/treesLeah Rowe
do not update them in project/repos - despite what the previous commit message says, this behaviour is error prone and should be avoided. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/*: unified git reset handlingLeah Rowe
With this change, lbmk now also updates submodules on simple git clones, not just multi-tree clones. This is OK, because git does not return non-zero status when git submodule update is ran, where git submodules are not actually defined. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25split up grub patches into subdirectoriesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25include/git: support applying patch subdirectoriesLeah Rowe
This is done recursively, with the following rule: files first, then directories. Where all patch files are applied from within the patch directory, subdirectories (within the patch directory) are then tried in alphanumerical order. Then, within each subdirectory tried, the same rule is once again applied. This is done recursively, until every patch file is applied. The code no longer applies *.patch, but instead any file. Additionally, symlinks are avoided. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/*: unified patch handlingLeah Rowe
Handle patches by a function at include/git.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/project/trees: remove extra.sh handlingLeah Rowe
This functionality has never been used, except in the erstwhile osboot project, and even then only experimentally. It was intended for use with coreboot's gerrit site, but it became Libreboot project policy that this not be relied upon, instead preferring to include patches directly within lbmk. This functionality can be re-added, if necessary. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25build/grub/*: move common strings to variablesLeah Rowe
also general cleanup of these scripts Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25build/grub/payload: split up main()Leah Rowe
also: the grub-mkstandalone command didn't have a || at the end, even though it did specify an err call. This has been corrected, so that the command now defers to err() under fault conditions. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25util/: use SPDX license and copyright headersLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25Update email address for Leah Rowe copyrightsLeah Rowe
also, some of them were out of date; years now updated. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25Use SPDX license headers on all scriptsLeah Rowe
This results in much cleaner copyright and license declarations. SPDX headers are legally recognised and make auditing easier. Also, remove descriptions of each script, from each script. Libreboot documentation at docs/maintain/ describes them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-25update/repos: concatenate multiple revision filesLeah Rowe
With this change, it's still possible to have a single file at config/git/revisions, but this has been scrapped. Instead, multiple files now exist under config/git/ with the same modules declared, but the files are separated logically. List of files under config/git: * bios_extract * biosutilities * coreboot * flashrom * grub (gnulib also defined here) * me_cleaner * memtest86plus * seabios * serprog (multiple projects defined) * u-boot * uefitool The rationale behind this change is simple: in the future, we will stop relying on build systems within imported projects for the import of git submodules. Instead, we will handle them directly in lbmk. Additionally, a Linux payload is planned for Libreboot, made easier by the recent audit (script handle/make/config makes it easy to integrate Linux, and handle cross-compilers for userland utilities); a "linux" file under config/git/ could also define rules for each project besides linux, such as musl libc, busybox and other utilities. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-24handle/make/config: run fail() on error, not err()Leah Rowe
This was an oversight, during a previous audit. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-24update grub revisionLeah Rowe
It's now 44 revisions above 2.12-rc1, not 17 above. The additional patches (in GRUB master) contain several important fixes, including cryptodisk and ZFS fixes plus a few other interesting changes, namely: 14c95e57fddb6c826bee7755232de62efc8eb45b: kern/misc: Make grub_vsnprintf() C99/POSIX conformant 296d3ec835ed6e3b90d740e497bb534f14fe4b79: disk/cryptodisk: Fix missing change when updating to use grub_uuidcasecmp() 42a831d7462ec3a114156d56ef8a03e1d47f19e7: ZFS: support inode type embed into its ID 96446ce14e2d1fe9f5b36ec4ac45a2efd92a40d1: ZFS: Fix invalid memcmp 444089eec6042250ce3a7184cb09bd8a2ab16808: ZFS: Don't iterate over null objsets 7ce5b4911005b2a0bfd716d92466b6711844068c: ZFS: Check bonustype in addition to dnode type There are more patches than this, but these are the ones that strike me as interesting for Libreboot. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-19util/nvmutil: remove xorswap() macroLeah Rowe
it's only used once, so just do it once. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-19util/nvmutil: make setWord a macroLeah Rowe
253 sloccount on nvmutil.c now, versus 258 Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-19util/nvmutil: further optimise swap commandLeah Rowe
don't swap pointers at all. handle it in the for loop. 258 sloccount now, versus 261. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-19util/nvmutil: use correct comparisons on pointersLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-19util/nvmutil: optimise swap commandLeah Rowe
handle it exclusively in writeGbeFile() this reduces nvmutil.c sloccount to 261, versus 265 Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: don't use err_if on argc checkLeah Rowe
at this stage in the code, the file name will be NULL value, so it would be improper to use it in a string. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: always print filename in err_ifLeah Rowe
the previous code size optimisations removed mention of the file name, on file-related err() calls. almost every error the user runs across will be file related, so put the path on err() called from err_if() Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: remove SIZE_8KB defineLeah Rowe
use SIZE_4KB << 1 when needing 8KB size Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: remove xpread/xpwrite macrosLeah Rowe
use err_if instead Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: remove unnecessary xclose macroLeah Rowe
it is only used once. use err_if instead. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-18util/nvmutil: simplify pledge and unveil handlingLeah Rowe
there is no need to have these as defines, when err_if exists; get rid of xunveil and xpledge. use the bare pledge and unveil functions directly, with err_if(). 268 sloccount now on nvmutil.c, versus 289 sloccount before this change, with no loss of functionality. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16Merge pull request 'merge serprog scripts' (#131) from Riku_V/lbmk:master ↵Leah Rowe
into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/131
2023-09-16merge serprog scriptsRiku Viitanen
13 sloc reduction Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-16lbmk: more verbose error messagesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: reduce indentation in execute_command()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: fail if ./build command options failsLeah Rowe
non-zero exit, whereas it was previously an unhandled non-zero exit as per -e - now it is simply more verbose. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: simplify execute_command()Leah Rowe
if ./build command options fails, it just means that lbmk would next check whether ./buildpath mode list exists, which it never will because that would violate lbmk design. the generic "help" output is more than sufficient, and tells the user to check "list" anyway, so there's no point in saying it here. simplify this function. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: remove "./buildpath mode all"Leah Rowe
for example: ./build boot all the "all" function is a relic from a much older lbmk design, where for example we might have done: ./build clean all ./download all this is no longer used, nor is this currently relevant for the types of scripts present in lbmk. we can always re-add this function later if needed, but for now? remove unwanted code. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: break up main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-16lbmk: always use lbmk_exit for exitsLeah Rowe
there were certain edge cases where TMPDIR wasn't being cleaned. this patch will fix that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-12rel/src: fix multi-line commandLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-12remove ich9utils entries from .gitignoreLeah Rowe
they are not needed anymore Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-12Merge pull request 'make clean stm32-vserprog for release' (#130) from ↵Leah Rowe
Riku_V/lbmk:makeclean into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/130
2023-09-12serprog: list available boardsRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11fix typo serprog -> vserprogRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11make libopencm3 correctlyRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11make clean libopencm3Riku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11Download libopencm3 before buildingRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11coreboot/hp8200sff_4mb: fix bad ifd path in configLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>