Jetson Nano kernel build error

Hello, forums

I got kernel build error on Jetson Nano,The L4T version runing on my Nano is “# R32 (release), REVISION: 3.1, GCID: 18186506, BOARD: t210ref, EABI: aarch64, DATE: Tue Dec 10 06:58:34 UTC 2019”.
And I download the Nano L4T source from DLC “L4T Jetson Nano R32.3.1 Sources”, build the /source/public/kernel/kernel-4.9 use Nano itself no cross-compile here.

The error log:build-err.log (15.5 KB)

How to solve this build issue?

I would start by verifying the config you used is valid, e.g., it came from tegra_defconfig or a copy of the running system’s /proc/config.gz. I imagine you made some edit of config, otherwise you would likely not be interested in building a new kernel. If the config edit was not from an editor such as “make nconfig” or “make menuconfig”, then dependencies were probably not accounted for.

Then you may want to check the docs for this kernel release and see if the compiler version is an issue. Some of the newer compilers are actually too new. Once you know starting config and compiler version are valid, then you can move on to specific debugging.

Hello, linuxdev
There is no config or other code edit in my kernel build,just test if the nano kernel source code build success on nano itself.
Maybe this error is caused by gcc version,other topic says the recommended version is gcc-linaro-7.3.1-2018.05,but nano’s gcc version is 7.4.
The cross-compile is succeed on my x86_64 host pc with toolchain gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.

Thanks.

Assuming it is not a configuration issue I believe the compiler release version is likely the issue. Someone at NVIDIA may need to verify if the Nano’s native compiler is too recent (at least for that kernel feature).

You might want to add more details for “there is no config or other code edit”. Specifically, what configuration was set at the moment compile started? For example, “make tegra_defconfig”.

yes linuxdev,

I use tegra_defconfig as .config to build nano kernel.

Hello suchb,

We compile our Jetson NANO builds on the NANO itself with our CONFIG_ options on top of the tegra_defconfig (and/or /proc/config.gz) file. The code that you are failing at is because of the missing CONFIG_DMA_CMA in your .config.

Can you please share the steps you are following in order to build the kernel?

Hi AnishAney,

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fkernel_custom.html%23wwpID0E02C0HA

I think this 32.3.1 release developer guide should provide standard and correct steps to build a kernel. I am not sure if the error caused by this CONFIG_DMA_CMA config, because I do the same steps the build work is succeeded on my x64 hostpc. And Developer Guide not mentioned CONFIG_DMA_CMA.

Hello suchb,

The Developer Guide need not mention anything about CONFIG_DMA_CMA because the arch/arm64/configs/tegra_defconfig has CONFIG_DMA_CMA=y.

Is it the same source tarball on both, Jetson NANO and x86 system? Also, please compare the .config files that’s being created on both systems.

My reason for mentioning CONFIG_DMA_CMA was because of the error. All the three functions in question have been defined but used only once and under #ifdef CONFIG_DMA_CMA/#else/#endif.

1 Like

Thanks for your info AnishAney.
I will check the .config on Nano and x86 system.