GNU bug report logs - #55343
Add support for 32bit UEFI

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Mon, 9 May 2022 23:18:02 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#55343: closed (Add support for 32bit UEFI)
Date: Fri, 24 Jun 2022 08:25:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 24 Jun 2022 10:23:54 +0200
with message-id <87r13ejwpx.fsf <at> gnu.org>
and subject line Re: bug#55343: Add support for 32bit UEFI
has caused the debbugs.gnu.org bug report #55343,
regarding Add support for 32bit UEFI
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
55343: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55343
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Subject: Add support for 32bit UEFI
Date: Tue, 10 May 2022 01:18:12 +0200
[Message part 3 (text/plain, inline)]
Hi,

I was lent a tablet with an x86_64 CPU and a 32bit UEFI. As I wanted
to test Guix on it, I ended up making patches to add support for 32bit
UEFI. This also enabled me to learn more about UEFI in the process.

In these patches (that will be sent right after this mail), I added a
grub-efi32 package that makes sure it is compiled for 32bit, even on
64bit systems, and to use it, I added and a new 'efi32-raw' image type.

I've copied (with dd) a system image that I made with this command on a
x86_64 Guix:
> guix system image -t efi32-raw system.scm
to an USB key that I then booted on a Dell Venue Pro 8.

I've attached the system.scm used for the tests (it's based on the
desktop.tmpl in the Guix source code).

I validated that the device booted fine up to gdm.

I also validated that the grub image generated with this package was
32bit with the following commands (on both i686 and x86_64 computers):
> /gnu/store/[...]-grub-efi32-2.06/bin/grub-mkimage \
> -O i386-efi -p / -o /tmp/grub.img
> $ file /tmp/grub.img 
> /tmp/grub.img: PE32 executable (EFI application) Intel 80386 (stripped
> to external PDB), for MS Windows

I've not yet tried to create an image with grub-efi32 on i686 but I
assume that it's not necessarily an issue since grub system image also
has targets like novena-raw that don't work for x86.

I also don't have ARM UEFI machines so I still added support for that
but I could not test it.

Also, for some reasons guix lint fails on i686 while it works fine for
x86_64:
> $ ./pre-inst-env guix lint grub-efi32
> gnu/packages/bootloaders.scm:337:2: grub-efi32 <at> 2.06: label
> 'ld-wrapper' does not match package name 'ld-wrapper-i386'
> gnu/packages/bootloaders.scm:337:2: grub-efi32 <at> 2.06: label 'binutils'
> does not match package name 'binutils-i386'
> gnu/packages/bootloaders.scm:337:2: grub-efi32 <at> 2.06: label 'qemu'
> does not match package name 'qemu-minimal'
> gnu/packages/bootloaders.scm:337:2: grub-efi32 <at> 2.06: label 'gettext'
> does not match package name 'gettext-minimal'
> gnu/packages/bootloaders.scm:337:2: grub-efi32 <at> 2.06: file names of
> patches should start with the package name Backtrace:rub-efi32 <at> 2.06
> [gnu-description]... In ice-9/boot-9.scm: 1752:10 17
> (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 16
> (apply-smob/0 #<thunk 919b010>) In ice-9/boot-9.scm: 724:2 15
> (call-with-prompt _ _ #<procedure default-prompt-handle…>) In
> ice-9/eval.scm: 619:8 14 (_ #(#(#<directory (guile-user) 9192690>)))
> In guix/ui.scm: 2230:7 13 (run-guix . _)
>   2193:10 12 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>   1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
>   1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/store.scm:
>    658:37  9 (thunk)
> In srfi/srfi-1.scm:
>     634:9  8 (for-each #<procedure 9265740 at guix/scripts/lint.scm…>
> …) In guix/scripts/lint.scm:
>      65:4  7 (run-checkers _ _ #:store _)
> In srfi/srfi-1.scm:
>     634:9  6 (for-each #<procedure b0bd948 at guix/scripts/lint.scm…>
> …) In guix/scripts/lint.scm:
>     74:21  5 (_ _)
> In guix/lint.scm:
>    1093:2  4 (check-gnu-synopsis+description #<package
> grub-efi32 <at> 2.…>) In srfi/srfi-1.scm:
>    730:15  3 (find #<procedure b8d71d0 at guix/lint.scm:1093:15 (de…>
> …) In guix/gnu-maintenance.scm:
>    100:21  2 (_ #<<gnu-package-descriptor> name: "3dldf"
> mundane-nam…>) In ice-9/boot-9.scm:
>   1685:16  1 (raise-exception _ #:continuable? _)
>   1685:16  0 (raise-exception _ #:continuable? _)
> 
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> error: <gnu-package-descriptor>: unbound variable

Denis.
[system.scm (text/x-scheme, attachment)]
[Message part 5 (application/pgp-signature, inline)]
[Message part 6 (message/rfc822, inline)]
From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Maxime Devos <maximedevos <at> telenet.be>,
 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55343-done <at> debbugs.gnu.org
Subject: Re: bug#55343: Add support for 32bit UEFI
Date: Fri, 24 Jun 2022 10:23:54 +0200
Hey,

>   This way we could get rid of the grub-efi32 package and rely only on
>   the grub-efi package. We would need to come up with something
>   similar for the aarch64-linux Grub package I guess.

I tried to do that, turns out Grub doesn't have support for building
modules for multiple architectures in a single pass. You need to call
configure and make for each architecture. Having a dedicated grub-efi32
doesn't seem so bad after all.

I pushed the patchset, thanks!

Mathieu


This bug report was last modified 2 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.