963 Commits

Author SHA1 Message Date
Leah Rowe
1d17a8ffcf util/nvmutil: call it nvmutil in makefile
a package manager by the name "nvm" exists, as
i discovered.

this is a courtesy to them.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-03-08 01:11:52 +00:00
Leah Rowe
a55af90b6c vendor.sh: handle mfs in find_me
This makes the argument handling easier to understand,
since other arguments are also handled in find_me

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-02-22 17:18:51 +00:00
Leah Rowe
a938309d35 vendor.sh: handle me_cleaner -p separately
this is a special mode that skips FPTR checks, which is
needed on the topton x2e_n150

we currently set this, when MEclean="n", but we may want to
skip cleaning while still checking FPTR on some boards (in
a future lbmk revision)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-02-22 17:15:24 +00:00
Leah Rowe
177f45355f vendor.sh: tidied up mecleaner argument handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-02-22 17:06:12 +00:00
Leah Rowe
0f93368ea0 get.sh: properly initialise _ua
it is currently only initialised inside case
conditions. this is fine on most shells, but
some of them can be a bit buggy here.

initialise it empty and then override.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-02-21 17:44:01 +00:00
Leah Rowe
2edd583aee Add ThinkPad X270 coreboot port from Kat Inskip
Courtesy of Kat Inskip who ported this board.

Headphone output doesn't work at the moment, due to incorrect verb.
Intel VBT is also wrong. Both are taken from another board.

This will be amended later with the correct verb and VBT.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-02-21 08:26:44 +00:00
Ron Nazarov
2e98da9688 Add Supermicro X11SSH-F/LN4F port
Surprisingly, SeaBIOS VGA output works (coreboot documentation says it
doesn't).

I'm using a static CMOS option table currently (like most other boards
supported in libreboot), but maybe it would be better to switch to the
CBFS file option table.  The default option table enables
hyperthreading, overriding the compile-time setting.

I'm also using a ME/SPS image extracted from the official BIOS update
for this board.  Unfortunately, https://www.supermicro.com/Bios/* is
excluded from crawlers in robots.txt so it's not in archive.org, so I
haven't been able to find a backup download URL.  I also needed to set
the user-agent for fetching the update to "curl/8.6.0" because the
default user-agent override used by lbmk resulted in a 403 error.
deguard is not required (there's no bootguard on this board).

SPS does not implement CPU replacement detection which means that the
MRC cache does not work and RAM training needs to happen on every
boot.  To avoid this it may be possible to run ME instead of SPS on
this board, but I tried both the ME image used on the OptiPlex 3050
Micro in libreboot and one from the ASRock C236 WSI and they both hung
at "[INFO ] POST: 0x92" (POSTCODE_FSP_MEMORY_INIT).

The memtest86+ build included with libreboot doesn't work with USB
keyboards and this board doesn't have a PS/2 port, which is annoying.
2026-02-14 02:50:42 +00:00
Leah Rowe
d5351aee37 inject: fix mac address insertion
during previous re-factoring, i sorted variable initialisations.

that was all well and good, but prior to that, i initialised
the new_mac string to empty at first, and then to
the "xx" letters; the latter made the first initialisation
redundant, but in the re-factoring, I put the blanking of
the string afterward.

this disabled mac address insertion, because the way the script
works is precisely to avoid mac address insertion when the mac
string is empty. this is used when running the "nuke" command.

silly me.

yes, i'm very silly. very very silly. so silly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-12-25 13:41:37 +01:00
Leah Rowe
68e0b5dddc init.sh: Explicitly export UTF-8 locale
C.UTF-8, instead of just C.

This fixes a build issue in GRUB on my Arch Linux test bench.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-12-24 17:16:10 +01:00
Leah Rowe
1b10c072d3 tree.sh: tidy up check_gnu_path
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-15 16:57:48 +00:00
Leah Rowe
7ef7e02f73 lib.sh: reduce indentation in setvars
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-15 16:55:27 +00:00
Leah Rowe
214ed3efd2 get.sh: reduce indendation in fetch_targets
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-15 16:51:59 +00:00
Leah Rowe
9d6af0063b get.sh: reduce indentation in clone_project
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-15 16:51:10 +00:00
Leah Rowe
d7869a56f5 WIP: chromebook integration script
I intend to merge every Chromebook that Mrchromebox supports,
into Libreboot, ready for the Libreboot 25.12 release. Work
is still ongoing, and several changes need to happen in lbmk.

I started working on it a few weeks ago (today is
14 November 2025 as I push this).

Still TODO:

* Automatically create lbmk coreboot targets, based
  on the configs present in MrChromebox git
* Re-work git repository management in lbmk, such that
  a list of upstreams is used, instead of a hardcoded
  list per configuration; this will allow us to use
  different remotes across the same project, even where
  they diverge. This would then allow us to use the
  MrChromebook repository directly, instead of cherry-picking
  patches into upstream coreboot
* The note above about remotes would also mean that we can
  use MrChromebox's own edk2 repository directly. All of this
  would reduce the burden on lbmk.git
* Support building edk2 payloads, exactly mirroring the
  setups used on MrChromebox builds

There are some things that need to be checked first, for
boards that use MMC-based or eMMC-based storage, for the
GRUB and SeaBIOS payloads, also U-Boot, because I will
also be using these.

As such, this current script shall sit in lbmk master, but
it is not yet finished.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-11-14 18:22:51 +00:00
Leah Rowe
25f523bbac get.sh: return clone_project if multi-tree
this is the true fix, replacing the fixes previously
reverted.

the problem with the old fix was that it was a hack,
and could result in the archived backup of a code repo
being the wrong one; the destination was the one for
the main repo, but what if we were cloning the backup?

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 22:40:29 +01:00
Leah Rowe
bec7e6d4cb Revert "get.sh: don't frivolously copy tmp git clones"
This reverts commit b840cf3a83.
2025-10-17 22:32:43 +01:00
Leah Rowe
f632b8aed7 Revert "get.sh: remove a redundant check"
This reverts commit e2a97455cc.
2025-10-17 22:32:35 +01:00
Leah Rowe
e2a97455cc get.sh: remove a redundant check
loc is never empty.

if it is, it's a bug. don't hide bugs.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 21:01:31 +01:00
Leah Rowe
b840cf3a83 get.sh: don't frivolously copy tmp git clones
this fixes a regression in a previous patch, this time
also taking account for the different cache locations.

all of get.sh needs to be purged, and re-written clean.
it looks clean. but it's years of hacks.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 20:57:18 +01:00
Leah Rowe
2aea7f6229 Revert "get.sh: make forcepull a macro"
This reverts commit b3232a7c4a.
2025-10-17 16:07:16 +01:00
Leah Rowe
b3232a7c4a get.sh: make forcepull a macro
:

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 14:02:55 +01:00
Leah Rowe
54aa5b7d32 tree.sh: unify -f/-F in case/switch handling
they're the same commands, but -F does forcepull

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 13:57:14 +01:00
Leah Rowe
96f786b962 tree.sh: convert do_make into a macro
use it similarly to if_dry_build/if_not_dry_build

there is nothing cooler than an sh macro

:

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-17 13:29:56 +01:00
Leah Rowe
e1b6ccf69e xbmk: sort global variables alphabetically
also separate some of the special ones.

this makes the variables easier to read/find.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16 15:46:44 +01:00
Leah Rowe
d84a556bf0 get.sh: use the same directory map as --mirror
Don't hardcode the cache directory, and don't store
remotes anymore. This change retains compatibility
in practice, with the older directory location, because
it's extremely unlikely that newly generated locations
would conflict with old ones.

With this new change, non-mirror git clone caches are
now done twice; one directory per remote, rather than
one directory with two remotes.

This is just inherently much more reliable.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16 14:22:06 +01:00
Leah Rowe
b333ddfe73 get.sh: use --keep-cr on git-am
Some repositories might use CR-LF line endings. This option
keeps Git from mangling patches when merging.

Repositories that don't do this, such as ALL repositories
currently used by xbmk, will be unaffected by this change.

This is being done in preparation for importing MrChromebox
edk2, as Intel's own edk2 repository on GitHub uses these.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16 13:30:55 +01:00
Leah Rowe
d83dd506c2 get.sh: More reliable git remote caching
Don't do one repository for all remotes. Do one *clone* per
remote.

This also means that users no longer download information twice,
in practice, because the backup repository will only be downloaded
if the main one didn't work.

Theoretically, this change is makes the process less efficient, but
in practise it's more reliable now.

We do now use --mirror on the git clone command for caches, but we
already did git pull --all before.

This just ensures that we absolutely have all local code.

NOTE:

The new code isn't used by default. To use it, you must do:

export XBMK_CACHE_MIRROR="y"

Otherwise, the old behaviour will continue to be used. This is
because the new code, while correct, puts more strain on upstream
servers (more code being downloaded), and can result in higher amounts
of disk space being used. The old behaviour wasn't broken, so we'll
also support that method.

TODO: perhaps also have a check in place to re-use both caches,
where available, regardless of XBMK_CACHE_MIRROR?

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16 13:29:59 +01:00
Leah Rowe
11a3e9d887 xbmk: minor code cleanup (79 character rule)
recent re-factoring lead to certain code lines that
exceeded 79 characters in length.

we like to avoid this, whenever possible.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07 05:52:36 +01:00
Leah Rowe
fb95e4ad68 tree.sh: add missing -F flag
i support -F, but didn't include it in the
actual getopt string.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07 03:02:01 +01:00
Leah Rowe
ca5f0a5edd get.sh: use git-show instead, for rev checks
whatchanged is deprecated, and results in an error
on modern git versions, prompting you to include
the --i-still-use-this argument

what absolute, utter fucking arrogance. i use the
whatchanged feature every fucking day.

i will be complaining to git-scm.com about this.

but that's what we do in libreboot. we adapt.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-07 01:25:19 +01:00
Leah Rowe
8636d7497c rom.sh/tree.sh: clean up if_not_dry_build
the way it was used is messy, and a relic of the
old chained command coding style, from before when
i recently loosened that requirement.

the new focus is simple, readable code, regardless
of size.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06 13:28:34 +01:00
Leah Rowe
1b54c7a744 rom.sh: use if_dry_build macro
instead of checking if_not_dry_build.

use it here the same way.

yes. shell script macros. it's how i roll.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06 12:43:04 +01:00
Leah Rowe
afccecbde0 rom.sh: don't run add_cbfs_option on dry builds
i added this in an earlier version of the patch, but
for some reason removed it.

this is necessary, or the build system will fail.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06 07:44:38 +01:00
Leah Rowe
c716341c13 cb/kabylake: don't hardcode power_on_after_fail
I realised that the Dell OptiPlex 3050 Micro has NVRAM available.
Use that backend, and hardcode power_on_after_fail to Disable,
which is already done in cmos.default.

The Lenovo ThinkPad T480 currently has no option table in coreboot,
besides the CBFS one. For this, the CBFS option table has been
enabled, and the build system has been modified to insert
a relevant config for power_on_after_fail.

Nicholas Chin informs me that Kabylake generally has legacy NVRAM,
so enabling it for the T480/T480s should work, but we'll need
to use it in the future anyway; better to just use CBFS now.

I *could* use the CBFS backend on 3050micro as well.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-06 04:03:36 +01:00
Leah Rowe
9b104fca44 init.sh: only create cache/ here
also, the check is -e, not -d, because we
might be operating on a symlink.

it's a bit hacky but this should work.

the previous change (now reverted) broke
re-use of the main cache/ in release work
directories.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05 01:23:32 +01:00
Leah Rowe
ee2bca65f6 Revert "init.sh: explicitly create cache/"
This reverts commit 23f98c2958.
2025-10-05 01:21:26 +01:00
Leah Rowe
23f98c2958 init.sh: explicitly create cache/
otherwise, an error occurs when doing ./mk release

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05 01:04:25 +01:00
Leah Rowe
c1d6cd22c2 xbmk: don't call mkdir. use xbmkdir (new function)
xbmkdir checks if a directory exists, before running
mkdir, and then still uses -p

i was testing xbmk on arch linux today, and noticed
that it errored out when a directory already exists.

i'm mitigating against buggy or differently behaving
mkdir implementations this way, by wrapping around
it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 22:42:42 +01:00
Leah Rowe
31fa7ea591 vendor.sh: re-do the previously reverted change
but do it better. this time, the change won't cause any
behavioural differences.

the reason for the change is we don't want "$@" inside
an eval statement, if such calamity can be avoided.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 16:57:36 +01:00
Leah Rowe
2956fcc051 vendor.sh: fix setvfile
this reverts change made to this function in:

commit 4f01dc704a
Author: Leah Rowe <leah@libreboot.org>
Date:   Sat Oct 4 06:13:15 2025 +0100

    xbmk: remove even more eval statements

for some reason, the new code caused sch5545 ec firmware
to never download.

the old code wasn't horribly broken, so just use that.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 16:14:36 +01:00
Leah Rowe
8334c93dac release.sh: preserve clean sbase before building
this way, the clean version can be placed inside the
release tarball.

there is a make clean option in sbase, but we should
not really on this.

the design of xbmk is that a clean src tarball is
created. there must not be build artifications in it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 10:09:24 +01:00
Leah Rowe
8969cc734f xbmk: use sbase sha512sum, not host sha512sum
the --status flag seems to be a GNUism

as stated in the previous commit, i import sbase
suckless now, so as to have a consistent implementation
of sha512sum.

this ensures that its output is reliable, when i'm using
the output of this command within backticks.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 09:58:24 +01:00
Leah Rowe
2cfaba181b xbmk: rename cv variables, for clarity
the new names are still a bit crap, but a bit better.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:41:25 +01:00
Leah Rowe
1943dba608 tree.sh: rename xtree to xgcctree, for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:37:41 +01:00
Leah Rowe
51e424c7d1 tree.sh: rename btype to buildtype, for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:36:18 +01:00
Leah Rowe
d95af9ba44 vendor.sh: rename _t to blobtype, for code clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:33:26 +01:00
Leah Rowe
63002732f5 tree.sh: rename _f to flag, for code clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:29:33 +01:00
Leah Rowe
b7a9aad9fc get.sh: delete tmp patch list when done
yet another oversight

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:20:27 +01:00
Leah Rowe
a115679c57 get.sh: sort patches when applying
this was an oversight in my recent patch unrolling
the condensed code lines, to remove eval statements.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:17:53 +01:00
Leah Rowe
0776eb414c vendor.sh: make the fsp hack a bit cleaner
it's still a dirty hack. i really should make
a better check here.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:12:24 +01:00