unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org
Subject: Re: custom kernel config
Date: Thu, 04 Apr 2019 01:44:48 -0700	[thread overview]
Message-ID: <87zhp6rwfz.fsf@gmail.com> (raw)
In-Reply-To: <20190403202758.GC1203@macbook41> (Efraim Flashner's message of "Wed, 3 Apr 2019 23:27:58 +0300")

[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]

Efraim Flashner <efraim@flashner.co.il> writes:

> On Wed, Apr 03, 2019 at 09:49:59PM +0200, Pierre Neidhardt wrote:
>> Thank you Efraim, this is awesome!

I second this remark!  It's really helpful to see how you're doing it.
Thank you for taking the time to share with us!

>> > tar xf $(guix build linux-libre -S)
>> > cd linux-libre<tab>
>> > touch .config
>> > guix environment linux-libre
>> >     make localmodconfig
>> >
>> > copy that into .config
>> 
>> Copy what into .config?
>
> the .config you just created at the root of the source tarball

I think there is some confusion here.  When I run "touch .config" and
then run "make localmodconfig", the .config file is not modified.
Perhaps you meant that we need to take the stdout from "make
localmodconfig", save it, and copy it (after massaging it) back into the
.config file?

> running make localconfig spits out a bunch of pseudo-error messages
> about modules that are missing in .config. If you copy that whole
> message, minus the lines starting with 'WARING', into .config and
> then format it as UPERCASE_OPTION=(y|m) it gives the kernel a config
> that is usable for it.
>
> so turning lines that look like:
> module nouveau did not have configs CONFIG_DRM_NOUVEAU
>
> into lines that look like:
> CONFIG_DRM_NOUVEAU=m

I read up a little on the various targets.  The documentation you
mentioned was helpful, "make help" was helpful, the Makefile source was
somewhat helpful, and the contents of
./scripts/kconfig/streamline_config.pl were helpful for understanding
the intent of the "localmodconfig" target.

It sounds like the intended use of "localmodconfig" target is to modify
an existing, non-empty .config file.  With that in mind, how does the
procedure you describe compare to something like the following?

1) Invoke "guix repl".  Then run this to determine the config that would
normally be used to configure the default linux-libre kernel:

  scheme@(guix-user)> (assoc "kconfig" (package-native-inputs linux-libre))
  $1 = ("kconfig" "/gnu/store/cwghfr06cadj2ss1ya6whgczpcba58z3-guix-module-union/share/guile/site/2.2/gnu/packages/aux-files/linux-libre/5.0-x86_64.conf")

2) Copy that file out of the store into .config.

3) Run "make olddefconfig" to non-interactively update the .config file.

4) Run "make localmodconfig" to streamline the .config based on what's
currently loaded.  I expected this target to also be non-interactive,
but to my surprise it still asked me to choose what to set for a few
options.

If you do it this way, you don't have to fix up formatting.  However,
maybe it doesn't produce the same kind of configuration you had in mind.
What do you think?

> Currently this doesn't take into account the initrd.

Do you mean that there are modules or configuration which the initrd
might need, which this procedure might accidentally disable?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-04-04  8:45 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 18:04 custom kernel config Efraim Flashner
2019-04-01 18:30 ` Pierre Neidhardt
2019-04-02  5:37   ` Efraim Flashner
2019-04-02  8:04     ` Pierre Neidhardt
2019-04-02 14:49       ` Efraim Flashner
2019-04-01 19:46 ` Ludovic Courtès
2019-04-02 14:50   ` Efraim Flashner
2019-04-03  8:08 ` Chris Marusich
2019-04-03 19:04   ` Efraim Flashner
2019-04-03 19:49     ` Pierre Neidhardt
2019-04-03 20:27       ` Efraim Flashner
2019-04-04  8:44         ` Chris Marusich [this message]
2019-04-07 14:36           ` Efraim Flashner
2019-04-07 17:25             ` Pierre Neidhardt
2019-04-08 14:52             ` Ludovic Courtès
2019-04-08 15:03               ` Pierre Neidhardt
2019-05-01  7:54                 ` Pierre Neidhardt
2019-05-06  3:46                   ` Chris Marusich
2019-05-06  8:01                     ` Efraim Flashner
2019-05-06  8:34                       ` Pierre Neidhardt
2019-05-01  9:31               ` Mark H Weaver
2019-05-01 14:15                 ` Ludovic Courtès
2019-05-15 18:09 ` [BLOG] " Efraim Flashner
2019-05-16 11:10   ` Pierre Neidhardt
2019-05-16 19:15     ` Efraim Flashner
2019-05-16 11:48   ` Pierre Neidhardt
2019-05-16 14:29   ` Marius Bakke
2019-05-16 14:33     ` Pierre Neidhardt
2019-05-16 19:14     ` Efraim Flashner
2019-05-17  0:15     ` Mark H Weaver
2019-05-17  7:50       ` Efraim Flashner
2019-05-20 14:57         ` Ludovic Courtès
2019-05-20 17:38           ` Efraim Flashner
2019-05-21 10:07             ` Ludovic Courtès
2019-05-21 12:46               ` zimoun
2019-05-18  2:04       ` ison

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=87zhp6rwfz.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=efraim@flashner.co.il \
    --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).