For Anyone Using Yocto/Poky and/or Poky-Tiny for Testing to Get GPIO Up and Running

Would me using the BeagleBoard-DeviceTrees work within Yocto with libgpiod-dev, python3-gpiod, and etc for utilizing the onboard GPIO peripherals?

I am trying to understand Yocto a bit better but seem to fail at their vast amount of documentation. They, their writers and document specialists, are extremely documenting things and in a positive manner.

The only complaint I have with them is the amount of data to process within their build environment to have success.

Anyway…

So, I can append my files within local.conf and put in the hardware so far. Drr. I know…extravagant over here.

Outside of fun time, when I install the python3-gpiod library within yocto builds for particular boards, BeagleV-Ahead and/or BeagleBone Black, I am getting really no data with gpioinfo.

I have the Chip and Line Numbers as usual but they are not populated.

  1. Would I need a DTS file along with .dtsi files to handle instantiating the GPIO peripheral on the boards?
  2. So, again. I am using Yocto and trying to figure out what methods I need to take to handle populating gpioinfo after boot.
  3. I can boot a random test Yocto build on the BeagleV-Ahead and with installed python3-gpiod libs and dependencies.

If there is some type of guide that illustrates this effort, please try to reason with me on it.

first, Yocto is a beast, spent several yrs learning the basics.

seconds, in the dts files that your using, does it have all the gpio information. i.e. what you see when you use gpioinfo?

i haven’t looked into gpioinfo, but isn’t it a script that reads this dts info?

1 Like

No. My DTS does not have anything in it yet. I have not created it just yet.

gpioinfo reports back I/O but the I/O are not marked by any values.

And…most likely about the gpioinfo report to output. I always just used it to handle whatever beagleboard.org personnel had done previously with DTS.

Here:

What technology in DTS should I be using to handle GPIO instances with python3-gpiod?

gpio-leds?

gpio-hog?

others?

This is where I am making follies so far. Soaking up the data from Yocto documentation has left me boggled on DTS for now. I need to figure out exactly how to propose a DTS in a format that is workable.

Also, dually noted here, I need to install the DTC in my build and its deps alongside other commands I will need to scratch this DTS in the bud.

Also:

I need to configure whereabouts of the .dtb used in this build for the BeagleV-Ahead to progress (I think).

And…another idea (I am full of them today since “conquering” a fresh build) is me having numerous files that are not used so far. I need to figure out where to place them and how to place them.

e.g. uEnv.txt is one of them and I have some other files too.

here is one part of bbblue dts, that i think is related to gettting gpioinfo to work.

&gpio0 {
	gpio-line-names =
		"UART3_CTS", /* M17 */
		"UART3_RTS", /* M18 */
		"UART2_RX", /* A17 */
		"UART2_TX", /* B17 */
		"I2C1_SDA", /* B16 */
		"I2C1_SCL", /* A16 */
		"MMC0_CD", /* C15 */
		"SPI1_SS2", /* C18 */
		"EQEP_1A", /* V2 */
		"EQEP_1B", /* V3 */
		"MDIR_2B", /* V4 */
		"BATT_LED_2", /* T5 */
		"I2C2_SDA", /* D18 */
		"I2C2_SCL", /* D17 */
		"UART1_RX", /* D16 */
		"UART1_TX", /* D15 */
		"MMC2_DAT1", /* J18 */
		"MMC2_DAT2", /* K15 */
		"NC", /* F16 */
		"WIFI_LED", /* A15 */
		"MOT_STBY", /* D14 */
		"WLAN_IRQ", /* K16 */
		"PWM_2A", /* U10 */
		"PWM_2B", /* T10 */
		"",
		"",
		"BATT_LED_4", /* T11 */
		"BATT_LED_1", /* U12 */
		"BT_EN", /* K17 */
		"SPI1_SS1", /* H18 */
		"UART4_RX", /* T17 */
		"MDIR_1B"; /* U17 */
};
1 Like

Okay. I am not sure I exactly understand but…

&gpio0 {
    gpio-line-names =
        ...
};

That will help me as I try to make the DTS for the beaglev-ahead. There is really so much that goes into handling the machines that beagleboard.org personnel make. It is not just about hardware.

The source and building is an enormous part as I can tell so far. Off to research more.

Oh and another thing…

In the gpio-line-names section for the beaglev-ahead, I found some leds1, leds2, and etc in the output for gpioinfo. I am currently trying to flash an led on the machine to test out my readings and knowledge. The user LEDs are what I am trying first since they are listed with gpioinfo.

Also. In one of my files, I have the uEnv.txt file for the beaglev-ahead Yocto/Poky distro in the built file.

how would I place it in the fs during booting? Is there an appropriate way or can I just place it in boot during an sftp session or during scp?

Does anyone know if networking is needed (ssh-server-openssh) in Yocto to address python3-gpiod?

I am finding little to no data on building around Poky (for now) while utilizing a network (ssh).

Anyway, reading commence. I will check in again and again and again and etc.

Something happened in the build this morning. Blah. tainted kernel, once more.

So, without due, I am building from scratch and ruining my processor and RAM on the development system. Oh! One thing I learned so far, it seems Yocto/Poky likes connman. New to me…sheesh.

Update

connman and its client is out on the Poky Distro used on my end. I cannot get the meta-networkingto accept the build with connman and its client libs.

I figured out uEnv.txt finally with extlinux.conf. This is good news for me. I have only been trying for over five years. Ha.

Update Two

connman and connman-client is not part of meta-networking. It is in /meta/recipes-connectivity/ and dislikes other backends for networking, e.g. systemd-networkd.

I need to put in another .bb file called wpa_supplicant (I guess), e.g. I cannot get the ethernet to work just yet. I guess accessing systemd as the init program is an issue with connman.

Does anyone know or can give some details on what you know about the Ethernet on the BeagleV-Ahead and testing for networking?