Jetpack5.0.2 kernel compile error

drivers/video/Kconfig:27: can’t open file “drivers/video/tegra/Kconfig”

1 Like

Did you follow the document to compile the kernel?

I am facing a similar issue in compiling kernel with my own set of commands:

I populated the sources with the below command:
./ -k jetson_35.1


$ make ARCH=arm64 CROSS_COMPILE=<toolchain>/bin/aarch64-buildroot-linux-gnu- -C sources/kernel/kernel-5.10/ -o $PWD/kernel_out/ tegra_defconfig
make: Entering directory '<PATH>/Linux_for_Tegra/sources/kernel/kernel-5.10'
  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/[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"
make[1]: *** [scripts/kconfig/Makefile:89: tegra_defconfig] Error 1
make: *** [Makefile:633: tegra_defconfig] Error 2
make: Leaving directory '<PATH>/Linux_for_Tegra/sources/kernel/kernel-5.10'

The problem comes from:

$ grep -rn “drivers/video/tegra/Kconfig” sources/kernel/
sources/kernel/kernel-5.10/drivers/video/Kconfig:27:source “drivers/video/tegra/Kconfig”

But there is no directory named ‘tegra’
$ ls -l sources/kernel/kernel-5.10/drivers/video/tegra
ls: cannot access ‘sources/kernel/kernel-5.10/drivers/video/tegra’: No such file or directory

Please follow the document to compile the kernel. I just verify without problem.


We are encountering a similar issue. It seems what is being pulled by is missing the aforementioned files. They are however included in the public_sources.tbz2 kernel sources (kernel_src.tbz2 archive). Manually copying the contents of kernel/nvidia/ to the matching directory pulled by is our workaround.

Upon looking into it further, this just seems to be an issue with the ordering of SOURCE_INFO elements in

Specifically, since is cloned prior to, git obviously refuses to clone linux-nvidia into a non-empty directory. The easiest solution is to just patch such that linux-nvidia.git is cloned prior to the other repositories that will be entailed within it:

@@ -59,9 +59,9 @@ SCRIPT_NAME=`basename $0`
 # NOTE: *Add only kernel repos here. Add new repos separately below. Keep related repos together*

Alternatively, cd into nvidia directory, then:

git init
git remote add origin git://
git fetch --depth=1 origin jetson_35.1
git checkout FETCH_HEAD

Have a try this file to sync the source or download the public.tbz2 from download center. (11.0 KB) (3.7 KB)


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.