From: Mark H Weaver <mhw@netris.org>
To: Andy Wingo <wingo@pobox.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Allow building other kernels
Date: Sun, 05 Apr 2015 16:31:16 -0400 [thread overview]
Message-ID: <87d23i48rv.fsf@netris.org> (raw)
In-Reply-To: <87iodb4qk2.fsf@pobox.com> (Andy Wingo's message of "Sat, 04 Apr 2015 21:54:53 +0200")
Andy Wingo <wingo@pobox.com> writes:
> To use a different kernel, for example do:
>
> (kernel linux-mine)
>
> (initrd (lambda (file-systems . rest)
> (apply base-initrd file-systems
> #:linux linux-mine
> rest)))
It would be great if users could specify a custom kernel without having
to override the default value of 'initrd' like this. I suppose this
could be arranged by passing #:linux (operating-system-kernel os) in
every call of the initrd procedure.
What do you think? Ludovic?
Mark
> From 1dbdc673654f94868b0176876dd83fb8b5bfe68c Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@pobox.com>
> 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
next prev parent reply other threads:[~2015-04-05 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 19:54 [PATCH] Allow building other kernels Andy Wingo
2015-04-05 20:31 ` Mark H Weaver [this message]
2015-04-05 22:28 ` Ludovic Courtès
2015-04-05 20:50 ` 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=87d23i48rv.fsf@netris.org \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
--cc=wingo@pobox.com \
/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.