summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
3 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>
3 daysinit.sh: export LOCALVERSION in set_envLeah Rowe
Don't do it in set_version Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: run set_version before set_envLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinit.sh: Use readlink in pybin()Leah Rowe
Use realpath only as a fallback. Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: simplify extract_kbc1126ec()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: simplified MAC address handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysinject.sh: Simplify patch_release_roms()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 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>
3 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>
3 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>
3 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>
3 daysbuild serprog using fe_ *defined inside mkhelper*Leah Rowe
sh macros ftw Signed-off-by: Leah Rowe <leah@libreboot.org>
3 daysrom.sh: build serprog images with fe_Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
3 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>
4 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>
4 daysinject.sh: clean up tmp me file before extractLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
4 dayslib.sh: re-add missing break in fe/fx_Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysinject.sh: tidy up extract_intel_me_bruteforceLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
4 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>
4 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>
4 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>
4 daysinject.sh: insanely optimise the me bruteforceLeah Rowe
use fe_ fe_ ftw Signed-off-by: Leah Rowe <leah@libreboot.org>
5 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>
5 daysinject.sh: remove unused functionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 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>
5 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>
5 daysinject.sh: simplify kconfig scanningLeah Rowe
Use fe_ with a new function, scankconfig, to do the same thing. Not only is this simpler, it now also operates on all coreboot configs for a given target, whereas it previously only operated on the first one. This is useful for cases where one config might use a file that the other one does not; in practise, we don't do this yet, but it's a theoretical possibility Also: don't use the function check_defconfig, which is now redundant and has been removed. That function also conflicted with another function by the same name in mk, but fortunately didn't cause an issue in practise, due to how sh works; when vendor.sh was used, it was without running the tree commands, except under a separate lbmk instance. So this is a simplification, a feature enhancement and even a bug fix, all wrapped into one! Signed-off-by: Leah Rowe <leah@libreboot.org>
5 dayslib.sh find_ex: Write sort errors to /dev/nullLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 dayslib.sh x_(): Remove warning of empty argsLeah Rowe
It's completely unnecessary, and I forsee this check breaking the build system at some point, since some commands rely on the output of other commands. Therefore, I've removed this check. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 dayslbmk: Replace err with much simpler implementationLeah Rowe
The current implementation is insanely over-engineered, and completely unnecessary. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 dayssingletree/elfcheck: use fx_, not fe_Leah Rowe
fe_ returns an error on the find command, but we rely on the only error ever being our intentional exit, upon discovering files. in singletree, the directory being checked was already checked first, so we know it's safe not to err on find; and find not reporting an error if no files are found is ok. on elfcheck, it's very much the same thing. In fact, we very much want it to return 0 if the directory doesn't exist, or if files don't exist within it. Therefore, use fx_ which is designed for this use-case. Quick re-cap: fx and fe execute a given function name with each line outputting by find as an argument, each time. It is somewhat similar in scope to find's -exec command. We use fe_ as shorthand in several places all over lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysrom.sh: Print the rom image path being generatedLeah Rowe
This message used to exist, and it's a nice feedback for the user, to confirm that the build went OK. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysrom.sh: Safer cprom()Leah Rowe
Don't insert special files like GRUB keymaps after copying to the final destination. Instead, copy the tmprom to /tmp and operate on that, in these instances. This is less efficient, depending on the user's configuration; if /tmp is on the same file system as the user's xbmkpwd, it should be fine. However, the actual performance hit isn't that bad in practise, on most setups. If the user's /tmp is a tmpfs, then that means using tmpfs, but it's one image at a time. It should be OK. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysrom.sh: specifically check keymaps in cprom()Leah Rowe
"not seauboot" is a valid check at present, but if i start supporting other arguments in the future, this code would have to change. therefore, i change it in advance, on that theory. this new check is more technically correct. these lines are triggered when inserting grub keymaps. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysrom.sh: simplify mkseagrub()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysmk: simplify elfcheck()Leah Rowe
fe_() called inside subshell, ftw Signed-off-by: Leah Rowe <leah@libreboot.org>
5 dayslib.sh: simplify singletree()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysgit.sh: move singletree() to lib.shLeah Rowe
it's also used by mk, to determine which build function to use (build_project or build_targets). Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysmk: Fix bad error handling for gnu_setverLeah Rowe
I mixed logical OR and AND by mistake. Oops! Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysGRUB: Mark E820 reserved on coreboot memoryLeah Rowe
See, coreboot bug report: https://ticket.coreboot.org/issues/590 We hadn't noticed this for quite a while, since we always just booted with iomem=relaxed when needing to run cbmem, since in practise it was always combined with other tasks that require access to lower memory. GRUB currently matches coreboot's own mmap for cbmem, but for example SeaBIOS marks cbmem as E820 reserved. Therefore, this change replicates the SeaBIOS behaviour. Without this patch, Linux needs to boot with iomem=relaxed for cbmem access, for example when running ./cbmem -1 With this patch, cbmem is now accessible regardless. This patch also prevents Linux from overwriting parts of CBMEM. Thanks go to Paul Menzel, who wrote this GRUB patch. Thanks also go to Nicholas Chin, who provided testing, all the way from Coreboot 25.03 back to Coreboot 4.20. It seems that this is just something the payloads have to handle. This means that both SeaBIOS and GRUB no longer have this bug, in Libreboot; now what remains is to replicate the test with our U-Boot payload. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysinject.sh: simplify extract_intel_me_bruteforce()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysinject.sh: Remove unnecessary checkLeah Rowe
_dest is already checked in the calling function fetch(), after extract_tbfw() has been called. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysinject.sh extract_intel_me(): reduce indentationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysinject.sh: Move FSP extraction only to extract_fspLeah Rowe
Don't do FSP-specific extraction in extract_archive, as that is not what the latter is for. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysinject.sh: tidy up intel me handlingLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysinject.sh: tidy up the deguard commandLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
6 dayslib.sh: set -u -e in err()Leah Rowe
Some parts of lbmk set +u +e, to be reset later on under normal conditions upon exit. We must ensure such level of integrity in err() as well. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 dayslib.sh: Provide error message where none is givenLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysinit.sh: Silence the output of git config --globalLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysinit.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>