so i'm trying to build the pengutronix root file system for the 6410. when i run ptxdist it's building away and then quits because it can't find an included header file. the include statement is: #include <linux/videodev.h> my PATH includes going to /usr/include. the header file is present at /usr/include/linux/videodev.h. i've been writing c/c++ for years, but am new to linux. i can't figure out why the preprocessor can't find this file. if i put in the fully-qualified pathname, it works. like this: #include </usr/include/linux/videodev.h> i know there's something obvious i'm missing, but it escapes me. any help is much appreciated!
include paths
If you are cross compiling don't, *don't*, *DON'T* use any file from your host. And "/usr/include/linux/videodev.h" is relevant for programs that should be run on your host, but *not* for your target Mini6410! The cross toolchain itself brings these headers in. Or, if you need the headers of a different kernel revision, you should use PTXdist feature to provide kernel headers of a specific kernel (but it must(!) match the revision of the used kernel at runtime). Enable the kernel headers in the 'menuconfig' Core (libc, locales) ---> <*> Linux kernel headers ---> --- Linux kernel headers (2.6.39) kernel version (1aab7a741abe08d42e8eccf20de61e05) kernel source md5sum After the next ptxdist go you will find these include headers in platform-mini6410/sysroot-target/kernel-headers/include/ Add this path with "-I" parameter to your Makefile or whatever you are using to build your own software. BTW: The job of PTXdist (like any other buildsystem) is to *avoid* any leakage of the host software and its configuration into the target system.
thanks, this gets me furthur. the v4l_id.c file has includes for videodev.h and videodev2.h. after following your instructions, the videodev2.h file turns up in the include directory, but not videodev.h. the build still doesn't complete. it's not an oversight, commenting out the videodev.h file include generates errors in the v4l_id.c build. why would the videodev.h file not be included in the directories?
It seems you are using a software for older kernels, as the "videodev.h" was removed in december 2010 with the following commit: $ git log -- include/linux/videodev.h commit 88ae7624a6fe890e5a8ca57b25420f66e1389f8b Author: Mauro Carvalho Chehab <mchehab@redhat.com> Date: Mon Dec 27 07:47:54 2010 -0300 [media] V4L1 removal: Remove linux/videodev.h There's no sense on keeping it on 2.6.38, as nobody is using it anymore, at the kernel tree, and installing it at the userspace API. As two deprecated drivers still need it, move it to their internal directories. Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> [...] You must adapt your application for v4lv2. Or you have to switch back to an older kernel.
Yes, and this board support package for the Mini6410 comes with more recent kernels than 2.6.38. Your app seems to use V4Lv1, and this is deprecated.