'sudo make' throws error in Jetson Xavier AGX

Hello ,

I use Jetson Xavier AGX, 4.9.201 tegra kernel on ubuntu 18.04.

In the directory “/usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9/”
I tried to run $sudo make without making any modifications.

The same error comes up.

abc@xyz:/usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9$ sudo make
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/net/ethernet/nvidia/Kconfig:30: can’t open file “drivers/net/ethernet/nvidia/eqos/Kconfig”
scripts/kconfig/Makefile:37: recipe for target ‘silentoldconfig’ failed
make[2]: *** [silentoldconfig] Error 1
Makefile:579: recipe for target ‘silentoldconfig’ failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/kernel.release’. Stop.

I couldnot identify the problems… Please do help.

abc@xyz:/usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9$ make --debug=b
GNU Make 4.1
Built for aarch64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles…
arch/arm64/Makefile:49: LSE atomics not supported by binutils
GNU Make 4.1
Built for aarch64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles…
Updating goal targets…
File ‘silentoldconfig’ does not exist.
File ‘scripts_basic’ does not exist.
Must remake target ‘scripts_basic’.
GNU Make 4.1
Built for aarch64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles…
Updating goal targets…
File ‘__build’ does not exist.
File ‘FORCE’ does not exist.
Must remake target ‘FORCE’.
Successfully remade target file ‘FORCE’.
Prerequisite ‘FORCE’ of target ‘scripts/basic/fixdep’ does not exist.
Must remake target ‘scripts/basic/fixdep’.
Successfully remade target file ‘scripts/basic/fixdep’.
Prerequisite ‘FORCE’ of target ‘scripts/basic/bin2c’ does not exist.
Must remake target ‘scripts/basic/bin2c’.
Successfully remade target file ‘scripts/basic/bin2c’.
Must remake target ‘__build’.
Successfully remade target file ‘__build’.
Successfully remade target file ‘scripts_basic’.
File ‘outputmakefile’ does not exist.
Must remake target ‘outputmakefile’.
Successfully remade target file ‘outputmakefile’.
File ‘FORCE’ does not exist.
Must remake target ‘FORCE’.
Successfully remade target file ‘FORCE’.
Must remake target ‘silentoldconfig’.
GNU Make 4.1
Built for aarch64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles…
Updating goal targets…
File ‘silentoldconfig’ does not exist.
File ‘FORCE’ does not exist.
Must remake target ‘FORCE’.
Successfully remade target file ‘FORCE’.
Prerequisite ‘FORCE’ of target ‘scripts/kconfig/conf.o’ does not exist.
Must remake target ‘scripts/kconfig/conf.o’.
Successfully remade target file ‘scripts/kconfig/conf.o’.
Prerequisite ‘FORCE’ of target ‘scripts/kconfig/zconf.tab.o’ does not exist.
Must remake target ‘scripts/kconfig/zconf.tab.o’.
Successfully remade target file ‘scripts/kconfig/zconf.tab.o’.
Prerequisite ‘FORCE’ of target ‘scripts/kconfig/conf’ does not exist.
Must remake target ‘scripts/kconfig/conf’.
Successfully remade target file ‘scripts/kconfig/conf’.
Must remake target ‘silentoldconfig’.
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/net/ethernet/nvidia/Kconfig:30: can’t open file “drivers/net/ethernet/nvidia/eqos/Kconfig”
scripts/kconfig/Makefile:37: recipe for target ‘silentoldconfig’ failed
make[2]: *** [silentoldconfig] Error 1
Makefile:579: recipe for target ‘silentoldconfig’ failed
make[1]: *** [silentoldconfig] Error 2
Updating goal targets…
File ‘_all’ does not exist.
File ‘all’ does not exist.
File ‘vmlinux’ does not exist.
File ‘vmlinux_prereq’ does not exist.
File ‘arch/arm64/kernel/vmlinux.lds’ does not exist.
File ‘init’ does not exist.
File ‘prepare’ does not exist.
File ‘vdso_prepare’ does not exist.
File ‘prepare0’ does not exist.
File ‘archprepare’ does not exist.
File ‘archheaders’ does not exist.
Must remake target ‘archheaders’.
Successfully remade target file ‘archheaders’.
File ‘archscripts’ does not exist.
Must remake target ‘archscripts’.
Successfully remade target file ‘archscripts’.
File ‘prepare1’ does not exist.
File ‘prepare2’ does not exist.
File ‘prepare3’ does not exist.
make: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/kernel.release’. Stop.

You wanna build a kernel?
Then, you need kernel source tree, dont’t you?

@MtHiker is correct. I’ll add that kernel headers are not full kernel source. Once you have source, then you also need to configure the source. When it comes time to compile, then you should also pick a specific make target, e.g., “make Image”, or “make modules_prepare; make modules”.

Hello,

Thank you so much. As I was new, i was not familiar with the steps. Now i understood the whole process and successfully rebuilt the kernel. Thank you for your support.
I just have one problem now.
Before rebuilding, i was able to connect to wifi. and now I am not able to connect to my wifi network.

It says that your kernel headers are incomplete/not installed.
please install kernel headers,including a .config file or use the KLIB/KLIB_BUILD make variables to set the kernel to build against, eg: make KLIB =/lib/modules/3.1.7/
to compile/install for the installed kernel 3.1.7(that isn’t corrently running

I use intel wireless AC 9260. It shows up in $lspci.

please help. Thanks in advance

cluster2-worker2@cluster2worker2-desktop:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package linux-headers-4.9.201
E: Couldn’t find any package by glob ‘linux-headers-4.9.201’
E: Couldn’t find any package by regex ‘linux-headers-4.9.201’
cluster2-worker2@cluster2worker2-desktop:~$ cd /usr
cluster2-worker2@cluster2worker2-desktop:/usr$ cd src
cluster2-worker2@cluster2worker2-desktop:/usr/src$ ll
total 36
drwxr-xr-x 9 root root 4096 8월 10 20:31 ./
drwxr-xr-x 12 root root 4096 8월 10 18:02 …/
drwxr-xr-x 6 root root 4096 8월 10 17:57 cudnn_samples_v8/
drwxr-xr-x 7 root root 4096 8월 10 18:07 jetson_multimedia_api/
drwxr-xr-x 25 root root 4096 8월 10 20:31 linux-headers-4.15.0-153/
drwxr-xr-x 7 root root 4096 8월 10 20:31 linux-headers-4.15.0-153-generic/
drwxr-xr-x 5 root root 4096 8월 6 16:35 linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/
drwxr-xr-x 3 root root 4096 8월 6 16:35 nvidia/
drwxr-xr-x 5 root root 4096 8월 10 18:00 tensorrt/
cluster2-worker2@cluster2worker2-desktop:/usr/src$ uname -a
Linux cluster2worker2-desktop 4.9.201 #1 SMP PREEMPT Tue Aug 10 22:46:25 KST 2021 aarch64 aarch64 aarch64 GNU/Linux
cluster2-worker2@cluster2worker2-desktop:/usr/src$ cd
cluster2-worker2@cluster2worker2-desktop:~$ cd /lib
cluster2-worker2@cluster2worker2-desktop:/lib$ cd modules
cluster2-worker2@cluster2worker2-desktop:/lib/modules$ ll
total 20
drwxr-xr-x 5 root root 4096 8월 10 22:53 ./
drwxr-xr-x 19 root root 4096 8월 10 17:46 …/
drwxr-xr-x 2 root root 4096 8월 10 20:31 4.15.0-153-generic/
drwxr-xr-x 3 root root 4096 8월 11 00:30 4.9.201/
drwxr-xr-x 4 root root 4096 8월 10 18:19 4.9.201-tegra/

It is unable to locate the headers. WHat could be the possible solution?

The above would indicate kernel source for kernel version 3.1.7, which is incredibly old, and not supported. You must use the source code for the exact release due to many dependencies. If you are trying to build part of a kernel for a specific feature/driver, then perhaps if the old driver is really that old, then there might be a “native” solution now which does not require external code (you’d need to know the name of the “new” feature which supersedes this, and then enable the kernel config to be an exact match to the existing kernel, followed by adding that single config (preferably as a module if it is allowed in that format).

I couldn’t personally tell you the name of the config for the Intel AC 9260, but there is a chance this needs firmware in addition to the driver, e.g., “sudo apt-get install linux-firmware”, or if it is already there, maybe freshen it with “sudo apt-get --reinstall linux-firmware”.

FYI, devices which are regulated differently depending on which part of the world you are in (e.g., radio devices) tend to be a single hardware design, but adapted to the region of the world via firmware which uploads to the device. If this were not the case, then the manufacturer would have to produce different hardware for every region of the world, and any change to regulations would imply throwing out the old hardware and manufacturing a new design.

I don’t know if this still applies, but I did see this bug report related to the 9260:
https://bugzilla.kernel.org/show_bug.cgi?id=201319
(I don’t have a 9260 and haven’t tried working with one; someone else may be able to comment)