summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-30build/boot/roms: rename buildrom to build_targetLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30build/boot/roms: split up main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30build/boot/roms: simplify buildrom() handlingLeah Rowe
Only one for loop is required. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30build/boot/roms: support "all" if argument passedLeah Rowe
e.g. -k ukqwerty previously, this would not work: ./build boot roms -k ukqwerty all only this would work: ./build boot roms all this patch fixes the bug. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30build/boot/roms: move help() to bottom of fileLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-30update/*/*: unified scanning of revisions/sourcesLeah Rowe
update/blobs/download and update/project/repo both use the same logic, for setting variables with awk and a specially formatted configuration file. unify this logic under include/option.sh, and use that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: move helpers to include/blobutilLeah Rowe
mkdirs() should be in include/blobutil.sh, as should extract_archive(), because that is primarily where they are used. script/update/blobs/download calls these functions aswell, but it sources include/blobutil.sh so it's OK. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29include/blobutil: try curl first, then wgetLeah Rowe
Don't use only wget. Some systems may only have curl. The user can always install wget anyway, but why not support both? I've added the right user agent string. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29include/blobutil: simplify check_defconfig()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: do IntelME extract in one functionLeah Rowe
Just one function. Just one. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: do final check of _dest in fetch()Leah Rowe
This way, the file is checked regardless of what type of blob is handled, not just Intel ME. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blobs/download: don't pass dl_path as argumentLeah Rowe
Because fetch() is only called now from blobs/download, we can reliably know what dl_path should be. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29blob scripts: unified handling of blob destinationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29remove unused variables in blob scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29merge include/fetch.sh, blobutil.sh, defconfig.shLeah Rowe
They are only ever used by script/update/blobs/*, so put them all in blobutil.sh. This cuts down on the number of scripts in lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29update/blobs/*: simplify mrc.bin handlingLeah Rowe
mrc.bin is now handled by include/mrc.sh, adapted from now-deleted script/update/blobs/mrc much of the logic has been re-written or adapted for inside script/update/blobs/download mrc links/hashes now defined in config/blobs/sources the new code is simpler (and smaller). in addition, lbmk can now easily handle mrc.bin files for other platforms such as broadwell. watch this space. the full .zip download is now cached, like with other vendor downloads. this means it won't be re-downloaded if it was already downloaded before. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-29update/blobs/*: unified download/checksum logicLeah Rowe
Use the same logic between blobs/download and blobs/mrc. The logic is taken from blobs/download. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: remove unnecessary linebreaksLeah Rowe
generally condense the code, but not in a way that makes the code unreadable. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: remove unnecessary messagesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28include/blobutil: properly set global variablesLeah Rowe
I was setting certain global variables inside for loops, but some sh implementations won't like this. Instead, don't run eval inside the for loops. Set a string for eval inside the for loops, then execute eval outside of the loops. This should work on every shell. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: simplify downloading of filesLeah Rowe
individual functions for downloading each archive have been removed. instead, eval is used in fetch_update(), which is now renamed to fetch(). Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: remove unnecessary error pipesLeah Rowe
the called functions directly call err() under fault condition, so this additional handling is redundant. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-28blobs/download: unified archive extractionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27move build/command/options to include/option.shLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27build/release/roms: simplify strip_rom_image()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27blobs/download: unified blobdir handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27blobs/download: unified archive extractionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27blobs/download: remove errant debug lineLeah Rowe
i added that echo command when working on the function in question, but it's not needed now. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-27remove script/update/blobs/extractLeah Rowe
This script is incomplete, buggy and its use is ill advised. This script can be re-added later, when more work is done. The download and/or inject script is recommended. Signed-off-by: Leah Rowe <leah@libreboot.org>
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>