all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* List of modules required by linux-modules
@ 2023-01-17  8:22 dabbede
  2023-01-26 18:57 ` dabbede
  0 siblings, 1 reply; 4+ messages in thread
From: dabbede @ 2023-01-17  8:22 UTC (permalink / raw)
  To: help-guix

Dear community,

I am trying to create a package for linux-xenomai (see previous thread
"Creating a package
using two sources/origins").
Thank to your help I managed to successfully build the (patched)
kernel, but when I start a
"guix system reconfigure" to adopt linux-xenomai in my setup the
system build fails while
building linux-modules (and also grub, raw-initrd and init which depends on it).

This is the build log:
------------------------------------------------------------------------------------
Backtrace:
           6 (primitive-load "/gnu/store/m0kd924mhb1bl6wn384gpcss29w?")
In ice-9/eval.scm:
    619:8  5 (_ #f)
   626:19  4 (_ #<directory (guile-user) 7ffff5fdbc80>)
   293:34  3 (_ #(#<directory (guile-user) 7ffff5fdbc80> #<procedu?>))
In srfi/srfi-1.scm:
   586:29  2 (map1 ("ahci" "usb-storage" "uas" "usbhid" "hid-gene?" ?))
   586:17  1 (map1 ("usb-storage" "uas" "usbhid" "hid-generic" "h?" ?))
In gnu/build/linux-modules.scm:
    269:5  0 (_)

gnu/build/linux-modules.scm:269:5: kernel module not found
"usb-storage" "/gnu/store/r2f9wrf17ys0znnxmvmy31h1z8b2nvrv-linux-xenomai-5.4.228-5.4.228/lib/modules"
-------------------------------------------------------------------------------------------------------

The package is expecting to find kernel modules for "ahci",
"usb-storage", "uas", "usbhid",
"hid-generic" and I'm sure also many more (because I iterated the
build by inserting these new
config without success). Unfortunately the list (in the log) is
truncated and I don't know how
many we need.
My questions are these:
1. can you point me to the full list of modules required?
2. if they are needed, why those modules are not inserted in
%default-extra-linux-options?

Regards,
   Davide


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: List of modules required by linux-modules
  2023-01-17  8:22 List of modules required by linux-modules dabbede
@ 2023-01-26 18:57 ` dabbede
  2023-01-27  9:31   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 4+ messages in thread
From: dabbede @ 2023-01-26 18:57 UTC (permalink / raw)
  To: help-guix

Dear community,

I went a little step forward but I'm still confused: by building the
derivation of linux-modules in the store (for linux-libre) I've
obtained the full list of modules that must be available for initrd to
work (why, it's still not clear).
Now, the #:extra-options key in my custom linux package looks like this
          #:extra-options
          (append
           `(;; Required by gnu/build/linux-modules
             ("CONFIG_SATA_AHCI" . m)
             ("CONFIG_USB_STORAGE" . m)
             ("CONFIG_USB_UAS" . m)
             ("CONFIG_USB_HID" . m)
             ("CONFIG_HID_GENERIC" . m)
             ("CONFIG_HID_APPLE" . m)
             ("CONFIG_DM_CRYPT" . m)
             ("CONFIG_CRYPTO_XTS" . m)
             ("CONFIG_CRYPTO_SERPENT" . m)
             ("CONFIG_CRYPTO_WP512" . m)
             ("CONFIG_NLS_ISO8859_1" . m)
             ("CONFIG_PATA_ACPI" . m)
             ("CONFIG_PATA_ATIIXP" . m)
             ("CONFIG_SCSI_ISCI" . m)
             ("CONFIG_VIRTIO_PCI" . m)
             ("CONFIG_VIRTIO_BALLOON" . m)
             ("CONFIG_VIRTIO_BLK" . m)
             ("CONFIG_VIRTIO_NET" . m)
             ("CONFIG_VIRTIO_CONSOLE" . m)
             ("CONFIG_HW_RANDOM_VIRTIO" . m)
             ("CONFIG_VIRTIO_RING" . m)
             ("CONFIG_VIRTIO" . m)
             ("CONFIG_VIRTIO_PCI_LIB_LEGACY" . m)
             ("CONFIG_VIRTIO_PCI_LIB" . m)
             ("CONFIG_SCSI_SAS_ATTRS" . m)
             ("CONFIG_SCSI_SAS_LIBSAS" . m)
             ("CONFIG_HID" . m)
             ;; Xenomai specific tweaks
             ("CONFIG_SCHED_MC_PRIO" . #f)
             ("CONFIG_CPU_FREQ" . #f)
             ("CONFIG_ACPI_PROCESSOR" . #f)
             ("CONFIG_CPU_IDLE" . #f)
             ("CONFIG_APM" . #f)
             ("CONFIG_INTEL_IDLE" . #f)
             ("CONFIG_INPUT_PCSPKR" . #f)
             ("CONFIG_COMPACTION" . #f)
             ("CONFIG_MIGRATION" . #f)
             ;; PCP customization
             ("CONFIG_XENO_DRIVERS_NET" . #t)
             ("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" . #t)
             ("CONFIG_CIFS" . m)
             ("CONFIG_CIFS_XATTR" . #t)
             ("CONFIG_CONSOLE_LOGLEVEL_DEFAULT" . "4")
             )
           (@@ (gnu packages linux) %default-extra-linux-options))

I was expecting to see a successful build of linux-modules this time
but, instead, I've obtained another fail, this time due to module
"isci" being not present.
Funny thing is that module isci is produced with CONFIG_SCSI_ISCI,
which is present in my config list!
I've stopped the kernel build after the config phase and I've
inspected the resulting .config file. There's no evidence of
CONFIG_SCSI_ISCI in there, not even "# CONFIG_SCSI_ISCI is not set".
It's not clear why this happens with my custom build and not with linux-libre...
Can you help me debug this issue?
Moreover, where is created the list of module required by "linux-modules" ?

Regards

On Tue, Jan 17, 2023 at 9:22 AM dabbede@gmail.com <dabbede@gmail.com> wrote:
>
> Dear community,
>
> I am trying to create a package for linux-xenomai (see previous thread
> "Creating a package
> using two sources/origins").
> Thank to your help I managed to successfully build the (patched)
> kernel, but when I start a
> "guix system reconfigure" to adopt linux-xenomai in my setup the
> system build fails while
> building linux-modules (and also grub, raw-initrd and init which depends on it).
>
> This is the build log:
> ------------------------------------------------------------------------------------
> Backtrace:
>            6 (primitive-load "/gnu/store/m0kd924mhb1bl6wn384gpcss29w?")
> In ice-9/eval.scm:
>     619:8  5 (_ #f)
>    626:19  4 (_ #<directory (guile-user) 7ffff5fdbc80>)
>    293:34  3 (_ #(#<directory (guile-user) 7ffff5fdbc80> #<procedu?>))
> In srfi/srfi-1.scm:
>    586:29  2 (map1 ("ahci" "usb-storage" "uas" "usbhid" "hid-gene?" ?))
>    586:17  1 (map1 ("usb-storage" "uas" "usbhid" "hid-generic" "h?" ?))
> In gnu/build/linux-modules.scm:
>     269:5  0 (_)
>
> gnu/build/linux-modules.scm:269:5: kernel module not found
> "usb-storage" "/gnu/store/r2f9wrf17ys0znnxmvmy31h1z8b2nvrv-linux-xenomai-5.4.228-5.4.228/lib/modules"
> -------------------------------------------------------------------------------------------------------
>
> The package is expecting to find kernel modules for "ahci",
> "usb-storage", "uas", "usbhid",
> "hid-generic" and I'm sure also many more (because I iterated the
> build by inserting these new
> config without success). Unfortunately the list (in the log) is
> truncated and I don't know how
> many we need.
> My questions are these:
> 1. can you point me to the full list of modules required?
> 2. if they are needed, why those modules are not inserted in
> %default-extra-linux-options?
>
> Regards,
>    Davide


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: List of modules required by linux-modules
  2023-01-26 18:57 ` dabbede
@ 2023-01-27  9:31   ` Tobias Geerinckx-Rice
  2023-01-27 21:34     ` dabbede
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2023-01-27  9:31 UTC (permalink / raw)
  To: dabbede@gmail.com; +Cc: help-guix

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

Hi,

dabbede@gmail.com 写道:
> I've stopped the kernel build after the config phase and I've
> inspected the resulting .config file. There's no evidence of
> CONFIG_SCSI_ISCI in there, not even "# CONFIG_SCSI_ISCI is not 
> set".

CONFIG_SCSI_ISCI depends on CONFIG_SCSI_LOWLEVEL.  Is it set?

That's the only possibility I see, apart from the obvious 
CONFIG_SCSI.

Otherwise, share your (Guix-generated, final) .config.

> It's not clear why this happens with my custom build and not 
> with linux-libre...
> Can you help me debug this issue?
> Moreover, where is created the list of module required by 
> "linux-modules" ?

I'm confused by your explicit reference to 
gnu/build/linux-modules[.scm], which provides a set of mechanisms 
to work with modules.  It *should* not set policies or ‘require’ 
any ones in particular.  Does it?

Do you mean ‘%base-initrd-modules’ in 
<https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/linux-initrd.scm#n342>?

This static list can be frustrating, but we can easily remove 
elements from it or even replace it entirely:

  (operating-system
    …
    (initrd-modules
      ((@ (rnrs lists) remove) "isci" %base-initrd-modules))
    …)

What I suggest you do instead (because it's what I do to my 
kernels :-) is simply ship a ‘%xenomai-initrd-modules’ variable 
along with your ‘xenomai-linux’ package, keep them in perfect 
harmony yourself, and ask users to use both.

Kind regards,

T G-R

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: List of modules required by linux-modules
  2023-01-27  9:31   ` Tobias Geerinckx-Rice
@ 2023-01-27 21:34     ` dabbede
  0 siblings, 0 replies; 4+ messages in thread
From: dabbede @ 2023-01-27 21:34 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: help-guix

Yes yes yes!
That's the tip I was hoping for! I've missed CONFIG_SCSI_LOWLEVEL
because I was looking for answers here:
https://cateee.net/lkddb/web-lkddb/SCSI_ISCI.html.
It's the first time that that database gives me wrong information...
Conversely, this website is correct:
https://www.kernelconfig.io/config_scsi_isci?q=&kernelversion=5.4.230&arch=x86.

And for the module list, I was blaming linux-module.scm because the
system reconfigure was failing at that point. Looking in the code I
knew that the list was generated elsewhere, but I couldn't find where,
nor how it is passed to linux-modules... I admit I've just wet my toe
in Guix (and guile programming) and the codebase is huge...

Thank you very much. Now my system reconfigure ended correctly! Time
for latency tests... :-D

On Fri, Jan 27, 2023 at 11:07 AM Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>
> Hi,
>
> dabbede@gmail.com 写道:
> > I've stopped the kernel build after the config phase and I've
> > inspected the resulting .config file. There's no evidence of
> > CONFIG_SCSI_ISCI in there, not even "# CONFIG_SCSI_ISCI is not
> > set".
>
> CONFIG_SCSI_ISCI depends on CONFIG_SCSI_LOWLEVEL.  Is it set?
>
> That's the only possibility I see, apart from the obvious
> CONFIG_SCSI.
>
> Otherwise, share your (Guix-generated, final) .config.
>
> > It's not clear why this happens with my custom build and not
> > with linux-libre...
> > Can you help me debug this issue?
> > Moreover, where is created the list of module required by
> > "linux-modules" ?
>
> I'm confused by your explicit reference to
> gnu/build/linux-modules[.scm], which provides a set of mechanisms
> to work with modules.  It *should* not set policies or ‘require’
> any ones in particular.  Does it?
>
> Do you mean ‘%base-initrd-modules’ in
> <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/linux-initrd.scm#n342>?
>
> This static list can be frustrating, but we can easily remove
> elements from it or even replace it entirely:
>
>   (operating-system
>     …
>     (initrd-modules
>       ((@ (rnrs lists) remove) "isci" %base-initrd-modules))
>     …)
>
> What I suggest you do instead (because it's what I do to my
> kernels :-) is simply ship a ‘%xenomai-initrd-modules’ variable
> along with your ‘xenomai-linux’ package, keep them in perfect
> harmony yourself, and ask users to use both.
>
> Kind regards,
>
> T G-R


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-27 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17  8:22 List of modules required by linux-modules dabbede
2023-01-26 18:57 ` dabbede
2023-01-27  9:31   ` Tobias Geerinckx-Rice
2023-01-27 21:34     ` dabbede

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.