From 62c86c8391ceb8953ca972498fd75ea9298b85ff Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 17 Jun 2022 23:18:35 -0600 Subject: image: Add support for 32bit UEFI. * gnu/bootloader/grub.scm (grub-efi32-bootloader): New variable. (install-grub-efi32): New variable. * gnu/build/bootloader.scm (install-efi): Add a 'targets' keyword argument. (install-efi-loader): Likewise. * gnu/build/image.scm (initialize-efi32-partition): New procedure. * gnu/packages/bootloaders.scm (grub-efi32): New variable. * gnu/system/image.scm (esp32-partition): New variable (efi32-disk-image): New variable. (efi32-raw-image-type): New variable. (system-disk-image)[partition-image]: Set '#:grub-efi32' when calling the partition initializer. Signed-off-by: Mathieu Othacehe --- gnu/system/image.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/image.scm b/gnu/system/image.scm index f02f6e0b8c..5972a944d7 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020, 2021 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2022 Pavel Shlyak +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ (define-module (gnu system image) root-label esp-partition + esp32-partition root-partition efi-disk-image @@ -75,6 +77,7 @@ (define-module (gnu system image) image-with-os efi-raw-image-type + efi32-raw-image-type qcow2-image-type iso-image-type uncompressed-iso-image-type @@ -110,6 +113,11 @@ (define esp-partition (flags '(esp)) (initializer (gexp initialize-efi-partition)))) +(define esp32-partition + (partition + (inherit esp-partition) + (initializer (gexp initialize-efi32-partition)))) + (define root-partition (partition (size 'guess) @@ -123,6 +131,11 @@ (define efi-disk-image (format 'disk-image) (partitions (list esp-partition root-partition)))) +(define efi32-disk-image + (image + (format 'disk-image) + (partitions (list esp32-partition root-partition)))) + (define iso9660-image (image (format 'iso9660) @@ -164,6 +177,11 @@ (define efi-raw-image-type (name 'efi-raw) (constructor (cut image-with-os efi-disk-image <>)))) +(define efi32-raw-image-type + (image-type + (name 'efi32-raw) + (constructor (cut image-with-os efi32-disk-image <>)))) + (define qcow2-image-type (image-type (name 'qcow2) @@ -376,6 +394,7 @@ (define (partition-image partition) #$(image-shared-store? image)) #:system-directory #$os #:grub-efi #+grub-efi + #:grub-efi32 #+grub-efi32 #:bootloader-package #+(bootloader-package bootloader) #:bootloader-installer -- cgit v1.2.3