cross compile kernel for tx2 with a error: can't find "dev.h"

I want to cross compile kernel-4.4(for tx2) on my X86 PC(ubuntu16.04),follow the article “Kernel Customization”,but I get a error:can’t find the “dev.h”.
what I have did is:


2.git checkout tegra-l45-r28.2

3.zcat /home/ml/config/gz > .config

4.make menuconfig,unchoose Tegra Audio Processing Engine(APE) present,let HZ=1000

5.make 0=$TEGRA_KERNEL_OUT zImage

and the error message is:

drivers/media/platform/tegra/camera/csi/csi.c:27:17: fatal error: dev.h: 没有那个文件或目录
#include “dev.h”
compilation terminated.
scripts/ recipe for target ‘drivers/media/platform/tegra/camera/csi/csi.o’ failed
make[6]: *** [drivers/media/platform/tegra/camera/csi/csi.o] Error 1
scripts/ recipe for target ‘drivers/media/platform/tegra/camera/csi’ failed
make[5]: *** [drivers/media/platform/tegra/camera/csi] Error 2
scripts/ recipe for target ‘drivers/media/platform/tegra/camera’ failed
make[4]: *** [drivers/media/platform/tegra/camera] Error 2
scripts/ recipe for target ‘drivers/media/platform/tegra’ failed
make[3]: *** [drivers/media/platform/tegra] Error 2
scripts/ recipe for target ‘drivers/media/platform’ failed
make[2]: *** [drivers/media/platform] Error 2
scripts/ recipe for target ‘drivers/media’ failed
make[1]: *** [drivers/media] Error 2
Makefile:973: recipe for target ‘drivers’ failed
make: *** [drivers] Error 2

when I search this file,I get :

ml@ml:~/mlKernel/kernel/kernel-4.4$ find -name “dev.h”

 which "dev.h" can use?

Did you follow all steps in “Building the NVIDIA Kernel”?

Thanks for your reply.

may be I missed some steps.

so I download the lastest L4T Documention,and followed the steps of "Manually Downloading and Expanding

Kernel Sources", now I can cross compile all the sources.

I have exactly the same problem. Does it mean that the sources one gets using a tarball and the sources one gets cloning the git repository are different for the same tag ?

I now have found that ./drivers/media/platform/tegra/camera/csi/Makefile references files outside of the linux sources tree :

ccflags-y += -I…/nvhost/drivers/video/tegra/host
ccflags-y += -I…/nvhost/include
ccflags-y += -Idrivers/video/tegra/camera
ccflags-y += -Idrivers/media/platform/tegra
ccflags-y += -Werror

obj-y += csi.o csi2_fops.o csi4_fops.o

What’s the reason for that ? It’s not expected for linux kernel sources to need external header files.

“” does download some files from outside of the kernel tree as subdirectories:

./ -k tegra-l4t-r28.2

This produces:

         ├── hardware
         │   └── nvidia...
         ├── kernel...
         │   ├── display
         │   ├── kernel-4.4
         │   ├── nvgpu
         │   ├── nvhost
         │   ├── nvmap
         │   ├── nvmap-t18x
         │   └── t18x

(however there is probably still going to be some step I don’t know about to get that particular file)

Or you can download the source from here: