From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Juergen Borleis Date: Wed, 28 Jan 2015 09:44:38 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201501280944.38868.jbe@pengutronix.de> Subject: Re: [ptxdist] ptxdist: Adding custom kernel headers Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Markus Niebel , Guillermo Rodriguez Garcia Hi Guillermo, On Tuesday 27 January 2015 21:45:08 Guillermo Rodriguez Garcia wrote: > 2015-01-27 21:28 GMT+01:00 Guillermo Rodriguez Garcia > guille.rodriguez@gmail.com>: > > 2015-01-27 8:31 GMT+01:00 Markus Niebel : > > > Am 26.01.2015 um 20:16 schrieb Guillermo Rodriguez Garcia: > > > > I wrote a custom driver for my BSP, and I initially made it an > > > > out-of-tree driver (ptxdist newpackage src-linux-driver and so on) > > > > > > > > This driver needs to export a header file (defining some ioctl valu= es) > > > > for use by other (custom) ptxdist packages. I am currently exporting > > > > this header file in the "install" stage of the out-of-tree driver: > > > > > > > > cp $(MY_DRIVER_DIR)/someheader.h $(PTXDIST_SYSROOT_TARGET)/usr/incl= ude > > > > > > > > So far so good. > > > > > > > > Now I would like to transform this out-of-tree driver into an in-tr= ee > > > > driver and for that I am generating a set of patches against the > > > > kernel tree. My question is: How can I export the custom header in > > > > this case? I assume that modifying the generic kernel.make is not t= he > > > > way to go. > > > > > > > > Any hints? > > > > > > split the internal from the external part and place the header to exp= ort > > > under > > > /include/uapi/ > > > modify the Kbuild script in this subdir to add your header to the > > > headers to export > > > Generate patch series for your kernel and use this kernel version for > > > the kernel header package in ptxdist > > > > Thank you, I think this is exactly what I needed! > > Just playing with this now, is it normal that after selecting the kernel > headers package in ptxdist it wants to rebuild all other packages? Yes. Changes on the kernel-header package settings have a deep impact. > Is there any way to use the "modified" kernel headers only for a specific > package (the custom driver mentioned above) without affecting the rest of > the packages? If you create your own kernel-header package you can depend on it without = affecting the remaining packages depending on the generic kernel-header = package. A few weeks ago I had a similar issue and solved it (at least for the time = of = development) by adding the include path to the new ioctl file in my = development kernel source tree into the package rule file. After finishing = development the new ioctl file is now part of the kernel patch stack and th= e = additional include path is now gone as well. Regards, Juergen -- = Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| Juergen Borleis =A0 =A0 =A0 =A0 =A0 =A0 | Industrial Linux Solutions =A0 =A0 =A0| http://www.pengutroni= x.de/ | -- = ptxdist mailing list ptxdist@pengutronix.de