unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: Re: [GNU-linux-libre] Replacing Yocto with Guix kernel image builds: best practices
Date: Sun, 17 May 2020 14:55:38 +0200	[thread overview]
Message-ID: <87lflqhgad.fsf@elephly.net> (raw)
In-Reply-To: <CAJsH2Qm7uX+BSRy_CaomKO0H1OSR_1_sLuOziT0KWpvMaZ-1EA@mail.gmail.com>


Hi,

[+guix-devel, -gnu-linux-libre]

> We are now looking to build Linux kernels using Guix instead of Yocto.  We
> can't see any reason why the builds wouldn't be linux-libre. Ideally we'd
> like our effort to be accepted by upstream guix.
[…]
> We'd appreciate any pointers to package definition(s) that demonstrate best
> practices to do what we'd like:
>
> - We'd like to build custom configured kernels for each patch series in the
> LTS 4.14.72+, 4.19+ and 5.4+.
> - Currently we have two `base` kernel configs that each 'variant'
> configuration is applied to for each of a machine 'type' (3 machine types)
> and one of two 'arch'.
> - Currently we can generate a full kernel `.config` for a
> kernel+base+variant+arch (we are working on the best way to handle
> different machines if we are not using Yocto.)
> - We'd ideally like to generate `vmlinux`, `initrd` and `rootfs` images for
> each.
>
> Based on Efraim's post we think the first example is the least friction -
> "including an actual .config file as a native input to our custom kernel".
> Assume we resolve the machine definition issue.  However we're puzzled
> about how to best distribute the configuration file such that a build of
> kernel x.y.z can be updated with fixes.

You can either put your config files in a separate git repository and add that to
the native inputs, or you can include the config files in your channel
repository (or later in Guix itself).

> The constraint of users being able to use the std guix commands rather than
> telling them to download a config file or clone a git repo and copy a
> config file is what is puzzling. Some options we thought about seem
> inelegant - hence too embarassing to mention - so we'll skip them ;)
> Leaving....
>
> 1) We did wonder if channels[2] were the way to go with each kernel x.y.z
> in its own branch and config files therein. Could anyone point us to
> packages that setup and use package specific channels?

Channels handle all the gnarly bits of interacting with git.  Users who
would like to add your channel providing alternative kernels would only
need to add it to their ~/.config/guix/channels.scm file.

But since your stated goal is to add these definitions to Guix itself
you can simply add the kernel variants to linux.scm and include the
config files in the repository.

> 2) Should we be aiming to provide a single package with multiple parameters
> or is it better to provide a package for each kernel x.y.z, or some other
> partitioning. We'd likely want to script the package definition then -
> correct?

If the main differences between kernel variants are not in the package
definition but the sources and the configuration file I’d suggest
defining a procedure that returns a package value.  You can then define
multiple packages in terms of that procedure.

-- 
Ricardo


       reply	other threads:[~2020-05-17 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJsH2Qm7uX+BSRy_CaomKO0H1OSR_1_sLuOziT0KWpvMaZ-1EA@mail.gmail.com>
2020-05-17 12:55 ` Ricardo Wurmus [this message]
2020-05-17 21:40   ` [GNU-linux-libre] Replacing Yocto with Guix kernel image builds: best practices Begley Brothers Inc
2020-05-18  7:16     ` Efraim Flashner
2020-05-19  6:48       ` Begley Brothers Inc
2020-05-18 10:24     ` Ricardo Wurmus
2020-05-19  7:09       ` Begley Brothers Inc
2020-05-19  7:50         ` Begley Brothers Inc

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lflqhgad.fsf@elephly.net \
    --to=rekado@elephly.net \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).