summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
4 daysget.sh: return clone_project if multi-treeHEADmasterLeah Rowe
this is the true fix, replacing the fixes previously reverted. the problem with the old fix was that it was a hack, and could result in the archived backup of a code repo being the wrong one; the destination was the one for the main repo, but what if we were cloning the backup? Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysRevert "get.sh: don't frivolously copy tmp git clones"Leah Rowe
This reverts commit b840cf3a832de815a87d9d10b698eec97aceb342.
4 daysRevert "get.sh: remove a redundant check"Leah Rowe
This reverts commit e2a97455cc25921dcb9f5e3a4bf06cdfb3e34b49.
4 daysget.sh: remove a redundant checkLeah Rowe
loc is never empty. if it is, it's a bug. don't hide bugs. Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysget.sh: don't frivolously copy tmp git clonesLeah Rowe
this fixes a regression in a previous patch, this time also taking account for the different cache locations. all of get.sh needs to be purged, and re-written clean. it looks clean. but it's years of hacks. Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daysRevert "get.sh: make forcepull a macro"Leah Rowe
This reverts commit b3232a7c4a6466381d798d7beda56fd020d86d54.
4 daysget.sh: make forcepull a macroLeah Rowe
: Signed-off-by: Leah Rowe <leah@libreboot.org>
4 daystree.sh: unify -f/-F in case/switch handlingLeah Rowe
they're the same commands, but -F does forcepull Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daystree.sh: convert do_make into a macroLeah Rowe
use it similarly to if_dry_build/if_not_dry_build there is nothing cooler than an sh macro : Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysxbmk: sort global variables alphabeticallyLeah Rowe
also separate some of the special ones. this makes the variables easier to read/find. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysget.sh: use the same directory map as --mirrorLeah Rowe
Don't hardcode the cache directory, and don't store remotes anymore. This change retains compatibility in practice, with the older directory location, because it's extremely unlikely that newly generated locations would conflict with old ones. With this new change, non-mirror git clone caches are now done twice; one directory per remote, rather than one directory with two remotes. This is just inherently much more reliable. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysget.sh: use --keep-cr on git-amLeah Rowe
Some repositories might use CR-LF line endings. This option keeps Git from mangling patches when merging. Repositories that don't do this, such as ALL repositories currently used by xbmk, will be unaffected by this change. This is being done in preparation for importing MrChromebox edk2, as Intel's own edk2 repository on GitHub uses these. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysget.sh: More reliable git remote cachingLeah Rowe
Don't do one repository for all remotes. Do one *clone* per remote. This also means that users no longer download information twice, in practice, because the backup repository will only be downloaded if the main one didn't work. Theoretically, this change is makes the process less efficient, but in practise it's more reliable now. We do now use --mirror on the git clone command for caches, but we already did git pull --all before. This just ensures that we absolutely have all local code. NOTE: The new code isn't used by default. To use it, you must do: export XBMK_CACHE_MIRROR="y" Otherwise, the old behaviour will continue to be used. This is because the new code, while correct, puts more strain on upstream servers (more code being downloaded), and can result in higher amounts of disk space being used. The old behaviour wasn't broken, so we'll also support that method. TODO: perhaps also have a check in place to re-use both caches, where available, regardless of XBMK_CACHE_MIRROR? Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07xbmk: minor code cleanup (79 character rule)Leah Rowe
recent re-factoring lead to certain code lines that exceeded 79 characters in length. we like to avoid this, whenever possible. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07tree.sh: add missing -F flagLeah Rowe
i support -F, but didn't include it in the actual getopt string. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07get.sh: use git-show instead, for rev checksLeah Rowe
whatchanged is deprecated, and results in an error on modern git versions, prompting you to include the --i-still-use-this argument what absolute, utter fucking arrogance. i use the whatchanged feature every fucking day. i will be complaining to git-scm.com about this. but that's what we do in libreboot. we adapt. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06rom.sh/tree.sh: clean up if_not_dry_buildLeah Rowe
the way it was used is messy, and a relic of the old chained command coding style, from before when i recently loosened that requirement. the new focus is simple, readable code, regardless of size. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06rom.sh: use if_dry_build macroLeah Rowe
instead of checking if_not_dry_build. use it here the same way. yes. shell script macros. it's how i roll. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06rom.sh: don't run add_cbfs_option on dry buildsLeah Rowe
i added this in an earlier version of the patch, but for some reason removed it. this is necessary, or the build system will fail. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06cb/kabylake: don't hardcode power_on_after_failLeah Rowe
I realised that the Dell OptiPlex 3050 Micro has NVRAM available. Use that backend, and hardcode power_on_after_fail to Disable, which is already done in cmos.default. The Lenovo ThinkPad T480 currently has no option table in coreboot, besides the CBFS one. For this, the CBFS option table has been enabled, and the build system has been modified to insert a relevant config for power_on_after_fail. Nicholas Chin informs me that Kabylake generally has legacy NVRAM, so enabling it for the T480/T480s should work, but we'll need to use it in the future anyway; better to just use CBFS now. I *could* use the CBFS backend on 3050micro as well. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05init.sh: only create cache/ hereLeah Rowe
also, the check is -e, not -d, because we might be operating on a symlink. it's a bit hacky but this should work. the previous change (now reverted) broke re-use of the main cache/ in release work directories. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05Revert "init.sh: explicitly create cache/"Leah Rowe
This reverts commit 23f98c29581e7d2cf5639e93fd89a6e64bec5635.
2025-10-05init.sh: explicitly create cache/Leah Rowe
otherwise, an error occurs when doing ./mk release Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: don't call mkdir. use xbmkdir (new function)Leah Rowe
xbmkdir checks if a directory exists, before running mkdir, and then still uses -p i was testing xbmk on arch linux today, and noticed that it errored out when a directory already exists. i'm mitigating against buggy or differently behaving mkdir implementations this way, by wrapping around it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: re-do the previously reverted changeLeah Rowe
but do it better. this time, the change won't cause any behavioural differences. the reason for the change is we don't want "$@" inside an eval statement, if such calamity can be avoided. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: fix setvfileLeah Rowe
this reverts change made to this function in: commit 4f01dc704a1ed0e18fc0efc1500e61b4bc41b0e6 Author: Leah Rowe <leah@libreboot.org> Date: Sat Oct 4 06:13:15 2025 +0100 xbmk: remove even more eval statements for some reason, the new code caused sch5545 ec firmware to never download. the old code wasn't horribly broken, so just use that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04release.sh: preserve clean sbase before buildingLeah Rowe
this way, the clean version can be placed inside the release tarball. there is a make clean option in sbase, but we should not really on this. the design of xbmk is that a clean src tarball is created. there must not be build artifications in it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: use sbase sha512sum, not host sha512sumLeah Rowe
the --status flag seems to be a GNUism as stated in the previous commit, i import sbase suckless now, so as to have a consistent implementation of sha512sum. this ensures that its output is reliable, when i'm using the output of this command within backticks. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: rename cv variables, for clarityLeah Rowe
the new names are still a bit crap, but a bit better. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04tree.sh: rename xtree to xgcctree, for clarityLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04tree.sh: rename btype to buildtype, for clarityLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: rename _t to blobtype, for code clarityLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04tree.sh: rename _f to flag, for code clarityLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04get.sh: delete tmp patch list when doneLeah Rowe
yet another oversight Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04get.sh: sort patches when applyingLeah Rowe
this was an oversight in my recent patch unrolling the condensed code lines, to remove eval statements. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: make the fsp hack a bit cleanerLeah Rowe
it's still a dirty hack. i really should make a better check here. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: correction to fsp hackLeah Rowe
i unrolled these lines earlier, but this line was incorrect; dl was already handled. it's dl_bkup that we have to handle here. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04vendor.sh: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04release.sh: remove eval statement in nuke()Leah Rowe
the symlink check is what made me use eval, but the symlink check is not required, since i check every entry that goes in nuke.list anyway. not having that symlink check is safer than having an eval statement on that line. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: rename the "dry" variable to if_not_dry_runLeah Rowe
and add a line break where it is used now it is essentially a macro of sorts, used in terms of syntax, to mean the same as: if [ "$dry" != ":" ]; do thing fi in this case, we say: $if_not_dry_build \ thing yes. macros in sh are a thing. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: remove even more eval statementsLeah Rowe
in one or two cases, the use of eval is retained, but modified so as to be safer. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: remove the setcfg functionLeah Rowe
this allows me to remove several eval calls, and the errors relating to configs can now show exactly which function they occured in, allowing for easier debugging. once again, eval should be used sparingly if at all. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: clean up a few err callsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: remove more eval statementsLeah Rowe
i will eventually find a way to remove them all, while still leaving the code completely clean. in practise, i never use the contents of a file for eval and the inputs are carefully checked. however, over-use of eval is always a bad idea in shell scripting. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: general cleanup: unroll condensed code linesLeah Rowe
i overlooked a number of lines, during previous cleanup Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-03vendor.sh: remove superfluous ANDLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02mrc.sh: remove superfluous eval statementLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02tree.sh: remove superfluous eval statementsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02rom.sh: remove superfluous eval statementLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02inject: remove superfluous use of evalLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>