unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: dabbede@gmail.com
Cc: help-guix@gnu.org
Subject: Re: customize-linux not working as expected
Date: Wed, 18 Jan 2023 20:35:05 -0500	[thread overview]
Message-ID: <87y1pze27q.fsf@gmail.com> (raw)
In-Reply-To: <CAEwYQ4Q9HMyd5nd7z7hRiaiEw2xSfeHw3vCAT54NL0Tnc8pTSg@mail.gmail.com> (dabbede@gmail.com's message of "Tue, 17 Jan 2023 13:00:07 +0100")

Hi,

"dabbede@gmail.com" <dabbede@gmail.com> writes:

> Dear community,
>
> I would like to customize the configuration of my linux kernel, in
> particular of a xenomai-patched one.
> In the past days I've followed the route of using the procedure
> make-linux-libre*, in particular using the
> key  #:extra-options to append my customizations to
> %default-extra-linux-options. In that case I did
> not encounter any suspect behavior (except for the fact that
> %default-extra-linux-options must be
> appended after my list, and not the opposite, in order to have my
> settings in place).
>
> Today I've decided to give a try to the new procedure
> "customize-linux". Here is the snippet:
> ----------------------------------------------------------------------------------------------------
> define-public linux-xenomai
>  (let ((father ((@@ (gnu packages linux) customize-linux)
>             #:name "linux-xenomai"
>             #:linux linux-libre-5.4
>             #:defconfig "x86_64_defconfig"
>             #:configs
>             '("CONFIG_LOCALVERSION=\"-xenomai3.2.2\""
>               ;; Xenomai specific tweaks
>               "# CONFIG_SCHED_MC_PRIO is not set"
>               "# CONFIG_CPU_FREQ is not set"
>               "# CONFIG_ACPI_PROCESSOR is not set"
>               "# CONFIG_CPU_IDLE is not set"
>               "# CONFIG_APM is not set"
>               "# CONFIG_INTEL_IDLE is not set"
>               "# CONFIG_INPUT_PCSPKR is not set"
>               "# CONFIG_COMPACTION is not set"
>               "# CONFIG_MIGRATION is not set"
>               ;; PCP customization
>               "CONFIG_XENO_DRIVERS_NET=y"
>               "CONFIG_XENO_DRIVERS_NET_DRV_E1000=m"
>               "CONFIG_XENO_DRIVERS_NET_DRV_E1000E=m"
>               "CONFIG_XENO_DRIVERS_NET_DRV_IGB=m"
>               "CONFIG_NTFS_FS=m"
>               "CONFIG_NTFS_RW=y"
>               "CONFIG_CIFS=m"
>               "CONFIG_CIFS_XATTR=y"
>               "CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4")))
>        (ipipepatch (ipipe-x86-patch "5.4.228-x86-12"
> "05l092vfswqlwyis0m6x5wa5hxwlmv7jwjpnjrbjav0b5ibv0xnr")))
>  (package
>    (inherit father)
>    (name "linux-xenomai")
>    (version "5.4.228")
>    (arguments
>      (substitute-keyword-arguments (package-arguments father)
>           ((#:phases phases)
>            #~(modify-phases #$phases
>              (add-after 'unpack 'unpack-extra-sources
>                 (lambda _
>                   (begin
>                    (copy-recursively #+ipipepatch "ipipe.patch")
>                    (copy-recursively #+xenomai-origin "xeno-source.tar.bz2")
>                    (invoke "tar" "-xjf" "xeno-source.tar.bz2")
>                    (invoke "bash" (string-append "xenomai-v"
> #$xenomai-version "/scripts/prepare-kernel.sh") "--ipipe=ipipe.patch"
> "--arch=x86_64"))))))))
>    (synopsis "Linux kernel with Xenomai Cobalt co-kernel")
>    (description
>     "Xenomai is a Free Software project in which engineers from a wide
>      background collaborate to build a robust and resource-efficient
>      real-time core for Linux following the dual kernel approach, for
>      applications with stringent latency requirements.")
>    (home-page "http://xenomai.org/"))))
> ----------------------------------------------------------------------------------------------------
>
> Unfortunately, some of my custom configs are in contrast to the
> default one (and they have to be that
> way for xenomai to work), and this leads the build process to stop at
> "verify-config".
> Here is the output to the terminal:
> ----------------------------------------------------------------------------------------------------
> error: in phase 'configure': uncaught exception:
> misc-error #f "~A ~S" ("Mismatching configurations in .config and
> arch/x86/configs/guix_defconfig" (("CONFIG_JUMP_LABEL" (#f "y"))
> ("CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE" (#f "y"))
> ("CONFIG_CPU_FREQ_GOV_PERFORMANCE" (#f "y"))
> ("CONFIG_CPU_FREQ_GOV_ONDEMAND" (#f "y")) ("CONFIG_X86_ACPI_CPUFREQ"
> (#f "y")) ("CONFIG_NF_CONNTRACK_IPV4" (#f "y"))
> ("CONFIG_IP_NF_TARGET_MASQUERADE" ("m" "y"))
> ("CONFIG_NF_CONNTRACK_IPV6" (#f "y")) ("CONFIG_SND_MIXER_OSS" (#f
> "y")) ("CONFIG_SND_PCM_OSS" (#f "y")) ("CONFIG_SND_SEQUENCER_OSS" (#f
> "y")) ("CONFIG_TIMER_STATS" (#f "y")) ("CONFIG_DEBUG_STACKOVERFLOW"
> (#f "y")) ("CONFIG_XENO_DRIVERS_NET" ("m" "y")))) #f
> phase `configure' failed after 111.5 seconds

[...]

> ----------------------------------------------------------------------------------------------------
>
> This behaviour is strange to me, as I was expecting my #:configs to
> take priority over default ones.
>
> Am I missing something?!
> Thank you for your support!

The new customize-linux procedure ensures that the provided #:defconfig
(or default defconfig if not specified), modified by #:configs, let's
name that "guix_defconfig" generates a .config file that can be saved
back exactly into exactly the same "guix_defconfig" when calling "make
savedefconfig".

This is very strict indeed, and unless you produced the defconfig from
'make menuconfig', you'll need to pay attention to each kconfig
dependency effect.  The upside is that the defconfig you version or the
set of options you pass is fully specified.  If another option got
implicitly turned on or disabled by the one you've added in #:configs,
you'll need to add theses too to #:configs, if you want to use that
field.

Seen from that angle, #:configs appears to be best suited for options
that do not have complex kconfig dependencies; else it's best to version
your defconfig and manipulate it through 'make menuconfig' and 'make
savedefconfig'.

Hopefully that's helpful,

-- 
Thanks,
Maxim


      reply	other threads:[~2023-01-19  1:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 12:00 customize-linux not working as expected dabbede
2023-01-19  1:35 ` Maxim Cournoyer [this message]

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=87y1pze27q.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=dabbede@gmail.com \
    --cc=help-guix@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.
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).