Skip to content

Missing kconfig in linux-headers when compiling kernel module (after 5.x) #56

@ecrin4102

Description

@ecrin4102

Since the kernel version 5.x, linux headers seems to not have all of files needed to build a kernel module. I have tried 3 versions 5.10.168-ti-rt-r79, 6.1.80-ti-rt-r34, 6.1.83-ti-rt-r35 with different way to install headers:

  • With "sudo apt install linux-headers-x.x.xx-ti-rt-rxx"
  • With build_deb.sh
  • With insmod kheader

After that, if I compile my kernel module with:
sudo make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

I get this error:

make -C /lib/modules/6.1.83-ti-rt-r35/build M= modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.83-ti-rt-r35'
  SYNC    include/config/auto.conf.cmd
can't find file Kconfig
make[3]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
make[2]: *** [Makefile:703: syncconfig] Error 2
make[1]: *** [Makefile:804: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.83-ti-rt-r35'
make: *** [Makefile:7: module] Error 2

The content of /usr/src/linux-headers-xxxxx is indeed almost empty:

ls /usr/src/linux-headers-6.1.83-ti-rt-r35/
arch  include  Makefile  Module.symvers  scripts

Compare to a kernel which works:

ls /usr/src/linux-headers-4.19.94-ti-rt-r74/
arch   crypto         firmware  init     kernel    mm              samples   sound  virt
block  Documentation  fs        ipc      lib       Module.symvers  scripts   tools
certs  drivers        include   Kconfig  Makefile  net             security  usr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions