summaryrefslogtreecommitdiff
path: root/script
AgeCommit message (Collapse)Author
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-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-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-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-16merge serprog scriptsRiku Viitanen
13 sloc reduction Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-12rel/src: fix multi-line commandLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
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 and copy serprog related srcRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-11clean up pico-serprog for releaseRiku Viitanen
moved cmake files into a separate build directory. this can just be deleted for the source release. might as well use cmake for the actual build too. that makes repeated builds faster for some reason. Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-10make clean stm32-vserprog for releaseRiku Viitanen
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-10build/release/src: be more thorough deleting .gitLeah Rowe
a few were missed. nuke all of it from orbit. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/release/src: delete elf/ in srcdirLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10handle/make/file: run make-clean firstLeah Rowe
flashrom distclean resulted in zero status upon exit, but did not remove the actual flashrom binary. our logic was to run distclean and defer to clean; now, we run clean and *then* run distclean, but we do not throw an error if distclean fails. (we do throw one if clean fails) Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/release/src: remove cbutils/ in srcdirLeah Rowe
the builds were being created within that srcdir, because build/release/src runs lbmk commands within it, and one of them is building (re-building) it. there's no point addressing this, other than rm -Rf Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/release/src: remove errant codeLeah Rowe
the main lbmk script already creates these files, and these files are then copied by build/release/src so we don't need to re-create them here Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10handle/make/config: distclean once per treeLeah Rowe
previously, it was possible that the distclean or crossgcc-clean modes were being executed on the same project tree, needlessly. this patch fixes that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10handle/make/config: fix distclean/crossgcc-cleanLeah Rowe
these commands weren't being run at all, leading to binaries (such as xgcc) not being removed, and thus they were present in tested release archives. this bug did not affect libreboot 20230625. it appeared during my audit, post-20230625. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10handle/make/config: fix whitespace and 80-line bugLeah Rowe
fit in 80 lines, and remove whitespace Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/release/roms: use -T0 on serprog tarballsLeah Rowe
xz supports using multiple threads so use multiple threads Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/boot/roms stragglers: properly handle errorsLeah Rowe
there were a few missing err calls i actually went through all of lbmk and found no instances where err calls were missing except in build/boot/roms_helper Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-10build/release/src: re-create symlinks, don't copyLeah Rowe
if you copy a symlink, you create a whole new file with the contents of what that symlink points to. what we need to do instead is re-create the symlinks. this is relevant for all symlinks to the main lbmk script, from the main directory of lbmk.git. this avoids there being multiple copies of the main lbmk script, in release archives. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09scripts: use printf, not echo, where appropriateLeah Rowe
printf has more universal behaviour, across various implementations of sh, so it's better to use this. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09update/blobs printf statements: use double quotesLeah Rowe
single quotes are not valid Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09scripts: better handling of printf: stdout/stderrLeah Rowe
in some cases, messages that should be considered errors or warnings, were being written to the standard output, rather than written as error messages. also: one or two printf statements should specifically avoid printing errors (to any file); in these cases, stdout has been redirected to /dev/null Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09update/project/*: remove redundant checksLeah Rowe
these scripts used to be in the main directory of lbmk, and thus needed to check for root user, and also git credentials. now they are called by the main lbmk script, which also runs the same checks. avoid waste of resources by not running the same check twice. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09blobs/download: don't use the -B option in makeLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>