summaryrefslogtreecommitdiff
path: root/script/handle
AgeCommit message (Collapse)Author
2023-09-26simplify getopts loops in shell scriptsLeah 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-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-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-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-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-04merge config/ and resources/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-03ich9m mainboards: use pre-assembled ifd/gbe filesLeah Rowe
This cuts down on build time, and it will allow libreboot to remove large chunks of code. these ifd/gbe configs are just binary-encoded config files, in a format well-understood. they can easily be opened up and displayed, using ich9show or ifdtool, and manipulated by these tools; bincfg can generate them from scratch, and nvmutil can change mac addresses, for example. so, do this and remove from lbmk the following: * ich9utils (which contains ich9gen) - not needed anymore * code in lbmk for handling ich9gen and insertions; the coreboot build system is now used, for this same purpose, so remove such code from lbmk this results in a massive code size reduction (thousands of lines) in lbmk; smaller when only looking at the build system, but much larger when you consider that ich9utils is also removed (about 3k sloc) Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-03Less cat abuseRiku Viitanen
More than 90% of cats were thus terminated. read (shell built-in) is better at reading, and dogs are better pets. Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-09-03unify build/clean scripts: use handle/make insteadLeah Rowe
The -c option is added for distclean, and -x for crossgcc-clean, in handle/make/config about 100 sloc removed from lbmk Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-02handle/make/config -m/-u: actually copy configsLeah Rowe
they weren't being copied back, after running the make command. i overlooked this when testing in the previous optimisations, because i only tested building, not modification or updating of configs Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-02handle/make/config: properly handle cbutilsLeah Rowe
it wasn't being checked for, to run cbfstool. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-02handle/make/file: fix uefitool buildsLeah Rowe
the current check only worked if it had already been built, when checking for the Makefile however, running this during build/release/src caused problems, hence the current check so: perform the same check, but as a fallback for cmake failing (and if that check fails, only then will err be called) Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01don't do cmake on uefitool if the Makefile existsLeah Rowe
nasty little hack to fix another nasty little hack, which i call script/build/release/src Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-01handle project downloads in main lbmk scriptLeah Rowe
this means the unified /tmp handling is now provided for in both the former "fetch" and "fetch_trees" script, which are now (respectively): ./update project repo ./update project trees if the fetch scripts weren't cleaning /tmp before, they now are, because lbmk handles it Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-31move build/boot/rom moverom to handle/make/configLeah Rowe
most of these steps do not need to be repeated, per image. move it into handle/make/config, so that the steps are performed on files that go under elf/coreboot (this will save on build time). the logic for handling 4MB ROM images on sandy/ivy was unused, and has been removed. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-27move resources/scripts/ to script/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>