(address . guix-patches@gnu.org)
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:
Toggle quote (1 lines)
> 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):
Toggle quote (6 lines)
> /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:
Toggle quote (44 lines)
> $ ./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.
(use-modules (gnu) (gnu system nss) (guix utils))
(use-service-modules desktop sddm xorg)
(use-package-modules certs gnome)
(operating-system
(host-name "dell-venue-8-pro")
(timezone "Europe/Paris")
(locale "en_US.utf8")
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
;; This device has a 32bit UEFI
(bootloader (bootloader-configuration
(bootloader grub-efi32-bootloader)
(targets '("/boot/efi"))
(keyboard-layout keyboard-layout)))
;; Specify a mapped device for the encrypted root partition.
;; The UUID is that returned by 'cryptsetup luksUUID'.
(mapped-devices
(list (mapped-device
(source (uuid "12345678-1234-1234-1234-123456789abc"))
(target "my-root")
(type luks-device-mapping))))
(file-systems (append
(list (file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4")
(dependencies mapped-devices))
(file-system
(device (uuid "1234-ABCD" 'fat))
(mount-point "/boot/efi")
(type "vfat")))
%base-file-systems))
;; Specify a swap file for the system, which resides on the
;; root file system.
(swap-devices (list (swap-space
(target "/swapfile"))))
(users (cons (user-account
(name "parinux")
(comment "Parinux")
(group "parinux"))
%base-user-accounts))
(groups (cons* (user-group
(name "parinux"))
%base-groups))
;; This is where we specify system-wide packages.
(packages (append (list
;; for HTTPS access
nss-certs
;; for user mounts
gvfs)
%base-packages))
;; Add GNOME and Xfce---we can choose at the log-in screen
;; by clicking the gear. Use the "desktop" services, which
;; include the X11 log-in service, networking with
;; NetworkManager, and more.
(services (if (target-x86-64?)
(append (list (service gnome-desktop-service-type)
(service xfce-desktop-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services)
;; FIXME: Since GDM depends on Rust (gdm -> gnome-shell -> gjs
;; -> mozjs -> rust) and Rust is currently unavailable on
;; non-x86_64 platforms, we use SDDM and Mate here instead of
;; GNOME and GDM.
(append (list (service mate-desktop-service-type)
(service xfce-desktop-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))
sddm-service-type))
%desktop-services)))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmJ5oTQACgkQX138wUF3
4mNenQ//aHcM9wxnsvVqPmDEneHyXYe6AETFstXWaPC3EPcdKnRLu7UbYsnpX/x5
kPnHNNJgaHNQSHPLgsVZJXAuWCE5P0PB5ZgFlyRVLwF838sDLpzZvOeVPYhgQRKC
AP+OVV5bm/t1uMwk7UOyfszu/tIdEm55eqad+CZIYWD3mAUbBweWNK38kpgOdUMs
vWuT6/t4s1QpMw5Nw/yUnSwby8vDOCgMUB84JZnm2ka0tVgf732f6P8196y+pg9h
ebGGcmAwACMb556+GRMEvyb7HmZBHuEda5DNTVmiO8z6knIKWH8QQv7w8WxtdbmR
OHE3pHHSBfuQN3NAMeFJYZ60KlFvzhk8ePI4T//PqOT+M4DGIstcoc87OTjxIpI7
BbRzmZdUeh1sat2am9Oz8qME6QyELdvgd4WK236wuOLNIrNRP2jZOR1IInNDdTjb
mOunAOHxqUpLFatZINijWQjmVcD3Z1UzNUETHNzOacvA6CR+y9snxAyg15NKo/os
o1Wg2rN6/GcTdNvTuDhipnn3hyatqVE2adUn2MXuAVml9FbK2ZMOkTCCS8luwE9g
QV3oXo3hX4n3D2huhmFjQg3svwj7a25G8Nc0FkQbRPyAtJzMkdFLHuaeG5F7mg9T
obl76ye55p9i8YhqZwV6kLUn5ZWV1G+VnAaJ5L97vwmmaHgAoW8=
=EwHg
-----END PGP SIGNATURE-----