Compile Kernel CAN module

Good Afternoon,

This issue might have been asked before, however I am unable to find an answer that supports my issue. I am trying to recompile the Jetson’s kernel and add some extra modules using make menuconfig.

I am using this tutorial:

I Use

make O=$TEGRA_KERNEL_OUT tegra12_defconfig

to create an configuration file.

then I use

make O=$TEGRA_KERNEL_OUT  menuconfig

to add in the extra modules that I want to be compiled,

However, I get this output when I try to compile the kernel

  Using /opt/JetPackTK1-1.1/Linux_for_Tegra/sources/kernel_source as source for kernel
  /opt/JetPackTK1-1.1/Linux_for_Tegra/sources/kernel_source is not clean, please run 'make mrproper'
  in the '/opt/JetPackTK1-1.1/Linux_for_Tegra/sources/kernel_source' directory.
make[1]: *** [prepare3] Error 1
make: *** [sub-make] Error 2

Does anybody know how I can perform this operation without contaminating the config file when running make menuconfig?

thank you ,


Simplify life. make mrproper to clean up, and on the running Jetson copy /proc/config.gz to your kernel tree, unpack it and rename as .config. Run make menuconfig and tell it to load .config whenever you want to start over. As long as you run the original kernel just copy /proc/config.gz back in, decompress, and name as .config whenever you want. Ignore all the complications of command line options unless cross-compiling. Even when cross compiling you can still copy the Jetson’s /proc/config.gz onto your host machine. Save a backup copy of that config.gz so you don’t have to always run the Jetson to get a copy.