mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] ptxdist: Adding custom kernel headers
@ 2015-01-26 19:16 Guillermo Rodriguez Garcia
  2015-01-27  7:31 ` Markus Niebel
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2015-01-26 19:16 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 794 bytes --]

Hello all,

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 values) 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/include

So far so good.

Now I would like to transform this out-of-tree driver into an in-tree
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 the way to go.

Any hints?

-- 
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 1079 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-26 19:16 [ptxdist] ptxdist: Adding custom kernel headers Guillermo Rodriguez Garcia
@ 2015-01-27  7:31 ` Markus Niebel
  2015-01-27 20:28   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Niebel @ 2015-01-27  7:31 UTC (permalink / raw)
  To: ptxdist; +Cc: guille.rodriguez

Hello,
Am 26.01.2015 um 20:16 schrieb Guillermo Rodriguez Garcia:
> Hello all,
> 
> 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 values) 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/include
> 
> So far so good.
> 
> Now I would like to transform this out-of-tree driver into an in-tree
> 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 the way to go.
> 
> Any hints?
> 
split the internal from the external part and place the header to export under
<kernel>/include/uapi/<correct subdir>
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
> 
> 
Markus

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-27  7:31 ` Markus Niebel
@ 2015-01-27 20:28   ` Guillermo Rodriguez Garcia
  2015-01-27 20:45     ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2015-01-27 20:28 UTC (permalink / raw)
  To: Markus Niebel; +Cc: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --]

Hello,

2015-01-27 8:31 GMT+01:00 Markus Niebel <list-09_ptxdist@tqsc.de>:

> Hello,
> Am 26.01.2015 um 20:16 schrieb Guillermo Rodriguez Garcia:
> > Hello all,
> >
> > 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 values)
> 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/include
> >
> > So far so good.
> >
> > Now I would like to transform this out-of-tree driver into an in-tree
> > 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 the way to go.
> >
> > Any hints?
> >
> split the internal from the external part and place the header to export
> under
> <kernel>/include/uapi/<correct subdir>
> 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!

Best,

Guillermo

[-- Attachment #1.2: Type: text/html, Size: 1901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-27 20:28   ` Guillermo Rodriguez Garcia
@ 2015-01-27 20:45     ` Guillermo Rodriguez Garcia
  2015-01-28  8:44       ` Juergen Borleis
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2015-01-27 20:45 UTC (permalink / raw)
  To: Markus Niebel; +Cc: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1791 bytes --]

2015-01-27 21:28 GMT+01:00 Guillermo Rodriguez Garcia <
guille.rodriguez@gmail.com>:

> Hello,
>
> 2015-01-27 8:31 GMT+01:00 Markus Niebel <list-09_ptxdist@tqsc.de>:
>
>> Hello,
>> Am 26.01.2015 um 20:16 schrieb Guillermo Rodriguez Garcia:
>> > Hello all,
>> >
>> > 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 values)
>> 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/include
>> >
>> > So far so good.
>> >
>> > Now I would like to transform this out-of-tree driver into an in-tree
>> > 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 the way to go.
>> >
>> > Any hints?
>> >
>> split the internal from the external part and place the header to export
>> under
>> <kernel>/include/uapi/<correct subdir>
>> 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?

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?

Thank you,

Guillermo

[-- Attachment #1.2: Type: text/html, Size: 2719 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-27 20:45     ` Guillermo Rodriguez Garcia
@ 2015-01-28  8:44       ` Juergen Borleis
  2015-01-28  9:21         ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Borleis @ 2015-01-28  8:44 UTC (permalink / raw)
  To: ptxdist; +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 <list-09_ptxdist@tqsc.de>:
> > > 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 values)
> > > > 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/include
> > > >
> > > > So far so good.
> > > >
> > > > Now I would like to transform this out-of-tree driver into an in-tree
> > > > 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 the
> > > > way to go.
> > > >
> > > > Any hints?
> > >
> > > split the internal from the external part and place the header to export
> > > under
> > > <kernel>/include/uapi/<correct subdir>
> > > 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 the 
additional include path is now gone as well.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-28  8:44       ` Juergen Borleis
@ 2015-01-28  9:21         ` Guillermo Rodriguez Garcia
  2015-01-28  9:45           ` Juergen Borleis
  0 siblings, 1 reply; 7+ messages in thread
From: Guillermo Rodriguez Garcia @ 2015-01-28  9:21 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: Markus Niebel, ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2840 bytes --]

Hi Juergen,

2015-01-28 9:44 GMT+01:00 Juergen Borleis <jbe@pengutronix.de>:

> 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 <list-09_ptxdist@tqsc.de>:
> > > > 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
> values)
> > > > > 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/include
> > > > >
> > > > > So far so good.
> > > > >
> > > > > Now I would like to transform this out-of-tree driver into an
> in-tree
> > > > > 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
> the
> > > > > way to go.
> > > > >
> > > > > Any hints?
> > > >
> > > > split the internal from the external part and place the header to
> export
> > > > under
> > > > <kernel>/include/uapi/<correct subdir>
> > > > 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
> the
> additional include path is now gone as well.
>

Thank you for the feedback.
I'm not sure to understand this, can you elaborate on how you did this
exactly?

Did you create your own kernel-header package ?

Guillermo

[-- Attachment #1.2: Type: text/html, Size: 3977 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] ptxdist: Adding custom kernel headers
  2015-01-28  9:21         ` Guillermo Rodriguez Garcia
@ 2015-01-28  9:45           ` Juergen Borleis
  0 siblings, 0 replies; 7+ messages in thread
From: Juergen Borleis @ 2015-01-28  9:45 UTC (permalink / raw)
  To: Guillermo Rodriguez Garcia; +Cc: Markus Niebel, ptxdist

Hi Guillermo,

On Wednesday 28 January 2015 10:21:44 Guillermo Rodriguez Garcia wrote:
> [...]
> Thank you for the feedback.
> I'm not sure to understand this, can you elaborate on how you did this
> exactly?

I created my kernel git repository in "local_src/kernel.<platformname>" and did 
all development within it (including the new ioctl header file) and with 
PTXdist.

To compile the package which needs this new ioctl header file I added the path 
to this development tree by adding "-I(KERNEL_DIR)/include/uapi/" into 
package's rule file.

Regards
Juergen

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-28  9:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 19:16 [ptxdist] ptxdist: Adding custom kernel headers Guillermo Rodriguez Garcia
2015-01-27  7:31 ` Markus Niebel
2015-01-27 20:28   ` Guillermo Rodriguez Garcia
2015-01-27 20:45     ` Guillermo Rodriguez Garcia
2015-01-28  8:44       ` Juergen Borleis
2015-01-28  9:21         ` Guillermo Rodriguez Garcia
2015-01-28  9:45           ` Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox