From 44d5f54e31039d78f156bd9562dca293124eaa76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 9 Sep 2016 23:27:00 +0200 Subject: system: grub: Allow arbitrary kernel file names in 'menu-entry'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Tomáš Čech . * gnu/system.scm (system-linux-image-file-name) (operating-system-kernel-file): New procedures. (operating-system-grub.cfg): Use 'operating-system-kernel-file' for the 'kernel' field of 'menu-entry'. (operating-system-parameters-file): Likewise for the 'kernel' entry. (read-boot-parameters): Adjust 'kernel' field so that it contains the absolute file name of the image. * gnu/system/grub.scm (grub-configuration-file)[linux-image-name]: Remove. [entry->gexp]: Assume LINUX is the absolute file name of the kernel image. * doc/guix.texi (GRUB Configuration): Add an example, and adjust 'kernel' field documentation accordingly. --- gnu/system/grub.scm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index aa93c0f454..4592747083 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -243,11 +243,6 @@ code." object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." - (define linux-image-name - (if (string-prefix? "mips" system) - "vmlinuz" - "bzImage")) - (define all-entries (append entries (grub-configuration-menu-entries config))) @@ -256,14 +251,12 @@ corresponding to old generations of the system." (($ label linux arguments initrd) #~(format port "menuentry ~s { ~a - linux ~a/~a ~a + linux ~a ~a initrd ~a }~%" #$label - #$(grub-root-search store-fs - #~(string-append #$linux "/" - #$linux-image-name)) - #$linux #$linux-image-name (string-join (list #$@arguments)) + #$(grub-root-search store-fs linux) + #$linux (string-join (list #$@arguments)) #$initrd)))) (mlet %store-monad ((sugar (eye-candy config store-fs system #~port))) -- cgit v1.2.3