# Compile Kernel CAN module 

**URL:** <https://forums.developer.nvidia.com/t/compile-kernel-can-module/37965>\
**Category:** Jetson TK1\
**Created:** [May 13, 2015, 5:28pm UTC](https://forums.developer.nvidia.com/t/compile-kernel-can-module/37965 "2015-05-13T17:28:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael1991j](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@michael1991j](https://forums.developer.nvidia.com/u/michael1991j)\
**Post date:** [May 13, 2015, 5:28pm UTC](https://forums.developer.nvidia.com/t/compile-kernel-can-module/37965/1 "2015-05-13T17:28:20Z")

</div>

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:  
[http://jetson.co/doc/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide/l4t\_developers\_guide.html#wwpID0E0AD0HA](http://jetson.co/doc/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide/l4t_developers_guide.html#wwpID0E0AD0HA)

I Use

```auto
make O=$TEGRA_KERNEL_OUT tegra12_defconfig

```

to create an configuration file.

then I use

```auto
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

```auto
make O=$TEGRA_KERNEL_OUT zImage
  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 ,

michael

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [May 13, 2015, 5:51pm UTC](https://forums.developer.nvidia.com/t/compile-kernel-can-module/37965/2 "2015-05-13T17:51:04Z")

</div>

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.
