Commit Graph

626 Commits (7ee6ec0ce9b91b3144c5cfbbd624182facf487ea)

Author SHA1 Message Date
Leah Rowe 7ee6ec0ce9 Mitigate Debian Trixie/Sid GCC/GNAT version mismatch
When I tested Debian Trixie, and Debian Sid, I saw that
GCC in PATH pointed to gcc-14, but gnat in path pointed
to GNAT-13, even if you manually install gnat-14.

GNAT 14 was marked experimental, but GCC 14 was marked
for use, in the apt repositories.

So this patch doesn't address the mismatch when doing e.g.
apt-get install gcc gnat

I will address the actual package dependency in a follow-up
patch, on the Debian dependencies config.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-07 00:07:24 +00:00
Leah Rowe f1d9ecc468 rom.sh: Name pico directory serprog_pico
Previously serprog_rp2040, but we now also support
the RP2530 boards.

Therefore, serprog_pico is a nice generic name. The
directory on release archives will now be serprog_pico
instead of serprog_rp2040; it will contain serprog images
for both RP2040 and RP2530 devices.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-07 00:04:37 +00:00
Leah Rowe bb6c31aa16 add 2024 to Riku's copyright header on rom.sh
he forgot to do this in the recently merged pico2
support. i'm doing it for him as a matter of courtesy.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-07 00:03:57 +00:00
Riku Viitanen 3d738af507 pico-sdk: update to 2.1.0
this brings support for a new microcontroller platform rp2530.

total number of pico boards supported now: 97

TEST: built them all

Tested-by: Riku Viitanen <riku.viitanen@protonmail.com>
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2025-01-07 00:03:50 +00:00
Riku Viitanen fa6ed8816e pico-serprog: enable building for multiple pico chips
rp2040 and rp2530 platforms can't share a cmake build directory. we
could just delete the build directory after every compilation, but that
would be really wasteful (every tool would need to be recomiled every
time. instead create new build directories as new plaforms are found
and symlink them to the point where the build directory used to be.

to find out which platform we're compiling for, we crudely parse the
board headers file.

there surely would be better ways to do this, but this hack works
with all the boards in pico-sdk 2.1.0.

Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
2025-01-07 00:03:40 +00:00
Leah Rowe 31a0ea3537 add spdx headers to various config files
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-07 00:02:07 +00:00
Leah Rowe dd6f914186 git.sh: don't initialise livepull globally
set this variable in the tmpclone function. otherwise,
certain submodules might always download every time,
when handling multiple projects.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:53:38 +00:00
Leah Rowe 417accd9e0 lib.sh: Support copying files locally
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:50:39 +00:00
Leah Rowe 7b8bda9977 lib.sh: Safer exit from ./mk dependencies
The exit was dependent upon install_packages returning
zero status, which it always would in practise, due to
its design, but this exit must always be observed, so
the code has been modified to honour this design.

A direct exit violates lbmk's design in most instances,
where a temporary directory and lock file has already
been created; at this stage, no such act was performed,
so a direct exit is perfectly acceptable.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:44:36 +00:00
Leah Rowe 63eb43ec39 dependencies/void: add missing escape character
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:44:16 +00:00
Leah Rowe daefe4f895 rom.sh: support grub-first setups
in this setup, seabios is never the default payload, grub is,
but only if grub is enabled.

set this in target.cfg:

payload_grubsea="y"

if payload_grub isn't enabled, this is auto-set to n

ditto if initmode=normal

NOTE: if flashing libgfx setups, you should make sure
that you're not booting with a graphics card, only intel
graphics. this setting will intentionally not be documented,
because it's not recommended, but is being implemented for
testing purposes (and i implemented it for some guy who i
think is cool). i'll probably also use this myself, since
i already do grub-only setups on all my own machines.

seagrub is the default on x86 because of past instabilities
with grub. to mitigate in case of future issues, since seabios
is always stable, we reduce the chance of bricks.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:42:12 +00:00
Leah Rowe 73920cb0a1 rom.sh: insert grub background in cbfs not memdisk
for some reason, when the background is in memdisk, inserting
it into cbfs afterward doesn't override, despite this
being the behaviour in grub.cfg

put it in cbfs explicitly, and skip inserting into memdisk

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:40:37 +00:00
Leah Rowe 5ebeb65cbf add tarballs and signatures to gitignore
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:39:49 +00:00
Leah Rowe 5053354644 fix another very stupid mistake
the last revision disabled building arm64 images!

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:39:39 +00:00
Leah Rowe df509aac63 fix the stupidest bug ever
no context given, but every rom needs to be re-built.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-01-06 23:39:32 +00:00
Leah Rowe fa16f7e36d Canoeboot 20241207 release
Signed-off-by: Leah Rowe <info@minifree.org>
2024-12-07 19:44:08 +00:00
Leah Rowe 4088cc12eb remove the purple patch on arm64 u-boot
it's green there. different colour scheme apparently.

still works on x86. alper said his kevin chromebook was green!

was green on the libreboot one, which should be purple.
i don't know how can-u-boot green would show up. would be
funny if it turned out purple

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 17:38:52 +00:00
Alper Nebi Yasak 4a50e5a3e9 u-boot: Use bootflow menu by default for ARM64 boards
The bootflow menu is already the default boot command on x86. Switch
arm64 boards to that as well, so instead of booting the first thing we
find, we can easily choose what to boot.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-07 17:38:52 +00:00
Leah Rowe 81a29cef73 i made u-boot turquoise
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 17:38:52 +00:00
Leah Rowe 421e73c04c Add bootflow/branding patches to arm64 U-Boot too
U-Boot on ARM64 also enables the bootflow menu.

Can
U
Boot
????

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 17:38:49 +00:00
Leah Rowe 773cd8b384 Add canoeboot branding/version to U-Boot bootflow
Show it in the bootflow menu

Signed-off-by: Leah Rowe <leah@libreboot.org>
Signed-off-by: Leah Rowe <info@minifree.org>
2024-12-07 17:09:53 +00:00
Leah Rowe ce27bb0ea0 Add auto-boot timeout for U-Boot's bootflow menu
Otherwise, you have to press enter to boot your distro.

With this, a timeout is created. After a number of seconds,
which can be reconfigured, the first option selected will be booted,
when generating a bootflow menu.

The timeout is disabled when you navigate the menu; it only
kicks in if you don't input anything on the keyboard.

More information about how this works is in the U-Boot patches,
within this patch. I've set the timeout to 8 seconds.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 15:44:20 +00:00
Leah Rowe 2ccc9215d8 8-sec auto-boot timeout for U-Boot's bootflow menu
Otherwise, you have to press enter to boot, which is unacceptable
for headless operation.

Pressing anything other than enter an an option, such as the arrow
keys, will disable the timeout.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 15:40:44 +00:00
Leah Rowe ea9e4765f4 add /dump/ to .gitignore
this is used for factoryy bios dumps, in cases where
boards require extraction of ME and so on,
instead of downloading online.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 15:40:21 +00:00
Alper Nebi Yasak 2d40305a35 u-boot: Enable USB with a preboot command
We need to initialize the USB subsystem before we can use USB devices
like keyboards and external disks, by running `usb start`. Use the
PREBOOT config option to run the necessary command before U-Boot tries
to automatically boot anything. It's already enabled for boards other
than gru_kevin and gru_bob, so just update those two configs.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-07 15:32:05 +00:00
Alper Nebi Yasak 0cea72c1cc u-boot: Update ARM64 boards to v2024.10
Set default U-Boot revision to v2024.10 and rebase patches on top of
that. The video subsystem now has switched to using the 'cyclic'
mechanism, so the code around one of the video patches changed a bit.

x86 boards were already switched to v2024.10. Update U-Boot for the
remaining ARM64 boards as usual:

- Turn old configs into defconfigs (./update trees -s u-boot)
- Save the diff from old upstream defconfig (diffconfig $theirs $ours)
- Update U-Boot revision, rebase patches, and clean old trees
- Prepare new U-Boot tree (./update trees -f u-boot)
- Review the diffconfigs to see if any options were renamed upstream
- Copy over the new upstream defconfigs and apply earlier diff
- Turn new defconfigs into configs (./update trees -l u-boot)

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-07 15:31:39 +00:00
Leah Rowe 6069668153 trees: reset PATH per-target
Otherwise, if PATH was set before, it will be re-used
again in the next pass. We previously unset CROSS_COMPILE
to avoid using the wrong cross-compiler when switching to
another target within a multi-tree project such as U-Boot.

Well, PATH was also being set, to use coreboot xgcc first.
This is fine, but the next target may not use the same one.

This patch solves a similar problem to the following patch
which was mentioned above:

commit 637c0a1521a03e3f65de85dcc5ffd478b37a5360
Author: Leah Rowe <leah@libreboot.org>
Date:   Tue Nov 19 02:52:28 2024 +0000

    trees: unset CROSS_COMPILE per target

Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-12-07 15:31:08 +00:00
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