aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-17 01:07:50 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-17 01:11:06 +0200
commitee2a6304f3bcf19df895310aedff372ed7e17c34 (patch)
treea1faa13fb55276d7fbb97917657d872148acd750 /gnu
parent2378df558a6ca9c1db889294cc08b1229720e912 (diff)
downloadpatches-ee2a6304f3bcf19df895310aedff372ed7e17c34.tar
patches-ee2a6304f3bcf19df895310aedff372ed7e17c34.tar.gz
system: Add 'kernel-arguments' field.
* gnu/system.scm (<operating-system>)[kernel-arguments]: New field. (operating-system-grub.cfg): Honor it. (operating-system-parameters-file): Add 'kernel-arguments' to the parameters file. * guix/scripts/system.scm (previous-grub-entries)[system->grub-entry]: Read the 'kernel-arguments' field of the parameters file, when available. * gnu/system/vm.scm (system-qemu-image/shared-store-script): Use (operating-system-kernel-arguments os) in '-append'. * doc/guix.texi (operating-system Reference): Document it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system.scm16
-rw-r--r--gnu/system/vm.scm3
2 files changed, 13 insertions, 6 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index efad14596a..ed37c320f7 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -68,6 +68,7 @@
operating-system-host-name
operating-system-hosts-file
operating-system-kernel
+ operating-system-kernel-arguments
operating-system-initrd
operating-system-users
operating-system-groups
@@ -103,6 +104,8 @@
operating-system?
(kernel operating-system-kernel ; package
(default linux-libre))
+ (kernel-arguments operating-system-kernel-arguments
+ (default '())) ; list of gexps/strings
(bootloader operating-system-bootloader) ; <grub-configuration>
(initrd operating-system-initrd ; (list fs) -> M derivation
@@ -866,11 +869,12 @@ listed in OS. The C library expects to find it under
(label (kernel->grub-label kernel))
(linux kernel)
(linux-arguments
- (list (string-append "--root="
- (file-system-device root-fs))
- #~(string-append "--system=" #$system)
- #~(string-append "--load=" #$system
- "/boot")))
+ (cons* (string-append "--root="
+ (file-system-device root-fs))
+ #~(string-append "--system=" #$system)
+ #~(string-append "--load=" #$system
+ "/boot")
+ (operating-system-kernel-arguments os)))
(initrd #~(string-append #$system "/initrd"))))))
(grub-configuration-file (operating-system-bootloader os) entries
#:old-entries old-entries)))
@@ -887,6 +891,8 @@ this file is the reconstruction of GRUB menu entries for old configurations."
(label #$label)
(root-device #$(file-system-device root))
(kernel #$(operating-system-kernel os))
+ (kernel-arguments
+ #$(operating-system-kernel-arguments os))
(initrd #$initrd)))))
(define (operating-system-derivation os)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 2520493e2e..b293009127 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -493,7 +493,8 @@ exec " #$qemu "/bin/" #$(qemu-command (%current-system))
#~(" -kernel " #$(operating-system-kernel os) "/bzImage \
-initrd " #$os-drv "/initrd \
-append \"" #$(if graphic? "" "console=ttyS0 ")
- "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1\" "))
+ "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1 "
+ (string-join (list #+@(operating-system-kernel-arguments os))) "\" "))
#$(common-qemu-options image
(map file-system-mapping-source
(cons %store-mapping mappings)))