guenter geiger wrote:
On Tue, 12 Oct 2004, Johannes M Zmoelnig wrote:
so we just have to force people to have kernel-headers installed. i think we can assume, that most linux will have the current kernel-headers in /usr/src/linux (?)
If it would be that simple. Normally the interface to the kernel drivers get included into /usr/include/linux hierarchy if they are stable.
Now, as the kernel is like a library and we don't know of the ioctl API changes, you have to compile gem against a special kernel version, and theoretically you would have to recompile everytime you upgrade the kernel.
correct me if i am wrong (i don't know anything about this) ioctl()-commands are defined(!) numbers that tell the driver (which *is* kernel-dependant) to do something. if we do "ioctl(DV1394_IOC_WAIT_FRAMES, ...)" this is the same as doing "ioctl(8969, ...)" so if the API changes, the ioctl() will fail!
thus compiling against dv1394.h (either from a special kernel or provided with Gem) could always break when upgrading the kernel! but using the kernel-headers will at least enable us to compile against the current kernel (which a gem-included file will not!) and make it work again.
however, if they really change the API (e.g. rename DV1394_WAIT_FRAMES to DV1394_IOC_WAIT_FRAMES) we will have a problem. is this likely to change ??
In practice it might be that the interface doesn't change, and you can use the kernel header file. This means, in this case you sort of "inofficially freeze" the API (by including the corresponding header file in your sources, just for convenience). In this case you have to be aware that strange things could happen.
ah, i think this is, what i have just tried to explain.
the official stable kernel-headers (/usr/include/linux) are versioned (on debian) as 2.5.99 this does not look very "stable" to me as i read the /usr/share/doc/kernel-source-2.6.7/README.headers.gz file, the /usr/include/linux is mainly for libc6
Then, as another wild guess, probably the libraw1394 can be used for the task ?
maybe (??)
but why do we have a kernel-module for dv1394 if we cannot/mustnot use it ?
mfg.as.dr IOhannes