Welcome! Log In Create A New Profile

Advanced

Install kernel headers

Posted by damsma 
Install kernel headers
June 01, 2021 03:48PM
How can i install the kernel headers?

Preparing to compile for kernel version 4.4.0
File not found: /lib/modules/4.4.0-kirkwood-tld-1/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4.

or maybe i am missing something?

done this allready;

cd /boot
dpkg -i linux-headers-4.4.0-kirkwood-tld-1_1.0_armel.deb

root@debian:/boot# apt-get install linux-headers-$(uname -r) 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-4.4.0-kirkwood-tld-1 is already the newest version (1.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Re: Install kernel headers
June 15, 2021 12:25PM
the whole "build" directory is missing
root@debian:/lib/modules/5.2.9-kirkwood-tld-1# ls -la
total 2512
drwxr-xr-x  3 root root   4096 Aug 24  2019 .
drwxr-xr-x  3 root root   4096 Jun 15 10:21 ..
drwxr-xr-x 11 root root   4096 Aug 24  2019 kernel
-rw-r--r--  1 root root 598299 Aug 24  2019 modules.alias
-rw-r--r--  1 root root 600020 Aug 24  2019 modules.alias.bin
-rw-r--r--  1 root root   7192 Aug 17  2019 modules.builtin
-rw-r--r--  1 root root   9679 Aug 24  2019 modules.builtin.bin
-rw-r--r--  1 root root  51156 Aug 17  2019 modules.builtin.modinfo
-rw-r--r--  1 root root 242316 Aug 24  2019 modules.dep
-rw-r--r--  1 root root 337756 Aug 24  2019 modules.dep.bin
-rw-r--r--  1 root root    259 Aug 24  2019 modules.devname
-rw-r--r--  1 root root  87089 Aug 17  2019 modules.order
-rw-r--r--  1 root root    468 Aug 24  2019 modules.softdep
-rw-r--r--  1 root root 262867 Aug 24  2019 modules.symbols
-rw-r--r--  1 root root 330148 Aug 24  2019 modules.symbols.bin
root@debian:/lib/modules/5.2.9-kirkwood-tld-1# 
Re: Install kernel headers
June 15, 2021 12:29PM
ok.. figured it out

root@debian:/lib/modules/5.2.9-kirkwood-tld-1# ln -s /usr/src/linux-headers-5.2.9-kirkwood-tld-1 build
Re: Install kernel headers
June 15, 2021 03:45PM
damsma,

Glad you've figured it out! This was a bug in the Debian build scripts in previous kernel. So when you upgrade the kernel to the latest, you won't need to do this anymore.

Quote

Updated 06 Oct 2019:

Kernel linux-5.3.2-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- This kernel is now configured to run with Kirkwood boxes up to 2GB RAM.
- Updated Dell Kace M300 DTS.
- This kernel header now can be installed and used to build cryptodev module, without any special tweaks.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Install kernel headers
June 19, 2021 10:45AM
bodhi,

how can i fix that?

root@debian:/lib/modules/5.12.6-kirkwood-tld-1/build# make menuconfig
  UPD     scripts/kconfig/mconf-cfg
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTLD  scripts/kconfig/mconf
can't find file Kconfig
make[1]: *** [scripts/kconfig/Makefile:34: menuconfig] Error 1
make: *** [Makefile:602: menuconfig] Error 2

there are some files missing in the new 5.12.6 kernel headers:
root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1# ls -la
total 1268
drwxr-xr-x  23 root root   4096 Jun 19 08:47 .
drwxr-xr-x   4 root root   4096 Jun 19 08:47 ..
-rw-r--r--   1 root root 165790 Aug 17  2019 .config
-rw-r--r--   1 root root    563 Aug 16  2019 Kconfig
-rw-r--r--   1 root root  60262 Aug 16  2019 Makefile
-rw-r--r--   1 root root 954857 Aug 17  2019 Module.symvers
drwxr-xr-x  27 root root   4096 Jun 19 08:47 arch
drwxr-xr-x   3 root root   4096 Jun 19 08:47 block
drwxr-xr-x   2 root root   4096 Jun 19 08:47 certs
drwxr-xr-x   4 root root   4096 Jun 19 08:47 crypto
drwxr-xr-x   9 root root   4096 Jun 19 08:47 debian
drwxr-xr-x 139 root root   4096 Jun 19 08:47 drivers
drwxr-xr-x  73 root root   4096 Jun 19 08:47 fs
drwxr-xr-x  31 root root   4096 Jun 19 08:47 include
drwxr-xr-x   2 root root   4096 Jun 19 08:47 init
drwxr-xr-x   2 root root   4096 Jun 19 08:47 ipc
drwxr-xr-x  17 root root   4096 Jun 19 08:47 kernel
drwxr-xr-x  15 root root   4096 Jun 19 08:47 lib
-rw-r--r--   1 root root      4 Aug 17  2019 linux-headers.revision
drwxr-xr-x   3 root root   4096 Jun 19 08:47 mm
drwxr-xr-x  70 root root   4096 Jun 19 08:47 net
drwxr-xr-x  28 root root   4096 Jun 19 08:47 samples
drwxr-xr-x  15 root root  12288 Jun 19 08:47 scripts
drwxr-xr-x  11 root root   4096 Jun 19 08:47 security
drwxr-xr-x  26 root root   4096 Jun 19 08:47 sound
drwxr-xr-x  29 root root   4096 Jun 19 08:47 tools
drwxr-xr-x   2 root root   4096 Jun 19 08:47 usr
drwxr-xr-x   4 root root   4096 Jun 19 08:47 virt
root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1# ls -la ../linux-headers-5.12.6-kirkwood-tld-1/
total 1324
drwxr-xr-x  5 root root    4096 Jun 19 08:42 .
drwxr-xr-x  4 root root    4096 Jun 19 08:47 ..
-rw-r--r--  1 root root  182963 Jun 19 08:42 .config
-rw-r--r--  1 root root   66286 May 22 02:43 Makefile
-rw-r--r--  1 root root 1071172 May 22 16:42 Module.symvers
drwxr-xr-x  3 root root    4096 Jun 19 04:35 arch
drwxr-xr-x 31 root root    4096 Jun 19 04:36 include
drwxr-xr-x 17 root root   12288 Jun 19 04:36 scripts

edit:
followed it down till 5.5.1 -> 5.5.1 is ok
the missing files starts on the 5.6.5 release


root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1# ls -la ../linux-headers-5.6.5-kirkwood-tld-1/
total 1228
drwxr-xr-x  4 root root    4096 Jun 19 09:56 .
drwxr-xr-x 12 root root    4096 Jun 19 09:56 ..
-rw-r--r--  1 root root  174789 Apr 17  2020 .config.dpkg-new
-rw-r--r--  1 root root   60410 Apr 17  2020 Makefile.dpkg-new
-rw-r--r--  1 root root 1002370 Apr 17  2020 Module.symvers.dpkg-new
drwxr-xr-x  3 root root    4096 Jun 19 09:56 arch
drwxr-xr-x  9 root root    4096 Jun 19 09:56 include
root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1# ls -la ../linux-headers-5.6.5-kirkwood-tld-1/
total 1228
drwxr-xr-x  4 root root    4096 Jun 19 09:56 .
drwxr-xr-x 12 root root    4096 Jun 19 09:56 ..
-rw-r--r--  1 root root  174789 Apr 17  2020 .config.dpkg-new
-rw-r--r--  1 root root   60410 Apr 17  2020 Makefile.dpkg-new
-rw-r--r--  1 root root 1002370 Apr 17  2020 Module.symvers.dpkg-new
drwxr-xr-x  3 root root    4096 Jun 19 09:56 arch
drwxr-xr-x 14 root root    4096 Jun 19 09:56 include
root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1# ls -la ../linux-headers-5.5.1-kirkwood-tld-1/
total 1320
drwxr-xr-x  23 root root    4096 Jun 19 09:48 .
drwxr-xr-x  12 root root    4096 Jun 19 09:56 ..
-rw-r--r--   1 root root  173805 Feb  1  2020 .config
drwxr-xr-x  10 root root    4096 Jun 19 09:48 Documentation
-rw-r--r--   1 root root     595 Feb  1  2020 Kconfig
-rw-r--r--   1 root root   60841 Feb  1  2020 Makefile
-rw-r--r--   1 root root 1006549 Feb  1  2020 Module.symvers
drwxr-xr-x  27 root root    4096 Jun 19 09:48 arch
drwxr-xr-x   3 root root    4096 Jun 19 09:48 block
drwxr-xr-x   2 root root    4096 Jun 19 09:48 certs
drwxr-xr-x   4 root root    4096 Jun 19 09:48 crypto
drwxr-xr-x 137 root root    4096 Jun 19 09:48 drivers
drwxr-xr-x  76 root root    4096 Jun 19 09:48 fs
drwxr-xr-x  30 root root    4096 Jun 19 09:48 include
drwxr-xr-x   2 root root    4096 Jun 19 09:48 init
drwxr-xr-x   2 root root    4096 Jun 19 09:48 ipc
drwxr-xr-x  17 root root    4096 Jun 19 09:48 kernel
drwxr-xr-x  19 root root    4096 Jun 19 09:48 lib
drwxr-xr-x   3 root root    4096 Jun 19 09:48 mm
drwxr-xr-x  70 root root    4096 Jun 19 09:48 net
drwxr-xr-x  29 root root    4096 Jun 19 09:48 samples
drwxr-xr-x  15 root root   12288 Jun 19 09:48 scripts
drwxr-xr-x  12 root root    4096 Jun 19 09:48 security
drwxr-xr-x  26 root root    4096 Jun 19 09:48 sound
drwxr-xr-x  30 root root    4096 Jun 19 09:48 tools
drwxr-xr-x   3 root root    4096 Jun 19 09:48 usr
drwxr-xr-x   4 root root    4096 Jun 19 09:48 virt
root@debian:/usr/src/linux-headers-5.2.9-kirkwood-tld-1#



Edited 2 time(s). Last edit at 06/19/2021 11:59AM by damsma.
Re: Install kernel headers
June 19, 2021 04:02PM
damsma,

> make menuconfig

Not menuconfig.

cd to the source directory and run
make

> there are some files missing in the new 5.12.6
> kernel headers

Usually the kernel config changes overtime when I add/remove or move a loadable module to in-kernel module (so it always run during kernel start up), or move an in-kernel module back to loadable module (if it is something not popularly used).

So comparing an old kernel to a newer one, many versions removed, is not really good way to check something. You just either builld an out-of-tree module and see if you can. Or look for something with find command.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Install kernel headers
June 21, 2021 11:00AM
bodhi,

i will stick with 5.5.1. everything i wanted works there.

thank you for your support!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: