From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id EAF1AE00405; Mon, 30 Jan 2017 09:05:54 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [212.227.126.135 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [212.227.126.135 listed in dnsbl.sorbs.net] Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 87EEAE0030B for ; Mon, 30 Jan 2017 09:05:50 -0800 (PST) Received: from LNSYSCH3 ([81.130.69.98]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.163]) with ESMTPSA (Nemesis) id 0MM3G0-1cZLKS3eAe-007mw2; Mon, 30 Jan 2017 18:05:49 +0100 From: To: "'Daniel.'" References: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> In-Reply-To: Date: Mon, 30 Jan 2017 17:05:48 -0000 Organization: LN Systems Limited Message-ID: <009501d27b1b$1ab18260$50148720$@ln-systems.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHjoxvKHeLW+VhGVM3rT7yIoJw26AIUJUPWoR5Nw4A= X-Provags-ID: V03:K0:u0QpzwlSMiGxD3uTKRzy5h61dEnbbsY/x+M4j1/KqCt05kiNR9e 1jtADApN2MbPnS2jjOCa+xEREjF0jzjaL5bYMHUOkE8C9QcQVt+XXFDVTTi2u5U8QWDHgiE Z2INm/FOuGkdP24Mt6UKkbOdW7w2tjZc/ZtOgPWccNwovDvnQcHaUqUYhcmaClmvsR+S6iY EGP2UIajL+KEKdvN6ACVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:UuM+MjR6VYw=:XmIC2WXQkfAcezSt79PiHH Q+wUw32eXcZGsy20i8i46gEBe5oAwCZCXVE8D4zm70JH2SFO92uLfcWPJqol091/qm9Je6iR1 oL8vRRvcEPNCuPEQMdamGxxSTE14yoMwtDdFjqrAbeqYSY/gyg0vM5Cim+C763P4JWd8ljTku i+8pZV6EOSgDIaVkiYlVCjFVJdVOybA8NRk/j7AMEiZbGa6PMRL7UTl8JhP6tBP8hRZBgHJfs UTYUJRslPX4wTAvcLaggW0MiNhLYiKbdLAP6UFehLoqg2pDgFFd0658wP9GKr0Yd/RsxpsdRF Fl+lBpPMfgcxaljbtleUJ+fCE+rPb5CR0KD32SyqQ7PNizjADfabdKDnn8II6OoVyPouJkluj Ufr4+9PmTL5s9RU+1p43fVLMx0UEd1WqM5YHOMUpv4y9X5VQoYnrrfS5tk6b0UkCWV3VAosGV 0lT1jkUo1o4XuOMlm0/hL7VTGzXSUAN+DO0G9nyU8YeGjM6X+0yUFtzbYNrfsAuT4iISQeAA8 DGr0xcSUt4ZQk7EQbyR0apTMhH07rcupZ18ngoPgwm0b7O2d6loAE8xqnImV8Yi+mxrK97Q49 BA7gDAh0QfMOygXFR08fTnWZ1ySXrP/LbWwmqzW3qvowQREUc0k82CeO7ypqe1GkfLs0Op/ww Lfg4Eb0een07oiTP9D3PoZwRt19ZbQgJ+gwNe9YbxPUn5ictKg3S2EnA0UJEijzw2kDqK4W4J 6BJxHE76mF+wji4S Cc: yocto@yoctoproject.org Subject: Re: Making header of out-of-tree module available X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: colin.helliwell@ln-systems.com List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 17:05:55 -0000 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0096_01D27B1B.1AB63D50" Content-Language: en-gb ------=_NextPart_000_0096_01D27B1B.1AB63D50 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thanks Daniel, I=E2=80=99ve given that a try, but the header isn=E2=80=99t appearing = (with =E2=80=98bitbake rfctrl=E2=80=99) anywhere but the = module=E2=80=99s own workdir. It=E2=80=99s recipe is =20 SUMMARY =3D " RF driver" LICENSE =3D "GPLv2" LIC_FILES_CHKSUM =3D = "file://COPYING;md5=3D12f884d2ae1ff87c09e5b7ccc2c4ca7e" =20 inherit module =20 SRC_URI =3D "file://Makefile \ file://rfctrl.c \ file://rfctrl.h \ file://COPYING \ " =20 FILES_${PN}-dev =3D "/usr/include/rfctrl/linux/rfctrl.h" =20 S =3D "${WORKDIR}" =20 =20 With a makefile: =20 obj-m :=3D rfctrl.o =20 SRC :=3D $(shell pwd) =20 all: $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) =20 modules_install: $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) modules_install =20 clean: rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c rm -f Module.markers Module.symvers modules.order rm -rf .tmp_versions Modules.symvers =20 =20 =20 From: Daniel. [mailto:danielhilst@gmail.com]=20 Sent: 30 January 2017 16:46 To: colin.helliwell@ln-systems.com Cc: yocto@yoctoproject.org Subject: Re: [yocto] Making header of out-of-tree module available =20 You don't, you make your library depends on your driver, and not on = kernel exported headers. In my case I add the header to the -dev package = and make the library compilation depend on kernel module. # kernel-module-foo.bb =20 FILES_${PN}-dev =3D "/usr/include/foo/linux/foo.h"=20 # libfoo.bb =20 DEPENDS =3D "kernel-module-foo" Cheers =20 2017-01-30 13:37 GMT-02:00 >: I have a recipe which builds my own (out-of-tree) driver module = =E2=80=93 this packages/installs the module fine. (It=E2=80=99s recipe = has =E2=80=9Cinherit module=E2=80=9D).=20 Now I=E2=80=99m writing a recipe to build a library which uses the = driver. What=E2=80=99s needed to get the driver=E2=80=99s header file = =E2=80=98exported=E2=80=99 so that it can be included by the = library=E2=80=99s recipe? Thanks =20 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org =20 https://lists.yoctoproject.org/listinfo/yocto --=20 "Do or do not. There is no try" Yoda Master ------=_NextPart_000_0096_01D27B1B.1AB63D50 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Thanks Daniel,

I=E2=80=99ve given that a try, but the = header isn=E2=80=99t appearing (with =E2=80=98bitbake rfctrl=E2=80=99) = anywhere but the module=E2=80=99s own workdir.

It=E2=80=99s recipe = is

 

SUMMARY =3D " RF = driver"

LICENSE =3D = "GPLv2"

LIC_FILES_CHKSUM =3D = "file://COPYING;md5=3D12f884d2ae1ff87c09e5b7ccc2c4ca7e"

 

inherit module

 

SRC_URI =3D "file://Makefile = \

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 file://rfctrl.c \

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 file://rfctrl.h \

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 file://COPYING \

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 "

 

FILES_${PN}-dev =3D = "/usr/include/rfctrl/linux/rfctrl.h"

 

S =3D = "${WORKDIR}"

 

 

With a makefile:

 

obj-m :=3D rfctrl.o

 

SRC :=3D $(shell = pwd)

 

all:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(MAKE) -C $(KERNEL_SRC) = M=3D$(SRC)

 

modules_install:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(MAKE) -C $(KERNEL_SRC) = M=3D$(SRC) modules_install

 

clean:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rm -f *.o *~ core .depend = .*.cmd *.ko *.mod.c

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rm -f Module.markers = Module.symvers modules.order

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rm -rf .tmp_versions = Modules.symvers

 

 

 

From:<= /b> Daniel. = [mailto:danielhilst@gmail.com]
Sent: 30 January 2017 = 16:46
To: colin.helliwell@ln-systems.com
Cc: = yocto@yoctoproject.org
Subject: Re: [yocto] Making header of = out-of-tree module available

 

You don't, you make your library depends = on your driver, and not on kernel exported headers. In my case I add the = header to the -dev package and make the library compilation depend on = kernel module.

# kernel-module-foo.bb<= /p>

FILES_${PN}-dev =3D = "/usr/include/foo/linux/foo.h"

DEPENDS =3D = "kernel-module-foo"

Cheers

 

2017-01-30 13:37 GMT-02:00 <colin.helliwell@ln-systems.com>:

<= blockquote style=3D'border:none;border-left:solid #CCCCCC = 1.0pt;padding:0cm 0cm 0cm = 6.0pt;margin-left:4.8pt;margin-right:0cm'>

I have a = recipe which builds my own (out-of-tree) driver module =E2=80=93 this = packages/installs the module fine. (It=E2=80=99s recipe has = =E2=80=9Cinherit module=E2=80=9D).

Now = I=E2=80=99m writing a recipe to build a library which uses the driver. = What=E2=80=99s needed to get the driver=E2=80=99s header file = =E2=80=98exported=E2=80=99 so that it can be included by the = library=E2=80=99s recipe?

Thanks<= /o:p>

 <= /o:p>


--
________________________________= _______________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto<= /o:p>




--

"Do or do not. There is = no try"
  Yoda = Master

------=_NextPart_000_0096_01D27B1B.1AB63D50--