summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
11 daysvendor.sh: set need_files="n" if skipping patchLeah Rowe
This change finally ensures that no insertions will be attempted, on the basis that readkconfig failed; this covers the instance whereby vcfg was set, but no scanned items were indicated e.g. Intel ME files not specified. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: Don't handle vendor files if not neededLeah Rowe
This should speed up automated tests. Otherwise, it goes through all the extra checks that aren't needed, for each individual type of vendor file, and also errors out when handling pico serprog images; during automated testing, on the bin directory, you might try on every tarball, one of which is the pico tarball and this patch makes lbmk skip that one too. In general, we must not perform unnecessary tasks. Doing so may even cause other bugs that we couldn't easily detect. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysRevert "lib.sh: use eval for the command in x_"Leah Rowe
This reverts commit 3bfdecdc75bbc77f795736ac282f858f2eb7ab94. The commit that this reverses, caused sch5545 ec firmware downloads to fail, due to globbing.
11 dayslib.sh: fix bad eval writing resized fileLeah Rowe
x_ cannot be used, where output is redirectod to a file; only the conventional piping can be used. same as the last change. this and the other fix were caught during testing. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 dayslib.sh: fix bad eval writing version/versiondateLeah Rowe
x_ cannot be used, where output is redirected to a file; only the convention piping can be used, for errors. relying on x_ in these cases will cause unpredictable bugs. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 dayslib.sh: use eval for the command in x_Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmk: use eval to run mkhelp commandsLeah Rowe
directly quoting it and running it quoted means that the shell way try to execute it as a file. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmk: tidy up the switch/case block in main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmk: tidier error handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 dayslib.sh: tidy up the error handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysrom.sh: tidy up error handlingLeah Rowe
same as the last change Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: tidy up error handlingLeah Rowe
x_ can be used nowadays on any function, because it properly handles globbing. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: tidy up decat_fspfd()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysgit.sh: clean up fetch_project()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmk: Remove unnecessary argument checks on trees()Leah Rowe
These checks are no longer necessary, because these checks are already properly handled in main(). Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysvendor.sh: properly call err_ in fail_injectLeah Rowe
i can't call $err (variable), because it's set to fail_inject. fix this infinite loop, which was an oversight in the previous commit. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysremove xbmk_parent, handle forking in lib.shLeah Rowe
I was using a complicated method of knowing whether the current instance was parent or a child, to know whether the lock file and TMPDIR needed to be purged. It was quite error-prone too. Instead, I'm now handling it directly from within the if statement that previously initialised xbmk_parent=y, forking ./mk from there. The forked instance would not trigger that if clause again, since then TMPDIR is created, thus avoiding recursion. This is an improvement because it doesn't rely on how the parent handles exit statuses, and it ensures that the lock/tmp files are never accidentally deleted. Even if a given program/script that lbmk runs would export TMPDIR, it doesn't matter because lbmk doesn't, so it would be unaffected. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: define x_ right after err_Leah Rowe
because the top-down function order isn't as reliable in lib.sh, since this is what first runs, included in every other script Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmk: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmrc.sh: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysrom.sh: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up check_release()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up vendor_inject()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up readcfg()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up patch_release_roms()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up process_release_roms()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up patch_rom()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up inject()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: tidy up modify_mac_addresses()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysscript/trees: merge with mk and delete script/Leah Rowe
script/ no longer exists. this means that the only executable script in lbmk is now mk. script/trees was never called directly; instead, we used ./update trees in the past, then just ./mk. this is part of a larger audit to simplify lbmk, in preparation for the next Libreboot release. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmk: remove the legacy "roms" commandLeah Rowe
we don't need it. the documentation only tells you now to run ./mk -b coreboot target1 target2 etc Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: write version/versiondate to dotfilesLeah Rowe
write to .version and .versiondate, instead of version and versiondate. this will hide them to avoid visual clutter while analysing files within lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: hardcode projectname/projectsiteLeah Rowe
remove the corresponding files, containing these strings Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysremove update/vendor symlinksLeah Rowe
these are obsolete commands for backward compatibility, but they are being removed before the next release. the documentation has for some now only referenced use of the ./mk commands, making lbmk live up to its name! Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmove build to mkLeah Rowe
i'm removing all the backward-compatibility in the build system, so that only the ./mk command is available Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: unify the execution of mkhelper commandsLeah Rowe
provide it in a new function: mkhelp() Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: tidy up configure_project()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysbuild: make coreboot building an else in "roms"Leah Rowe
Otherwise, the current return prevents set -u -e after the case/switch block, which is a problem if set +u +e was done at any point before the return. Remove the return in the roms) section of the case/switch block, and make the building of coreboot images part of an else clause. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: don't build dependencies if dry=":"Leah Rowe
build_depend is already blanked anyway, but it can't hurt to have an extra check here. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: unified handling of flagsLeah Rowe
this way, the error message will never be incorrect, which i had to fix in a recent patch. now, the same string is used for error messages and getopt. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: simplified handling of badhash/do_makeLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: don't set mode on ./mk -bLeah Rowe
mode is already initialised as an empty string Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: don't set mod on ./mk -dLeah Rowe
mode is already initialised as an empty string Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: don't initialise mode to "all"Leah Rowe
this is not necessary. the fetch mode is still handled, as before, and no make commands will run in this case. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daystrees: clean up some commentsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysvendor.sh: simplified readkconfig()Leah Rowe
So much bloat Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: double-quote pwd to prevent globbingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslbmk: unified PWD handling (work directory)Leah Rowe
instead of running pwd all the time, run it once in lib.sh, and export PWD. for lbmk-specific use of PWD, use xbmkpwd, which contains the value of PWD as was set by the pwd utility in lib.sh. many parts of lbmk rely on pwd, and it *must* be correct. this change adds basic error handling, since pwd can in fact return errors in some cases. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 dayslib.sh: initialise PATH if it's unsetLeah Rowe
it's incorrect for PATH not to be set, but some users may foolishly blank it out before running lbmk. prevent such issues, by initialising it. Signed-off-by: Leah Rowe <leah@libreboot.org>