summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
6 daysinject.sh: split up the inject functionsLeah Rowe
generally go for a more linear function order, and split up any functions. the objective is to have functions only suitable to libreboot be separate. more splitting will be done, and eventually the vendor-download functions will be split into a new file, as will several other functions. this is being done as part of an effort to bring the libreboot and canoeboot versions of inject.sh in sync, so that from now on, cherry picking between the two projects will produce fewer merge conflicts and require a lesser amount of post-merge maintenance. some other minor cleanup has also been done; for example, the "need_files" variable is redundant and was removed. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 dayslbmk: use x_ instead of err, where appropriateLeah Rowe
many places in lbmk used err, because older versions of x_ did not handle globbing properly. however, use of x_ is preferable on trivial commands. the only time err() should be called is what it has to be, when x_ can't work, or when a more useful error message is needed, for context. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysmrc.sh: operate on refcode in tmp area firstLeah Rowe
that way, the Intel GbE device can be enabled there, and only then would the refcode file be copied. otherwise, the current behaviour would leave buggy refcode in place, if the dd command failed. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysmrc.sh: fix outdated info in the commentLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysinject.sh: use direct comparison for metmpLeah Rowe
use of the e function would slow down execution, and it's mostly unnecessary in this case. the e function is only needed if we want to confirm via user message that a file exists. that is not needed here. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysinject.sh: use subshell to speed up find_me()Leah Rowe
the current test allows a further extraction after running mecleaner, even if me.bin was found. further, any recursive calls that exit non-ze don't lot the loop acthually stop, unless we subshell that too, otherwise fx_ is returned to return 0 when a given command it runs returns 1, or more specifically: the for loop in x_ breaks. this is by design, and there's not much that can be done, but this patch should pseed up extraction a little bit, when dealing with intel me files. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysmk: use zero exit instead, to run treesLeah Rowe
that way, with set -u -e, we aren't risking some buggy sh implementations from causing an error exit where it shouldn't. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysremove useless commentLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysmk: remove unnecessary line breakLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysmk: re-split tree logic to include/tree.shLeah Rowe
I really think mk should just be a small stub. Better to keep everything separate. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysmk: move release functions to idnclude/release.shLeah Rowe
The idea with mk is that it's meant to basically be a stub for running everything else, while mainly having the trees logic within it (what was once script/trees). Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysmk: add missing error handli for mk -fLeah Rowe
on the release command, that is Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: re-write tmpclone without cachingLeah Rowe
remove caching for now. it's buggy as hell. will re-write the caching feature next. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: use setvars for fail variablesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: hard fail if git am failsLeah Rowe
similar to the last patch, we must ensure that the inability to patch will cause a hard exit, regardless of any redundancy we have for cloning. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysgit.sh: Hard fail if reset failsLeah Rowe
We allow a re-try when cloning fails, to account for redundancy, but resetfail currently doesn't cause any error exit at all. This patch mitigates that bug. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysinit.sh: Only check XBMK_CACHE if it existsLeah Rowe
Otherwise, if it doesn't exist, the current check will wrongly exit with error status, preventing you from running the build system at all! Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysHP 820 G2: Use fam15h cbfstool tree for refcodeLeah Rowe
We used cbfstool from coreboot 4.13, because it was the last version to work with the particular format used for stage files, before the CBFS standard changed in newer releases of cbfstool. When I added this board to Libreboot, it was source-only at first so it didn't matter. I didn't want to do a standalone cbfstool binary, in case some people decided to use that one on newer boards, which would cause all sorts of issues. So I bodged it and just included an import of coreboot 4.13. Well, the cbfstool from coreboot 4.11, as used for FAM15H AMD boards, is compatible. I checked the code diff between the two, and there is no meaningful difference. I've tested this, and it works, since the last release or two now includes 820 G2 images, so I was able to use those with ./mk inject, to verify whether the refcode file is still grabbed properly. We need the refcode to handle MRC on Broadwell platform, but we extract it from an old Google Chromebook image, that uses the old CBFS stage file layout. This change solves my problem: the problem was that releases are bloated further, due to including this extra coreboot version. This should reduce the size of the next release considerably, especially after decompressing the tarball. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysalso fix the other grub treesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysMerge pull request 'fix trying to boot all logical volumes after unlocking ↵Leah Rowe
an encrypted volume' (#330) from cqst/lbmk:master into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/330
8 daysfix trying to boot all logical volumes after unlocking an encrypted volumecqst
9 daysinit.sh: remove useless exportLeah Rowe
we already reset to n if not y, afterward just rely on that Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: also allow XBMK_RELEASE=Y or NLeah Rowe
as opposed to =n or =y Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: Resolve XBMK_CACHE via readlinkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: check XBMK_CACHE is a directory insteadLeah Rowe
it doesn't matter if it's not a file. that's the wrong check. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: export LOCALVERSION in set_envLeah Rowe
Don't do it in set_version Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: run set_version before set_envLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: Use readlink in pybin()Leah Rowe
Use realpath only as a fallback. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: simplify extract_kbc1126ec()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: simplified MAC address handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: Simplify patch_release_roms()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: Remove useless command in err()Leah Rowe
We don't need this, since we're exiting anyway. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinject.sh: rename copytb and preprom functionsLeah Rowe
make them shorter so they go on one line again Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: Simplified fx_() and removed fe_()Leah Rowe
Instead of calling fe_, prefix x_ as indicated. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: Create serprog tarballs here insteadLeah Rowe
i simplified rom.sh to use mkhelper for actual image building. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysbuild serprog using fe_ *defined inside mkhelper*Leah Rowe
sh macros ftw Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysrom.sh: build serprog images with fe_Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayslib.sh: support any command on find_exec()Leah Rowe
right now, we assume "find", but it adds any number of arguments next to that. change it instead to support any command, where the assumption is that it would generate a list of files and directories. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: Simplify extract_intel_me_bruteforce()Leah Rowe
This is probably about as small as it's going to get. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: clean up tmp me file before extractLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
10 dayslib.sh: re-add missing break in fe/fx_Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: tidy up extract_intel_me_bruteforceLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: fix oversight in me bruteforceLeah Rowe
i used i instead of 1, in the variable when running the extract_archive function. this didn't trigger since +u was set, and +e was set. in practise, then, it seems that because of this, and because my ME extract/insert test was a success, that none of the archives we use actually have a ME inside of a file inside of a given downloaded archive. still, this is technically incorrect, so fix it! Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: remove unnecessary checkLeah Rowe
the call stack already falls through with a bunch of return 1s after a successful run of me_cleaner, so it's really not necessary. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: don't use subshell for me bruteforceLeah Rowe
i needed it on the old version, which used cd this one stays in the same directory at all times Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinject.sh: insanely optimise the me bruteforceLeah Rowe
use fe_ fe_ ftw Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysgit.sh: Simplify git am handlingLeah Rowe
fx_ and fe_ really are the best shell functions ever. really. they're the best. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: remove unused functionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinit.sh: New function dx_ to execute path filesLeah Rowe
Generated by find, this is a wrapper in place of using for loops everywhere. This simplification temporarily increases the amount of code, because we don't do this a lot, but this will reduce the growth of the build system code size in future changes. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinject.sh: Further simplified FSP extractionLeah Rowe
We don't need the copy command at all, since the files it copies are the only ones that the Python script does anyway, so now we just make that script output to the directory, directly, where these files must go. Signed-off-by: Leah Rowe <leah@libreboot.org>