16 Commits

Author SHA1 Message Date
Leah Rowe a0951d1127 minor cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 11:06:12 +01:00
Leah Rowe e1c2525783 lib.sh: make build_sbase a macro
sh macros are cool

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:40:55 +01:00
Leah Rowe 69875b8e10 xbmk: general cleanup
note: mecleaner check removed in vendor.sh, because
it's already guaranteed to be fetched. the check will
never indicate failure, so we can just assume that
the me cleaner python script exists.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:33:43 +01:00
Leah Rowe 113dac006f variable ./mk location, based on user input
when calling ./mk, or from PATH, an absolute path
is created to ./mk

this will likely be different than mk, but it might
be a different script. perhaps the operator is making
a copy of the mk script temporarily - obviously not
advised, no, but here we have a problem because then
lbmk is still running ./mk everywhere

run arg0 instead, now called "mk"

./mk is still hardcoded in release.sh, because we
do need to make sure we're using the right script
there

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 05:52:06 +01:00
Leah Rowe 40b1a3e0bb Revert "init.sh: re-initialise upstream src .git"
This reverts commit cf079dbd17.

we don't need it anymore. we don't bother cleaning sources
for releases, because tehy're never dirtied. we build
using ./mk release which does everything fresh.

the git-clean feature was only used on ./mk -c, which was
removed because it's not needed for the same reason as
above. lbmk always cleans and re-builds everything when
metadata changes, otherwise storing builds out of tree
in a cache directory.

get rid of this dead code.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 20:42:33 +01:00
Leah Rowe 5043b6dc97 mk: abuse an absurd number of sh macros
just the right amount of absurd

this is why i don't need to use python

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 17:08:05 +01:00
Leah Rowe a65d804f1e add dir check
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 10:37:06 +01:00
Leah Rowe cf079dbd17 init.sh: re-initialise upstream src .git
we have git-clean in use for projects, but that
only affects lbmk.git

now we re-initialise .git in upstream projects,
when .git is missing. this ensures consistent
cleaning behaviour between lbmk.git and the
libreboot releases.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 10:32:38 +01:00
Leah Rowe c6900c8571 init.sh: remove redundant sha512sum init
it's done in xbmk_init. the initial value
is never used.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-14 11:33:15 +01:00
Leah Rowe c0402ef642 mk: simplify xbmkpwd initialisation
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>
2026-09-14 11:30:49 +01:00
Leah Rowe abee462f2a mk: run xbmk_init here, not from init.sh
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>
2026-09-14 11:07:24 +01:00
Leah Rowe 93b49afa3f mk: remove gcc/gnat matching logic (obsolete)
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>
2026-09-14 10:05:16 +01:00
Leah Rowe f5f6464c60 79 lines
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-13 20:55:30 +01:00
Leah Rowe 74c374a3a2 use awk instead
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-13 20:38:54 +01:00
Leah Rowe de09b71e0a init.sh: tidy up main loop
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>
2026-09-13 20:12:03 +01:00
Leah Rowe eb23cd3de8 split up include/
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-13 15:33:21 +01:00