Compiling kernel from git failure(s)

I’m attempting to compile the Nano’s kernel from git. I’ve done

git clone git clone git://
git checkout -b l4t-r32.1-4.9 origin/l4t/l4t-r32.1-4.9
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tegra_gnu_linux_defconfig

And it fails.

HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/
  HOSTLD  scripts/kconfig/conf
drivers/net/ethernet/nvidia/Kconfig:30: can't open file "drivers/net/ethernet/nvidia/eqos/Kconfig"
make[1]: *** [scripts/kconfig/Makefile:113: tegra_gnu_linux_defconfig] Error 1
make: *** [Makefile:565: tegra_gnu_linux_defconfig] Error 2

It appears that the eqos network driver was moved out to its own git repo, but the line

source "drivers/net/ethernet/nvidia/eqos/Kconfig"

was left in


Removing that line, leads to

arch/arm64/Kconfig:1235: can't open file "drivers/firmware/tegra/Kconfig"
make[1]: *** [scripts/kconfig/Makefile:113: tegra_gnu_linux_defconfig] Error 1
make: *** [Makefile:565: tegra_gnu_linux_defconfig] Error 2

Which, that folder doesn’t seem to exist in the git repository.

Removing that as well, leads to…

kernel/fork.c:81:10: fatal error: linux/tegra_profiler.h: No such file or directory

Attempting to just build the dtbs leads to…

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs
  CHK     scripts/mod/devicetable-offsets.h
cp -u   arch/arm64/boot/dts/
cp: missing destination file operand after 'arch/arm64/boot/dts/'
Try 'cp --help' for more information.
make[1]: *** [arch/arm64/boot/dts/Makefile:136: dtbs] Error 1
make: *** [arch/arm64/Makefile:154: dtbs] Error 2

A quick grep to see what we’re attempting to copy shows…

arch/arm64/boot/dts/Makefile:   cp -u $(DTB_OBJS) $(DTBO_OBJS) arch/arm64/boot/dts/

Maybe I’m going about this completely wrong, since I’m not using the public tarball (I’ve downloaded it, but again, running the normal

make defconfig && make

doesn’t work there either)

Why are there so many hoops to jump through for something as basic as building a kernel?

1 Like

As a side note, it appears that is currently down, so I can’t browse the git repositories there.

Take a look at that is installed in the host when you install the Jetpack. Nvidia utilizes numerous repositories for building the kernel. Instead of their script I prefer to pull in their code using git submodules. Anyhow, that script has the repositories you’ll need along with the directory structure that they use for building.

1 Like

Hello @Steev,

The site is now back up and running. Thanks for bringing to our attention.


the below wont work since recent, as it seems to me:

sudo su
cd /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9
make modules_prepare