Commit Graph

1400 Commits (eee22447a7e20d7584bcad046534600fb0515c74)

Author SHA1 Message Date
Nicholas Chin eee22447a7
config: Add Dell Latitude E5530
Tested by Martin Dawson.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-02-06 13:18:31 -07:00
Nicholas Chin a5bfbe4d10
config: Add Dell Latitude E6520
Tested by Martin Dawson.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-02-06 13:18:31 -07:00
Nicholas Chin 617f2b88fd
config: Add Dell Latitude E6420
Tested by Martin Dawson.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-02-06 13:18:27 -07:00
Leah Rowe 0c8fa2011a 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-01-28 02:09:32 +00:00
Leah Rowe 2ad52ed3f4 Merge pull request 'flashprog: apply the good old MX25 workaround' (#180) from Riku_V/lbmk:master into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/180
2024-01-28 00:06:51 +00:00
Riku Viitanen 112d2a4e69 flashprog: apply the good old MX25 workaround 2024-01-28 02:01:36 +02:00
Leah Rowe 77770f5ad8 remove remaining flashrom remnants (use flashprog)
we use flashprog now!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-27 22:37:39 +00:00
Leah Rowe 36ddd6f658 update parabola dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-27 22:06:06 +00:00
Leah Rowe 182a029f0c update arch dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-27 22:05:08 +00:00
Leah Rowe e852386435 update trisquel dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-27 21:51:37 +00:00
Leah Rowe 4131981c0a update debian dependencies for flashprog
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-27 21:47:30 +00:00
Leah Rowe af82d67183 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-01-27 21:34:21 +00:00
Leah Rowe 7f0ca5455a Libreboot 20240126
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-26 11:16:01 +00:00
Leah Rowe 9071160c7a 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:15:23 +00:00
Leah Rowe 39688ebee6 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:28:14 +00:00
Leah Rowe e5ebaa8564 update config/git/docs to latest revs
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-25 22:03:06 +00:00
Leah Rowe 0a24b2e612 dell/e6*30: use generic PS2K/PS2M EISAID strings
CONFIG_PS2M_EISAID. this is a a string used for the
identifier on the mouse, in ACPI.

CONFIG_PS2K_EISAID this is used for the keyboard.

IASL comes back with this build error:

dsdt.asl   1884:   Name(_HID, EISAID("DLLK0534"))
Error    6045 -                              ^ EISAID string must be of the form "UUUXXXX" (3 uppercase, 4 hex digits) (DLLK0534)

Change DLLK0534 back to PNP0303 and
change DLL0534 back to PNP0F13. These are generic identifiers
for PS/2 keyboard and mouse. Any generic driver will work with
the onboard mouse/keyboard on these machines. They do not need
to be changed. These are the default values anyway. Just leave
them explicitly defined to the default values, for now; if these
options are not set, coreboot will default to these values.

This shouldn't break anything for the users. I've reported this
to Nicholas Chin, author of those patches. Libreboot imported
the new versions of E6430/E6530 board patches in the coreboot
revision update, but the new (technically correct) values broke
IASL, so I've decided to use the old values for now.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-25 18:57:07 +00:00
Leah Rowe 614c5efa65 update coreboot/dell to same rev as default
re-use the same patches, and drop the same patches.

this tree uses hell's special ddr2 fix, which we apply
for the dell latitude e6400.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-25 16:09:19 +00:00
Leah Rowe 4a6dc5553f coreboot/default: update coreboot to January 2024
Base revision changed to:

commit b6cbfa977f63d57d5d6b9e9f7c1cef30162f575a
Author: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Date:   Fri Jan 5 16:48:17 2024 +0800

    mb/google/dedede/var/metaknight:Add fw_config probe for multi codec
    and amplifier

Of note:

Several out-of-tree ports have been adjusted to use the new SPD config
style, where it is defined in devicetree. I manually updated the E6530
patch myself, based on the update that Nicholas did on E6430 (Nicholas
will later update the E6530 patch himself, and I'll re-merge the patch).

Several upstream patches now exist in this revision, that we were able
to remove from lbmk.

The heap size patch was reverted upstream, as we did, but see:
https://review.coreboot.org/c/coreboot/+/80023
https://review.coreboot.org/c/coreboot/+/79525
Although we still disable the TSEG Stage Cache, ivy/sandy/haswell should
be reliable on S3 now (leaving TSEG Stage Cache disabled, for now, anyway).

Also included in upstream now:

commit 29030d0f3dad2ec6b86000dfe2c8e951ae80bf94
Author: Bill Xie <persmule@hardenedlinux.org>
Date:   Sat Oct 7 01:32:51 2023 +0800

    drivers/pc80/rtc/option.c: Stop resetting CMOS during s3 resume

Further patches from upstream:

commit 432e92688eca0e85cbaebca3232f65936b305a98
Author: Bill Xie <persmule@hardenedlinux.org>
Date:   Fri Nov 3 12:34:01 2023 +0800

    drivers/pc80/rtc/option.c: Reset only CMOS range covered by checksum

This should fix S3 on GM45 thinkpads.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-25 15:41:15 +00:00
Leah Rowe ece5463109 script/vendor/inject: remove erroneous check
the boarddir variable is only set *after* detect_board
is run, and is in fact checked after that. this check,
removed by this patch, is too early and causes lbmk
to exit with error states. this patch fixes the error.

the error was that lbmk was then searching for a file
that is at an empty path.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-23 20:26:14 +00:00
Leah Rowe 8b4a4f79f6 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:19:04 +00:00
Leah Rowe dcf7da9a65 coreboot/fam15h_udimm: define xtree
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 22:16:09 +00:00
Leah Rowe f72a72af96 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:11:00 +00:00
Leah Rowe 435441d04b 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:05:41 +00:00
Leah Rowe a225e4d5d9 fix amd mainboard configs
in a build test, canoeboot 0.1 builds, but master doesn't,
and neither does lbmk. i changed a few of them when doing
the crossgcc build optimisation patches.

i'm just copying the configs from there. unlike in the
canoeboot version of this patch, i've re-enabled microcode
updates in these lbmk configs.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 20:45:44 +00:00
Leah Rowe c996118294 git.sh: fix bad call to ./update
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 15:50:21 +00:00
Leah Rowe 3e7e0c7d48 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 12:59:02 +00:00
Leah Rowe 8f3d3eada9 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 06:26:23 +00:00
Leah Rowe 8a9c70f2f6 allow multitree projects to define xgcc tree
let them specific it, rather than falling back
to coreboot/default (can also be used for coreboot boards)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 05:59:37 +00:00
Leah Rowe c6d243af93 u-boot: don't define xarch in default
it's only needed for each board

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 05:55:54 +00:00
Leah Rowe 9877eb0968 coreboot/*/target.cfg: don't define xarch
it's defined per board

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 05:52:32 +00:00
Leah Rowe e329b365db grub/target.cfg: move --disable-werror
i meant to push it in configure args, not bootstrap

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 05:43:11 +00:00
Leah Rowe b71d4fd016 coreboot/fam15h: disable -Werror on binutils 2.32
work around newer build issues, on very bleeding edge distros

(disable treating warnings as errors)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 00:20:51 +00:00
Leah Rowe 1d971fcdc9 grub: use --disable-werror on ./configure
work around build issues on very bleeding edge distros

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-21 00:18:35 +00:00
Leah Rowe 33e25a3355 dependencies/arch: add pandoc to dependencies
pandoc is required by the grub build system, when
running autoconf at the start of the build process

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-20 18:54:53 +00:00
Leah Rowe 37817e6bcb GRUB: insert only 1 keymap per board, in cbfs
There is no need to add multiple keymap files, because
GRUB can load keymaps from CBFS. The current build logic
is designed to avoid building multiple GRUB binaries,
which are expensive computationally because each one
would then have to be compressed for each board.

This patch provides the best of both worlds: less space
used in flash like in the old lbmk design (1 keymap per
board), but retaining the current build speeds and therefore
not re-introducing the slowness of lbmk's previous GRUB
build logic.

The grub.cfg file has been modified, accordingly. It now
only loads a keymap.gkb file from CBFS, by default. It does
this, only if that file exists; if not, GRUB already defaults
to US Qwerty layout anyway.

ALSO: compress all keymap gkb files with xz -6

GRUB automatically decompresses files when accessed.
This results in about 2KB of flash space saved in CBFS.

Here is real-world data, showing the increased flash space:

< fallback/payload               0x3eb80    simple elf     548821 none
< keymap.cfg                     0xc4bc0    raw                16 none
< (empty)                        0xc4c00    null         11633316 none
---
> fallback/payload               0x3eb80    simple elf     546787 none
> keymap.gkb                     0xc43c0    raw               344 none
> (empty)                        0xc4540    null         11635044 none

This was taken by diffing the cbfstool "print" output,
both before and after. The *after* result is with this change.
11633316. In this example, 1728 bytes have been saved. Therefore,
with compression taken into account, this patch saves about 1.7KB
of space in CBFS.

This change means that lbmk can now scale to support hundreds
of keymaps, without increasing the amount of flash space used,
in each given image. Since the keymap files are compressed in
lbmk.git, in advance, we spend no additional time on compression
at build time. The resulting change in build speed in negligible.

Adding your own keymap.gkb file was already possible, for changing
the keymap in libreboot images, if you didn't want to change the
memdisk (and thus re-compile grub.elf). Now, this is the default
behaviour, and the only way to do it. It's much more efficient.

The original keymap files can be restored, by running unxz.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-18 00:27:33 +00:00
Leah Rowe df007d22ec build/roms: err if -k layout doesn't exist
if the user defines a layout that doesn't exist, throw
an error in lbmk.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-17 23:22:22 +00:00
Leah Rowe d44c9551c5 build/roms: regression fix: uninitialised variable
the "kmapdir" variable was removed in an earlier audit,
but was overlooked for -k because that option was untested.

rather than initialise the variable, re-use grubcfgsdir.
this fix enables e.g. "-k usdvorak" to work again.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-17 19:32:54 +00:00
Leah Rowe 2b6beaf2f9 Merge pull request 'config/dependencies/trisquel: replaced package from ttf-unifont to fonts-unifont' (#177) from goodspeed/lbmk:master into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/177
2024-01-14 12:01:36 +00:00
William Goodspeed 59096d8d7c config/dependencies/trisquel: replaced package from ttf-unifont to fonts-unifont
ttf-unifont no longer exists on trisquel aramo.
---
Package: fonts-unifont
Breaks: ttf-unifont (<< 1:13.0.02-1)
Replaces: ttf-unifont (<< 1:13.0.02-1)
---
Signed-off-by: William Goodspeed <goodspeed@anche.no>
2024-01-14 14:12:12 +08:00
Leah Rowe 09bed9a4c3 REMOVE MAINBOARD: lenovo x201
with neutered ME, fan control fails. while there are
ways to mitigate it, many users will not, and will
likely see their system overheat, which is very
dangerous.

this bug (failed fan control on neutered ME) only
affects arrandale machines such as lenovo x201.
the newer machines are not affected by this.

other arrandale machines will probably not be added
to libreboot because of this, or they will be subject
to further testing.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-12 16:08:56 +00:00
Leah Rowe 401c0882aa NEW MAINBOARD: HP EliteBook 820 G2
This is of Broadwell platform, one generation above Haswell.

Of note: this uses HP Sure Start. Although the flash is 16MB,
our CBFS section (and IFD configuration) assumes 12MB flash,
so the final 4MB will be left unflashed on installation,
after blanking the private flash. The coreboot documents have
more information about this.

Some minor design changes in lbmk were made, to accomodate
this port:

Support for extracting refcode binaries added (pulled from
Google recovery images). The refcode file is an ELF that
initialises the MRC and the PCH. It is also responsible for
enabling or disabling the Intel GbE device, where Google
does not enable it, but lbmk modifies it per the instructions
on the coreboot documentation, so as to enable Intel GbE.

Google's recovery image stores the refcode as a stage file,
but coreboot changed the format (for CBFS files) after 4.13
so coreboot 4.13's cbfstool is used to extract refcode. This
realisation made me also change the script logic to use a
cbfstool and ifdtool version matching the coreboot tree, for
all parts of lbmk, whereas lbmk previously used only the
default tree for cbfstool/ifdtool, on insertion and deletion
of vendor files - it was 81dc20e744 that broke extraction of
refcode on google's recovery images, where google used an older
version of cbfstool to insert the files in their coreboot ROMs.
A further backported patch has been added, copying coreboot
revision f22f408956 which is a build fix from Nico Huber.

Iru Cai submitted an ACPI bugfix after the revision lbmk
currently uses, for coreboot/default, and this fix is
needed for rebooting to work on Linux 6.1 or higher. This
patch has been backported to lbmk, while it still uses the
same October 2023 revision of coreboot.

Broadwell MRC is inserted at the same offset as Haswell,
so I didn't need to tweak that.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-10 00:50:29 +00:00
Leah Rowe a8a7a51b9b Merge pull request 'Dell-flash-unlock README updates' (#175) from nic3-14159/lbmk:dell-flash-unlock-updates into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/175
2024-01-06 11:05:35 +00:00
Nicholas Chin bdd32a5c7f
README.md: Add Latitude E7270 as supported
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-01-05 14:53:33 -07:00
Nicholas Chin 051b17f4fe
README.md: Add notes about iopl and AC adapter requirement
In order for the EC to maintain the state of whether or not to set the
flash descriptor override across a power cycle, the AC adapter must be
connected, as the system leaves the voltage rail that the EC uses
powered under this condition. Without this, the utility may fail,
continually asking the user to power off and on.

On Linux, CONFIG_X86_IOPL_IOPERM must be set for the kernel, or else the
iopl call will error with "Function not implemented". Make a note of
this in case a user runs into this issue.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-01-05 14:48:38 -07:00
Nicholas Chin d2de03cefa
README.md: List E6520, E5530, and M4800 as supported
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-01-05 14:48:37 -07:00
Leah Rowe f5b04fa505 build/roms: tidy up payload configuration handling
the eval for loop is overkill

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01 22:36:55 +00:00
Leah Rowe 0b08121829 build/roms: remove unused variable
the kmapdir variable is only used once, and just
the string makes it obvious what this is for

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01 22:36:49 +00:00
Leah Rowe 4870e84e71 build/roms: don't needlessly re-build grub.elf
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01 22:36:43 +00:00
Leah Rowe 0e955f1e70 build/roms: create elf/grub if non-existent
i overlooked this during previous re-factoring

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-01-01 19:09:45 +00:00