Re: [OE-core] adding kernel headers to sysroot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Bruce, On Thu, May 16, 2013 at 11:41:20AM -0400, Bruce Ashfield wrote: On 13-05-16 11:25 AM, Koen Martens wrote: I have added a kernel header file to the linux kernel for my project, that exposes a public API for new kernel functionality I have implemented. This header file is needed to compile certain user-space programs. I have been trying to get this include file in the sysroot used to compile the user- space programs (as well as in the SDK i build for the project). - point your application at the STAGING_KERNEL_DIR and include the header from there. You are already coupled to the kernel, since you need this header, so it isn't as evil as it seems. This will also get you SDK support. - Install the header file to another location in the sysroot and include it from there. You can do this via an append to the kernel install. Assuming you don't collide with existing headers, you could use this to install into a standard location as well, but things start to get a bit more risk. You can also arrange I went with the latter option, but i'm still curious as to what part of oe magic installs the standard kernel headers? How often does the header file change ? If it really is static there's another option, and that is to capture the header in the applications themselves and simply use it that way. iptables, and other user application have done this in the past, and will do it again in the future. Yep, i'm aware of the way ipfilter does it, from personal experience with the insanity that causes :) Thanks! Koen - -- https://ohm2013.org/- outdoor hacker conference, August 2013, NL http://www.sonologic.nl/- hosting and DBA http://koenmartens.nl/ - curriculum vitae https://www.revspace.nl/- hackerspace in Den Haag, NL http://signal.hackerspaces.org/ - hackerspace radio -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGrVw8ACgkQktDgRrkFPpa0rQCfWUXPWJEUKKn5Ngc8MOdSzlt+ clcAoIoGA7jIiVBvZXQz2MpiXHD6/6Tj =zYrm -END PGP SIGNATURE- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] adding kernel headers to sysroot
On 13-06-02 10:30 AM, Koen Martens wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Bruce, On Thu, May 16, 2013 at 11:41:20AM -0400, Bruce Ashfield wrote: On 13-05-16 11:25 AM, Koen Martens wrote: I have added a kernel header file to the linux kernel for my project, that exposes a public API for new kernel functionality I have implemented. This header file is needed to compile certain user-space programs. I have been trying to get this include file in the sysroot used to compile the user- space programs (as well as in the SDK i build for the project). - point your application at the STAGING_KERNEL_DIR and include the header from there. You are already coupled to the kernel, since you need this header, so it isn't as evil as it seems. This will also get you SDK support. - Install the header file to another location in the sysroot and include it from there. You can do this via an append to the kernel install. Assuming you don't collide with existing headers, you could use this to install into a standard location as well, but things start to get a bit more risk. You can also arrange I went with the latter option, but i'm still curious as to what part of oe magic installs the standard kernel headers? That's the linux-libc-headers package. It uses the matching linux release tarball and installs them to the /usr/include/linux directory structure. And good choice on the latter option. I've been working with this more myself lately, and if you attempt to install over top of the libc-headers location, you'll end up with package ordering issues if you use the SDK, and in general, not be triggering the right rebuilds when things change. Bruce How often does the header file change ? If it really is static there's another option, and that is to capture the header in the applications themselves and simply use it that way. iptables, and other user application have done this in the past, and will do it again in the future. Yep, i'm aware of the way ipfilter does it, from personal experience with the insanity that causes :) Thanks! Koen - -- https://ohm2013.org/- outdoor hacker conference, August 2013, NL http://www.sonologic.nl/- hosting and DBA http://koenmartens.nl/ - curriculum vitae https://www.revspace.nl/- hackerspace in Den Haag, NL http://signal.hackerspaces.org/ - hackerspace radio -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGrVw8ACgkQktDgRrkFPpa0rQCfWUXPWJEUKKn5Ngc8MOdSzlt+ clcAoIoGA7jIiVBvZXQz2MpiXHD6/6Tj =zYrm -END PGP SIGNATURE- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] adding kernel headers to sysroot
On 13-05-16 11:25 AM, Koen Martens wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I was asking this question on the irc channel earlier today, and bluelightning suggested I pose this question to this mailing list (with certain key people in cc). I have added a kernel header file to the linux kernel for my project, that exposes a public API for new kernel functionality I have implemented. This header file is needed to compile certain user-space programs. I have been trying to get this include file in the sysroot used to compile the user- space programs (as well as in the SDK i build for the project). However, I haven't managed to find out how to accomplish this. I tried creating a custom tarball from my own branch of the linux kernel, and use that in libc-kernel-headers, but alas that was not the trick. Can anyone point me in the right direction of how to accomplish this?? Aha! I can definitely point you in the right direction for this, it's something that I'm working on *right* now. So the timing is good. You definitely do not want to use libc headers, it is for just that, libc. Modifying it is going to cause you all sorts of pain with respect to rebuilds and consistency issues. Since this is a new header (and not a modification of an existing one), you are on better footing than you'd otherwise be (i.e. modifying an existing header should be avoided at nearly all costs). You should be able to see your kernel header file in the kernel source that is part of the sysroot, just not in the common include locations. is this the case for you ? Are you having build errors at the moment ? (i.e. is this working at all ?). There are a few approaches that I've taken, others can chime in if I miss something obvious: - point your application at the STAGING_KERNEL_DIR and include the header from there. You are already coupled to the kernel, since you need this header, so it isn't as evil as it seems. This will also get you SDK support. - Install the header file to another location in the sysroot and include it from there. You can do this via an append to the kernel install. Assuming you don't collide with existing headers, you could use this to install into a standard location as well, but things start to get a bit more risk. You can also arrange How often does the header file change ? If it really is static there's another option, and that is to capture the header in the applications themselves and simply use it that way. iptables, and other user application have done this in the past, and will do it again in the future. Cheers, Bruce Thanks in advance, Koen Martens - -- https://ohm2013.org/- outdoor hacker conference, August 2013, NL http://www.sonologic.nl/- hosting and DBA http://koenmartens.nl/ - curriculum vitae https://www.revspace.nl/- hackerspace in Den Haag, NL http://signal.hackerspaces.org/ - hackerspace radio -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGU+lsACgkQktDgRrkFPpYH7QCfZROAcMkUVN+BiesoUtxBBzbt 5OQAoJBjIWbjmNf+wVvASyGwpcYeI6UH =HHSa -END PGP SIGNATURE- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
[OE-core] adding kernel headers to sysroot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I was asking this question on the irc channel earlier today, and bluelightning suggested I pose this question to this mailing list (with certain key people in cc). I have added a kernel header file to the linux kernel for my project, that exposes a public API for new kernel functionality I have implemented. This header file is needed to compile certain user-space programs. I have been trying to get this include file in the sysroot used to compile the user- space programs (as well as in the SDK i build for the project). However, I haven't managed to find out how to accomplish this. I tried creating a custom tarball from my own branch of the linux kernel, and use that in libc-kernel-headers, but alas that was not the trick. Can anyone point me in the right direction of how to accomplish this?? Thanks in advance, Koen Martens - -- https://ohm2013.org/- outdoor hacker conference, August 2013, NL http://www.sonologic.nl/- hosting and DBA http://koenmartens.nl/ - curriculum vitae https://www.revspace.nl/- hackerspace in Den Haag, NL http://signal.hackerspaces.org/ - hackerspace radio -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGU+lsACgkQktDgRrkFPpYH7QCfZROAcMkUVN+BiesoUtxBBzbt 5OQAoJBjIWbjmNf+wVvASyGwpcYeI6UH =HHSa -END PGP SIGNATURE- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core