All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding libgpiod to Yocto Warrior 4.19.35 image?
@ 2020-07-17 20:17 Scott Whitney
  2020-07-17 20:23 ` Scott Whitney
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Whitney @ 2020-07-17 20:17 UTC (permalink / raw)
  To: yocto

I'm using Yocto Warrior 4.19.35 on a Variscite i.MX8M MINI SoM.  I need to be able to respond to some interrupt events on GPIO events from userspace.
I saw on kernel.org that the sysfs ABI is being deprecated, and the recommendation is to use libgpiod. https://www.kernel.org/doc/html/latest/driver-api/gpio/using-gpio.html

I modified my local.conf file to add libgpiod to IMAGE_INSTALL_append:
IMAGE_INSTALL_append = " \
    tcf-agent \
    openssh-sftp-server \
    libgpiod \
    "
I then ran "bitbake fsl-image-qt5", and programmed the new image onto an SD card.  After booting, I can now see "/dev/gpiochip*" as expected.  However, gpiod.h does not appear to be installed to /usr/include nore any other directory.

Can someone explain what I need to do to correctly deploy libgpiod onto my target?  Thanks!

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

* Re: Adding libgpiod to Yocto Warrior 4.19.35 image?
  2020-07-17 20:17 Adding libgpiod to Yocto Warrior 4.19.35 image? Scott Whitney
@ 2020-07-17 20:23 ` Scott Whitney
  2020-07-19 20:57   ` [yocto] " Joel A Cohen
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Whitney @ 2020-07-17 20:23 UTC (permalink / raw)
  To: yocto

I should also note that gpioinfo and other tools from libgpiod run as expected on the target, and that /usr/lib has libgpiod.so.2 (libgpiod.so.2.1.1) in it.
I would also like the header file to be put into the image so that I can build/run executables using libgpiod on the target.

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

* Re: [yocto] Adding libgpiod to Yocto Warrior 4.19.35 image?
  2020-07-17 20:23 ` Scott Whitney
@ 2020-07-19 20:57   ` Joel A Cohen
  2020-07-20 17:48     ` Scott Whitney
  0 siblings, 1 reply; 6+ messages in thread
From: Joel A Cohen @ 2020-07-19 20:57 UTC (permalink / raw)
  To: Scott Whitney; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

You would need to add libgpiod-dev, presumably, to get the build
requirements.

On Fri, Jul 17, 2020 at 4:23 PM Scott Whitney <sdw@inea.com> wrote:

> I should also note that gpioinfo and other tools from libgpiod run as
> expected on the target, and that /usr/lib has libgpiod.so.2
> (libgpiod.so.2.1.1) in it.
> I would also like the header file to be put into the image so that I can
> build/run executables using libgpiod on the target.
> 
>

[-- Attachment #2: Type: text/html, Size: 784 bytes --]

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

* Re: Adding libgpiod to Yocto Warrior 4.19.35 image?
  2020-07-19 20:57   ` [yocto] " Joel A Cohen
@ 2020-07-20 17:48     ` Scott Whitney
  2020-07-21 10:49       ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Whitney @ 2020-07-20 17:48 UTC (permalink / raw)
  To: yocto

Thanks for the tip, Joel.  I'm still new to this.  How should libgpiod-dev be added to my local.conf?
Do I just need to add it to EXTRA_IMAGE_FEATURES?  Do I still need to add libgpiod to IMAGE_INSTALL_append?

Your help is greatly appreciated!

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

* Re: [yocto] Adding libgpiod to Yocto Warrior 4.19.35 image?
  2020-07-20 17:48     ` Scott Whitney
@ 2020-07-21 10:49       ` Quentin Schulz
  2020-07-21 12:33         ` Scott Whitney
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2020-07-21 10:49 UTC (permalink / raw)
  To: Scott Whitney; +Cc: yocto

Hi Scott,

On Mon, Jul 20, 2020 at 10:48:52AM -0700, Scott Whitney wrote:
> Thanks for the tip, Joel.  I'm still new to this.  How should libgpiod-dev be added to my local.conf?
> Do I just need to add it to EXTRA_IMAGE_FEATURES?  Do I still need to add libgpiod to IMAGE_INSTALL_append?
> 

IMAGE_INSTALL is the way to go.

I recommend spending some time on watching
https://www.youtube.com/playlist?list=PLD4M5FoHz-TxMfBFrDKfIS_GLY25Qsfyj

Here you'll learn that you shouldn't really use local.conf for that
purpose and how to add packages to your image (and many other things).
Consider to subscribe, Jozef streams on Twitch every month or so and
then uploads the videos to the Youtube channel.

Cheers,
Quentin

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

* Re: Adding libgpiod to Yocto Warrior 4.19.35 image?
  2020-07-21 10:49       ` [yocto] " Quentin Schulz
@ 2020-07-21 12:33         ` Scott Whitney
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Whitney @ 2020-07-21 12:33 UTC (permalink / raw)
  To: yocto

Thanks, Quentin,  I'll take a look at Jozef's videos as time permits.  Getting lots of time pressure to get something working, and even our SoM vendor provides examples that modify local.conf... so much for helping us with the "right" way to do things.  I appreciate your advice, and can now see gpiod.h and libgpiod.so in my image.

Best regards,
Scott

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

end of thread, other threads:[~2020-07-21 12:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 20:17 Adding libgpiod to Yocto Warrior 4.19.35 image? Scott Whitney
2020-07-17 20:23 ` Scott Whitney
2020-07-19 20:57   ` [yocto] " Joel A Cohen
2020-07-20 17:48     ` Scott Whitney
2020-07-21 10:49       ` [yocto] " Quentin Schulz
2020-07-21 12:33         ` Scott Whitney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.