tk1 - build the kernel modules fails

Cross compile in host Ubuntu 14.04 64 bit

21.4 Release

export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
export TEGRA_KERNEL_OUT=~/k1/kernel_build
export ARCH=arm
make modules DESTDIR=~/k1/module_build

~/k1/kernel$ export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
~/k1/kernel$ export ARCH=arm
~/k1/kernel$ make modules DESTDIR=~/k1/module_build
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] error 1
make[1]: *** [silentoldconfig] error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make: *** [modules] Ошибка 1

Previously, the kernel build is successful.

I’m not sure about everything else, but the “.config” is the main configuration and it is comletely missing. It looks like you are on a 64-bit x86 host cross compiling for 32-bit Jetson TK1. If you look at a working TK1, there will be a file “/proc/config.gz”. This is a compressed version of a working configuration…you can copy this to your kernel source and gunzip it, then rename to “.config”. Any changes needed in kernel config can then be started with that config and whatever edits you want (e.g., “make menuconfig”).

Hi,

thank you very much for your reply!

I operate according to instructions in Tegra_Linux_Driver_Package_Documents_R21.4
chapter “Building the NVIDIA Kernel”

$ export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
$ export TEGRA_KERNEL_OUT=~/k1/kernel_build
$ export ARCH=arm

$ make O=$TEGRA_KERNEL_OUT tegra12_defconfig

At this stage creates a file of ~/k1/kernel_build/.config
it is identical to the file “/proc/config.gz” - I checked

Further I type

$ make O=$TEGRA_KERNEL_OUT zImage

– kernel build is successful!

make O=$TEGRA_KERNEL_OUT dtbs

– Ok!

$ make modules DESTDIR=~/k1/module_build

– fails :-(((

Yes of course.

If I copy the file .config to the kernel, the build module is successful, but the result is not clear where, DESTDIR is empty.

Please tell me the correct sequence for cross compiling modules.

Regards, Alex.

At the moment I’m in the process of upgrading my host from Fedora 19 to Fedora 23, and do not have my cross compile tools in yet, so I can’t actually test. What I’d look at is if DESTDIR is writable by you. Then I wonder if perhaps the .config is just in the wrong place. Have you tried manually placing the .config rather than using tegra12_defconfig?

Bumping this, I’m not set up to answer cross compile questions until I get my workstation upgrade finished and the thread was previously in the legacy forum.