Commit Graph

929 Commits

Author SHA1 Message Date
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
Leah Rowe
70cdb03f7f vendor.sh: correction to fsp hack
i unrolled these lines earlier, but this line was
incorrect; dl was already handled. it's dl_bkup
that we have to handle here.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:08:34 +01:00
Leah Rowe
1eafcf9029 vendor.sh: minor cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:07:07 +01:00
Leah Rowe
efd1db1ca3 release.sh: remove eval statement in nuke()
the symlink check is what made me use eval, but the
symlink check is not required, since i check every
entry that goes in nuke.list anyway.

not having that symlink check is safer than having
an eval statement on that line.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 08:03:12 +01:00
Leah Rowe
b4c7cac8a2 xbmk: rename the "dry" variable to if_not_dry_run
and add a line break where it is used

now it is essentially a macro of sorts, used in
terms of syntax, to mean the same as:

if [ "$dry" != ":" ]; do
	thing
fi

in this case, we say:

$if_not_dry_build \
	thing

yes. macros in sh are a thing.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 07:50:34 +01:00
Leah Rowe
4f01dc704a xbmk: remove even more eval statements
in one or two cases, the use of eval is retained, but
modified so as to be safer.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 07:17:42 +01:00
Leah Rowe
7f8d85140f xbmk: remove the setcfg function
this allows me to remove several eval calls, and the
errors relating to configs can now show exactly which
function they occured in, allowing for easier debugging.

once again, eval should be used sparingly if at all.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 05:23:47 +01:00
Leah Rowe
0a74cc8ec6 xbmk: clean up a few err calls
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 03:05:23 +01:00
Leah Rowe
a09ec1d02b xbmk: remove more eval statements
i will eventually find a way to remove them all,
while still leaving the code completely clean.

in practise, i never use the contents of a file
for eval and the inputs are carefully checked.

however, over-use of eval is always a bad idea
in shell scripting.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 02:55:52 +01:00
Leah Rowe
0605fbe720 xbmk: general cleanup: unroll condensed code lines
i overlooked a number of lines, during previous cleanup

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04 02:43:24 +01:00
Leah Rowe
e1c70f4319 vendor.sh: remove superfluous AND
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-03 22:43:06 +01:00
Leah Rowe
d90defeae3 mrc.sh: remove superfluous eval statement
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 07:09:37 +01:00
Leah Rowe
a74af6aa05 tree.sh: remove superfluous eval statements
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 06:55:29 +01:00
Leah Rowe
15cefca84b rom.sh: remove superfluous eval statement
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 06:53:36 +01:00
Leah Rowe
2b4b5bf82e inject: remove superfluous use of eval
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 06:52:10 +01:00
Leah Rowe
85b10a674b init.sh: reduce the use of eval statements
also remove the unused _nogit variable

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 06:51:03 +01:00
Leah Rowe
99f2c0fcf9 get.sh: reduce the number of eval statements
also split up try_fetch()

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02 06:27:39 +01:00
Leah Rowe
be1f4ebb9c get.sh: allow force-pull via -F instead of -f
use of ./mk -F behaves the same as -f before the
previous commit.

this can be useful, during development when we want
to update revisions.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01 16:51:00 +01:00
Leah Rowe
24f120d1b8 get.sh: only pull if the local revision is missing
we pull from upstream in cached git repos, before performing
an operation, and we run from the cache, but we do this every
time, even if a local revision exists, defeating the purpose
of the caching; on unreliable/intermittent internet connections,
this can cause a problem.

this also causes us problems with gnulib.git and grub.cfg, which
for *some reason* are really slow, even when doing a pull.

this change improves the efficiency of the build system, during
release builds, on a development repository where we already
have lots of caches.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01 16:28:04 +01:00
Leah Rowe
2ac51f442b init.sh: break up xbmk_set_env
what this function does will differ wildly,
depending on whether it's a child instance
or a parent instance of xbmk.

break up this function accordingly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01 07:57:39 +01:00
Leah Rowe
8b351e51aa tree.sh: break up check_gnu_path to subfunctions
this whole check could probably be removed, honestly.

it was only put in place during the debian trixie testing
release cycle, before they finally updated gnat just before
the stable release of trixie came out.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01 07:43:12 +01:00
Leah Rowe
3b6d2b799c vendor.sh: break up the extract_kbc1126 subshell
stick it in a new function, for easier reading.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01 07:19:04 +01:00
Leah Rowe
f272c4d1c4 rom.sh: support "fspgop" init mode
for all intents and purposes, this functions like libgfxinit
corebootfb, but uses intel fsp's video initialisation instead
of coreboot's native initialisation code

this is currently in use on the x2e n150 mainboard, whose
config is dubiously named "libgfxinit_corebootfb"

now the config can be renamed, and will be, in the next commit.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 23:18:50 +01:00
Leah Rowe
b786918b2b vendor.sh: use bsdunzip, not unzip
most implementations of unzip are info-zip

we already compile libarchive for bsdtar, to extract
rar archives in vendor.sh

now we also use bsdunzip

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 11:27:16 +01:00
Leah Rowe
8e8f29c2e5 vendor.sh: remove false error message
mkdst cycles through a bunch of outputted files
when running an extract function, to find the
right file as per defined checksums; if one is
found, it can still show errors for the others,
leading the user to think something is wrong.

remove their fear by removing this benign error.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 02:29:04 +01:00
Leah Rowe
4075c8be38 vendor.sh: use bsdtar, not unar
unar is buggy and crap

and bsdtar has superior licensing

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 01:56:05 +01:00
Leah Rowe
e527820ceb vendor.sh: don't use unrar
the only practical way to use it is to to use
the non-free version; currently used as a
fallback if unar fails.

however, i'm also going to scrap unar and
use bsdtar instead.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 01:45:36 +01:00
Riku Viitanen
b4c3bafb0e New mainboard: X2E_N150
Patch in Gerrit: https://review.coreboot.org/c/coreboot/+/89281
Not working: USB3 ports only work at USB2 speeds.

IFD:
Modified the original by:
- Removing Device Exp2 region (empty anyway)
- Enlarging the BIOS region to use this freed space
- Setting the HAP bit in PCHSTRP55 using a fork of
  me_cleaner: https://github.com/XutaxKamay/me_cleaner

Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-28 02:21:15 +03:00
Leah Rowe
fa6c3512d6 rom.sh: remove TODO note
the return is necessary when release=n while doing
release builds, because it prevents a build error
since the given images don't exist in that scenario.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:25:13 +01:00
Leah Rowe
574fd30cde inject.sh: don't exit from patch_release
return instead. xbmk's coding style specifically
prohibits anything other than x_ or err from
running "exit".

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:21:40 +01:00
Leah Rowe
4fbafaaa46 init.sh: remove comment in pybin
the following checks on the path mitigates the
lack of error handling in the findpath command
that sets pypath.

this was all thought of when i initially wrote
this code. it's perfectly fine.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:14:45 +01:00
Leah Rowe
204e310f5a get.sh: remove unnecessary check in try_copy
the check for whether a file is present is unnecessary,
because the following cp command would also print the
file name if it doesn't exist, and exit with the same
non-zero status.

let cp do the work.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:13:17 +01:00
Leah Rowe
b4fbdb448d get.sh: rename try_file to try_fetch
the previous function name was misleading, because
this tries multiple methods including git and curl.

therefore, this was renamed to match what it dose.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:12:21 +01:00
Leah Rowe
e42cb4f4cd xbmk: tidy up some if statements
this is an extension of the previous work to unroll
most of the condensed code lines.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26 00:09:46 +01:00
Leah Rowe
f5060232e1 init.sh: remove TODO note
on further inspection, the following check ensures that the
python version number is 3.

if anything went wrong, the possibility alluded to in the
comment wouldn't actually matter in practise.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-25 23:54:16 +01:00