aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
entry-initrd entry))) #~(format port "LABEL ~a MENU LABEL ~a KERNEL ~a ~a INITRD ~a APPEND ~a ~%" #$label #$label #$kernel (if #$with-fdtdir? (string-append "FDTDIR " (dirname #$kernel) "/lib/dtbs") "") #$initrd (string-join (list #$@kernel-arguments))))) (define builder #~(call-with-output-file #$output (lambda (port) (let ((timeout #$(bootloader-configuration-timeout config))) (format port "# This file was generated from your Guix configuration. Any changes # will be lost upon reconfiguration. UI menu.c32 MENU TITLE GNU Guix Boot Options PROMPT ~a TIMEOUT ~a~%" (if (> timeout 0) 1 0) ;; timeout is expressed in 1/10s of seconds. (* 10 timeout)) #$@(map menu-entry->gexp all-entries) #$@(if (pair? old-entries) #~((format port "~%") #$@(map menu-entry->gexp old-entries) (format port "~%")) #~()))))) (computed-file "extlinux.conf" builder #:options '(#:local-build? #t #:substitutable? #f))) ;;; ;;; Install procedures. ;;; (define (install-extlinux mbr) #~(lambda (bootloader device mount-point) (let ((extlinux (string-append bootloader "/sbin/extlinux")) (install-dir (string-append mount-point "/boot/extlinux")) (syslinux-dir (string-append bootloader "/share/syslinux"))) (for-each (lambda (file) (install-file file install-dir)) (find-files syslinux-dir "\\.c32$")) (invoke/quiet extlinux "--install" install-dir) (write-file-on-device (string-append syslinux-dir "/" #$mbr) 440 device 0)))) (define install-extlinux-mbr (install-extlinux "mbr.bin")) (define install-extlinux-gpt (install-extlinux "gptmbr.bin")) ;;; ;;; Bootloader definitions. ;;; (define extlinux-bootloader (bootloader (name 'extlinux) (package syslinux) (installer install-extlinux-mbr) (configuration-file "/boot/extlinux/extlinux.conf") (configuration-file-generator extlinux-configuration-file))) (define extlinux-bootloader-gpt (bootloader (inherit extlinux-bootloader) (installer install-extlinux-gpt)))