1052 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 f59e5d8e2b rom.sh: remove redundant check
if_build / empty mode are a given here, since this
is a premake function which only executes if
the mode string is empty and/or if_build is empty

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:55:19 +01:00
Leah Rowe 4530c6f2e3 rom.sh: put coreboot dry checks in mkhelper
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:52:52 +01:00
Leah Rowe e0714ad929 rom.sh: check grub dry build in mkhelper
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:46:53 +01:00
Leah Rowe 058a70a16e pcsx-redux: check dry build in mkhelper
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:45:16 +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 63596046d1 rom.sh: simplify add_uboot
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 10:33:36 +01:00
Leah Rowe bf654d4c19 rom.sh: just remove the coreboot cook function
ccache isn't used at all in any of the configs

ensuring that this remains the case is much
cleaner. coreboot will never enable it by default,
precisely because of how buggy it is.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 07:20:25 +01:00
Leah Rowe 94ff1ec49a inject.sh: simplify variable init and end message
the modified/not message is pointless, because the
message indicating tarball rebuild will suffice

variable initialisation simplified (global newvar)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 02:22:11 +01:00
Leah Rowe 08021d71c2 rom.sh: simplify add_uboot
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 02:06:00 +01:00
Leah Rowe 856551a36d mk: add forx function for shorthand loops
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 01:53:56 +01:00
Leah Rowe 7c025e1036 release.sh: remove -m option
-m src can skip building binaries

this is pointless. i always want them.

i won't use it, and i'm the only person
who will ever use ./mk release

i'm going to add a -t option in the future
to allow e.g. ./mk -t coreboot

this would do -f but create a tarball of
the source, versioned. e.g.
coreboot-libreboot-27.05_src.tar.xz

or something like that. this would allow
more granular control, if you just want to
get sources.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 01:13:36 +01:00
Leah Rowe 60a2f5cbff rom.sh: disable ccache on coreboot builds
this fixes a build issue i was having on ./mk release,
and it's also a preventative bug fix.

instead of forcing it to be enabled, we now force
it to be disabled. all current configs already disable
it, and disabled is the default.

just in case, disable it by force. i encountered build
errors on ./mk release, due to stale build artifacts.

i had no issues on normal lbmk.git, doing builds, but
./mk release builds everything in bulk. we want the
release build process to be as reliable as possible.

this won't actually affect build speed much, due to
lbmk's design (clean builds before running make).

work is needed upstream, to make ccache more reliable.
ccache is fine when you're re-building the same board
a lot, but there's just no way it can be used reliably
when building lots of very different boards, where the
code greatly differs in coreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 23:27:53 +01:00
Leah Rowe 3b565ce056 vendor.sh: minor cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 21:06:39 +01:00
Leah Rowe 2dc01a93b9 mk: tidy up xbmk_sanitize_version
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 11:21:56 +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 b32dd39262 move findpath and err functions to mk
otherwise, it's totally broken. i also now include
lib.sh later.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-14 11:37:34 +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 d17b06f589 merge tree.sh into mk
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>
2026-09-14 09:26:37 +01:00
Leah Rowe 2fc37b4b47 use -mindepth alongside -maxdepth in find
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>
2026-09-14 08:48:16 +01:00
Leah Rowe 4ebede5b99 tree.sh: fix globbing in multi-tree command args
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>
2026-09-14 08:06:51 +01:00
Leah Rowe 5fb0d1098f mk: simplified command handling
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>
2026-09-14 00:05:48 +01:00
Leah Rowe dcaa15ab01 common.h: re-order includes
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>
2026-09-13 22:25:15 +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
Leah Rowe 07ed4e940b more build system cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-13 15:28:15 +01:00
Leah Rowe ff83f69154 init.sh: remove unnecessary directory check
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>
2026-09-13 14:58:31 +01:00
Leah Rowe 0363bcaa0f fix regression in version check
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>
2026-09-13 14:55:38 +01:00
Leah Rowe 1a9b211368 xbmk: remove xbmkdir()
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>
2026-09-13 14:50:41 +01:00
Leah Rowe e9e33d4b4d lib.sh: always sanitize xbmkver before writing
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>
2026-09-13 14:33:37 +01:00
Leah Rowe 3b37a0b17d lib.sh: simplify update_xbmkver
sanitization can be done with a single sed command

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-13 14:25:09 +01:00
Leah Rowe 77b0b448e2 more cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 19:37:57 +01:00
Leah Rowe c7fb6a2bc8 get.sh: remove redundant check
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>
2026-09-12 18:12:36 +01:00
Leah Rowe 2d1d7624e9 get.sh: add try_fetch_copy function
just a skeleton that calls the curl function

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 15:10:44 +01:00
Leah Rowe a32374f6cc more cleanup
this will be the last time, i promise

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 14:29:11 +01:00
Leah Rowe 897c2667af get.sh: even more cleanup (simplified fetch)
fetch_submodule now contains just the right amount
of eval, which means all of the eval.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 13:24:13 +01:00
Leah Rowe 446eca846e get.sh: further cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 12:49:12 +01:00
Leah Rowe c3e2d8c8bc get.sh: simplify xbget
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 11:19:42 +01:00
Leah Rowe b094c60a39 more variable cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 09:02:04 +01:00
Leah Rowe 798cc79399 mk: export locales much earlier
also simplify the way it works (eval and awk)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-12 08:49:53 +01:00