diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/bootloaders.scm | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index fdf373758f9..4e08cef31f9 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | (define-module (gnu packages bootloaders) | 44 | (define-module (gnu packages bootloaders) |
| 45 | #:use-module (gnu packages) | 45 | #:use-module (gnu packages) |
| 46 | #:use-module (gnu packages assembly) | 46 | #:use-module (gnu packages assembly) |
| 47 | #:use-module (gnu packages autotools) | ||
| 47 | #:use-module (gnu packages base) | 48 | #:use-module (gnu packages base) |
| 48 | #:use-module (gnu packages disk) | 49 | #:use-module (gnu packages disk) |
| 49 | #:use-module (gnu packages bison) | 50 | #:use-module (gnu packages bison) |
| @@ -114,13 +115,13 @@ | |||
| 114 | (define*-public (make-grub platform) | 115 | (define*-public (make-grub platform) |
| 115 | (package | 116 | (package |
| 116 | (name (string-append "grub-" platform)) | 117 | (name (string-append "grub-" platform)) |
| 117 | (version "2.12") | 118 | (version "2.14") |
| 118 | (source (origin | 119 | (source (origin |
| 119 | (method url-fetch) | 120 | (method url-fetch) |
| 120 | (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz")) | 121 | (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz")) |
| 121 | (sha256 | 122 | (sha256 |
| 122 | (base32 | 123 | (base32 |
| 123 | "1ahgzvvvwdxx7rl08pv5dyqlgp76jxz0q2cflxvsdsn4yy8p7jgk")) | 124 | "0hvd8i3ib6nwymfmvd6dia6axrn4xmrlsrg2r3c3i22vadrkr3dw")) |
| 124 | (patches (search-patches | 125 | (patches (search-patches |
| 125 | "grub-efi-fat-serial-number.patch" | 126 | "grub-efi-fat-serial-number.patch" |
| 126 | "grub-setup-root.patch")) | 127 | "grub-setup-root.patch")) |
| @@ -148,13 +149,21 @@ | |||
| 148 | ;; This needs to be compiled with clang for powerpc64le. | 149 | ;; This needs to be compiled with clang for powerpc64le. |
| 149 | (if #$(and=> (%current-target-system) | 150 | (if #$(and=> (%current-target-system) |
| 150 | target-ppc64le?) | 151 | target-ppc64le?) |
| 151 | (list "TARGET_CC=powerpc64le-linux-gnu-clang") | 152 | (list "TARGET_CC=powerpc64le-linux-gnu-clang" |
| 153 | "CFLAGS=-Wno-error") | ||
| 152 | '()) | 154 | '()) |
| 153 | (if #$(and (target-ppc64le? (%current-system)) | 155 | (if #$(and (target-ppc64le? (%current-system)) |
| 154 | (not (%current-target-system))) | 156 | (not (%current-target-system))) |
| 155 | (list "CC=clang") | 157 | (list "CC=clang" "CFLAGS=-Wno-error") |
| 156 | '())) | 158 | '())) |
| 157 | 159 | ||
| 160 | ;; The 'configure' script detects --image-base support and uses it, | ||
| 161 | ;; but that shifts the i386-pc kernel.img start address from 0x9000 | ||
| 162 | ;; to 0x9074, breaking grub-install. Override with -Ttext. | ||
| 163 | ;; See <https://lists.gnu.org/archive/html/grub-devel/2026-01/msg00041.html>. | ||
| 164 | #:make-flags | ||
| 165 | #~(list "TARGET_IMG_BASE_LDOPT=-Wl,-Ttext") | ||
| 166 | |||
| 158 | ;; GRUB fails to load modules stripped with --strip-unneeded. | 167 | ;; GRUB fails to load modules stripped with --strip-unneeded. |
| 159 | #:strip-flags | 168 | #:strip-flags |
| 160 | #~(list "--strip-debug" "--enable-deterministic-archives") | 169 | #~(list "--strip-debug" "--enable-deterministic-archives") |
| @@ -229,7 +238,7 @@ | |||
| 229 | (("test_unset grub_func_test") | 238 | (("test_unset grub_func_test") |
| 230 | "test_unset"))))))) | 239 | "test_unset"))))))) |
| 231 | (inputs | 240 | (inputs |
| 232 | (append (list gettext-minimal freetype ncurses | 241 | (append (list gettext-minimal freetype ncurses libtasn1 |
| 233 | 242 | ||
| 234 | ;; Console-setup's ckbcomp is invoked by grub-kbdcomp. It | 243 | ;; Console-setup's ckbcomp is invoked by grub-kbdcomp. It |
| 235 | ;; is required for generating alternative keyboard layouts. | 244 | ;; is required for generating alternative keyboard layouts. |
| @@ -389,7 +398,8 @@ menu to select one of the installed operating systems.") | |||
| 389 | "test_sha512sum" | 398 | "test_sha512sum" |
| 390 | "grub_cmd_tr" | 399 | "grub_cmd_tr" |
| 391 | "test_unset" | 400 | "test_unset" |
| 392 | "file_filter_test") | 401 | "file_filter_test" |
| 402 | "asn1_test") | ||
| 393 | " ")))))))) | 403 | " ")))))))) |
| 394 | (supported-systems '("i686-linux" "x86_64-linux"))))) | 404 | (supported-systems '("i686-linux" "x86_64-linux"))))) |
| 395 | 405 | ||
| @@ -441,22 +451,27 @@ menu to select one of the installed operating systems.") | |||
| 441 | ((target-arm32?) "arm") | 451 | ((target-arm32?) "arm") |
| 442 | (else "")))) | 452 | (else "")))) |
| 443 | (substitute* "tests/util/grub-shell.in" | 453 | (substitute* "tests/util/grub-shell.in" |
| 444 | (("OVMF-ia32\\.fd") | 454 | (("\\$\\{srcdir\\}/OVMF(32)?\\.fd") |
| 445 | (search-input-file | 455 | (search-input-file |
| 446 | (or native-inputs inputs) | 456 | (or native-inputs inputs) |
| 447 | (string-append | 457 | (string-append |
| 448 | "/share/firmware/ovmf_" arch ".bin"))) | 458 | "/share/firmware/ovmf_" arch ".bin"))) |
| 449 | (("OVMF\\.fd") | 459 | (("/usr/share/qemu/OVMF(32)?\\.fd") |
| 450 | (search-input-file | 460 | (search-input-file |
| 451 | (or native-inputs inputs) | 461 | (or native-inputs inputs) |
| 452 | (string-append | 462 | (string-append |
| 453 | "/share/firmware/ovmf_" arch ".bin"))) | 463 | "/share/firmware/ovmf_" arch ".bin"))) |
| 454 | (("/usr/share/qemu-efi/QEMU_EFI\\.fd") | 464 | (("\\$\\{srcdir\\}/AAVMF(32)?\\.fd") |
| 455 | (search-input-file | 465 | (search-input-file |
| 456 | (or native-inputs inputs) | 466 | (or native-inputs inputs) |
| 457 | (string-append | 467 | (string-append |
| 458 | "/share/firmware/ovmf_" arch ".bin"))) | 468 | "/share/firmware/ovmf_" arch ".bin"))) |
| 459 | (("/usr/share/ovmf-arm/QEMU_EFI\\.fd") | 469 | (("/usr/share/qemu-efi-aarch64/QEMU_EFI\\.fd") |
| 470 | (search-input-file | ||
| 471 | (or native-inputs inputs) | ||
| 472 | (string-append | ||
| 473 | "/share/firmware/ovmf_" arch ".bin"))) | ||
| 474 | (("/usr/share/AAVMF/AAVMF(32)?\\.fd") | ||
| 460 | (search-input-file | 475 | (search-input-file |
| 461 | (or native-inputs inputs) | 476 | (or native-inputs inputs) |
| 462 | (string-append | 477 | (string-append |
| @@ -513,7 +528,23 @@ menu to select one of the installed operating systems.") | |||
| 513 | ((target-arm?) "arm") | 528 | ((target-arm?) "arm") |
| 514 | (else "")))) | 529 | (else "")))) |
| 515 | (substitute* "tests/util/grub-shell.in" | 530 | (substitute* "tests/util/grub-shell.in" |
| 516 | (("OVMF-ia32\\.fd") | 531 | (("\\$\\{srcdir\\}/OVMF(32)?\\.fd") |
| 532 | (search-input-file | ||
| 533 | inputs (string-append | ||
| 534 | "/share/firmware/ovmf_" arch ".bin"))) | ||
| 535 | (("/usr/share/qemu/OVMF(32)?\\.fd") | ||
| 536 | (search-input-file | ||
| 537 | inputs (string-append | ||
| 538 | "/share/firmware/ovmf_" arch ".bin"))) | ||
| 539 | (("\\$\\{srcdir\\}/AAVMF(32)?\\.fd") | ||
| 540 | (search-input-file | ||
| 541 | inputs (string-append | ||
| 542 | "/share/firmware/ovmf_" arch ".bin"))) | ||
| 543 | (("/usr/share/qemu-efi-aarch64/QEMU_EFI\\.fd") | ||
| 544 | (search-input-file | ||
| 545 | inputs (string-append | ||
| 546 | "/share/firmware/ovmf_" arch ".bin"))) | ||
| 547 | (("/usr/share/AAVMF/AAVMF(32)?\\.fd") | ||
| 517 | (search-input-file | 548 | (search-input-file |
| 518 | inputs (string-append | 549 | inputs (string-append |
| 519 | "/share/firmware/ovmf_" arch ".bin"))) | 550 | "/share/firmware/ovmf_" arch ".bin"))) |
