summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
9 daysmk: redirect readlink err to /dev/nullLeah Rowe
i had this before. forgot to add it in the new design. oops. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: ruthlessly simplify findpath()Leah Rowe
i love eval, printf and awk eval, printf and awk are the best things ever Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayserr even louderLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: further simplify err()Leah Rowe
yes, just awk everything, double-quoted Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: add error check on xbmkpwd initLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: simplified findpath()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: simplified error functionsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: remove xprintfLeah Rowe
totally useless function. all it does is print quotes. just printf the args into awk this does literally the same thing. the output will literally be the same. unclear thinking == unclear code right thinking == this patch Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmove findpath and err functions to mkLeah Rowe
otherwise, it's totally broken. i also now include lib.sh later. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: remove redundant sha512sum initLeah Rowe
it's done in xbmk_init. the initial value is never used. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: simplify xbmkpwd initialisationLeah Rowe
do it from mk instead. we don't need to run pwd anymore, because we just get the path and cd to it, setting that as the path. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: include lib.sh earlierLeah Rowe
this means we can now cd to wrkdir using findpath, and it means the cd command can be wrapped in x_ Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: call xbmk_init through x_Leah Rowe
the function never returns 1 at the moment, but this is a useful future trap. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: run xbmk_init here, not from init.shLeah Rowe
it should be clear on first reading, what the actual control flow is. hiding the call in init.sh obscures first reading. now it is absolutely clear on first reading, that xbmk_init is called before going through everything else in mk. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysdelete stragglerLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: remove gcc/gnat matching logic (obsolete)Leah Rowe
coreboot has this now: commit c421847fe2fef61586eb313206a4be0f2e491974 Author: Matt DeVillier <matt.devillier@gmail.com> Date: Mon Dec 29 10:12:17 2025 -0600 util/crossgcc: Fix GNAT detection for gnat-15 this one is advisory instead, telling the user to create such a symlink as we did. this is much less invasive. our own check was bad, because it basically silences what is otherwise an error. coreboot's approach is more correct, so we will defer to that instead. note that this means older coreboot (for fam15h) is no longer covered, but those trees don't use gnat anyway as libgfxinit is unused on those targets this lbmk patch removes 61 sloc of dead code, which makes me very happy. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: rename trees() to main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmerge tree.sh into mkLeah Rowe
mk is so tiny now, and will likely never get bigger. tree.sh is effectively the main script now, so let's treat it as such. i'll start splitting tree.sh instead. e.g. move gcc setup to its own file. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysuse -mindepth alongside -maxdepth in findLeah Rowe
use of maxdepth 1 does not exclude the main directory, which is undesired in these contexts, though excluded in practise due to how find is actually used. technically, mindepth should be used, just in case, as a defensive measure. the context here is files and directories within a main directory, used as arguments in other commands. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daystree.sh: fix globbing in multi-tree command argsLeah Rowe
this solves a bug that does not yet manifest, because this bug *can't* currently trigger any error due to lbmk's design. this is therefore a preventative fix, for reasons that will become clear. we previously put arguments in a variable, in a way that didn't handle globbing. now we avoid a variable and use "$@" instead, which solves the problem. this also means that the main logic in mk can be cleaner, as trees-specific control logic is now placed entirely in tree.sh's main. this means that we can now also wrap x_ around trees() this was never a problem in the past, because all of the arguments for trees commands never have globbing; config names are always e.g. foo_bar, not foo bar in commands where globbing did need to be handled, those commands were never trees commands. e.g. you had ./mk inject filename yes, this is a design improvement, or a preventative bug fix. pick your poison. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: clean up printf commandLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: put all includes in one placeLeah Rowe
the previous design flaw was fixed by recent refactors, such that i can now . include all of lbmk at once, and have control logic right after that. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysmk: simplified command handlingLeah Rowe
just do includes in mk again. common.sh was stupidly small, just pointless. replace the entire command dispatcher with eval, printf and awk, because i can, and it further reduces sloccount. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 dayscommon.h: re-order includesLeah Rowe
the new order more reliably indicates which order everything is executed in, by virtue of the functions provided in each file. Signed-off-by: Leah Rowe <leah@libreboot.org>
9 days79 linesLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysuse awk insteadLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
9 daysinit.sh: tidy up main loopLeah Rowe
the new loop is incredibly novel in nature, and will break if anyone but me ever touches it. it also reduces sloccount by two lines. i did it because i can, and it's perfectly safe. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 dayssplit up include/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysmore build system cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysinit.sh: remove unnecessary directory checkLeah Rowe
literally the point of -p in mkdir is to, you know, check whether the directory already exists unclear thinking = unclear code Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysfix regression in version checkLeah Rowe
it occured to me that this style of check was bad. it only works when checking if both variables are set my bad Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysxbmk: remove xbmkdir()Leah Rowe
pointless function. literally pointless. it is literally the most pointless function ever written in the history of functions. literally pointless in every possible way. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 dayslib.sh: always sanitize xbmkver before writingLeah Rowe
this removed the need to check it in xbmk_set_version as it calls update_xbmkver, which in turn performs the same check. this increases the general reliability and safety of xbmk when recording its own version after update. Signed-off-by: Leah Rowe <leah@libreboot.org>
10 dayslib.sh: simplify update_xbmkverLeah Rowe
sanitization can be done with a single sed command Signed-off-by: Leah Rowe <leah@libreboot.org>
10 daysmore cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysget.sh: remove redundant checkLeah Rowe
we don't pull anything from supermicro's site. we did briefly, in an earlier port for that one supermicro board. don't maintain dead code. dead code has one purpose: be deleted. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysget.sh: add try_fetch_copy functionLeah Rowe
just a skeleton that calls the curl function Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmore cleanupLeah Rowe
this will be the last time, i promise Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysget.sh: even more cleanup (simplified fetch)Leah Rowe
fetch_submodule now contains just the right amount of eval, which means all of the eval. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysget.sh: further cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysget.sh: simplify xbgetLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmore variable cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmk: export locales much earlierLeah Rowe
also simplify the way it works (eval and awk) Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysremove include/chromebook.sh import script (not needed)Leah Rowe
i will be adding chromebooks, but not using this script, which is why i never finished the script. i previously had the plan to patch upstream coreboot, by importing patches from mrchromebox, but that results in an extreme number of patches. several hundred patches, in fact. more efficient is to add multi-upstream support in include/get.sh, for using different upstreams including forks, on a given multi-tree project. i haven't done this yet, but this is what will be done, and then adding each chromebook will be a matter of importing configs from mrchromebox alongside edk2 integration. a script will still need to be written, for the initial import, and imported chromebooks will be set release=n until and when each target is fully tested. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmore cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daystree.sh: remove redundant TODOLeah Rowe
infinite loop detection was here before. i removed it because it was bloat. we don't take general user input here, so careful configuration is all we need. infinite loops are harmless to the user. they are merely annoying. they would never be introduced to the user, because configs are always tested before release. before commit, even. we can save the user a few watts of electricity, or we can Keep It Simple. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysrom.sh: remove another TODOLeah Rowe
this one is unnecessary, because we're not taking general input from the user. we mitigate this carefully by being, you know, careful. implementing the TODO would have bloated the code, in ways that might only introduce other serious bugs. the current logic is fine, and great care will always be taken by me to keep the code safe, while i'm in charge. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysrom.sh: remove redundant TODOLeah Rowe
the code is correct. no TODO needed here. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinit.sh: universally set git commit/auth dateLeah Rowe
do it as an export. to avoid pollution elsewhere, do it inside a subshell. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinit.sh: set git committer date as wellLeah Rowe
only the author date was being set before with this change, at least on my system, i now get the same commit ID and date each time on the following test: NOTE: . is lbmk (main work directory) NOTE: here, we are copying the current clone git clone . lbmktest cd lbmktest ./mk version rm -Rf .git ./mk version git log same output each time. we have thus eliminated timestamps as a variable. this is but a part of in a series of changes that will eventually lead to libreboot being built reproducibly. Signed-off-by: Leah Rowe <leah@libreboot.org>