Commit Graph

278 Commits (c88fb8c12921317a1d98bb4730c0b07c3178a274)

Author SHA1 Message Date
Leah Rowe 3eb59000a5 build/roms: reduce indentation in skip_board()
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:30:33 +01:00
Leah Rowe 3aa148aa2e build/roms: simplified status handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:27:37 +01:00
Leah Rowe 96eb7913a5 build/roms: simplified seagrub handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:22:15 +01:00
Leah Rowe cbf673fc46 build/roms: support SeaGRUB *with menu enabled*
This is useful on desktops, where you want GRUB to
automatically start, but you still want access to the
GRUB menu, in the case where you rely on SeaBIOS to
execute the VGA ROM inside your graphics card.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:21:48 +01:00
Leah Rowe 79b1a1fee2 update/trees: simplified defconfig copying
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:21:18 +01:00
Leah Rowe 45ac5f1741 option.sh: don't use nproc (not portable)
export CBMK_THREADS=x

where x is an integer. this is already supported for
setting the number of build threads, but if not set
it uses nproc.

openbsd doesn't have nproc. default to 1 thread.

now you MUST set threads. e.g. in linux do:

export CBMK_THREADS=$(nproc)

preliminary work is being done to make cbmk run
on openbsd!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:19:00 +01:00
Leah Rowe ee853c20e0 update/release: disable status checking
just to ensure that nothing goes wrong. we don't rely on
the status variable for releases, because there is another
variable, release, that target.cfg files declare, e.g.

release="n"
release="y"

you can just omit the variable, because it defaults to y, so
you only need declare it when it needs to be "n"

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:14:54 +01:00
Leah Rowe 8cf0d56f66 build/roms: tell the user how to ignore status
Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-03 01:12:29 +01:00
Leah Rowe 3eab399e7a update macbook21/x60/t60 status
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:10:40 +01:00
Leah Rowe c7513ce31c allow disabling status checks during builds
export CBMK_STATUS=n

if not set, the status checks and confirmation dialogs
persist. if set to y they persist.

if you set it to n, all checks are disabled, so e.g.:

./build roms all

this would once again build all targets, regardless
of status. this is if you want the old behaviour.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 01:03:02 +01:00
Leah Rowe bd9404c237 update more board statuses before release
what's left to properly test are pineview/x4x/i945 boards

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 00:59:07 +01:00
Leah Rowe a52db7899c add warning for coreboot/e6400_4mb
Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-03 00:56:05 +01:00
Leah Rowe 9bff198adc declare gm45 thinkpads stable for release
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 00:51:17 +01:00
Leah Rowe d8bd88bff2 kcma-d8/kgpe-d16: mark as tested(unstable)
raminit has never been fully reliable on this board, and so
this board has never been stable. so, now that lbmk specifies
such status per board, mark these boards as such.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 00:50:46 +01:00
Leah Rowe b707b7a8cc build/roms: update help, pertaining to status
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 00:49:24 +01:00
Leah Rowe eda035eb23 build/roms: let "list" specify status types
for example:

./build roms list

this will list every now, still. same behaviour. now see:

./build roms list stable

this will list all stable roms

./build roms list untested

this lists untested roms. but wait!

./build roms list untested broken unstable

./build roms list broken unstable

yes. it works this way. now you can use lbmk to easily
see what rom status are, during maintenance.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-03 00:48:14 +01:00
Leah Rowe b56f79578a build/roms: report status when building images
export CBMK_VERSION_TYPE=x
x can be: stable, unstable

in target.cfg files, specify:
status=x
x can be: stable, unstable, broken, untested
if unset, cbmk defaults to "unknown"

if CBMK_VERSION_TYPE is set, no confirmation is asked
if the given target matches what's set (but what's set
in that environmental variable can only be stable or
unstable)

if CBMK_RELEASE="y", no confirmation is asked, unless
the target is something other than stable/unstable

"unstable" means it works, but has a few non-breaking
bugs, e.g. broken s3 on dell e6400

whereas, if raminit regularly fails or it is so absolutely
unreliable as to be unusable, then the board should be
declared "broken"

untested means: it has not been tested

With this change, it should now be easier to track whether
a given board is tested, in preparation for releases. When
working on trees/boards, status can be set for targets.

Also: in the board directory, you can add a "warn.txt" file
which will display a message. For example, if a board has a
particular quirk to watch out for, write that there. The message
will be printed during the build process, to stdout.

If status is anything *other* than stable, or it is unstable
but CBMK_VERSION_TYPE is not set to "unstable", and not building
a release, a confirmation is passed.

If the board is not specified as stable or unstable, during
a release build, the build is skipped and the ROM is not
provided in that release; this is in *addition* to
release="n" or release="y" that can be set in target.cfg,
which will skip the release build for that target if "n"

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-03 00:45:50 +01:00
Leah Rowe b8db9ed698 exports variables from err.sh, not build
LC_COLLATE and CBMK_RELEASE are important variables. we want
to make sure that these are seen by everything.

since err.sh is included from all scripts, doing it there will
accomplish just that.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 23:28:31 +01:00
Leah Rowe cca3294194 GRUB: bump to today's latest revision
GRUB has not pushed many patches to master since the recent 2.12
release, but there are a number of interesting fixes.

canoeboot is doing a release soon. bump to latest grub revision.

Some of the new patches in GRUB are interesting:

XFS fixes:

"fs/xfs: Handle non-continuous data blocks in directory extents"
68dd65cfdaad08b1f8ec01b84949b0bf88bc0d8c
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2254370
Apparently, XFS could not boot in some reports, though this was
likely with BIOS or UEFI GRUB; no such reports were made to canoeboot

"gfxmenu/view: Resolve false grub_errno disrupting boot process"
39c927df66c7ca62d97905d1385054ac9ce67209

"util/grub-fstest: Add a new command zfs-bootfs"
28c4405208cfb6e2cea737f6cbaf17e631bac6cd

The gnulib revision does not need to be updated at this time.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 23:23:48 +01:00
Leah Rowe 3ae05b347c cbmk: export TMPDIR from err.sh, not build
cbmk sets TMPDIR to /tmp, and then creates a tmpdir, then
exports *that* as the value of TMPDIR. this unified TMPDIR
location then contains all subsequent files and directories,
when any script or program makes use of /tmp, via mktemp. at
least, that's the theory!

in practise, because it was only being properly exported from
the main build scripts, subscripts that are then called were
not exporting it, at least that is my assumption because in
some cases, i found that the coreboot build system was leaving
errant files behind outside of our own TMPDIR, and that build
system did not seem to be setting TMPDIR itself; more debugging
is needed.

anyway: use the exact same logic, but do it from err.sh. since
err.sh is included from every cbmk script, that means it will
always be exported when running every single part of cbmk. this
should reduce the chance that mktemp creates files and directories
outside of our custom TMPDIR location.

this is because in cbmk, we mitigate unhandled tmpdirs/files by
unifying it in the manner described, then deleting the entire
TMPDIR on exit from the main cbmk parent process (the main
script that the user called from, which is always the "build"
file).

in cbmk, effort is made to clean up temporary files properly,
without relying on this catch-all, but we can't rely on that.
the catch-all should also be as robust as possible.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 23:21:40 +01:00
Leah Rowe c8bb465d1a build/roms: add missing deletion of tmp file
the temporary rom per build was not being deleted after
finishing the current target. this adds up in /tmp during
large builds, when building for many targets. fix this!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 23:17:45 +01:00
Leah Rowe a1ac872240 permit excluding certain coreboot roms on releases
release="n" can be set in target.cfg on coreboot targets

script/update/release exports CBMK_RELEASE="y"

script/build/roms skips building a given target if release="n"
in target.cfg *and* CBMK_RELEASE="y"

you could also do the export yourself before running ./build roms,
for example:

export CBMK_RELEASE="y"
./build roms all

this will be used in subsequent revisions, to exclude certain
targets from the next canoeboot release.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 23:15:50 +01:00
Leah Rowe 428ebea0d9 grub xhci support
see:

https://github.com/9elements/grub/commits/xhci-module-upstreaming-squash_v4/

grub only supports xhci on bios/uefi targets, but not coreboot.
some newer machines don't have ps/2 controllers, and boot in a
way where ehci isn't available at startup; the controller can't
be used by ehci code, there must be xhci support.

the code is from Patrick Rudolph working on behalf of 9elements.
the code was also sent here for review:

https://lists.gnu.org/archive/html/grub-devel/2020-12/msg00111.html

however, upstream never merged these patches. canoeboot will have
to maintain these from now on. the patches have been rebased for
use with grub 2.12.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 23:07:43 +01:00
Leah Rowe 187a3ea484 allow users to specify number of build threads
cbmk otherwise uses nproc to set the number of build threads,
in these places:

* generic make commands in script/update/trees
* crossgcc make command in script/update/trees

the -T0 option is also used in script/update/release, when running
tar.

with this change, you can do:

export CBMK_THREADS=x

where x is the number of threads. when you then run
cbmk, your chosen number of threads will override
the default. this may be useful on a host that does
not have a lot of memory.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 22:44:59 +01:00
Leah Rowe 226b2301db safer, simpler error handling in cbmk
in shell scripts, a function named the same as a program included in
the $PATH will override that program. for example, you could make a
function called ls() and this would override the standand "ls".

in cbmk, a part of it was first trying to run the "fail" command,
deferring to "err", because some scripts call fail() which does
some minor cleanup before calling err.

in most cases, fail() is not defined, and it's possible that the user
could have a program called "fail" in their $PATH, the behaviour of
which we could not determine, and it could have disastrous effects.

cbmk error handling has been re-engineered in such a way that the
err function is defined in a variable, which defaults to err_ which
calls err_, so defined under include/err.sh.

in functions that require cleanup prior to error handling, a fail()
function is still defined, and err is overridden, thus:

err="fail"

this change has made xx_() obsolete, so now only x_ is used. the x_
function is a wrapper that can be used to run a command and exit with
non-zero status (from cbmk) if the command fails. the xx_ command
did the same thing, but called fail() which would have called err();
now everything is $err

example:

	rm -f "$filename" || err "could not delete file"

this would now be:

	rm -f "$filename" || $err "could not delete file"

overriding of err= must be done *after* including err.sh. for
example:

err="fail"
. "include/err.sh"

^ this is wrong. instead, one must do:

. "include/err.sh"
err="fail"

this is because err is set as a global variable under err.sh

the new error handling is much cleaner, and safer. it also reduces
the chance of mistakes such as: calling err when you meant to
call fail. this is because the standard way is now to call $err,
so you set err="fail" at the top of the script and all is well.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 22:41:35 +01:00
linear cannon 5f73ebe9da dell-flash-unlock: add NetBSD support 2024-05-02 22:19:48 +01:00
Leah Rowe 983fc788db simplified README, without affecting substance
i do tend to waffle on a bit. canoeboot.org will probably see
a similar change applied to it.

the new readme more thoroughly explains everything, getting
straight to the point.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-02 22:19:11 +01:00
Leah Rowe ccfbfffb10 enable serial console on fam15h boards
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 22:08:33 +01:00
Leah Rowe f340a10fbb update pico-serprog to new revision
this merges the fix from:
https://codeberg.org/libreboot/pico-serprog/pulls/1

however, PRs are not to be sent there. riku merged it in
his repository, and i pulled it in the mirror hosted
on libreboot codeberg

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 22:06:25 +01:00
Riku Viitanen ef0cf81948 Patch SeaBIOS: Add MXM support
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2024-05-02 22:06:06 +01:00
Riku Viitanen b5236f00a9 update revision: pico-serprog
should fix https://codeberg.org/libreboot/lbmk/issues/182

Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2024-05-02 22:04:23 +01:00
Leah Rowe 5cf9880a9f update pico-serprog to Riku's new revision
Riku introduced three new patches:

* Add support for multiple chip selects. This allows you to
  control multiple chips from the same clip, on systems with
  dual flash setups, at least theoretically.
* Enable pull-up on unused chip selects - pull them high so
  that chips you connect that to are deactivated while flashing
  the target chip. This could be used on thinkpad W541 for
  instance, where miso/mosi have 0ohm between them via the two
  flash ICs. You could pull the other chip select high.
* Documentation for the above, in the pico-serprog readme.

This goes in tandem with a patch from Riku, present in the
recently integrated flashprog project, namely:

commit ddb6d926783d4f9cbee04c7392718ed8f89daa0e
Author: Riku Viitanen <riku.viitanen@protonmail.com>
Date:   Mon Jan 15 19:15:49 2024 +0200

    serprog: Add support for multiple SPI chip selects

This functionality will therefore be present in the next
release of Libreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:43:48 +01:00
Riku Viitanen 73cfc61d65 flashprog: apply the good old MX25 workaround 2024-05-02 21:43:33 +01:00
Leah Rowe 52f3bb2e64 remove remaining flashrom remnants (use flashprog)
we use flashprog now!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:43:06 +01:00
Leah Rowe 8ec0c79d71 update parabola dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:41:35 +01:00
Leah Rowe 789f897688 update arch dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:41:26 +01:00
Leah Rowe efdcdd6e4e update trisquel dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:41:17 +01:00
Leah Rowe e91acb99a9 update debian dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:41:06 +01:00
Leah Rowe 1040b3f623 config/git: use flashprog instead of flashrom
Nico Huber is the rightful project lead. I do not support
the coup that occured within the flashrom project. Nico
has always been of great service to the Libreboot project,
by virtue of his work on both coreboot and flashrom.

Nico Huber was unfairly removed from the flashrom project
infrastructure, due to unfounded accusations hurled at him
by flashrom's new project lead. The accusations are unfounded
because no evidence was given.

Use Nico Huber's fork, named flashprog. We will work with
flashprog from now on.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-05-02 21:40:41 +01:00
Leah Rowe 5447f8be00 support making u-boot-only tarballs in releases
./update release -m u-boot

if someone just wants to make u-boot, they can
use this and it tars up all the trees.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-02-07 00:26:31 +00:00
Leah Rowe 8d83340da4 git.sh: also reset xtree/tree_depend here
it's still necessary here, to prevent the same bug
identified in the previous patch.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-26 11:17:14 +00:00
Leah Rowe f1549872b8 update/trees: reset xtree/tree_depend before build
in some cases, the build system was needlessly, and sometimes
erroneously, creating crossgcc symlinks, which then caused an
issue, namely:

in lbmk release builds, dell e6400 is build before fam15h boards,
and it sets xtree, but fam15h_rdimm doesn't, and later this would
cause fam15h_rdimm boards to use xtree="default" (because they don't
set xtree), causing the newer toolchain to be used on coreboot 4.11.

this patch fixes the issue. quite a simple problem, actually.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-26 09:31:52 +00:00
Leah Rowe 72db1389d9 fam15h boards: define xtree
these should be using the rdimm tree for crossgcc,
so define it explicitly. the build system creates
a symlink too, but it's still best that we use it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:20:22 +00:00
Leah Rowe fd67f338e9 coreboot/fam15h_udimm: define xtree
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:16:32 +00:00
Leah Rowe 5f9ed1e130 don't download projects on release archives
the changelog file is only present in releases, so
use the presence of this file for the test.

someone who wants to fetch projects within a release
archive can simply use the git repo, or delete the file.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:12:26 +00:00
Leah Rowe aa11288a09 update/release: generate changelogs
use the git log, as follows:

git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' --abbrev-commit

this creates a nice, uniform list of changes.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:06:39 +00:00
Leah Rowe e9fcc47c08 fix amd mainboard configs
in a build test, canoeboot 0.1 builds, but master doesn't.

i'm just copying the configs from there.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-01-21 20:29:43 +00:00
Leah Rowe 47a39b9ec1 git.sh: fix bad call to ./update
Signed-off-by: Leah Rowe <info@minifree.org>
2024-01-21 15:49:46 +00:00
Leah Rowe 3056a38eaf git.sh: support downloading dependency trees
a tree can specify:

tree_depend="treename"

this will make the other tree be downloaded. this is
used for coreboot trees, to ensure that dependency
trees are downloaded, because trees can now re-use
crossgcc from other trees.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 13:08:29 +00:00
Leah Rowe 4621a784e6 re-use crossgcc builds on the coreboot trees
don't build crossgcc twice, especially if two coreboot
trees use the same revision!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 12:37:47 +00:00