guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55343] Add support for 32bit UEFI


From: Denis 'GNUtoo' Carikli
Subject: [bug#55343] Add support for 32bit UEFI
Date: Tue, 10 May 2022 01:18:12 +0200

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@2.06: label
> 'ld-wrapper' does not match package name 'ld-wrapper-i386'
> gnu/packages/bootloaders.scm:337:2: grub-efi32@2.06: label 'binutils'
> does not match package name 'binutils-i386'
> gnu/packages/bootloaders.scm:337:2: grub-efi32@2.06: label 'qemu'
> does not match package name 'qemu-minimal'
> gnu/packages/bootloaders.scm:337:2: grub-efi32@2.06: label 'gettext'
> does not match package name 'gettext-minimal'
> gnu/packages/bootloaders.scm:337:2: grub-efi32@2.06: file names of
> patches should start with the package name Backtrace:rub-efi32@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@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.

Attachment: system.scm
Description: Text Data

Attachment: pgpuSfQS04or0.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]