From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QIcYBzWheWK6gAAAbAwnHQ (envelope-from ) for ; Tue, 10 May 2022 01:18:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wL8ZBzWheWL0kgAA9RJhRA (envelope-from ) for ; Tue, 10 May 2022 01:18:13 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A6BB36713 for ; Tue, 10 May 2022 01:18:12 +0200 (CEST) Received: from localhost ([::1]:60726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noCdm-0006Z4-FG for larch@yhetil.org; Mon, 09 May 2022 19:18:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noCdf-0006Yp-17 for guix-patches@gnu.org; Mon, 09 May 2022 19:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noCde-00075F-Oo for guix-patches@gnu.org; Mon, 09 May 2022 19:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noCde-0003Pw-Hb for guix-patches@gnu.org; Mon, 09 May 2022 19:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55343] Add support for 32bit UEFI Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 23:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55343 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 55343@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165213822413063 (code B ref -1); Mon, 09 May 2022 23:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2022 23:17:04 +0000 Received: from localhost ([127.0.0.1]:59698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCch-0003Od-Fm for submit@debbugs.gnu.org; Mon, 09 May 2022 19:17:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:41576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCcg-0003OP-DW for submit@debbugs.gnu.org; Mon, 09 May 2022 19:17:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noCcg-0006Wa-99 for guix-patches@gnu.org; Mon, 09 May 2022 19:17:02 -0400 Received: from cyberdimension.org ([2001:910:1314:ffff::1]:43268 helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1noCce-000729-2s for guix-patches@gnu.org; Mon, 09 May 2022 19:17:01 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 01ba9775 for ; Mon, 9 May 2022 23:16:07 +0000 (UTC) Received: from primarylaptop.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id e998cc2a for ; Mon, 9 May 2022 23:16:07 +0000 (UTC) Date: Tue, 10 May 2022 01:18:12 +0200 From: Denis 'GNUtoo' Carikli Message-ID: <20220510011812.15710e0b@primarylaptop.localdomain> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/BDtFVo0Mikk2C+IWMygS2.D"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652138292; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=kdiJqzVcRk1kfbCC3kWTvMilqPKCOLOoKh9QTOjVsOc=; b=VYhHpg5bMRfMg4f3NLLkd+n6QrTK/5g/76425vX0YzRCqKQTQFmWhQ4WwpqyoVKMUYXqcF fGSEpRyS7u6Xjj7SvBNRz+tkynJSFeMq/4XM2q2Mnqyc0NGv36zRHw3yW5lxVj+PS+Gwgp Kt4HuH8m5ccbjESClcqgJKqVE0Rv93YV3lG3YbF0iObLhg6XM+FUUjn8etzT+9yufGIYmx YlxwuDraVYiSoc29rMMZfOkyJsRLEeSQNR9hxuJ++NHIOzjAoahvy+6BO4N2gI1U3JJgGm Hbh2f5yHYDhpbTFtsxyC3eirX2Hx/tACgFr4YQobpaQYTgx0gsbJ8f8RS++VFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652138292; a=rsa-sha256; cv=none; b=E+Az5eKUQ538Ngqkh1lJR4aA4ULEdv6OBviBK6zdPwFJ3ZlNRxjQvCwe2/RN2olMRmOWXD V+AzqIVYeqg3L5BdAz1EfGZ3L00s6Hb/V0BBrnQLKRwx+SLguLjqe6EsVyUSnQiw6XtS/i GrH/q7KpX/Zg2iVYxZcMlmkxQvJqrQ8f8MzRbW7hvP/Pbn2a6yQZNYdjz/7e1Pr7PXXOiX FsjWjgA1bQnm+XBuRpx0X906agYK186Yer4aCnUYbtuqgfIEkoYt4YJRQYoeLERMsg6wQD rxMNmmwzvs7F1D5Ildadk1uOM4lobHOgY8oTxHs1xEY4hJ7k3KFxIPK7prdVNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.70 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5A6BB36713 X-Spam-Score: -6.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: MXqUr8oXhmg2 --Sig_/BDtFVo0Mikk2C+IWMygS2.D Content-Type: multipart/mixed; boundary="MP_/w+wtIuqLooNM/FaFkx_v8pB" --MP_/w+wtIuqLooNM/FaFkx_v8pB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: 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=20 > /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 #) In ice-9/boot-9.scm: 724:2 15 > (call-with-prompt _ _ #) In > ice-9/eval.scm: 619:8 14 (_ #(#(#))) > 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 # > =E2=80=A6) In guix/scripts/lint.scm: > 65:4 7 (run-checkers _ _ #:store _) > In srfi/srfi-1.scm: > 634:9 6 (for-each # > =E2=80=A6) In guix/scripts/lint.scm: > 74:21 5 (_ _) > In guix/lint.scm: > 1093:2 4 (check-gnu-synopsis+description # grub-efi32@2.=E2=80=A6>) In srfi/srfi-1.scm: > 730:15 3 (find # > =E2=80=A6) In guix/gnu-maintenance.scm: > 100:21 2 (_ #< name: "3dldf" > mundane-nam=E2=80=A6>) In ice-9/boot-9.scm: > 1685:16 1 (raise-exception _ #:continuable? _) > 1685:16 0 (raise-exception _ #:continuable? _) >=20 > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > error: : unbound variable Denis. --MP_/w+wtIuqLooNM/FaFkx_v8pB Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=system.scm (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)) --MP_/w+wtIuqLooNM/FaFkx_v8pB-- --Sig_/BDtFVo0Mikk2C+IWMygS2.D Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----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----- --Sig_/BDtFVo0Mikk2C+IWMygS2.D--