Commit Graph

599 Commits (master)

Author SHA1 Message Date
Leah Rowe f6a2af67d5 Disable including Microcode in U-Boot builds
It wasn't being included, because we remove these files
in Canoeboot's version of U-Boot.

However, rules for including them was still in the U-Boot
build logic, leading to build issues such as:

arch/x86/dts/.cherryhill.dtb.pre.tmp:206:10: fatal error: microcode/m01406c2220.dtsi: No such file or directory
  206 | #include "microcode/m01406c2220.dtsi"

This happened when building x86 U-Boot payloads. This patch
fixes the issue.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-11-28 21:08:00 +00:00
Leah Rowe 106904ed81 rom.sh: Add U-Boot before SeaBIOS and GRUB (x86)
Since U-Boot must be inserted at a specific offset, it's
theoretically possible that other files might overlap, but
cbfstool will work around wherever U-Boot was inserted if
it was inserted first; we don't use specific offsets for
the other files.

This is technically a preventative bug fix, but it fixes
a bug that would probably never occur in practise.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:40:37 +00:00
Leah Rowe 19bc40962a rom.sh: Remove unnecessary shebang
This is not a main script, and should not be treated as such;
it must never be directly executed by the user.

This script was only ever used inside other scripts, so the
shebang didn't seem to do much at all, but it shouldn't be
there anyway.

Remove it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:40:30 +00:00
Mate Kukri 9a22d10e47 config/deps/fedora41: Add openssl-devel-engine to dependency list
openssl-devel was split up in Fedora 41, and this package is required to build libreboot
on Fedora 41.

This was reported by "tweezers" on #libreboot.

Signed-off-by: Mate Kukri <km@mkukri.xyz>
2024-11-28 20:40:13 +00:00
Leah Rowe 38dd860431 rom.sh: unset displaymode on normal initmode
Otherwise, you get "normal_normal" in the image name.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:40:05 +00:00
Leah Rowe b179ef63ed rom.sh: Don't build U-Boot on normal initmode
The "normal" mode in lbmk is where no built-in GPU exists,
or no libgfxinit is used, and SeaBIOS is the first payload,
and SeaBIOS executes VGA ROMs (can't know if it'll start
in VESA or text mode).

U-Boot needs a VESA framebuffer or native coreboot
framebuffer to work correctly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:39:58 +00:00
Leah Rowe c885a63dd5 rom.sh: Don't build txtmode U-Boot images
U-Boot needs a VESA framebuffer or native coreboot
framebuffer to work properly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:39:49 +00:00
Leah Rowe dea09b8bf5 rom.sh: Support SeaUBoot for 64-bit x86 U-Boot
Same concept as SeaGRUB, but for U-Boot. SeaBIOS starts, but
has a bootorder file loading U-Boot first, from flash.

You can interrupt it with the ESC menu, to boot something else
in SeaBIOS, including GRUB.

With this, we can effectively provide extremely user-friendly
UEFI-first setups in Canoeboot.

Take that, edk2!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:37:36 +00:00
Leah Rowe eea06c9659 U-Boot x86: Avoid clearing the VESA display
This is a patch from Simon Glass. U-Boot clears the display
when it starts up, but was asking the VESA driver to do the
same, needlessly; this patch avoids the latter.

A further patch is also included, which provides a better
message when jumping into long mode on the SPL (64-bit) target,
dumping it on the serial console instead of using printf.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:35:52 +00:00
Leah Rowe 5dd6a4e978 enable the serial console on thinkpad x60
it has one on the docking station

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:35:39 +00:00
Leah Rowe 112b761926 enable the serial console on thinkpad t60
it has one on the docking station

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:35:33 +00:00
Leah Rowe 8ba8cf3e60 Only boot 32-bit u-boot from grub, 64 from seabios
For some reason, 32-bit U-Boot only works when executed from
GRUB, but not SeaBIOS; 64-bit U-Boot only works from SeaBIOS!

This will have to be investigated. Standalone U-Boot, where
U-Boot is the primary payload, has not yet been tested in
Libreboot, and will not be provided for some time due to
stability concerns. More testing is needed!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:35:26 +00:00
Leah Rowe 6ff2a65a7c make the u-boot grub menuentry more useful
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:35:19 +00:00
Leah Rowe 0a90386ddb Re-enable U-Boot x86 on real mainboards
The previous stability issues were resolved, thanks to
the previous revision which added a fix courtesy Simon Glass.

This reverts commit eba73c778a85d1c6ad2f0de57c82a8775cdd1c17.
2024-11-28 20:35:01 +00:00
Leah Rowe f3d68fade3 u-boot x86 serial/ns16550: disable UART as needed
U-Boot was hanging on hardware, but not Qemu. This is because on
the machines tested, namely the X200 and E6230 laptops supported
in Libreboot, the UART was disabled from coreboot.

This U-Boot patch from Simon Glass works around the issue by
silently disabling the UART when it isn't there. Instead,
output is sent to the display and U-Boot no longer hangs.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:34:39 +00:00
Leah Rowe 8333930599 Disable U-Boot x86 except on Qemu
It's really buggy on hardware. Disable for now.

I've contacted Simon Glass on IRC, asking about hardware.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:34:21 +00:00
Leah Rowe d6cf658624 fix U-Boot hotkey mention in grub.cfg
it's u, not b, for the U-Boot hotkey

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:33:13 +00:00
Leah Rowe 5e27c14b05 Update x86 U-Boot to v2024.10 (was v2024.07)
It's a new experimental payload in Libreboot, so we may aswell
start with the very latest release of U-Boot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:32:58 +00:00
Leah Rowe 186e3c0a23 grub.cfg: mark U-Boot as experimental in the menu
it's important that we maintain realistic expectations.
x86 u-boot is not yet fully stable, so mark it as such.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:32:51 +00:00
Leah Rowe 414ff6095c trees: unset CROSS_COMPILE per target
When building a coreboot image, if they enable the
x86 U-Boot payloads, sometimes what happens is you
have CROSS_COMPILE set, for i386-elf, but then it's
still set to that when later building 64-bit U-Boot,
which needs x86_64-elf.

We currently rely on hostcc to build U-Boot.

To mitigate this, unset CROSS_COMPILE in the main
loop of the trees script, for building project targets.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:32:44 +00:00
Leah Rowe 739207021d Enable x86 U-Boot payload on every x86 board
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:31:48 +00:00
Leah Rowe ac5c87681f Add U-Boot x86_64 payload
Currently seems to stall when booted from the GRUB
payload, but works when booted from the SeaBIOS menu.

I also tested it as a standalone payload and it seems
to boot. Will test on hardware next, and start adding
it to more mainboards.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:27:10 +00:00
Leah Rowe a70a9813d7 add arm-none-eabi-gcc-cs-c++ to fedora dependency
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:27:00 +00:00
Leah Rowe 5a641b071d Bump coreboot/next in line with lbmk
This version simply updates the revision, whereas
the corresponding lbmk patch was more invasive:

commit 9abddb82b9228be738382ddc178a9562926404b3
Author: Leah Rowe <leah@libreboot.org>
Date:   Wed Nov 6 22:28:45 2024 +0000

    Bump coreboot/next and merge coreboot/dell7

Canoeboot must be in sync with Libreboot at all times.
Well, the Libreboot patch also merges another tree
that Canoeboot doesn't have, containing the Dell OptiPlex
3050 Micro port, because Canoeboot can't support the
OptiPlek 3050 Micro.

So the Libreboot patch rebased many patches. This one
simply updates the revision.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 20:26:53 +00:00
Leah Rowe 2d2cdd2368 data/coreboot: add missing variable
payload_uboot_i386 must be defined here, or the
build will fail for coreboot targets

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 19:55:57 +00:00
Leah Rowe 966fc8c23f Experimental U-Boot payload (32-bit dtb, U-Boot)
NOTE: Support added for xarch target x86_64-elf,
but U-Boot failed to build with this error:

OBJCOPY lib/efi_loader/helloworld.efi
x86_64-elf-objcopy: lib/efi_loader/helloworld_efi.so: invalid bfd target
make[2]: *** [scripts/Makefile.lib:476: lib/efi_loader/helloworld.efi] Error 1

Since I'm building U-Boot for x86_64 *on* an x86-64
host, and since that is currently the recommended type
of machine to use for cbmk development, and since the
other x86 payloads currently don't cross compile anyway,
this is an acceptable compromise for now. This is because
at present, I'm not making U-Boot the primary payload on x86,
instead preferring to chain it from GRUB and SeaBIOS.

The target.cfg file for x86 u-boot shows xarch/xtree commented.
Uncomment these to compile on crossgcc instead of hostcc.

I mention 64-bit because I initially did this first, but decided
to do 32-bit first. I'll work on the 64-bit one next (SPL).

It's only enabled in QEMU for now.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-11-28 19:53:23 +00:00
Leah Rowe 9706835dd5 Canoeboot 20241102 release!
Signed-off-by: Leah Rowe <info@minifree.org>
2024-11-02 07:04:10 +00:00
Leah Rowe a7a1534fb1 rebase coreboot/next
same revision, but re-do the patches again.

i wasn't quite as thorough with some of it yesterday.

for example, i included the ifdtool nuke patch yesterday,
which is not actually required in cbmk

Signed-off-by: Leah Rowe <info@minifree.org>
2024-11-01 22:46:30 +00:00
Leah Rowe b1319f5dbb Link e6400 vbt from variant dir.
Since the E6400 was made into a variant for the E4300 dir,
the VBT file is now located in the e6400 variant directory,
instead of the main directory for the port, the latter of
which now accounts for both mainboards.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-11-01 16:22:03 +00:00
Leah Rowe 6f39c7683a coreboot/default: Re-base patches
This is based on the same change recently made in
lbmk. A lot of unnecessary patches, and I want to
clean them all up.

Also, cbmk's /default didn't actually build, whereas
lbmk did, which is the primary motive for this rebase.
With this change, it should build again.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-11-01 16:08:05 +00:00
Leah Rowe 44f5909e43 Canoeboot 20241031 release!
Signed-off-by: Leah Rowe <info@minifree.org>
2024-10-31 22:20:43 +00:00
Leah Rowe 54585c2e75 more irony prevention ready for halloween release
Signed-off-by: Leah Rowe <info@minifree.org>
2024-10-31 19:56:31 +00:00
Leah Rowe 2daddfd118 NEW MAINBOARDS: Dell OptiPlex 780 MT and USFF
Thanks go to Nicholas Chin and Lorenzo Aloe for working on
and testing this code. Based on the 780 MT port.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:42:24 +00:00
Leah Rowe 19b4bf16e4 re-update seabios to latest revision
I reset it temporarily back to 1.16.3 when testing the
SeaBIOS hanging bug on 3050 micro, but the revision had
no effect; the bug was caused by a bad coreboot config

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:30:36 +00:00
Leah Rowe 121f3e304e re-affirm SeaGRUB as the primary payload
GRUB-as-primary was temporarily allowed in lbmk, because of
a temporary SeaBIOS bug on a machine that canoeboot doesn't
actually support yet, namely the 3050 Micro.

This same diff was also applied to lbmk, but lbmk also applied
changes to a coreboot config for the aforementioned mainboard.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:29:33 +00:00
Nicholas Chin cee363c6d5 config/coreboot/default: Update MEC5035 patches
- Update the MEC5035 S3 patches to the versions that were sent upstream
  to prevent conflicts with subsequent patches for that EC.
- Update the patch that enables the S3 SMI handler in mainboard code so
  that all Latitudes use the handler.
- Add a new patch that tells the EC to route power button events to the
  host so that the OS can decide what to do. Without it, the EC powers
  off the system without letting the OS cleanly shut down.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-10-31 19:26:46 +00:00
Leah Rowe 4f08fe2a6e Use SeaBIOS 1.16.3 and enable debugging
This diff matches the setup currently used in coreboot.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-10-31 19:24:45 +00:00
Leah Rowe 3f02e259ca rom.sh: remove unnecessary logic from copyps1bios
the .git directory never exists anyway, when doing a release,
so the purpose this is intended is defeated by lbmk's design.

individual headers say "pcsx-redux team" as copyright anyway,
and the code for generating that COPYING file, with MIT license
and correct years (matching the entire source code for the
open bios) remains correct.

a mitigation instead of this patch might be to maintain a hardcoded
list of authors, and manually update it over time, but this is not
required. however, it may be good practise for upstream to maintain
such a file. perhaps i should contact them?

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:24:16 +00:00
Leah Rowe 2db674f85e use redundant mirrors for recent utils imports
i mirrored riku's utils int, mxmdump and gpio-scripts
to the codeberg and disroot libreboot sites.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:24:08 +00:00
Leah Rowe 41e0bc7db9 remove end slashes on repos in config/git/
Due to quirks in how caching works in lbmk, this may be
error-prone. I'll properly address it in the next audit.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:23:56 +00:00
Leah Rowe eb6ec319ed import Riku's int tool
Riku used this for debugging, when adding the MXM support
to the HP EliteBook 8560w port. It will be useful for other
work that I have planned, so I'm archiving this too!

Riku has a lot of useful code, that I meant to import ages ago.
Once I'm done importing these in lbmk, I'll add backup repos.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:23:26 +00:00
Leah Rowe c995f2cce9 import Riku's gpio-scripts
Based on hell's code, but parses inteltool logs.

This will be useful for ports that I have planned, so
I'd like this to be included with Libreboot releases.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:23:21 +00:00
Leah Rowe 67f986e8cf import Riku's mxmdump utility
Used to dump MXM config for a given mainboard. We used this
for the HP EliteBook 8560w.

I meant to import this via config/git/ ages ago.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:23:14 +00:00
Leah Rowe a1aef7108f bump seabios
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:22:49 +00:00
Leah Rowe 2a4d0ce810 bump flashprog revision to d128a0a
This brings in the following important fix:

commit d128a0ae87086b37c0e5d7a8d934bcdee173402f
Author: Nicholas Chin <nic.c3.14@gmail.com>
Date:   Fri Sep 27 22:57:22 2024 -0600

    flashchips: Remove unsupported erase blocks for Winbond W25X{16,32,64}

    This family of chips does not support the 0x52 (32 KiB block erase) and
    0x60 (chip erase) opcodes according to their datasheet.

The full list of changes this brings in is as follows:

* d128a0a flashchips: Remove unsupported erase blocks for Winbond W25X{16,32,64}
* c6a924a Don't mention writing when erasing only (-E)
* dac4239 ch347_spi: Add 'spimode' parameter
* 56d236b chipset_enable: Add some newer AMD code names
* 3b9f152 chipset_enable: Probe AMD SPIBAR first and bail on ff
* 522160f meson: Add ft4222_spi

Nicholas Chin's patch fixes a bug on GM45 ThinkPads, where WX25
ICs (Winbond) could be read, but writes would fail in certain
cases because flashchips.c provided incorrect block erase commands.

This is unrelated to the --workaround-mx patch, for Macronix ICs.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:22:31 +00:00
Leah Rowe f4be26e249 dependencies/fedora40: add python3-devel
I was build-testing gru_bob on an arm64 host, and got a
build error when compiling U-Boot.

Python.h missing - installing python3-devel fixes it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:22:00 +00:00
Leah Rowe 6d2efbcbc3 build: actually build pcsx-redux bios on release
I added support earlier, on rom.sh, but the main build script
specifically defines which projects are to be compiled. I've
modified it so that pcsx-redux (just the BIOS part) will also
be compiled.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:21:17 +00:00
Leah Rowe f1ebdb50aa rom.sh: support making pcsx-redux bios release
I also checked the copyright declarations in the
directory src/mips/openbios where the PCSX-Redux BIOS
is, gleaning all the copyright years: 2019-2024 at this
time.

The years will be updated as and when PCSX-Redux is
updated in lbmk. Their BIOS is under MIT so I made lbmk
generate an appropriate COPYING file alongside the binary,
containing:

Copyright (c) 2019-2024 PCSX-Redux authors

Along with the actual text of the MIT license. With all
of this, the PCSX-Redux BIOS can now be included in
Libreboot releases.

No actual tarball is created. The release script in lbmk
simply copies the bin/ directory to ../roms

I'm leaving the PCSX-Redux BIOS release uncompressed,
because, and this will sound patronising because that is
my precise intention: Windows users don't know how to do
anything. If I provide a tarball to Windows users, they
won't know what to do. Libreboot releases always go on rsync
mirrors, which also have HTTP servers with indexing enabled,
for browsing release files.

I mention Windows users, because most people who use the PCSX
Redux BIOS will probably use it on a PlayStation emulator, and
most emulator users are on Windows. I can't really be bothered
to provide it as a .zip archive, and it's only 512kb, so just
provide it uncompressed in Libreboot releases!

Releases were already possible under this scheme, so this
patch really just adds the COPYING file. It's simply a courtesy
to the PCSX-Redux developers, providing proper credit to them.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-31 19:21:09 +00:00
Leah Rowe b2e41735f3 further irony prevention
most likely not code, or code that has source code, in
these examples, but let's play it cautiously.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-10-29 12:43:35 +00:00
Leah Rowe 2478b53f09 coreboot/default: delete HDCP binary from rk3399
Not needed in our use-case, and probably doesn't have any
source code. Accidentally missed during prior audits.

Signed-off-by: Leah Rowe <info@minifree.org>
2024-10-29 12:28:10 +00:00