summaryrefslogtreecommitdiff
path: root/gnu/bootloader/extlinux.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/bootloader/extlinux.scm')
-rw-r--r--gnu/bootloader/extlinux.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm
index 6b5ff298e74..d9b6d8bf8a2 100644
--- a/gnu/bootloader/extlinux.scm
+++ b/gnu/bootloader/extlinux.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 David Craven <david@craven.ch> 2;;; Copyright © 2017 David Craven <david@craven.ch>
3;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> 3;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4;;; Copyright © 2022 Reza Alizadeh Majd <r.majd@pantherx.org>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -38,6 +39,9 @@ corresponding to old generations of the system."
38 (define all-entries 39 (define all-entries
39 (append entries (bootloader-configuration-menu-entries config))) 40 (append entries (bootloader-configuration-menu-entries config)))
40 41
42 (define with-fdtdir?
43 (bootloader-configuration-device-tree-support? config))
44
41 (define (menu-entry->gexp entry) 45 (define (menu-entry->gexp entry)
42 (let ((label (menu-entry-label entry)) 46 (let ((label (menu-entry-label entry))
43 (kernel (menu-entry-linux entry)) 47 (kernel (menu-entry-linux entry))
@@ -46,12 +50,16 @@ corresponding to old generations of the system."
46 #~(format port "LABEL ~a 50 #~(format port "LABEL ~a
47 MENU LABEL ~a 51 MENU LABEL ~a
48 KERNEL ~a 52 KERNEL ~a
49 FDTDIR ~a/lib/dtbs 53 ~a
50 INITRD ~a 54 INITRD ~a
51 APPEND ~a 55 APPEND ~a
52~%" 56~%"
53 #$label #$label 57 #$label #$label
54 #$kernel (dirname #$kernel) #$initrd 58 #$kernel
59 (if #$with-fdtdir?
60 (string-append "FDTDIR " (dirname #$kernel) "/lib/dtbs")
61 "")
62 #$initrd
55 (string-join (list #$@kernel-arguments))))) 63 (string-join (list #$@kernel-arguments)))))
56 64
57 (define builder 65 (define builder