You are not logged in.

#1 2019-10-08 16:37:46

otaj
Member
Registered: 2019-10-08
Posts: 7

how to compile thunderbolt module with localmodconfig?

Hi,

I compile my own kernel and wanted to start using modprobed-db and localmodconfig in order to reduce compile times.

However, when I do it, thunderbolt config is not found and thunderbolt is not compiled (when I use this own-compiled kernel, thunderbolt is not working at all).

It also asks me for a lot (4) of modules, which are marked as NEW, and I have to disable them manually, even though I haven't asked them at all.

$ makepkg -fsri
==> Making package: linux-zen 5.3.5.zen1-1 (Tue 08 Oct 2019 18:31:08 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating zen-kernel git repo...
Fetching origin
  -> Found config
  -> Found 60-linux.hook
  -> Found 90-linux.hook
  -> Found linux.preset
==> Validating source files with sha256sums...
    zen-kernel ... Skipped
    config ... Passed
    60-linux.hook ... Passed
    90-linux.hook ... Passed
    linux.preset ... Passed
==> Verifying source file signatures with gpg...
    zen-kernel git repo ... Passed
==> Extracting sources...
  -> Creating working copy of zen-kernel git repo...
Cloning into 'zen-kernel'...
done.
Updating files: 100% (64624/64624), done.
Updating files: 100% (13306/13306), done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
  -> Setting version...
  -> Setting config...
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.h
  HOSTCC  scripts/kconfig/lexer.lex.o
  YACC    scripts/kconfig/parser.tab.c
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
using config: '.config'
thunderbolt config not found!!
*
* Restart config...
*
*
* PCI GPIO expanders
*
AMD 8111 GPIO driver (GPIO_AMD8111) [N/m/y/?] n
BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW) 

The asked modules are GPIO_BT8XX, VIDEO_ADV7511, SND_SE6X, SND_SOC_INTEL_BAYTRAIL.

I probably do something wrong, since I slightly modified the PKGBUILD, but I believe, that my modifications only remove documentation, nothing else.
I also modified config, but only to use CONFIG_MNATIVE=y and CONFIG_X86_MCELOG_LEGACY=y, otherwise it is default config used by linux-zen package.

Thanks for any help on this, I would really like to cut down the compile times, however not using thunderbolt is not an option.

Last edited by otaj (2019-10-08 16:39:05)

Offline

#2 2019-10-08 17:13:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: how to compile thunderbolt module with localmodconfig?

The key is having the modules available the first time you populate your database, so first boot into the Arch kernel.  Make sure the thunderbolt and whatever other modules you need are in fact loaded, then run `modprobed-db s` to pick them up.  Now you can compile your custom kernel.  As stated in the man page, modify your PKGBUILD to call recall mode to localmodconfig:

man modprobed-db wrote:

3. When building a kernel, simply define the LSMOD variable to the database ($XDG_CONFIG_HOME/modprobed-db) in the make step:
  make LSMOD=$HOME/.config/modprobed.db localmodconfig

That should do what you need.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2019-10-08 17:34:13

otaj
Member
Registered: 2019-10-08
Posts: 7

Re: how to compile thunderbolt module with localmodconfig?

graysky wrote:

The key is having the modules available the first time you populate your database, so first boot into the Arch kernel.  Make sure the thunderbolt and whatever other modules you need are in fact loaded, then run `modprobed-db s` to pick them up.  Now you can compile your custom kernel.  As stated in the man page, modify your PKGBUILD to call recall mode to localmodconfig:

man modprobed-db wrote:

3. When building a kernel, simply define the LSMOD variable to the database ($XDG_CONFIG_HOME/modprobed-db) in the make step:
  make LSMOD=$HOME/.config/modprobed.db localmodconfig

That should do what you need.

Well, that's already what I tried - I am compiling from linux-zen, which is compiled by myself without localmodconfig.
However, with localmodconfig, thunderbolt is available when I compile, but it complains, that it does cannot find config for thunderbolt. The errors posted above were from the kernel, where thunderbolt is available (and works).

If it helps, in BIOS I have BIOS support for thunderbolt disabled and thunderbolt security mode set to User

Last edited by otaj (2019-10-08 17:35:12)

Offline

#4 2019-10-08 17:38:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: how to compile thunderbolt module with localmodconfig?

Boot into an Arch kernel (one you did not compile), make sure your thunderbolt stuff orks, then post the output of `lsmod` to this thread.  Also post the output of `modprobed-db l` to this thread.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2019-10-08 17:43:11

otaj
Member
Registered: 2019-10-08
Posts: 7

Re: how to compile thunderbolt module with localmodconfig?

graysky wrote:

Boot into an Arch kernel (one you did not compile), make sure your thunderbolt stuff orks, then post the output of `lsmod` to this thread.  Also post the output of `modprobed-db l` to this thread.

Alright, will do that tomorrow, since the only thunderbolt device I use is at work and I'm out already.

Offline

#6 2019-10-09 07:56:32

otaj
Member
Registered: 2019-10-08
Posts: 7

Re: how to compile thunderbolt module with localmodconfig?

Official Arch kernel (package linux, linux-headers)

lsmod: https://pastebin.com/Fj9DDctx
modprobed-db l: https://pastebin.com/uxEGCQB3

EDIT: Forgot to mention, that the issue does persist even when booted in official kernel  - thunderbolt config not found, 4 kernel modules are asked.

Last edited by otaj (2019-10-09 16:41:47)

Offline

#7 2019-10-09 18:48:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: how to compile thunderbolt module with localmodconfig?

I don't think this is the fault of modprobed-db but of the make localmodconfig target.  You seem to have the same thunderbolt* entries in the database as you did when you booted to the kernel.  I guess you should email Steven Rostedt and report the issue or perhaps there is a more official method?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2019-10-10 19:12:50

otaj
Member
Registered: 2019-10-08
Posts: 7

Re: how to compile thunderbolt module with localmodconfig?

Should I just email him directly? Post to the main mailing list? Fill a bug in BugZilla? What is the preferred procedure of filing bugs against the upstream kernel? Thanks

Offline

#9 2020-04-09 11:29:41

deisi
Member
Registered: 2015-10-21
Posts: 66

Re: how to compile thunderbolt module with localmodconfig?

I run into the same. Has there anything ever been reported?

Offline

#10 2020-04-27 20:35:39

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: how to compile thunderbolt module with localmodconfig?

I had the same problem and could solve it, see here. In fact localmodconfig/modprobed-db doesn' work for thunderbolt. as far as I understand, the reason is, that "thunderbolt" in the kernel config in not called "thunderbolt" but "usb4" (set "config_usb4=y"); only the compiled module is called "thunderbolt"!

Offline

#11 2020-04-27 20:38:41

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: how to compile thunderbolt module with localmodconfig?

Offline

#12 2020-04-28 08:27:35

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: how to compile thunderbolt module with localmodconfig?

Thanks loqs!
Given the time it took me to sort this one out I cannot but find almost ironic this passage:

to help people to find the correct option if they want to enable USB4.

I guess the proportion of people looking for thunderbolt compared to those looking for usb4 is clear, at least for now! :-)

Last edited by gen2arch (2020-04-28 10:56:41)

Offline

Board footer

Powered by FluxBB