Where is the version.h?
Hi,
According to LDD3, the linux/module.h automatically includes the linux/version, which define some macros to help test the kernel version. But I search the source tree, and can not find version.h in include/linux. Where can I find it?
Thanks!
Quoted 5 lines · parmenides
According to LDD3, the
linux/module.hautomatically includes the linux/version, which define some macros to help test the kernel version. But I search the source tree, and can not findversion.hininclude/linux. Where can I find it?
It lives in include/generated/uapi/linux/version.h
If you've never built a kernel in your tree you won't find it though, because it's created from the Makefile. Look for version_h and filechk_version.h.
Regards,
Kristof
Quoted 2 lines · Kristof Provost
It lives in
include/generated/uapi/linux/version.h
Accroding to LDD3, version.h is included with the path "linux/version.h", therefore I think the
"include/generated/uapi/linux/version.h"
might be symbolic linked to
"include/linux/version.h"
during compilation. Is this the case?
Quoted 6 lines · parmenides
Accroding to LDD3,
version.his included with the path "linux/version.h", therefore I think the
"include/generated/uapi/linux/version.h"
might be symbolic linked to
"include/linux/version.h"
during compilation. Is this the case?
No, the build gets done with a -Iinclude/generated/uapi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140127/e52825c7/attachment.bin
Quoted 1 line · Valdis.Kletnieks at vt.edu
No, the build gets done with a -Iinclude/generated/uapi
So, I get it. Thanks for your reply!
Quoted 4 lines · parmenides
According to LDD3, the
linux/module.hautomatically includes the linux/version, which define some macros to help test the kernel version. But I search the source tree, and can not findversion.hininclude/linux. Where can I find it?
It's auto-generated. You need to run at least a 'make prepare' in the
kernel tree (though you'll probably want to go ahead and actually build and
boot a kernel to develop against).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140127/fe36c92e/attachment-0001.bin