[Buildroot] Help with DTO
Łukasz Przeniosło
bremenpl at gmail.com
Sun Oct 29 15:24:01 UTC 2023
Hi Edgar and all,
Edgar, as you suggested, I went with the beaglebone_defconfig as a
template- when booted, I could normally export the GPIOs via sysfs.
Again, I do not understand why this was not possible in the "virgin"
buildroot system...
Right now I am trying to figure out how to provide a device tree overlay
on this system, that would define my specific baseboard (or cape, or
hat...). What I do need to do is:
Disable the HDMI pins,
I think I dont need to do anything with pins that I need to use as
outputs- I can just work with sysfs and userspace for these,
Configure specific pins as belonging to PRU0 or PRU1,
Enable the ethernet phy with DHCP by default (not sure if this is to be
defined in the overlay).
So question is: how to create such a DTO and make buildroot compile it
and then later uBoot automatically load it, so the booted system has all
the HW ready to be used?
I would appreciate all further feedback!
--
Łukasz Przeniosło
------ Original Message ------
>From "Łukasz Przeniosło" <bremenpl at gmail.com>
To "Edgar Bonet" <bonet at grenoble.cnrs.fr>
Cc buildroot at buildroot.org
Date 2023-10-28 23:04:22
Subject Re[2]: [Buildroot] Help with DTO
>Hi Edgar and thank you for the answer!
>
>This tutorial walks you through a manual configuration. Note that
>Buildroot ships a ready-made configuration you can use:
>
> make beaglebone_defconfig # load the ready-made defconfig
> make menuconfig # if you want to tweak it
> make
>I see, so this is like a more proper template for BBB specifically,
>thanks! I started from scratch, because I wanted to try to learn as
>much as possible + the fact that I do not need the HDMI pins.
>Furthermore, I need to reuse them as gpio outputs and PRU inputs- for
>these, I think I need to configure the pins in specific mode 5 (PRU1)
>or 6 (PRU0).
>
>I do not understand why you need a device tree overlay. The tutorial
>gets you a kernel together with the am335x-boneblack device tree. This
>device tree already defines four GPIO chips. Can't you see them? Try
>
> ls /dev/gpiochip*
>Yes, I do see them:
>
># ls /dev/gpiochip*
>/dev/gpiochip0 /dev/gpiochip1 /dev/gpiochip2 /dev/gpiochip3
>
>My problem was that I was unable to export any of the gpios:
>
># pwd
>/sys/class/gpio
># echo 66 > export
>[23448.896503] export_store: invalid GPIO 66
>sh: write error: Invalid argument
>
>I thought that these cannot be exported due to incorrect DTS- no?
>
>If you want to play with the GPIOs, I suggest you install the tools that
>come with libgpiod: in Target packages / Libraries / Hardware handling,
>select “libgpiod”, then “install tools”. Then, on the booted system,
>type
>Here, do you mean to choose all this in the make menuconfig dialog?
>
>Thanks already and in advance!
>
>--
>Łukasz Przeniosło
>
>
>------ Original Message ------
>From "Edgar Bonet" <bonet at grenoble.cnrs.fr>
>To "Łukasz Przeniosło" <bremenpl at gmail.com>; buildroot at buildroot.org
>Date 2023-10-28 20:58:38
>Subject Re: [Buildroot] Help with DTO
>
>>Hello!
>>
>>Łukasz Przeniosło wrote, about the BeagleBone:
>>> So I have the HW and virgin working Buildroot image baked thanks to
>>> this tutorial.
>>> (https://blog.billvanleeuwen.ca/creating-a-minimal-linux-system-for-the-beaglebone-black-with-buildroot)
>>
>>This tutorial walks you through a manual configuration. Note that
>>Buildroot ships a ready-made configuration you can use:
>>
>> make beaglebone_defconfig # load the ready-made defconfig
>> make menuconfig # if you want to tweak it
>> make
>>
>>> What I wanted to do next is to create a device tree overlay for all
>>> required GPIOs that would be compiled at kernel build time.
>>
>>I do not understand why you need a device tree overlay. The tutorial
>>gets you a kernel together with the am335x-boneblack device tree. This
>>device tree already defines four GPIO chips. Can't you see them? Try
>>
>> ls /dev/gpiochip*
>>
>>If you want to play with the GPIOs, I suggest you install the tools that
>>come with libgpiod: in Target packages / Libraries / Hardware handling,
>>select “libgpiod”, then “install tools”. Then, on the booted system,
>>type
>>
>> gpiodetect
>> gpioinfo
>>
>>You should see all the available GPIO chips, then all the GPIO lines.
>>
>>Regards,
>>
>>Edgar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20231029/fba1afb4/attachment-0001.html>
More information about the buildroot
mailing list