yes, make it generalised. use a new variable in
mkhelper.cfg, gitclean and gitcleanargs
not enabled by default, but u-boot enables it. i'm
considering whether to use this by default, as it
is the general policy of lbmk to clean everything
just after a build, as builds are cached out of
tree. this way, we can do re-builds safely for each
project. there are probably a lot of subtle bugs that
might be fixed if we used this
the problem is that this is currently only used on
lbmk.git, but not on libreboot release archives which
lack .git directories; the main one is initialised in
lbmk, but not in upstream sources. we could just initialise
those.
in fact, that is probably what i'm going to do.
Signed-off-by: Leah Rowe <leah@libreboot.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>