Commit Graph

476 Commits (f9afeb6feb289003359790e820d7e7d918937fea)

Author SHA1 Message Date
Leah Rowe f9afeb6feb NEW BOARD: Dell Precision T1650
Very nice ivybridge board that supports ECC RAM.
NOTE: I couldn't get onboard graphics working yet, but
this was confirmed working with a graphics card (in my
case nvidia quadra k420) booted in text mode on the SeaBIOS
payload. The GRUB payload also works, when loaded from SeaBIOS.
Therefore, this is a SeaBIOS-only board (as far as first payload
is concerned), but you can pick GRUB from the menu.

You could make it "GRUB-only" in practise by setting SeaBIOS
boot order to only load GRUB, and disable the SeaBIOS menu.
We refer to this as "SeaGRUB".

I've made lbmk use biosutilities and uefiextract, to
get at the SMSC SCH5545 Environmental Control (EC) firmware.
This firmware is needed for fan control. This is automatically
downloaded and extracted, from Dell UEFI firmware updates.

As with other blobs such as Intel ME, this firmware is then
scrubbed by the release build scripts. The blobutil "inject"
script can be used to re-insert it.

Of note: there is no fixed offset, but no other blobs to
be inserted in CBFS either, so the offset when re-inserting
on release ROMs should still be the same, and thus the ROM
checksums should match, when running blobutil inject.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-14 09:37:07 +01:00
Leah Rowe f8f77cb288 NEW BOARD: HP EliteBook 2170p
Another ivybridge platform, added in coreboot recently.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-09 22:55:29 +01:00
Leah Rowe cb8bf380e9 bump seabios revision to 30 May 2023
this revision:
1281e340ad1d90c0cc8e8d902bb34f1871eb48cf
from 30 May 2023

It contains a few nice fixs, including an integer
overflow fix, but not many changes have been made
to seabios since the last revision.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-06 01:02:56 +01:00
Leah Rowe 27ee975e86 bump grub revision to 2.12-rc1
This is specifically the following Git revision:
7a994c87f571ac99745645be0bdde9827297321a
from 10 July 2023

The keyboard fix for HP EliteBooks was merged upstream,
so lbmk no longer needs this patch; it comes with GRUB.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-06 01:02:53 +01:00
Leah Rowe 705149a3e0 coreboot/default: bump revision to 2 August 2023
coreboot revision:
d86260a134575b083f35103e1cd5c7c7ad883bce
from 2 August 2023

The patches were updated. HP 8300 USDT has now been merged upstream,
so that patch is no longer included in lbmk.

SD card fix for E6400 merged upstream, so now it's removed in lbmk.
The nvidia E6400 patch (devicetree.cb) has not yet merged upstream.

The ifdtool --nuke option has been rebased.
Patches as follow-ups to earlier patches removed; for example, patches
that set VRAM to 352MB on GM45 have been removed, and replaced with
patches that just set 256MB in the first place (this is more stable).

This was mostly a clean rebase, of all the patches. It went smooth.
I haven't updated cros/haswell yet; the 4.11_branch revision used
on fam15h will also remain, for now.

The coreboot configurations have been updated, for this new
revision of coreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-06 01:02:49 +01:00
Leah Rowe 22ee7f745d blobs/download: save ME file to correct location
blobdir is incorrect, and it means that the directory
will appear under blobs/, in this case. this was an
oversight on my part.

this behaviour did not break anything in practise, but
this patch makes the behaviour more consistent with rules.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-05 21:24:28 +01:00
Leah Rowe cdd83ab1ce blobs/download: try backup if bad hash on main
At present, the logic only tries backup URLs when an
actual download fails (bad internet connection or the
server is down).

If the main download succeeds, but it has a bad checksum,
the backup download is not attempted.

Since wrongly hashed files are to be assumed useless, we
may aswell delete and try the next file. This will guard
against the possibility of a vendor changing their file,
without changing the file name (non-versioned files, for
example, may be subject to such changes).

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-05 21:13:34 +01:00
Leah Rowe f18b1859db blobs/download: support more formats on ME extract
ME extraction didn't support unar (RAR format), for regular
extraction, after downloading a vendor file.

For bruteforce ME extraction, after extracting a vendor
archive, unar(RAR) and inno(innoextract) was not supported.

This patch fixes both issues. It should be noted that as of
now, the unar method has only been tested with certain HP
vendor updates, and it's currently not used on any of those.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-05 20:53:49 +01:00
Leah Rowe f0efaf7913 add unar to dependencies scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-04 05:23:49 +01:00
Leah Rowe e8ba0f8781 blobs/download: declare full user agent
I messed up the string, when I first did this.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 13:46:44 +01:00
Leah Rowe 4875eef116 blobs/download: properly handle backup/main url
Immediately after the last revision, which was a hacky
workaround to the problem, I realised the actual problem,
and the real solution:

In the switch block, check *backup* first. Then it breaks,
continuing on the iteration.

If it's variable for a main URL, it'll reliably go to the
next check in the block, whereas if it's backup, it'll
default to the first one in each case.

This bug has been annoying the sh*t out of me for ages,
and I've finally nailed it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 08:27:20 +01:00
Leah Rowe cca93ca3f3 blobs/download: don't download backup on main
The script was actually downloading the backup, at
all times, for each given URL. The way we handle
this is quite buggy.

This patch is a workaround, a dirty hack in fact, but
it will do for now, because our backup URLs are always
wayback links where the original URL (matching the
correct main URL in the sources file) is always present,
in the URL.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 08:21:09 +01:00
Leah Rowe 3aeefaa75d blobs/download: set common user agent string
Make it look like a normal web browser, downloading files.

Some HTTP servers might block Wget unless this is done.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 08:09:57 +01:00
Leah Rowe 5e83d2bc8f blobs/download: simplify for loop
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 07:28:36 +01:00
Leah Rowe 8f1d3ad19f scripts: fix indentation in switch/case blocks
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-29 07:24:18 +01:00
Leah Rowe 748e097228 blobutil/ec: abort if kbc1126 ec extraction fails
This was an oversight on my part.

Should extraction fail, we must abort. This is in preparation
for addition of future mainboards, where further tweaking is
required in blobutil. This error check will warn us about it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-27 08:13:28 +01:00
Leah Rowe e594ac1697 coreboot/fam15h: remove unused files
they were taken from c-libreboot, but they are
not needed here (deblob-check files)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-22 14:00:56 +01:00
Leah Rowe 44bd077aff Revert "build/boot/roms mkUBootRoms: initialise variables"
This reverts commit 7c90a4077f.

causes another build bug. i'm helping someone with the bug now,
i think the workaround for now would be to just use bash, on
this script. until i can figure something better out.
2023-07-17 08:59:48 +01:00
Leah Rowe 7c90a4077f build/boot/roms mkUBootRoms: initialise variables
they were outside the scope, outside of the if statements.

in some shells, this is ok.

we use "sh" so the user could have any shell.

be a bit nicer to the more asininely technically
correct sh implementations out there

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-17 08:20:02 +01:00
Leah Rowe d918139f36 coreboot/fam15h: re-enable microcode updates
this was taken from old libreboot. the last libreboot
revisions that had these boards were under the old
policy.

i left microcode disabled at first, because the old
coreboot 4.11 behaviour was to always insert microcode
regardless, so old libreboot patched out microcode
from the coreboot build system

however, 4.11_branch appears to actually honour microcode
configuration, so i do actually need to make sure it's
enabled in configs

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 11:34:12 +01:00
Leah Rowe 8c7774289c 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 07:17:06 +01:00
Leah Rowe fb44c349e1 coreboot/haswell: fix acpica downloads
the upstream link died. this patch makes it grab the
acpica tarball (for iasl) via libreboot rsync, where
i've added the corresponding tarball

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 03:49:49 +01:00
Leah Rowe af084014f0 coreboot: re-add asus kgpe-d16/kcma-d8/kfsn4-dre
Libreboot 20220710 was the last release to support these
boards. I plan to eventually port code differences between
D8/D16 to Dasharo, for KCMA-D8 support in Dasharo, to then
use in Libreboot for both KCMA-D8 and KGPE-D16, but I have
no plans to update the KFSN4-DRE code, at least for now.

Libreboot 20220710 used coreboot 4.11, whereas this patch
makes use of coreboot 4.11_branch; the crossgcc toolchains
no longer compile on modern distros, so I spent time patching
those (tested in Debian Sid, will also work on Arch Linux and
so on).

The acpica downloads now fail, in 4.11_branch, because Intel
made some changes upstream for these tarball downloads. Newer
coreboot works around this by grabbing tarballs from github,
itself a non-ideal solution, but I digress; this patch changes
coreboot crossgcc (in 4.11_branch) to download the acpica
tarball from libreboot rsync, where I've added it.

This patch also re-introduces the PIKE2008 fix, where empty
option ROMs for these are inserted into CBFS. This prevents
SeaBIOS from loading the real option ROMs, which would cause
SeaBIOS to hang. This means that SAS drives are not supported
in SeaBIOS, for these boards in Libreboot.

I previously said, in the Censored Libreboot c20230710
announcement, that I would *only* merge D8/D16 when I've
added Dasharo support to Libreboot, and use that, but the
work to make coreboot 4.11_branch compile is something I'm
quite proud of and I see no reason to exclude from lbmk
master branch.

Honestly, there's not much different than 4.11, code-wise.
I *probably* won't use 4.11_branch for the next Libreboot
release, on D8/D16. By then, I might have Dasharo integrated
in lbmk instead. We shall see.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 03:18:58 +01:00
Leah Rowe e6002b9155 coreboot/cros: fix acpica downloads
upstream died. i put the corresponding tarball on
libreboot rsync. this is used by the coreboot build
system, specifically in crossgcc (cross compilers)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-16 03:01:39 +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 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
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 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
Leah Rowe 347f0899b7 update release files
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-06-20 00:51:41 +01:00