Message ID | 20240710104505.1215103-1-sean@geanix.com |
---|---|
State | New |
Headers | show |
Series | [v2] openocd: Enable linuxgpiod build option | expand |
On Wed, Jul 10, 2024 at 12:45 PM Sean Nyekjaer via lists.openembedded.org <sean=geanix.com@lists.openembedded.org> wrote: > > Enable the linuxgpiod via PACKAGECONFIG to allow to use swd via > libgpiod. > linuxgpiod requires libgpiod 1.x, so it's required to add > PREFERRED_VERSION_libgpiod = "1.%". > > Signed-off-by: Sean Nyekjaer <sean@geanix.com> > --- > > @Bartosz it would be nice to be able to depend on libgpiod-1.x. > Guess the libraries could co-exist and then the libgpiod tools could be > from the 2.x. > > meta-oe/recipes-devtools/openocd/openocd_git.bb | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb > index 559fe29ff..8c411ec5c 100644 > --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb > +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb > @@ -51,6 +51,9 @@ FILES:${PN} = " \ > ${bindir}/openocd \ > " > > +# To build with linuxgpiod it requires libgpiod 1.x. > +# Add PREFERRED_VERSION_libgpiod = "1.%" to local.conf Keep this comment but add: RDEPENDS:${PN} += "libgpiod (<= 1.6.5)" to this recipe to avoid build-time errors when the right version of the library is not available. Bart > +PACKAGECONFIG[linuxgpiod] = "--enable-linuxgpiod,--disable-linuxgpiod, libgpiod" > PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio" > PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang" > PACKAGECONFIG ??= "sysfsgpio remote-bitbang" > -- > 2.45.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#111294): https://lists.openembedded.org/g/openembedded-devel/message/111294 > Mute This Topic: https://lists.openembedded.org/mt/107140078/3618139 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [brgl@bgdev.pl] > -=-=-=-=-=-=-=-=-=-=-=- >
On Wed, Jul 10, 2024 at 01:11:50PM UTC, Bartosz Golaszewski wrote: > On Wed, Jul 10, 2024 at 12:45 PM Sean Nyekjaer via > lists.openembedded.org <sean=geanix.com@lists.openembedded.org> wrote: > > > > Enable the linuxgpiod via PACKAGECONFIG to allow to use swd via > > libgpiod. > > linuxgpiod requires libgpiod 1.x, so it's required to add > > PREFERRED_VERSION_libgpiod = "1.%". > > > > Signed-off-by: Sean Nyekjaer <sean@geanix.com> > > --- > > > > @Bartosz it would be nice to be able to depend on libgpiod-1.x. > > Guess the libraries could co-exist and then the libgpiod tools could be > > from the 2.x. > > > > meta-oe/recipes-devtools/openocd/openocd_git.bb | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb > > index 559fe29ff..8c411ec5c 100644 > > --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb > > +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb > > @@ -51,6 +51,9 @@ FILES:${PN} = " \ > > ${bindir}/openocd \ > > " > > > > +# To build with linuxgpiod it requires libgpiod 1.x. > > +# Add PREFERRED_VERSION_libgpiod = "1.%" to local.conf > > Keep this comment but add: > > RDEPENDS:${PN} += "libgpiod (<= 1.6.5)" > > to this recipe to avoid build-time errors when the right version of > the library is not available. Good idea. > > Bart Hi Bart, I have tried: RDEPENDS:${PN} += "libgpiod (<= 1.6.5)" and/or PACKAGECONFIG[linuxgpiod] = "--enable-linuxgpiod,--disable-linuxgpiod, libgpiod, libgpiod (<= 1.6.5)" I still get buildtime errors :/ /Sean
diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb index 559fe29ff..8c411ec5c 100644 --- a/meta-oe/recipes-devtools/openocd/openocd_git.bb +++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb @@ -51,6 +51,9 @@ FILES:${PN} = " \ ${bindir}/openocd \ " +# To build with linuxgpiod it requires libgpiod 1.x. +# Add PREFERRED_VERSION_libgpiod = "1.%" to local.conf +PACKAGECONFIG[linuxgpiod] = "--enable-linuxgpiod,--disable-linuxgpiod, libgpiod" PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio" PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang" PACKAGECONFIG ??= "sysfsgpio remote-bitbang"
Enable the linuxgpiod via PACKAGECONFIG to allow to use swd via libgpiod. linuxgpiod requires libgpiod 1.x, so it's required to add PREFERRED_VERSION_libgpiod = "1.%". Signed-off-by: Sean Nyekjaer <sean@geanix.com> --- @Bartosz it would be nice to be able to depend on libgpiod-1.x. Guess the libraries could co-exist and then the libgpiod tools could be from the 2.x. meta-oe/recipes-devtools/openocd/openocd_git.bb | 3 +++ 1 file changed, 3 insertions(+)