From: Mark H Weaver <mhw@netris.org>
To: guix-devel@gnu.org
Subject: [PATCH] system: grub: On MIPS, the linux image name is vmlinuz
Date: Sun, 23 Aug 2015 14:27:34 -0400 [thread overview]
Message-ID: <87a8thx3l5.fsf@netris.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
Currently, we assume that the linux image name is "bzImage", but this
varies depending on platform. On MIPS, the name is "vmlinuz". This
modifies our 'grub-configuation-file' generation code to use "vmlinuz"
on MIPS.
Mark
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] system: grub: On MIPS, the linux image name is vmlinuz --]
[-- Type: text/x-patch, Size: 1682 bytes --]
From a15b9a1eedd5b110b94e13f0fea17323aa1e160e Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Wed, 19 Aug 2015 16:30:02 -0400
Subject: [PATCH] system: grub: On MIPS, the linux image name is vmlinuz, not
bzImage.
* gnu/system/grub.scm (grub-configuration-file): Add 'linux-image-name'
internal procedure. Use it from 'entry->gexp'.
---
gnu/system/grub.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index fe7400a..1378f5f 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -221,6 +221,11 @@ fi~%"
"Return the GRUB configuration file corresponding to CONFIG, a
<grub-configuration> 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)))
@@ -229,13 +234,14 @@ entries corresponding to old generations of the system."
(($ <menu-entry> label linux arguments initrd)
#~(format port "menuentry ~s {
# Set 'root' to the partition that contains the kernel.
- search --file --set ~a/bzImage~%
+ search --file --set ~a/~a~%
- linux ~a/bzImage ~a
+ linux ~a/~a ~a
initrd ~a
}~%"
#$label
- #$linux #$linux (string-join (list #$@arguments))
+ #$linux #$linux-image-name
+ #$linux #$linux-image-name (string-join (list #$@arguments))
#$initrd))))
(mlet %store-monad ((sugar (eye-candy config #~port)))
--
2.5.0
next reply other threads:[~2015-08-23 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-23 18:27 Mark H Weaver [this message]
2015-08-27 21:20 ` [PATCH] system: grub: On MIPS, the linux image name is vmlinuz Ludovic Courtès
2015-10-27 20:48 ` Ludovic Courtès
2015-10-28 4:29 ` Mark H Weaver
2015-10-28 9:47 ` Ludovic Courtès
2015-10-30 20:21 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8thx3l5.fsf@netris.org \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.