4251 Commits

Author SHA1 Message Date
Leah Rowe 489a81eb6d Merge pull request 'fix smbios_product_name for t1700 mt and sff' (#452) from Ronanand0/lbmk:fix-smbios-prod-name-for-t1700 into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/452
2026-09-18 12:23:58 +02:00
Ronanand0 272e306ba2 Update config/coreboot/t1700sff_bmrc_12mb/config/libgfxinit_txtmode 2026-09-18 11:14:03 +02:00
Ronanand0 f1f7fa2925 Update config/coreboot/t1700mt_bmrc_12mb/config/libgfxinit_txtmode 2026-09-18 11:13:11 +02:00
Ronanand0 9e189bbd06 Update config/coreboot/t1700mt_bmrc_12mb/config/libgfxinit_corebootfb 2026-09-18 11:12:28 +02:00
Ronanand0 688e541c58 Update config/coreboot/t1700sff_bmrc_12mb/config/libgfxinit_corebootfb 2026-09-18 11:10:47 +02:00
Leah Rowe 387e6dd771 mk: much safer forx loop
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 21:14:08 +01:00
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 1722964f66 mk: add safety check for grep -o usage
very unlikely not to have it, but we deal in
certainty, not rm -Rf /

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 40b120c26b remove ccache from dependencies
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-17 07:23:18 +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 089875ac1f mk: error handling on command -v
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 11:43:58 +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 cebae0ed80 mk: rename autoconfargs to configureargs
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 10:58:00 +01:00
Leah Rowe d165f14a4d mk: general cleanup and awk appreciation
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 10:39:52 +01:00
Leah Rowe 5afd77433d mk: tidy up handle_defconfig
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 09:41:40 +01:00
Leah Rowe 08ec187842 wip
defconfig file test unnecessary in check_defconfig
because it's already checked in handle_defconfig

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 09:25:55 +01:00
Leah Rowe 2dc4a4d16b mk: clean up run_make_command_real
merge check_cmake with run_make_command_real

tidied up some redundant checks

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 07:54:16 +01:00
Leah Rowe ca55077032 mk: tidy up check_cmake
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-16 07:25:31 +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 88887c0163 mk: fix check_cross_compiler call
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 22:15:16 +01:00
Leah Rowe 0c41ea82dd mk: move config back to getopt
really pointless doing it here. do it in the loop.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 22:10:37 +01:00
Leah Rowe bbc56b714b fix build error on no-makefile projects
e.g. biosutilities

the subshell screws up error handling. this
patch changes it to old behaviour.

some projects don't have makefiles. the
non-zero exit also prevents further call
to copy_elf when no binaries are created,
as in this example.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 21:17:10 +01:00
Leah Rowe 6a5b4c98d6 mk: clean up getopt flags
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 21:11:51 +01:00
Leah Rowe 50eec6d485 mk: simplify single_tree_build
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 20:58:40 +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 59cbc1784c mk: remove -c and -x commands (clean/xgcc-clean)
the user never runs these. it's not needed. the design
of lbmk already cleans everything, or caches everything,
between builds. everything cached out of tree.

it's not expected to ever need to clean manually, so just
remove the option. knobs are for nobs.

releases don't need it either, because we tar everything
before building, thus eliminating all build artifacts.
we do this on a fresh copy of lbmk on ./mk release

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 20:38:08 +01:00
Leah Rowe 6725b616f3 mk: skip build if makefile check fails
this was the previous behaviour, and prevents
single-tree builds from proceeding with
use of copy_elf

otherwise you get a bunch of build errors

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 20:24:08 +01:00
Leah Rowe 7507655d34 simplified make-clean handling
no point using distclean, because the context there
is providing clean sources for distribution, but we
use ./mk release which tars everything up before ever
running any build commands.

make-clean is enough

distclean is a stupid gnuism anyway, and most makefiles
that have it will just do the same as clean anyway

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 20:20:03 +01:00
Leah Rowe 2aad50cd59 even more tidy up run_make_command
tidy it all the way up

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 19:51:55 +01:00
Leah Rowe f7b9c9e410 mk: tidy up run_make_command
yeah, this reverses the last change

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 19:03:39 +01:00
Leah Rowe 4878cec84d mk: optimise make-clean check
only check makefiles if if_not_make_clean is set

this avoids unnecessary disk usage

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 18:06:52 +01:00
Leah Rowe 04be963383 mk: remove unnecessary check
on dry builds, if_not_make_clean will also be empty

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 18:06:14 +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 828578cc57 mk: use correct elddir for coreboot xgcc
in practise, it was always correct because on projects
that used coreboot xgcc, the tree would always be called
default.

however, this is a bug. the logic uses a correct directory
name for coreboot in src/, but not elf/

this patch makes the two consistent, programattically.

this is therefore a preventative bugfix.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-15 09:16:28 +01:00
Leah Rowe 7cb4cdf0f2 mk: turn on git-clean by default, except coreboot
libreboot's policy is to thoroughly clean sources per
build, because we cache builds out of tree and avoid
re-builds if they exist; these and the sources are
deleted if metadata in config/ changes per project,
tree and/or target.

the problem is that this change only affects lbmk.git

it doesn't affect release archives, where project sources
do not have git-init applied to them. this will be
addressed.

can't use it on coreboot, because it will delete xgcc
tarballs in a way currently not handled, and handling
it will mean adding a project-specific hack.

the xgcc tarballs could be built out-of-tree, and this
will have to be done, otherwise coreboot will have to be
made gitclean="y" for now.

everything else is fair game.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-09-14 18:01:57 +01:00