summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
31 hoursinit.sh: Run git name/email check before initLeah Rowe
Otherwise, it returns if init is already done, which later leads to build errors in coreboot. Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hourslib.sh: stricter xbmk_err check in err()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hourslib.sh: simplify err-not-set handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hourslib.sh: Add warning if x_ is called without argsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hourslib.sh: simplify err()Leah Rowe
Rely once again on err_, but still explicitly add an exit just below, in case I made a mistake one day. err() is essentially a trap that triggers in case I mess up an error function, so that it doesn't reliably exit. So, the idea is that everything calls err(), and err() is almost never modified, or modified very carefully. If error exits were ever broken, the result could be quite unpredictable, so lbmk has very strict error handling, and great care is taken to ensure that it does reliably exit. Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hoursinit.sh: single-quote xbmklock in xbmk_lock()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hoursinit.sh: define lock file in a variable insteadLeah Rowe
don't hardcode it. Signed-off-by: Leah Rowe <leah@libreboot.org>
32 hoursinit.sh: tidy up xbmk_child_exec()Leah Rowe
make the command style more consistent, for example relying on x_ inside a subshell to print the command and arguments if a command failed. this is a good style, and i'll probably use it in other places on lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hourslib.sh err: add missing redirect to stderrLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
38 hourslbmk: MUCH safer err functionLeah Rowe
Don't directly call a variable. Call a function that checks the variable instead. The new err function also checks whether an exit was actually done, and exits 1 if not. If an exit was done by the given function, but the exit was zero, this is also corrected to perform an exit 1. This fixes a longstanding design flaw of lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hourslib.sh: rename errx to xmsgLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hourslib.sh: Make x_ err if first arg is emptyLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hourslib.sh: Make err_ always exit no matter whatLeah Rowe
Always certainly redundant, since if -u -e isn't set, it'll continue to exit anyway. However, we want to be pedantic about this, since the safety of lbmk relies entirely on this function NOT misbehaving. Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hoursinject.sh: tidy up TBFW handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hoursinject.sh: remove useless comment blockLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
39 hoursinit.sh: tidy up the python version checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: move non-init functions to lib.shLeah Rowe
these were missed in a previous cleanup Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: simplify dependencies handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursrom.sh: tidy up copyps1bios()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: tidy up xgccargs handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: remove useless codeLeah Rowe
this was added a few commits ago, but the previous commit made me realise it's not needed at all. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursinit.sh: tidy up pathdir creationLeah Rowe
we can use remkdir here. it does the same thing. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: re-make gnupath/ after handling crossgccLeah Rowe
instead of deleting every file within Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: tidy up check_cross_compilerLeah Rowe
only initialise variables at the point they're needed. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: re-make gnupath/ for each cross compilerLeah Rowe
it could be that some were left over before, for some reason. that isn't currently the case, but this will avoid the possibility in future. therefore, this is a preemptive bug fix. Signed-off-by: Leah Rowe <leah@libreboot.org>
40 hoursmk: reduce indentation in check_cross_compiler()Leah Rowe
we only call it in one place. the resulting code is still quite clear. Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysmk: Allow use of x_ on prefix functionsLeah Rowe
Use this for the sha512sum command, on the main mk script at the function check_project_hashes(). Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysmk: tidy up check_project_hashes() sha512sum checkLeah Rowe
the extra function isn't needed at all. awk can just handle every line all at once. Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysmk: simplify check_gnu_path()Leah Rowe
the initial checks are unnecessary, since i always know what arguments are being provided. the -f check in the for loop is now an -x instead, more efficient and complete. Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysinject.sh: minor code cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysinject.sh: simplify extract_archive()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2 daysinject.sh: simplified fsp extractionLeah Rowe
we know that _dest is always what's set in the coreboot config, without the ../../../ in it, so just copy both files in a single function, and call the function twice. if both files are done on the first call, the second call will be skipped. if only the first file was done on the first call, running the download script again will skip the first one, and grab the second one. this also avoids having to run the decat function twice, in most cases, so it's a tiny optimisation. this optimisation only works if both fsp files (s and m) are to be extracted into the same directory, which is the case anyway, and this will always be the case. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: Remove redundant code in copy_tbfwLeah Rowe
We don't use the tbtmp variable anymore, in this function. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: Stricter TBFW handlingLeah Rowe
Don't copy it until it has been padded properly. Otherwise, erroneous padding would result in an error, and who knows what would be left in vendorfiles/ ? Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: *Re-create* tmpdirs on parent instanceLeah Rowe
To make sure any old files are removed, always re-create. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: Always create xbmklocalLeah Rowe
If we're in a release work directory, TMPDIR is already set, so the local ./tmp won't be created, which would lead to an error. Fix it by creating xbmklocal before checking TMPDIR. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslbmk: Unified local ./tmp handlingLeah Rowe
Make it an absolute directory, relative to xbmktmp. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslib.sh: redirect find errors to /dev/nullLeah Rowe
this silences confusing error messages that the user sees on the screen, that are actually benign, and it will thus reduce the number of people who ask questions on #libreboot irc Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslib.sh: Fix bad touch commandLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: Only build nvmutil onceLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: always re-build nvmutilLeah Rowe
it's not a lot of code, and takes less than a second. the previous change uses x instead of ?, but this would cause an error if the nvmutil was already built, because the makefile might cause a build to be skipped. therefore, force a re-build to mitigate the error. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysutil/nvmutil: use x, not ?, for random charactersLeah Rowe
A user reported that '?' causes an error on zsh. See: https://codeberg.org/libreboot/lbmk/issues/261 For example: ./mk inject libreboot-XXXXXX.tar.xz setmac ??:??:??:??:??:?? The user got: zsh: no matches found: ??:??:??:??:??:?? The mitigation here is to double-quote, e.g.: ./mk inject libreboot-XXXXXX.tar.xz setmac "??:??:??:??:??:??" However, a lot of people won't do that. Therefore, I will retain the current behaviour but support x/X for randomness. Now lbmk uses x by default, instead. I will now update the documentation, accordingly. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslib.sh find_ex: explicitly create the tmp fileLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: Explicitly create the xbmktmp directoryLeah Rowe
mktemp would normally do it, but we must not rely on that Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: unified handling of ./tmpLeah Rowe
not to be confused with /tmp we use ./tmp inside the lbmk work directory, for large files, because /tmp might not be very big, or might be a tmpfs Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslib.sh: add fe_ which is fx_ but err on findLeah Rowe
In the mk script, we need fx_ to not return errors on the find command, since it's searching a bunch of directories where some of them may not exist. All other instances where fx_ is used, must return an error if the directory being searched doesn't exist. For this, fe_() is introduced, which does the same as fx_ but with this much stricter check. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 dayslbmk: unified execution on find commandsLeah Rowe
We have a lot of places in lbmk where the output of find is used, and then some function is executed on the result. This is messy, and bloats several of these functions. Now this is unified, into a new function: fx_ What fx_ does is execute a given function, for each result found, with the arguments for a find command appended. For example: find -name ".git" If you wanted to do: foo "$arg" Where "arg" is a search result from find, and you wanted to execute "foo" on each one, you would do: fx_ foo -name ".git" The find utility does have an -exec feature, but I've found that it only works for executables, not functions. fx_ does not return errors, so "foo" in this example would have to do its own error handling. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysNEW MAINBOARD: Dell Precision T1700 SFF and MTLeah Rowe
This is similar to the 9020SFF, but this board has ECC support. However, the native raminit isn't used here, even though it is otherwise compatible, because the native init doesn't do ECC yet. The broadwell mrc.bin has ECC support, which is also used on the HP EliteBook 820 G2. The MRC for broadwell can be used on haswell boards such as the T1700. Add both the SFF and MT variants. Since these are identical to the 9020 variants, except for slightly different PCH enabling ECC, we can just re-use the 9020 port without issue. We *could* add a variant to coreboot, for T1700, but there is not really any pressing need. It is simply the 9020sff/mt with mrc.bin Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysmk: include rom.sh directlyLeah Rowe
remove it from mkhelper files, because rom.sh doesn't initialise any variables globally, except one that never changes. Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysmk: Download vendorfiles before building releaseLeah Rowe
Do it just after creating the src archive. This way, everything is downloaded all at once. Otherwise, a momentary lapse of internet uptime will cause a release build to fail later on, and one of lbmk's flaws is that this would then mean you must re-build from scratch. If we assume that the internet is working within a short period of time, then this change would mitigate that possibility. If something did happen during tar archive creation, that's a much shorter amount of time that is "wasted". Signed-off-by: Leah Rowe <leah@libreboot.org>