Commit Graph

736 Commits (fsdg20230625)

Author SHA1 Message Date
Leah Rowe 0f960d6de4 board/qemu_x86: don't enable u-boot
it's a bit buggy when building. disable for now.

will re-visit later.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 09:14:26 +01:00
Leah Rowe 7f4cefdcd5 coreboot/cros: fix acpica downloads
same as the previous patch

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 02:56:58 +01:00
Leah Rowe 5d6a020db4 coreboot/fam15h: use new upstream for acpica
the upstream died, for links used by coreboot 4.11_branch
when downloading acpica (to run iasl).

other coreboot trees don't need this fix, because coreboot
upstream already fixed it. we only need to patch this
older coreboot revision. this fixes building for:

KFSN4-DRE, KGPE-D16 and KCMA-D8 boards

the c20230710 release itself did not include this fix,
but releases already include the tarballs and so the
broken acpica link does not matter (because it's included,
and the coreboot build system will skip downloading it
as a result)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 00:52:49 +01:00
Leah Rowe e1df640578 uboot: delete blobs, based on blobs.list file
and with that, censored-libreboot is now complete, ready
for a first release :)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 01:52:45 +01:00
Leah Rowe 9202ffa85a uboot: add blobs.list file under resources/
(i'll actually add deblobbing logic in the next revision)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 01:44:09 +01:00
Leah Rowe b5afcdaa04 rename project to censored-libreboot
it was called c-libreboot

make it clear what c means

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:54:03 +01:00
Leah Rowe fb30ec87ed coreboot/default: update blobs.list
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:53:24 +01:00
Leah Rowe d3d0288bd0 coreboot/cros: update blobs.list
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:46:27 +01:00
Leah Rowe f6a3190a4e coreboot/fam15h: update kfsn4-dre configs
i overlooked these in the previous revision

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:36:32 +01:00
Leah Rowe 3f8a243d84 coreboot/fam15h: update configs for 4.11_branch
The configs were made for 4.11, and several new changes
were required for 4.11_branch. Without these changes, the
builds are not automated because coreboot's build system
asks for user input on certain configuration.

This patch makes everything smooth as silk.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:27:49 +01:00
Leah Rowe cb4a1ec4d1 coreboot/fam15h: use 4.11_branch (fixes build)
This fixes build errors on KGPE-D16.

I can now build them on the latest Debian Sid,
as of 9 July 2023.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:01:06 +01:00
Leah Rowe 1ab8514882 coreboot/fam15h: fix acpica build on newer hostcc
Changes made to acpica/iasl in crossgcc, for
coreboot trees fam15h_udimm and fam15h_rdimm:

remove superfluous YYSTYPE declaration

make LuxBuffer variables static, to avoid warnings
treated as errors about multiple definitions

AcpiGbl_DbOpt_NoRegionSupport - remove this definition
in source/tools/acpiexec/aemain.c because it's already
re-defined by acpiexec. otherwise the linker complains
about multiple definitions

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 19:42:42 +01:00
Leah Rowe b55cc19f41 coreboot: AMD Fam10/15: don't build GCC-GNAT
do this with board.cfg option:

crossgcc_ada="n"

add this environmental variable when building
crossgcc, if crossgcc_ada="n":

BUILD_LANGUAGES=c

This avoids building the GNAT/Ada compiler in GCC.
Coreboot 4.11 is only used for some AGESA boards
that don't need Ada (their video init is the old
style, written in C, it's not libgfxinit)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 11:20:56 +01:00
Leah Rowe b7d22a9c36 coreboot/fam15h: patch binutils 2.32 for new gcc
tested on debian sid, as of 9 july 2023

implicit string declaration

easy stuff. now binutils 2.32 compiles. coreboot 4.11
uses this older binutils version.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 04:57:36 +01:00
Leah Rowe 41757a3b25 coreboot/fam15h: support distclean on cbfstool
lbmk uses distclean on cbfstool, which newer cbfstool
supports, but this old version (in coreboot 4.11) does
not. fix that.

it just runs make-clean

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 04:16:11 +01:00
Leah Rowe 77d9d94997 grub: flip the bootsplash background 180 degrees
c-libreboot, and GNU Boot, is a 180 U-turn versus
current libreboot policy, as seen here:

https://libreboot.org/news/policy.html

Therefore, rotate the bootsplash pic 180 degrees, for
comical effect.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 03:39:27 +01:00
Leah Rowe 947eb446f9 coreboot/fam15h: re-add kgpe-d16 and kcma-d8
also kfsn4-dre

this is still based on the old coreboot 4.11 version.

i have on todo to adapt dasharo coreboot for use in the master
branch of lbmk, for mainline libreboot releases.

since i'm doing c-libreboot for the GNU project, namely GNU Boot,
and since GNU Boot has dre/d8/d16 in their tree, re-add it here
for them.

i literally just copied this from them, who in turn copied it from
libreboot in an older revision anyway.

but there is one fix:

src/vendorcode/cavium/bdk/libbdk-hal/if/bdk-if-phy-vetesse.c

^ this blob wasn't being deleted by gnuboot, nor by libreboot
in the older revision that it forked from. an oversight. i decided
to audit the deblobbing and found this one was overlooked, out of
about 900 files picked up by deblob-check.

so this re-addition of dre/d8/d16 support is actually even better
deblobbed than gnuboot, or old-libreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 03:18:43 +01:00
Leah Rowe 0f09c0d72b download/coreboot: re-add book-burning support
see:

https://en.wikipedia.org/wiki/Book_burning

i'll actually update blobs.list for each coreboot rev
in a subsequent commit. this logic was taken from an
old libreboot revision, which uses different coreboot
revisions. as i write this, i'm running deblob-check
from linux-libre deblob scripts.

my process is: i just check each file and decide whether
it's a blob, or like, test data. in some cases it flags
other false positives, like... a C source file that has
a bunch of magic numbers in it for things (not a blob)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 23:45:57 +01:00
Leah Rowe 2bbb4c839a remove blobutil and boards/utils needing/for blobs
delete all blobs. TODO: actually deblob coreboot/uboot
when downloading. i'll that in a little while, in an
upcoming commit.

yes.

purge it all, in fsf style. censor what the fsf doesn't like.

so that they can feel good about having less, because
ideological purity is better than helping more people
use coreboot, yes?

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 22:09:58 +01:00
Leah Rowe 6bc619db90 rename project to c-libreboot (c = censored)
because that's what fsdg policy is: censorship

fsf will censor any existence of less-than-pure hardware
from coreboot, despite the fact that coreboot provides
more freedom for the user than fully proprietary firmware,
even in cases where blobs are needed. i criticise that here:

https://libreboot.org/news/policy.html

FSF's fork of libreboot, formerly libreboot.at and now
named GNU Boot*, is still based on old lbmk from october
2022, they haven't written *any* code since December 2022
when they supposedly first started working on the fork

i'm doing a gnuboot for them, purely for fun, called
c-libreboot. c-libreboot is essentially the same as old
libreboot, prior to the osboot merge, but i'm including
all the new things such as dell latitude e6400 or gru
chromebooks, all of which are suitable under the old
libreboot policy and, by extension, GNU Boot policy

*URL: https://savannah.gnu.org/projects/gnuboot/
(it actually is a GNU project, though the FSF has
not yet announced it officially, as I write this)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 21:00:05 +01:00
Leah Rowe cc30a1c6fa coreboot: never add microcode update to ROM image
this way, default psdg libreboot roms that enable microcode
can be used in fsdg libreboot, unmodified.

these configs enable microcode, but this change to the
coreboot build system avoids adding them regardless of
configuration

this saves hours of work that would otherwise be required,
to reconfigure all of the coreboot images, and will allow
gnuboot to use the same configs as libreboot

fsf makes such a fuss over this, when it's really quite
simple.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 20:47:40 +01:00
Leah Rowe f34e07ae27 build/boot/roms: fix coreboot-version in releases
This error was observed, in the coreboot build system:

In file included from src/lib/version.c:4:
build/build.h:10:32: error: 'libreboot' undeclared here (not in a function)
   10 | #define COREBOOT_MAJOR_VERSION libreboot-20230625
      |                                ^~~~~~~~~
src/lib/version.c:35:46: note: in expansion of macro 'COREBOOT_MAJOR_VERSION'
   35 | const unsigned int coreboot_major_revision = COREBOOT_MAJOR_VERSION;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~

This happened on the 20230625 *release archive*, when a user tried to
build for W541 MRC on an Arch Linux container.

This change fixes the error. I never got the error on my end when
build testing the release archives, but this will prevent the error.
Fix it by only inserting libreboot version string YYYYMMDD representing
the Libreboot version. (libreboot uses ISO dates as version numbers)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 00:27:53 +01:00
Leah Rowe 68d4710785 update .gitignore
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 14:17:29 +01:00
Leah Rowe 4efa545a46 build/release/src: clean spkmodem/e6400 utils
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 13:33:20 +01:00
Leah Rowe 2e85a63a0a build/roms_helper: reset d521fca7, backport fixes
I keep getting random linker issues when running:

./build boot roms all

I think the issue lies somewhere in here, from when
I did that massive audit. So I'm undoing the audit
which mostly re-factored the code style here.

These changes are being backported:
f338697b build/boot/roms: Support removing microcode
941fbcb run coreboot utils from own directory
f256ce98 build/boot/roms: say board name on stderr

I removed this change:
6d6bd5ee (the script now uses dedicated utils directory)

additionally:

cbutils is built much earlier on in the script, first
thing after initialising variables

the other changes not backported are all code style
changes, and I believe these are responsible.

if no other fixes occur to this fire before the next
libreboot release, then my hunch was right.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 12:21:48 +01:00
Leah Rowe 46e6a40c10 Revert "Revert "Add 4MB version of HP 8200 SFF""
This reverts commit 2099545078.

Wasn't this config's fault, the problem happens elsewhere too.

I'm going to revert build/boot/roms to an older version and backport
a few recent changes, to see if that fixes the problem. If it does,
then I know that the recent linker issues happen due to recent changes
in build/boot/roms

The linker errors typically appear in util/kconfig/ but can happen
elsewhere, seemingly random, which means I'm not handling distclean
properly. Something isn't getting cleaned properly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 11:44:22 +01:00
Leah Rowe f256ce9870 build/boot/roms: say board name on stderr
That way, I can more easily debug build issues with
specific boards, e.g.

./build boot roms all 2>lbmk.err.log

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 03:06:13 +01:00
Leah Rowe 2099545078 Revert "Add 4MB version of HP 8200 SFF"
This reverts commit 0f7a5386b9.

Random linker errors, must investigate after release.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-25 03:02:07 +01:00
Leah Rowe 1deb5843eb build/roms: distclean coreboot before each build
don't clean it, distclean it

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 23:28:41 +01:00
Leah Rowe 941fbcbf1b run coreboot utils from own directory
this means coreboot can now be distcleaned safely,
before and after each build of a rom image

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 23:23:16 +01:00
Leah Rowe 4a49ea3599 build/cbutils: distclean before building
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 22:54:53 +01:00
Leah Rowe 55fc8fe0b0 build/cbutils: exit if utils dir doesn't exist
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 22:50:09 +01:00
Leah Rowe dd16a575e7 build/cbutils: tab indentation, not spaces
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 22:33:29 +01:00
Leah Rowe 494c4d8dfe build/cbutils: rename variable for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 22:32:53 +01:00
Leah Rowe 668a3ef450 blobs/sources: rename t440p to t440plibremrc
this fixes blobutil not downloading me.bin for
the target, which was renamed to t440plibremrc

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-24 22:28:52 +01:00
Leah Rowe da6d039666 Merge pull request 'losslessly compress pngs' (#85) from Riku_V/lbmk:master into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/85
2023-06-22 15:33:09 +00:00
Riku Viitanen e7bfeb687b losslessly compress pngs
zopflipng is great!

Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2023-06-22 18:24:18 +03:00
Leah Rowe 067be2baa1 Merge pull request 'u-boot: Increase EFI variable buffer size' (#83) from alpernebbi/lbmk:uboot-efivar-size into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/83
2023-06-22 14:26:27 +00:00
Leah Rowe 559e8de5de Merge pull request 'cros: Disable coreboot related BL31 features' (#84) from alpernebbi/lbmk:cros-disable-bl31-coreboot-makearg into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/84
2023-06-22 14:08:08 +00:00
Alper Nebi Yasak dd3a190436 cros: Disable coreboot related BL31 features
I don't know why, but removing this BL31 make argument lets gru-kevin
power off properly when shut down from Linux. Needs investigation.
Do it as a cros-only HACK patch so people don't have to hold the power
button after every shutdown.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-06-22 16:49:29 +03:00
Alper Nebi Yasak f0236acbc6 u-boot: Increase EFI variable buffer size
Debian's signed shim allocates too many EFI variables to fit in the EFI
variable memory buffer. Normally it would then try to continue booting
in non-secure-boot mode, but its error handling throws a synchronous
abort that reboots the board, making it impossible to boot into Debian
unless one manually loads GRUB instead of shim. Increase EFI variable
buffer size to avoid triggering the bug.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-06-22 16:17:40 +03:00
Leah Rowe a01d05a261 re-add gigabyte/ga-g41m-es2l
turns out it's just picky ram.

errant reports of "no boot" (users did not have debug
dongles) were likely "bad" ram

notes will be written on libreboot.org about this

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 21:09:16 +01:00
Leah Rowe 0fb7eab591 nuke boards: delete nyan* (for now)
not well-tested, and existing testing has revealed video
issues on some of them (or just no boot)

for now, retain only qemu and gru-* on arm

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 02:33:36 +01:00
Leah Rowe 1762d114d3 build/boot/roms_helper nicer indent on switch loop
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 02:06:51 +01:00
Leah Rowe 97c9f06c91 blobs/download: exit if no board configs found
fixes ./build boot roms all

in detect_firmware(), "set" is used to get values from
configs, to know if things like ME/MRC are needed

on some "board" configs under resources/coreboot/, no
actual coreboot configs are provided, because they are
used as a reference (coreboot revision, tree name etc)
for actual boards, with actual coreboot configs

when attempting to build for such a board, running "set"
on such non-existent files would cause a non-zero exit,
when we want zero. the non-zero exit then caused the
build/boot/roms command to fail, when running "all" if
it found, for example, resources/coreboot/cros/ which
has the above problem, in this context

work around it by verifying that coreboot configs exist
for the given target name, in the blobutil download script.
if no such configs exist, then exit zero (success)

doing so is correct, because the script is intended to
do just that, erroring only if it is detected that blobs
are needed for a given board, but other errors occur; if
no coreboot configs exist, then no roms will be built and,
therefore, no blobs are needed

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 01:53:12 +01:00
Leah Rowe 652f3ba379 build/boot/roms: remove wrong parentheses
will pass all args as a single arg, which is wrong

fix that

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 01:15:28 +01:00
Leah Rowe 794def924c build/boot/roms: nicer indent style on switch loop
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 01:09:11 +01:00
Leah Rowe 9510d749e1 lbmk: run ./.gitcheck clean on error
a glaring oversight on my part

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 01:07:06 +01:00
Leah Rowe 917f699cc7 lbmk: exit 1 if script failed
script is -e anyway, so this is redundant, but best
put it here anyway. it can only help. correct behaviour
is always to fail on error, except in certain cases that
would be handled on a case-by-case basis in each script
2023-06-20 01:04:11 +01:00
Leah Rowe a08b6ac8e2 build/boot/roms: only set firstoption if argc>0
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 00:56:44 +01:00