From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 975ECE00405; Mon, 30 Jan 2017 07:37:34 -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=-0.5 required=5.0 tests=BAYES_05,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham 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.131 listed in list.dnswl.org] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.5 BAYES_05 BODY: Bayes spam probability is 1 to 5% * [score: 0.0150] Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2C5C4E0030B for ; Mon, 30 Jan 2017 07:37:32 -0800 (PST) Received: from LNSYSCH3 ([81.130.69.98]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.163]) with ESMTPSA (Nemesis) id 0Mgrp6-1cu8cN1z1c-00M4Q5 for ; Mon, 30 Jan 2017 16:37:31 +0100 From: To: Date: Mon, 30 Jan 2017 15:37:30 -0000 Organization: LN Systems Limited Message-ID: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdJ7DazY7wHv1lVCSBGip25qJDIG4g== X-Provags-ID: V03:K0:TiLZgxinVHarLYNVfZNY+OJJKJfhUzoCcbwe1WHCtXJE/e8n0iF a5cPv7sS+QUsJ/8t+67wD09b5YlmGSybOxNaDU5MeBqyN1zYQ75e2DcOcKdzLJvKGEpMz9x M03CJDRmLFVhzKetq6JkzaWcS/DtgZFIMmM55oX1ctgmi8S9TFkFl36Ac/vRfauniJdEKVg MyaFubT3WRsP7L9iS6gkw== X-UI-Out-Filterresults: notjunk:1;V01:K0:X8ldzoK8MWY=:gaUT62lptYrCYCxx4Oj6Pt DYDiIRPYuLoSMJ1J9xv+LLlW0nj9loc/SsS1FDWN0dXtxytKzAxj+PVo9eXTZHxLCelUbkEBm Vb3YcIqw3qsIOswDT2OJFyxcG4IY4kaNC/pWfjktfNMpWCTZpDT1BAVwdKMqDUDcbIdeM7nFw 3zL5PPZwzDEXAledHOTIcg8CKrVM8j1OEwIhoF8AB3WzSAfLEfJ/0mlG+GS7MY0K0pqcC3iRq 5P87K5wMTMyT//1qFN2HgRMcL5dVIeeeKMk5thnJJ5fgi4o2UhxgVLaXSWESep3kHrg0HoCM1 iORazIjSZr9ffH1afVDGks/9F/Adw9uJSPaB+cfLbJuhIo3T4KixxNuZzPex/3NDoR2ciYI2w 26IfVTbULawkN4qDtPv6GU26TfA+69pMVfgkBTN22uAVeZA9djd2wZZ9S4tnhCbXxHWDKIBAy Ag0VIua6cnodHDiSxbgvdFvmkn4YjjpfJFgmtysj99lR3MG+V4kzVKC+DKEKCiJuxGX0CV/7T bRB4SL9ppXFqOmUA0GGFMCZbEGl/5loL/0JcxFririF/NZJlqYYW5CqxcdWofcUi+AFqq9yAr /awD1m9DbhxjGVYidfeDd4NI3xob8eieyk1njXdRIfa/d88tLx8c0HYOfraiXqfqS9+d1e2jo pkJg+9PR9TdagwfsIy/WHlqdG7E/EtUFxMpkvkul2ZA/9XTfqB1Uxfcy3/JOqTrcRwyIRzrct MrX7FLm/zU0tZs5k Subject: 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 15:37:34 -0000 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0054_01D27B0E.C53502F0" Content-Language: en-gb ------=_NextPart_000_0054_01D27B0E.C53502F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have a recipe which builds my own (out-of-tree) driver module - this packages/installs the module fine. (It's recipe has "inherit module"). Now I'm writing a recipe to build a library which uses the driver. What's needed to get the driver's header file 'exported' so that it can be included by the library's recipe? Thanks ------=_NextPart_000_0054_01D27B0E.C53502F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have a recipe which builds my own (out-of-tree) = driver module – this packages/installs the module fine. = (It’s recipe has “inherit module”).

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

Thanks

 

------=_NextPart_000_0054_01D27B0E.C53502F0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 5BC89E00405; Mon, 30 Jan 2017 08:46:16 -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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (danielhilst[at]gmail.com) * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.220.195 listed in dnsbl.sorbs.net] * -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.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.220.195 listed in list.dnswl.org] Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 29420E0030B for ; Mon, 30 Jan 2017 08:46:12 -0800 (PST) Received: by mail-qk0-f195.google.com with SMTP id u25so19586334qki.2 for ; Mon, 30 Jan 2017 08:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dnYG9DMt5SSqMp4RESDrCyoHXlnpJIiRdTrwWJERUBE=; b=kqgUphuvTYFtNIl0BuTEKWI+ghwP9LmLc62bkApU0hWSA41xDYok7RJjmHX8wvfHzO 1qr1PjC9sYRKMYXGQvPVj78VaTO01mJMt0vl331ERM+GK0yJ+VMyh/UdwBBj4bqMyxxI sa4sXiiE9h6ULpkslOEXIq6ZW5SoMrR16rPY/8oQBqFTLNYyBfGojNob7zon+sXdcV/g VZ0ljjCLVsLTAUBmQMu7XkEiYsVCP4DAGd/M4MGiLP+V5PDGBrVamOT/kjgFCSW2MP4B JeHi4lAazg/+Neu7wQo7TfIfYv+UfZXsCEeTvvsB4tN47xvIJE0rGwcWijhQsMFJcinK nFHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dnYG9DMt5SSqMp4RESDrCyoHXlnpJIiRdTrwWJERUBE=; b=I3FQEpOsxnW1ckW0PunmaRIUMWe4tKQ6A7yIIbos4jGjTPZra5+zhI7iVZqtAnsgvF MTttJIiB2+SOmXSvzm7w5BF+NsPBBiqJXwijLxVmw/f7WXlu6OwE+dKIC30khMAjYc/v Br80ShAoK+i1HZ5fUVDTNm990rKJoQh1+02tjFfvC5Mfn5QjT0JYgugmpbrOszCYWmBV uK9ZIE2gTib+ZBcHWZxSjra1SsgzIZNAJMjTcVaaIl0mPoohT6FWV5LDOa2CHd15iMoQ uYPbPU2FL+0QAwZLFpsEGDekzBiLbpE8fB1fGqtpep8hKApSEDHntDW7dxNBuamseCpc TJWw== X-Gm-Message-State: AIkVDXKR+ny/AHHILYLbDzPdO4E2W7Ji2v2UTM1aDnn06em4kA95IYR60Sq7x3X19w5sSkvF9yKv0HlCiBTpzA== X-Received: by 10.55.98.5 with SMTP id w5mr21628383qkb.165.1485794771987; Mon, 30 Jan 2017 08:46:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.96.17 with HTTP; Mon, 30 Jan 2017 08:46:11 -0800 (PST) In-Reply-To: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> References: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> From: "Daniel." Date: Mon, 30 Jan 2017 14:46:11 -0200 Message-ID: To: colin.helliwell@ln-systems.com 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 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 16:46:16 -0000 Content-Type: multipart/alternative; boundary=94eb2c0574ac97f39a0547528d4b --94eb2c0574ac97f39a0547528d4b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 FILES_${PN}-dev =3D "/usr/include/foo/linux/foo.h" # libfoo.bb DEPENDS =3D "kernel-module-foo" Cheers 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=9Cinhe= rit 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 > > > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > --=20 *"Do or do not. There is no try"* *Yoda Master* --94eb2c0574ac97f39a0547528d4b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.<= br>
# kernel-module-foo.bb=
FILES_${PN}-dev =3D "/usr/include/foo/linux/foo.h&qu= ot;

# libfoo.bb
DEPENDS =3D "kernel-module-foo"

Cheers

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

I have a recipe which builds my own (out-of-tr= ee) 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 whi= ch uses the driver. What=E2=80=99s needed to get the driver=E2=80=99s heade= r file =E2=80=98exported=E2=80=99 so that it can be included by the library= =E2=80=99s recipe?

Thanks=

=C2=A0


-- _______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto<= br>



--
"Do or do not. There is no try"
=C2=A0 Yoda Master
--94eb2c0574ac97f39a0547528d4b-- 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 4C465E00405; Mon, 30 Jan 2017 09:13:53 -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=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (danielhilst[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.195 listed in list.dnswl.org] * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.216.195 listed in dnsbl.sorbs.net] * -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.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 04ADCE0030B for ; Mon, 30 Jan 2017 09:13:49 -0800 (PST) Received: by mail-qt0-f195.google.com with SMTP id n13so56499921qtc.0 for ; Mon, 30 Jan 2017 09:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Bfu8ZJ/vyKVZgQAu62u5CNM9EqH8ixiSakgZKYgRdPc=; b=lcVFygOI14mv4obuUwfqmF1YCZLvAu7Icmo13CMsRzsDVPZisGJL2gdyIx1RMp1w+O RvTFvffqmMnms+orqE+3uPTcbmup8iCiPT5uoLECmRMJ5JSo6aex81UaGIrY+6yE6/4d DL8rRxl7vXN3/coP4kPzEXbmLIMWB22iog6TTQ5PG5bTk2t5kELoPTsx1nYyjq19syXz 7oYhVVCRQs4xda7wMaWMQ4qQXZ2HxxmW5yVxw0DjAXqqcuP0SOXHIrkfVwmYGSXuKNp3 tyRRExhNKRNnuia+RojUhEZD9aguw2dL84REMyh+AKoHnGd5D1M+842Hs89/wR+0bcAV NppA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Bfu8ZJ/vyKVZgQAu62u5CNM9EqH8ixiSakgZKYgRdPc=; b=t3emTpYOZdKYxRSImowwBn3kFARpTqt9af6xg32J+lb1w4Wp8NJ0oLLyjsHEVu9XIE z1MrPDhvoxpPAFRyLGBSLkX9BTQX/2fi8fvs1qsXfGFd/m4RqM6G2+Xeyc4NgGLu6yiA ypKicqMdpKaT8rlrzqvEIveFuI0oKdN94Z/SiY8xFthFXvplv0yEphAvok/m82mUfIqv cr+yjin5D+9cCgWjMYd1NrInbIbn6xV8REnd4nAkuPTMsnq8U+DNr0hZm9d87BCdevKw bI+JNUTgsIBW5luQUlsfx58YIiR2wyCIxJVQ+pnJ/lOcjbyyk8Ni5HHWPJi/QcClI3i8 wprg== X-Gm-Message-State: AIkVDXLDGNFdGbg5vWm8TI9q1tUfoyjmcz5G/jhnR7KTZGQXE5ZT/jD2pCAleC7XWbBdR9XhG0XttXUJBGyzOg== X-Received: by 10.237.33.209 with SMTP id m17mr22536996qtc.59.1485796428791; Mon, 30 Jan 2017 09:13:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.96.17 with HTTP; Mon, 30 Jan 2017 09:13:48 -0800 (PST) In-Reply-To: <009501d27b1b$1ab18260$50148720$@ln-systems.com> References: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> <009501d27b1b$1ab18260$50148720$@ln-systems.com> From: "Daniel." Date: Mon, 30 Jan 2017 15:13:48 -0200 Message-ID: To: colin.helliwell@ln-systems.com 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 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:13:53 -0000 Content-Type: multipart/alternative; boundary=001a11377ff258faa9054752f0ee --001a11377ff258faa9054752f0ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable do_install_append() { install -d ${D}/usr/include/nrf24/linux/ install -m 0755 ${S}/include/linux/nrf24.h ${D}/usr/include/nrf24/linux/ } Try something like this ^ Regards, 2017-01-30 15:05 GMT-02:00 : > Thanks Daniel, > > I=E2=80=99ve given that a try, but the header isn=E2=80=99t appearing (wi= th =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=3D12f884d2ae1ff87c09e5b7ccc2c4ca= 7e" > > > > inherit module > > > > SRC_URI =3D "file://Makefile \ > > file://rfctrl.c \ > > file://rfctrl.h \ > > file://COPYING \ > > " > > > > 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: > > $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) > > > > modules_install: > > $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) modules_install > > > > clean: > > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c > > rm -f Module.markers Module.symvers modules.order > > rm -rf .tmp_versions Modules.symvers > > > > > > > > *From:* 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 kerne= l > exported headers. In my case I add the header to the -dev package and mak= e > the library compilation depend on kernel module. > > # kernel-module-foo.bb > > FILES_${PN}-dev =3D "/usr/include/foo/linux/foo.h" > > # libfoo.bb > > DEPENDS =3D "kernel-module-foo" > > Cheers > > > > 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=9Cinhe= rit 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 > > > > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > > > > -- > > *"Do or do not. There is no try"* > * Yoda Master* > --=20 *"Do or do not. There is no try"* *Yoda Master* --001a11377ff258faa9054752f0ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
do_install_append() {
=C2=A0=C2=A0=C2=A0 install -= d ${D}/usr/include/nrf24/linux/
=C2=A0=C2=A0=C2=A0 install -m 0755 ${S}/= include/linux/nrf24.h=C2=A0 ${D}/usr/include/nrf24/linux/
}


<= /div>
Try something like this ^

Regards,

2017-01-30 15= :05 GMT-02:00 <colin.helliwell@ln-systems.com>= :

Thanks Daniel,

I=E2=80=99ve given that a try, but the header is= n=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

=C2=A0

SUMMARY =3D " RF driver"

LICENSE =3D "GPLv2"= ;

LIC_FILES_C= HKSUM =3D "file://COPYING;md5=3D12f884d2ae1ff87c09e5b7ccc2c4ca7e"

=C2=A0

inherit = module

=C2=A0

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 fil= e://rfctrl.c \

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file://rfc= trl.h \

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file://COPYING \<= u>

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

<= p class=3D"MsoNormal">=C2=A0

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

= =C2=A0

S =3D "${WORKDIR}"

=C2=A0

=C2=A0

With a makefile:

=C2=A0

obj-m :=3D rfctrl.o

=C2=A0

SRC :=3D $(shell pwd)

=C2=A0

= 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)<= /span>

=C2=A0=

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

=C2=A0

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 *.m= od.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

=C2=A0

=C2=A0

=C2=A0

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

=C2=A0

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

# kernel-module-foo.bb=

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

DEPENDS =3D "kernel-module-foo"<= u>

Cheers

<= /div>

=C2=A0

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

I have a recipe which builds my own (o= ut-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 libr= ary which uses the driver. What=E2=80=99s needed to get the driver=E2=80=99= s header file =E2=80=98exported=E2=80=99 so that it can be included by the = library=E2=80=99s recipe?

Thanks=

=C2=A0

<= p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt">
--
____________= ___________________________________
yocto mailing list
yocto@yoctoproject.org=
https://lists.yoctoproject.org/listinfo/yocto




-= -

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

<= /div>



--
"Do or do not. There is no try"
=C2=A0 <= b>Yoda Master

--001a11377ff258faa9054752f0ee-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C4C13E0095C; Mon, 30 Jan 2017 09:14:28 -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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (danielhilst[at]gmail.com) * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.216.194 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.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.216.194 listed in dnsbl.sorbs.net] Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7B491E003C1 for ; Mon, 30 Jan 2017 09:14:14 -0800 (PST) Received: by mail-qt0-f194.google.com with SMTP id h53so20162398qth.3 for ; Mon, 30 Jan 2017 09:14:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7QW4hOOeX6oR/j2+kOfvfsUl3rKgTkGZ0+Y3YK07B5g=; b=IJBsMSjaab3T4xnHnwKgXdzMI8G8r2rM1w/OBzgnmg8D4yKBQbzShnfzDT6h0QoUf/ o/6REbUqvgOO+iy4/0f9lbxC4rf08r2Jue+aFztLEgpGeg/QhwEuPZAf3xWXqwRv4kTy TBWV4MORq07D+AzRoDDQ6Aey2NNfgoUTXQET2OqOjBxV9e7KxG/TPCmtB97vmRUYGOih fADHQ563xtQBiJi0mVJLetCuz//FXCyYGRpHKX0JbmhxwDfMvt4hqUzUUoONcj7QU7/4 BPdBWUjE0PimPlEd1wjGccEb5i6JxpDgwaGXQ98tEAlfM711f6fjH97EFYEmExgtKEG9 Xiog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7QW4hOOeX6oR/j2+kOfvfsUl3rKgTkGZ0+Y3YK07B5g=; b=WjIgOSIs2/E96xxFEPM/c/6jvPKHnapKbAVeuNFAi7pTlbnBL3CuXfY/2VDS2EBR6p TdGPw2zpplxVxfbABY4ZkdRLQj3uWjmiY4Jxdo6SN1axVKxas90q9OQDi7TlnXUSy6+u 3Iq6Fvxb2pbCML/6X1saIAlwZYc4GxdrwRsrLmcyLdZIz/DgJtFZ9Q26qgBK3bZlA0++ aLQ8if4qxCETUoWhVXQooBPVBmqMcNlcseo+U9Ld8ndLBq6prjqEKLDXkESB5Wkoj4JC GS0PbIBCGAIZsFIaiRTQDgJRg2HjnkUYTNSCIY6ufAXkNjDcdTc4rQjy7z0cXXvXhr7u 3sIw== X-Gm-Message-State: AIkVDXL5vTZhsrjOzmOGTYDtsTkgjOU1HRW+8F8fKRdzz5vycECQnZ5N7iFs9R4dUFPEzIGfEA5S/nCdTDm7Mg== X-Received: by 10.237.39.222 with SMTP id m30mr20178412qtg.118.1485796453653; Mon, 30 Jan 2017 09:14:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.96.17 with HTTP; Mon, 30 Jan 2017 09:14:13 -0800 (PST) In-Reply-To: References: <005301d27b0e$c532b900$4f982b00$@ln-systems.com> <009501d27b1b$1ab18260$50148720$@ln-systems.com> From: "Daniel." Date: Mon, 30 Jan 2017 15:14:13 -0200 Message-ID: To: colin.helliwell@ln-systems.com 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 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:14:28 -0000 Content-Type: multipart/alternative; boundary=f403045f4342d42591054752f191 --f403045f4342d42591054752f191 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable At your kernel-module-.bb :) 2017-01-30 15:13 GMT-02:00 Daniel. : > do_install_append() { > install -d ${D}/usr/include/nrf24/linux/ > install -m 0755 ${S}/include/linux/nrf24.h > ${D}/usr/include/nrf24/linux/ > } > > > Try something like this ^ > > Regards, > > 2017-01-30 15:05 GMT-02:00 : > >> Thanks Daniel, >> >> I=E2=80=99ve given that a try, but the header isn=E2=80=99t appearing (w= ith =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=3D12f884d2ae1ff87c09e5b7ccc2c4c= a7e" >> >> >> >> inherit module >> >> >> >> SRC_URI =3D "file://Makefile \ >> >> file://rfctrl.c \ >> >> file://rfctrl.h \ >> >> file://COPYING \ >> >> " >> >> >> >> 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: >> >> $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) >> >> >> >> modules_install: >> >> $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC) modules_install >> >> >> >> clean: >> >> rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c >> >> rm -f Module.markers Module.symvers modules.order >> >> rm -rf .tmp_versions Modules.symvers >> >> >> >> >> >> >> >> *From:* 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 >> >> FILES_${PN}-dev =3D "/usr/include/foo/linux/foo.h" >> >> # libfoo.bb >> >> DEPENDS =3D "kernel-module-foo" >> >> Cheers >> >> >> >> 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=9Cinh= erit module=E2=80=9D). >> >> Now I=E2=80=99m writing a recipe to build a library which uses the drive= r. 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 >> >> >> >> >> -- >> _______________________________________________ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto >> >> >> >> >> -- >> >> *"Do or do not. There is no try"* >> * Yoda Master* >> > > > > -- > *"Do or do not. There is no try"* > *Yoda Master* > --=20 *"Do or do not. There is no try"* *Yoda Master* --f403045f4342d42591054752f191 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
At your kernel-module-<foo>.bb

:)

2017-01-30 15:13 GM= T-02:00 Daniel. <danielhilst@gmail.com>:
do_install_append() {
=C2=A0=C2= =A0=C2=A0 install -d ${D}/usr/include/nrf24/linux/
=C2=A0=C2=A0=C2=A0 in= stall -m 0755 ${S}/include/linux/nrf24.h=C2=A0 ${D}/usr/include/nrf24/linux= /
}


Try something like this ^

R= egards,

2017-01-30 15:05 GMT-02:00 = <colin.helliwell@ln-systems.com>:
=

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

=C2=A0

=

SUMMARY =3D " RF driver"=

LICENSE =3D &qu= ot;GPLv2"

LIC_FILES_CHKSUM =3D "file://COPYING;md5=3D12f884d2ae1ff87c09= e5b7ccc2c4ca7e"

=C2=A0

inherit module

=C2=A0

= 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://C= OPYING \

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

=C2=A0

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

=C2=A0

S =3D "${WORKDIR}"

=C2=A0

=C2=A0

With a makefile:

=C2=A0

obj-m :=3D rfctrl.o

=C2=A0

SRC :=3D $(shell pwd)

=C2=A0

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)=

=C2= =A0

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

=C2=A0

<= p class=3D"MsoNormal">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<= u>

=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

=C2=A0

=C2=A0

=C2=A0

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

=C2=A0

You don&#= 39;t, you make your library depends on your driver, and not on kernel expor= ted headers. In my case I add the header to the -dev package and make the l= ibrary compilation depend on kernel module.

# = kernel-module-foo.bb

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

# libfoo.bb

<= /div>

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

Cheers

=C2=A0

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

= I have a recipe which builds my own (out-of-tree) driver module =E2=80=93 t= his packages/installs the module fine. (It=E2=80=99s recipe has =E2=80=9Cin= herit 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

=C2=A0


--
_________________________________________= ______
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.= org/listinfo/yocto




--

"Do or do no= t. There is no try"
=C2=A0 Yoda Master<= /u>




--
"D= o or do not. There is no try"
=C2=A0 Yoda Master



--
"Do or do not. There is no try"
=C2=A0 = Yoda Master
--f403045f4342d42591054752f191--