I’m attempting to compile the Nano’s kernel from git. I’ve done
git clone git clone git://nv-tegra.nvidia.com/linux-4.9
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/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
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
drivers/net/ethernet/nvidia/Kconfig
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?