diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-06-17 23:18:35 -0600 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2022-06-24 10:21:06 +0200 |
| commit | 62c86c8391ceb8953ca972498fd75ea9298b85ff (patch) | |
| tree | f4ddcdf3749219c0fd36b92d0c2ba52b73566a07 /gnu/system/image.scm | |
| parent | 242fad357e969da3b1f80b7e4360b54d99ee03f3 (diff) | |
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 <othacehe@gnu.org>
Diffstat (limited to 'gnu/system/image.scm')
| -rw-r--r-- | gnu/system/image.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm index f02f6e0b8c2..5972a944d7b 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 3 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
| 4 | ;;; Copyright © 2022 Pavel Shlyak <p.shlyak@pantherx.org> | 4 | ;;; Copyright © 2022 Pavel Shlyak <p.shlyak@pantherx.org> |
| 5 | ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -66,6 +67,7 @@ | |||
| 66 | root-label | 67 | root-label |
| 67 | 68 | ||
| 68 | esp-partition | 69 | esp-partition |
| 70 | esp32-partition | ||
| 69 | root-partition | 71 | root-partition |
| 70 | 72 | ||
| 71 | efi-disk-image | 73 | efi-disk-image |
| @@ -75,6 +77,7 @@ | |||
| 75 | 77 | ||
| 76 | image-with-os | 78 | image-with-os |
| 77 | efi-raw-image-type | 79 | efi-raw-image-type |
| 80 | efi32-raw-image-type | ||
| 78 | qcow2-image-type | 81 | qcow2-image-type |
| 79 | iso-image-type | 82 | iso-image-type |
| 80 | uncompressed-iso-image-type | 83 | uncompressed-iso-image-type |
| @@ -110,6 +113,11 @@ | |||
| 110 | (flags '(esp)) | 113 | (flags '(esp)) |
| 111 | (initializer (gexp initialize-efi-partition)))) | 114 | (initializer (gexp initialize-efi-partition)))) |
| 112 | 115 | ||
| 116 | (define esp32-partition | ||
| 117 | (partition | ||
| 118 | (inherit esp-partition) | ||
| 119 | (initializer (gexp initialize-efi32-partition)))) | ||
| 120 | |||
| 113 | (define root-partition | 121 | (define root-partition |
| 114 | (partition | 122 | (partition |
| 115 | (size 'guess) | 123 | (size 'guess) |
| @@ -123,6 +131,11 @@ | |||
| 123 | (format 'disk-image) | 131 | (format 'disk-image) |
| 124 | (partitions (list esp-partition root-partition)))) | 132 | (partitions (list esp-partition root-partition)))) |
| 125 | 133 | ||
| 134 | (define efi32-disk-image | ||
| 135 | (image | ||
| 136 | (format 'disk-image) | ||
| 137 | (partitions (list esp32-partition root-partition)))) | ||
| 138 | |||
| 126 | (define iso9660-image | 139 | (define iso9660-image |
| 127 | (image | 140 | (image |
| 128 | (format 'iso9660) | 141 | (format 'iso9660) |
| @@ -164,6 +177,11 @@ set to the given OS." | |||
| 164 | (name 'efi-raw) | 177 | (name 'efi-raw) |
| 165 | (constructor (cut image-with-os efi-disk-image <>)))) | 178 | (constructor (cut image-with-os efi-disk-image <>)))) |
| 166 | 179 | ||
| 180 | (define efi32-raw-image-type | ||
| 181 | (image-type | ||
| 182 | (name 'efi32-raw) | ||
| 183 | (constructor (cut image-with-os efi32-disk-image <>)))) | ||
| 184 | |||
| 167 | (define qcow2-image-type | 185 | (define qcow2-image-type |
| 168 | (image-type | 186 | (image-type |
| 169 | (name 'qcow2) | 187 | (name 'qcow2) |
| @@ -376,6 +394,7 @@ used in the image." | |||
| 376 | #$(image-shared-store? image)) | 394 | #$(image-shared-store? image)) |
| 377 | #:system-directory #$os | 395 | #:system-directory #$os |
| 378 | #:grub-efi #+grub-efi | 396 | #:grub-efi #+grub-efi |
| 397 | #:grub-efi32 #+grub-efi32 | ||
| 379 | #:bootloader-package | 398 | #:bootloader-package |
| 380 | #+(bootloader-package bootloader) | 399 | #+(bootloader-package bootloader) |
| 381 | #:bootloader-installer | 400 | #:bootloader-installer |
