From 1dbdc673654f94868b0176876dd83fb8b5bfe68c Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 3 Apr 2015 12:25:26 +0200 Subject: [PATCH 1/3] Allow specification of #:linux kernel when making an initrd * gnu/system/linux-initrd.scm (base-initrd): Add #:linux option to specify the linux kernel to use. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Propagate #:linux to base-initrd. (system-qemu-image, virtualized-operating-system): Delegate to the wrapped OS object's initrd builder, to allow the OS to specify the kernel. --- gnu/system/linux-initrd.scm | 4 ++-- gnu/system/vm.scm | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 9feb8f7..1914df9 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -147,6 +147,7 @@ initrd code." qemu-networking? virtio? volatile-root? + (linux linux-libre) (extra-modules '())) "Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is a list of file-systems to be mounted by the initrd, possibly in addition to @@ -224,8 +225,7 @@ loaded at boot time in the order in which they appear." (open source target))) mapped-devices)) - (mlet %store-monad ((kodir (flat-linux-module-directory linux-libre - linux-modules))) + (mlet %store-monad ((kodir (flat-linux-module-directory linux linux-modules))) (expression->initrd #~(begin (use-modules (gnu build linux-boot) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index c93e26d..a551c89 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -149,6 +149,7 @@ made available under the /xchg CIFS share." (initrd (if initrd ; use the default initrd? (return initrd) (base-initrd %linux-vm-file-systems + #:linux linux #:virtio? #t #:qemu-networking? #t)))) @@ -326,7 +327,7 @@ of the GNU system as described by OS." (let ((os (operating-system (inherit os) ;; Use an initrd with the whole QEMU shebang. (initrd (lambda (file-systems . rest) - (apply base-initrd file-systems + (apply (operating-system-initrd os) file-systems #:virtio? #t #:qemu-networking? #t rest))) @@ -409,7 +410,7 @@ environment with the store shared with the host. MAPPINGS is a list of (operating-system (inherit os) (initrd (lambda (file-systems . rest) - (apply base-initrd file-systems + (apply (operating-system-initrd os) file-systems #:volatile-root? #t #:virtio? #t #:qemu-networking? #t -- 2.2.1