Make menuconfig

Hello, I encountered a problem when compiling R35.1, and I need your help, thank you.
I followed the “Manually Downloading and Expanding Kernel Sources” in the operation manual, unpacked the source code file, and compiled the source code with the following command:

make ARCH=arm64 O=$PWD/kernel_out tegra_defconfig
make ARCH=arm64 O=$PWD/kernel_out -j8

But when the “make menuconfig ” command is used in the kernel_out directory, an error is reported.

drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"

1 Like

Did you check the “drivers/video/tegra/Kconfig” is in the kernel_out/ ?

Did you run below command in …/kernel/kernel-5.10/?

Executed in the target file directory generated by source code compilation.
That is, under the “$PWD/kernel_out” directory

Please run the command at …/kernel/kernel-5.10 for it

It can run successfully in this directory. What is the reason? Shouldn’t I run make menuconfig in the “$PWD/kernel_out” directory to generate different kernel image files?

Could you check if there is a kernel_out or out folder in …/kernel/kernel-5.10 ?

No, I created the kernel_out folder separately. But to execute make menuconfig under the corresponding kernel_out folder, there will be the above alarm. Execute make menuconfig in the kernel-5.10 directory, but there is no .config file in the kernel-5.10 directory. So, when make menuconfig is executed under kernel-5.10, which .config file is called?

This step creates a .config in the “$PWD/kernel_out”:
make ARCH=arm64 O=$PWD/kernel_out tegra_defconfig

Then this step edits the “.config” in “$PWD/kernel_out”:
make ARCH=arm64 O=$PWD/kernel_out menuconfig

Note that if there is a complaint about:
drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"
…then it is missing in the source. This should not occur and would not be related to any of your commands. This would probably be an incorrect source download of some sort.

I downloaded the source code file in this interface, there should be no problem

Hello, I just tested it. Using the command you gave, execute “make ARCH=arm64 O=$PWM/kernel_out menuconfig” in the /kernel/kernel-5.10 directory, and it can run successfully. But when I execute make menuconfig in the “$PWD/kernel_out” directory, an error is reported

Is that error the previously mentioned one which I quoted above? If so, from the kernel source top directory, does “drivers/video/tegra/” exist? If so, is there a Kconfig and Makefile in that directory? Is any of this owned by root and not readable without being root?

Incidentally, that is the correct download for the kernel source.

Yes, there is no tegra directory, only these files are in the video folder.
So is it a source code error? Can you check the source code file of R35.1.

I can verify the source code is missing the required content on this release, but has it on another release. However, if this was intended to be missing, then the Kconfig and Makefile would have required an update to prevent this. So I am thinking NVIDIA will likely need to update the source code download to include that directory.

What I did to confirm:

  • I downloaded from here:
  • I extracted just the kernel source via:
    tar xvfj public_sources.tbz2 Linux_for_Tegra/source/public/kernel_src.tbz2
  • I then went to subdirectory Linux_for_Tegra/source/public, and unpacked that:
    tar xvfj kernel_src.tbz2
  • From there:
    cd cd kernel/kernel-5.10/drivers/video/
  • I should have found “tegra/” (which would contain a Kconfig and Makefile, which it did contain in prior releases, and which current Kconfig still refers to), but did not. It is indeed missing.

So, can you please post the missing file and I will copy it to the corresponding source folder when I receive it

The “tegra” is at …/kernel/nvidia/drivers/video

snchen@snchen-HP:~/data/JEP/35.1/Linux_for_Tegra/source/public/kernel/nvidia/drivers/video$ l
backlight/  Kconfig  Makefile  tegra/

It sounds like the Kconfig of some feature in the main kernel might be looking in the wrong place.

If I go to “Linux_for_Tegra/source/public/kernel/kernel-5.10/drivers/video”, and examine Kconfig, I see:
source "drivers/video/tegra/Kconfig"
…but that is “in tree”, not “out of tree”. The “kernel/nvidia/drivers/video” is out of tree. So I think that Kconfig is wrong to search where it does rather than out of tree, unless there is another Kconfig and that particular one should not be set.

Really, so how can I solve this problem? I looked at other versions and found that there was no such problem

Hi @Yolomei , try this:

Delete your previously sources folder.
Replace Linux_for_Tegra/ with this one: Jetpack5.0.2 kernel compile error - #12 by ShaneCCC (I haven’t overwrited
Then run ./ and type jetson_35.1 when requested.
It shall create the sources folder.
Then retry with your make commands.

1 Like

Hello, this is a source file error, shouldn’t I modify the source file?