config-pin tool doesn't work.

641 views
Skip to first unread message

Pavel Yermolenko

unread,
Sep 9, 2020, 10:30:30 AM9/9/20
to BeagleBoard
Hello,

I tried config-pin example from Exploring BeagleBone, 2nd Ed.:

debian@beaglebone:~$ config-pin -l p2.08
ERROR: open() for /sys/firmware/devicetree/base/ocp/P2_08_pinmux/pinctrl-names failed, No such file or directory
debian@beaglebone:~$

Any comments ?

Thanks.

Robert Nelson

unread,
Sep 9, 2020, 10:45:46 AM9/9/20
to Beagle Board
P2_08 is a PocketBeagle reference, I thought you had a normal BBB?

Regards,

--
Robert Nelson
https://rcn-ee.com/

Pavel Yermolenko

unread,
Sep 9, 2020, 10:51:01 AM9/9/20
to BeagleBoard
Oh yes, I didn't notice that example is for PocketBeagle.
So, for BBB it should be something like this: config-pin -l p9.08 or config-pin -l p8.08?
Regards.

On Wednesday, September 9, 2020 at 4:45:46 PM UTC+2, RobertCNelson wrote:

Pavel Yermolenko

unread,
Sep 9, 2020, 10:57:46 AM9/9/20
to BeagleBoard
Just tried p8 and p9:

debian@beaglebone:~$ config-pin -l p9.08
ERROR: open() for /sys/firmware/devicetree/base/ocp/P9_08_pinmux/pinctrl-names failed, No such file or directory
debian@beaglebone:~$ config-pin -l p8.08
ERROR: open() for /sys/firmware/devicetree/base/ocp/P8_08_pinmux/pinctrl-names failed, No such file or directory
debian@beaglebone:~$

Robert Nelson

unread,
Sep 9, 2020, 11:19:37 AM9/9/20
to Beagle Board
On Wed, Sep 9, 2020 at 9:58 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> Just tried p8 and p9:
>
> debian@beaglebone:~$ config-pin -l p9.08
> ERROR: open() for /sys/firmware/devicetree/base/ocp/P9_08_pinmux/pinctrl-names failed, No such file or directory

P9.08 is a SYS_5V, definitely not user touchable...

> debian@beaglebone:~$ config-pin -l p8.08
> ERROR: open() for /sys/firmware/devicetree/base/ocp/P8_08_pinmux/pinctrl-names failed, No such file or directory
> debian@beaglebone:~$

debian@bbb-pwr02-ser10:~$ config-pin -l P8.08

Available modes for P8_08 are: default gpio gpio_pu gpio_pd gpio_input timer

Please run:

sudo /opt/scripts/tools/version.sh

and we can help point out what's wrong..

Pavel Yermolenko

unread,
Sep 9, 2020, 1:39:48 PM9/9/20
to BeagleBoard


On Wednesday, September 9, 2020 at 5:19:37 PM UTC+2, RobertCNelson wrote:
Thanks. Here it is:

debian@beaglebone:~$ config-pin -l P8.08

ERROR: open() for /sys/firmware/devicetree/base/ocp/P8_08_pinmux/pinctrl-names failed, No such file or directory
debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
eeprom:[A335BNLT000C2017BBBG0292]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack.dts]
kernel:[4.19.94-ti-r42]
nodejs:[v10.21.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20200814.0-0~buster+20200814]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy sudo audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   30.277069] remoteproc remoteproc0: wkup_m3 is available
[   31.377520] remoteproc remoteproc0: powering up wkup_m3
[   31.377555] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[   31.377855] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    0.452881] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.454615] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
debian@beaglebone:~$

Regards,

Pavel.

Robert Nelson

unread,
Sep 9, 2020, 3:22:30 PM9/9/20
to Beagle Board
> Thanks. Here it is:
>
> debian@beaglebone:~$ config-pin -l P8.08
> ERROR: open() for /sys/firmware/devicetree/base/ocp/P8_08_pinmux/pinctrl-names failed, No such file or directory
> debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
> [sudo] password for debian:
> git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
> eeprom:[A335BNLT000C2017BBBG0292]
> model:[TI_AM335x_BeagleBone_Black]
> dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
> UBOOT: Booted Device-Tree:[am335x-boneblack.dts]

Your booting the mainline kernel default device tree, thus config-pin
will not work.

Either use factory 2020-04-06 image or feel free to grab a newer snapshot:

https://rcn-ee.net/rootfs/bb.org/testing/2020-09-07/

Pavel Yermolenko

unread,
Sep 10, 2020, 3:31:36 AM9/10/20
to BeagleBoard
On the link there are more than 10 images.
Is there a document that compares their features?

Pavel Yermolenko

unread,
Sep 10, 2020, 3:39:34 AM9/10/20
to BeagleBoard
Either use factory 2020-04-06 image

Does it exist on this page ?

Pavel Yermolenko

unread,
Sep 10, 2020, 5:33:05 AM9/10/20
to BeagleBoard
I've also tried on the image that I built using create-sdcard.sh script from TI SDK (when booted from SD card):

root@am335x-evm:~# config-pin -l P8.08
-sh: config-pin: command not found
root@am335x-evm:~#


Here is link where the procedure is described: Linux SD Card Creation Guide
By the way this Linux image is quite strange as some standard Linux commands aren't recognized, e.g. apt package manager.

I've found only one image that matches closely BBB ... at least it follows from its name:
from:

In other "stretch" folders from this repository I didn't find images that start with BBB or am335.
So, the only available image for BBB is BBB-blank-debian-10.5-console-armhf-2020-09-07-1gb.img.xz ?

Sincerely,

Pavel.

Robert Nelson

unread,
Sep 10, 2020, 11:34:58 AM9/10/20
to Beagle Board
On Thu, Sep 10, 2020 at 2:31 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> On the link there are more than 10 images.
> Is there a document that compares their features?

This page has more descriptions:

https://elinux.org/Beagleboard:Latest-images-testing

Robert Nelson

unread,
Sep 10, 2020, 11:36:15 AM9/10/20
to Beagle Board
On Thu, Sep 10, 2020 at 4:33 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> I've also tried on the image that I built using create-sdcard.sh script from TI SDK (when booted from SD card):
>
> root@am335x-evm:~# config-pin -l P8.08
> -sh: config-pin: command not found
> root@am335x-evm:~#

config-pin is a beagleboard.org script...

>
> Here is link where the procedure is described: Linux SD Card Creation Guide
> By the way this Linux image is quite strange as some standard Linux commands aren't recognized, e.g. apt package manager.

They use yocto, apt isn't installed by default..

>
> Concerning this link
> https://rcn-ee.net/rootfs/bb.org/testing/2020-09-07/
> I've found only one image that matches closely BBB ... at least it follows from its name:
> BBB-blank-debian-10.5-console-armhf-2020-09-07-1gb.img.xz
> from:
> https://rcn-ee.net/rootfs/bb.org/testing/2020-09-07/buster-console/
>
> In other "stretch" folders from this repository I didn't find images that start with BBB or am335.
> So, the only available image for BBB is BBB-blank-debian-10.5-console-armhf-2020-09-07-1gb.img.xz ?

any image with bone-* is for am335x.

Pavel Yermolenko

unread,
Sep 10, 2020, 1:38:32 PM9/10/20
to BeagleBoard
Frankly speaking I didn't find any descriptions except name of kernel.
There are 5 images in "stretch" family:
  • Console
  • IoT
  • IoT TIDL
  • LXQt
  • LXQt TIDL
I suppose that Console stands for image without graphical environment ?
All others are perhaps with graphical environment. Correct ?
Then IoT stands for image with support of some network protocols, e.g MQTT ?
LXQt probably stands for image wit Qt preinstalled ?
But what signifies TIDL ?

Sincerely,

Pavel.

On Thursday, September 10, 2020 at 5:34:58 PM UTC+2, RobertCNelson wrote:

Robert Nelson

unread,
Sep 10, 2020, 2:02:53 PM9/10/20
to Beagle Board
On Thu, Sep 10, 2020 at 12:38 PM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> Frankly speaking I didn't find any descriptions except name of kernel.
> There are 5 images in "stretch" family:
>
> Console
> IoT
> IoT TIDL
> LXQt
> LXQt TIDL
>
> I suppose that Console stands for image without graphical environment ?
> All others are perhaps with graphical environment. Correct ?
> Then IoT stands for image with support of some network protocols, e.g MQTT ?
> LXQt probably stands for image wit Qt preinstalled ?
> But what signifies TIDL ?

Console = smallest, very little installed
IoT = bigger than console with out of box BeagleBoard.org stuff
(Cloud9, Node-Red, etc..).
LXQt = IoT + LXQt

TIDL = TI https://training.ti.com/texas-instruments-deep-learning-tidl-overview

Pavel Yermolenko

unread,
Sep 10, 2020, 2:22:59 PM9/10/20
to BeagleBoard


On Thursday, September 10, 2020 at 8:02:53 PM UTC+2, RobertCNelson wrote:
On Thu, Sep 10, 2020 at 12:38 PM Pavel Yermolenko <py....@sunrise.ch> wrote:
>
> Frankly speaking I didn't find any descriptions except name of kernel.
> There are 5 images in "stretch" family:
>
> Console
> IoT
> IoT TIDL
> LXQt
> LXQt TIDL
>
> I suppose that Console stands for image without graphical environment ?
> All others are perhaps with graphical environment. Correct ?
> Then IoT stands for image with support of some network protocols, e.g MQTT ?
> LXQt probably stands for image wit Qt preinstalled ?
> But what signifies TIDL ?

Console = smallest, very little installed
Ok

IoT = bigger than console with out of box BeagleBoard.org stuff
(Cloud9, Node-Red, etc..).
Does exist somewhere the whole list of features ?

LXQt = IoT + LXQt
Frankly speaking, didn't understand.
In the preview they are talking on AM57x. So, does not work for BBB?
Sincerely,
Pavel
P.S. Is my supposition correct that all images except console feature graphical environment ?

Robert Nelson

unread,
Sep 10, 2020, 2:29:31 PM9/10/20
to Beagle Board
>> Console = smallest, very little installed
>
> Ok
>
>> IoT = bigger than console with out of box BeagleBoard.org stuff
>> (Cloud9, Node-Red, etc..).
>
> Does exist somewhere the whole list of features ?

It's just the default out of box experience, so things really get
added all the time, whether from GSOC or any other code events.

>> LXQt = IoT + LXQt
>
> Frankly speaking, didn't understand.

https://lxqt.github.io/

LXQt is a lightweight desktop based on Qt

>> TIDL = TI https://training.ti.com/texas-instruments-deep-learning-tidl-overview
>
> In the preview they are talking on AM57x. So, does not work for BBB?

TIDL is AM57xx only, it takes a ton of room, so those libraries are
not installed on a base image.

> Sincerely,
> Pavel
> P.S. Is my supposition correct that all images except console feature graphical environment ?

Only the LXQt images have xorg installed.

Pavel Yermolenko

unread,
Sep 11, 2020, 8:01:06 AM9/11/20
to BeagleBoard
After flashing bone-eMMC-flasher-debian-10.5-iot-armhf-2020-08-25-4gb.img the tool config-pin works.
Thanks !
Before I had this image in eMMC:
bone-debian-10.3-iot-armhf-2020-04-06-4gb.img

Why on BBB-dedicated page they put "mainline kernel default device tree" image ?

Sincerely.

Pavel.

Pavel Yermolenko

unread,
Sep 14, 2020, 9:15:26 AM9/14/20
to BeagleBoard
I was a little hasty to say what works.
The version of config-pin, installed on my system, is quite shrinked.

debian@beaglebone:~$ config-pin -h

GPIO Pin Configurator

Usage: config-pin -c <filename>
       config-pin -l <pin>
       config-pin -q <pin>
       config-pin <pin> <mode>

debian@beaglebone:~$


Contrary to the version, described in the book of Derek Molloy, there is no such options as -a, -i, -f,

Pavel Yermolenko

unread,
Sep 14, 2020, 9:23:21 AM9/14/20
to BeagleBoard
Moreover, the -q option (pin querry) doesn't provide information of the pin mode (direction) and its value:

debian@beaglebone:~$ config-pin -q P9.12

Current mode for P9_12 is:     gpio

debian@beaglebone:~$


In fact, there is no information at all!

Robert Nelson

unread,
Sep 14, 2020, 10:48:35 AM9/14/20
to Beagle Board
it got rewritten and replaced by something that's maintainable.

Patches welcome..

https://github.com/beagleboard/bb.org-overlays/tree/master/tools/pmunts_muntsos



Regards,
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/c215f6ce-3dfb-4cf0-8bec-882bc536133eo%40googlegroups.com.

Robert Nelson

unread,
Sep 14, 2020, 10:52:03 AM9/14/20
to Beagle Board

Pavel Yermolenko

unread,
Sep 14, 2020, 10:57:21 AM9/14/20
to BeagleBoard
Hi Robert,

I've tried the version from your link.
It seems that nothing changed:

--2020-09-14 14:52:27--  https://raw.githubusercontent.com/pmunts/muntsos/master/bootkernel/initramfs/config-pin.c
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5571 (5.4K) [text/plain]
Saving to: 'config-pin.c'

config-pin.c                         100%[===================================================================>]   5.44K  --.-KB/s    in 0.002s  

2020-09-14 14:52:27 (2.78 MB/s) - 'config-pin.c' saved [5571/5571]

debian@beaglebone:~$ ls
bin  config-pin.c  exploringbb
debian@beaglebone:~$ gcc config-pin.c -o config-pin
debian@beaglebone:~$ ls
bin  config-pin  config-pin.c  exploringbb
debian@beaglebone:~$ ./config-pin -i P9.12
ERROR: open() for /sys/devices/platform/ocp/ocp:-I_pinmux/state failed, No such file or directory
debian@beaglebone:~$ ./config-pin -h


GPIO Pin Configurator

Usage: config-pin -c <filename>
       config-pin -l <pin>
       config-pin -q <pin>
       config-pin <pin> <mode>

debian@beaglebone:~$


Sincerely,

Pavel

On Monday, September 14, 2020 at 4:48:35 PM UTC+2, RobertCNelson wrote:
it got rewritten and replaced by something that's maintainable.

Patches welcome..

https://github.com/beagleboard/bb.org-overlays/tree/master/tools/pmunts_muntsos



Regards,

On Mon, Sep 14, 2020 at 8:23 AM Pavel Yermolenko <py....@sunrise.ch> wrote:
>
> Moreover, the -q option (pin querry) doesn't provide information of the pin mode (direction) and its value:
>
> debian@beaglebone:~$ config-pin -q P9.12
>
> Current mode for P9_12 is:     gpio
>
> debian@beaglebone:~$
>
> In fact, there is no information at all!
>
> On Monday, September 14, 2020 at 3:15:26 PM UTC+2, Pavel Yermolenko wrote:
>>
>> I was a little hasty to say what works.
>> The version of config-pin, installed on my system, is quite shrinked.
>>
>> debian@beaglebone:~$ config-pin -h
>>
>> GPIO Pin Configurator
>>
>> Usage: config-pin -c <filename>
>>        config-pin -l <pin>
>>        config-pin -q <pin>
>>        config-pin <pin> <mode>
>>
>> debian@beaglebone:~$
>>
>> Contrary to the version, described in the book of Derek Molloy, there is no such options as -a, -i, -f,
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagl...@googlegroups.com.

Robert Nelson

unread,
Sep 14, 2020, 11:03:51 AM9/14/20
to Beagle Board
On Mon, Sep 14, 2020 at 9:57 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> Hi Robert,
>
> I've tried the version from your link.
> It seems that nothing changed:

patches welcome

Regards,

Pavel Yermolenko

unread,
Sep 14, 2020, 11:07:53 AM9/14/20
to BeagleBoard
Which version of config-pin did Derek Molloy use in his book?
It no longer exists ?

On Monday, September 14, 2020 at 5:03:51 PM UTC+2, RobertCNelson wrote:

Robert Nelson

unread,
Sep 14, 2020, 11:12:11 AM9/14/20
to Beagle Board
On Mon, Sep 14, 2020 at 10:08 AM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>
> Which version of config-pin did Derek Molloy use in his book?
> It no longer exists ?

It's stored locally under:

/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin

cp it to /usr/local/bin/

Dennis Lee Bieber

unread,
Sep 14, 2020, 11:12:23 AM9/14/20
to Beagleboard
On Mon, 14 Sep 2020 06:15:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGO...@public.gmane.org> wrote:

>I was a little hasty to say what works.
>The version of *config-pin*, installed on my system, is quite shrinked.
>

The older config-pin is, as I recall, a shell script. The current
config-pin is a compiled executable.

debian@beaglebone:~$ which config-pin
/usr/bin/config-pin
debian@beaglebone:~$ sudo find / -iname "config-pin*"
[sudo] password for debian:
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin
/opt/source/bb.org-overlays/tools/pmunts_muntsos/config-pin.c
/usr/bin/config-pin


debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin
config-pin [-a] <pin> <mode>
Set <pin> to <mode>, configuring pin multiplexing and optionally
configuring the gpio. Valid <mode> strings vary based on <pin>,
however all pins have a default and gpio mode. The default mode is
the reset state of the pin, with the pin mux set to gpio, the pull
up/down resistor set to it's reset value, and the pin receive buffer
enabled. To setup gpio, the following <mode> strings are all valid:

gpio :
Set pinmux to gpio, existing direction and value unchanged
in | input:
Set pinmux to gpio and set gpio direction to input
out | output :
Set pinmux to gpio and set gpio direction to output
hi | high | 1 :
Set pinmux to gpio and set gpio direction to output driving
high
lo | low | 0 :
Set pinmux to gpio and set gpio direction to output driving low

To enable pull-up or pull-down resistors, a suffex may be appended to
any of the above gpio modes. Use + or _pu to enable the pull-up
resistor
and - or _pd to enable the pull-down resistor. Examples:

in+ | in_pu:
Enable pull-up resistor and setup pin as per input, above.
hi- | hi_pd:
Enable pull-down resistor and setup pin as per high, above.
While the pull-down resistor will be enabled, it will not do
much
until application software changes the pin direction to input.

config-pin -l <pin>
list valid <mode> values for <pin>

config-pin -i <pin>
show information to <pin>

config-pin -q <pin>
query pin and report configuration details

config-pin -f [file]
Read list of pin configurations from file, one per line
Comments and white-space are allowed
With no file, or when file is -, read standard input.
config-pin -h
Display this help text

debian@beaglebone:~$ config-pin

GPIO Pin Configurator

Usage: config-pin -c <filename>
config-pin -l <pin>
config-pin -q <pin>
config-pin <pin> <mode>

debian@beaglebone:~$

>Contrary to the version, described in the book of Derek Molloy, there is no
>such options as *-a*, *-i*, *-f*,

ANYTIME you are following a book and encounter a difference, you need
to study which version of the OS was present at that time. Even the 2nd
Edition of the book was likely behind a version or two by the time it was
printed.

Per page 32 of the book, it was written when Debian Stretch was still
in use. Standard images have been Debian Buster since April of this year
(though the config-pin change might have occurred anytime in 2019, or even
late 2018, as the 2nd edition shipped [from Amazon] January 14 2019). Based
on some screen captures, the book was using a February 2018 image, and the
examples were run in April 2018. That's a whole 2.5 years ago.

{Side note: Raspberry-Pi went to Buster in the summer of 2019, about two
weeks before Debian Buster was officially released -- the R-Pi 4B was
different enough that all the work to get it to run was done on pre-release
Buster.}



>Moreover, the -q option (pin querry) doesn't provide information of the pin
>mode (direction) and its value:
>
>debian@beaglebone:~$ config-pin -q P9.12
>
>Current mode for P9_12 is: gpio
>
>debian@beaglebone:~$
>
>In fact, there is no information at all!

debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q
P9.12
P9_12 Mode: default Direction: in Value: 1
debian@beaglebone:~$


--
Dennis L Bieber

Pavel Yermolenko

unread,
Sep 14, 2020, 11:29:19 AM9/14/20
to BeagleBoard
Ok, thanks !


On Monday, September 14, 2020 at 5:12:23 PM UTC+2, Dennis Bieber wrote:
On Mon, 14 Sep 2020 06:15:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko

Szabó Benedek Ákos

unread,
Oct 17, 2020, 9:16:17 AM10/17/20
to BeagleBoard
Hi there!
I have the same problem, with my BeagleBone.
When I run the command:
root@beaglebone:~# /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2_06

I get this error msg:
P2_06 pinmux file not found!
bash: /sys/devices/platform/ocp/ocp*P2_06_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P2_06_pinmux/state

As I read, I only have to flash a new image which is bone-eMMC-flasher-debian-10.5-iot-armhf-2020-08-25-4gb.img as Pavel mentioned it?
Then it will work?

Thx
Regards,
Bence
py.o...@sunrise.ch a következőt írta (2020. szeptember 14., hétfő, 17:29:19 UTC+2):
Ok, thanks !


On Monday, September 14, 2020 at 5:12:23 PM UTC+2, Dennis Bieber wrote:
On Mon, 14 Sep 2020 06:15:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko

Szabó Benedek Ákos

unread,
Oct 17, 2020, 1:30:15 PM10/17/20
to BeagleBoard
Tried flashing the new image, didnt boot with the eMMC flasher image.
Also tried the new IoT image, still the same error :(
Can anyone help?

Dennis Lee Bieber

unread,
Oct 17, 2020, 1:41:40 PM10/17/20
to Beagleboard
On Sat, 17 Oct 2020 09:40:08 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Szabó Benedek Ákos
<szabobenedekakos-Re...@public.gmane.org> wrote:

>Tried flashing the new image, didnt boot with the eMMC flasher image.

I tend to stay away from the downloaded flasher images. I prefer to use
an SD card image, get it configured (and updated since they may be behind
in security updates), and only after I'm happy do I edit the /boot/uEnv.txt
to make it a flasher image.

>Also tried the new IoT image, still the same error :(

What does "didn't boot" and "same error" mean?. What did the LEDs do?

HOW did you write the image to the SD card? The image files are just
that -- complete file system images... If you just copied it to the SD
card, it won't do anything. You have to use special tools to place the
image contents onto the SD card. BalenaEtcher is the current favored tool
for doing this.


--
Dennis L Bieber

evilwulfie

unread,
Oct 17, 2020, 1:51:46 PM10/17/20
to beagl...@googlegroups.com
Remember you cannot flash the BBB while plugged into the USB port.
You must use a external 5v supply
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/0512c5d8-26cc-4a11-badb-5c37d639d72dn%40googlegroups.com.

Szabó Benedek Ákos

unread,
Oct 17, 2020, 2:54:07 PM10/17/20
to BeagleBoard
Hi Dennis!

I'm an IT guy so you can imagine I didnt copy the image directly to SD card, used Etcher.

I dont really get it; how do u edit the uEnv.txt file to be a flasher image?

I flashed the eMMC flasher image to an sd card, booted the Pocketbeagle from that sd card. It started to boot, then all four leds stayed on, system didnt boot.
So after this, I flashed the latest (2020-08-25) image to another SD card, booted, and the P2_06 and P2_18 pinmux file still cannot be found there.

jonnymo

unread,
Oct 17, 2020, 4:40:47 PM10/17/20
to Beagle Board
At the end of the uEnv.txt file., there is the following section:
Ref:

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

If you have a Linux system (not a VM on Windows) or another Beaglebone, you can take the uSD card and plug it into the other Linux system and then navigate to /boot/uEnv.txt and uncomment the last line with the " #cmdline" statement. Then, plug it back into the BB and power it on. Once the LED flashing, including the cylon pattern is done they should stop blinking or turn off.  Then, take the uSD card from the BB, and plug it back into the Linux and comment out the 'cmdline' and transfer back to the BB.
The other option if you do not have another Linux system is to install the Flasher image on a uSD, flash the BB, and then install a non Flash image to boot the BB with.

As far as working through the Dr. Molloy book, it might be best to just use an older image, say with a 4.9 (maybe 4.14) kernel and go from there. Otherwise you will run into situations where something is not going to work 

Also, on this page, it makes reference to a similar error that you are seeing:

Note the steps:
  • First disable the HDMI port on the BBB. This is done by editing the file ‘/boot/uEnv.txt’ and uncommenting the line         ‘disable_uboot_overlay_video=1’
  • Reboot the BBB after uncommenting the disable HDMI line.

Perhaps having an overlay enabled is related to the issue you are seeing?

Cheers,

Jon


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Szabó Benedek Ákos

unread,
Oct 17, 2020, 5:35:33 PM10/17/20
to BeagleBoard
Btw, Im using a Pocketbeagle, I flashed during it was connected to an USB HUB with external power supply. Is it ok or not?

Szabó Benedek Ákos

unread,
Oct 17, 2020, 5:36:11 PM10/17/20
to BeagleBoard
Im not really sure that the new eMMC flasher image would solve my problem about pinmux. The main problem is that I cannot use configure-pin on my PocketBeagle.
Idk if the original author of this thread solved this issue by installing new eMMC flasher image. I’ll try to comment out those lines and reboot my BB

jonnymo

unread,
Oct 17, 2020, 6:02:26 PM10/17/20
to Beagle Board
You had a question regarding editing the uEnv.txt file so I gave you info on that.

As far as the config-pin issue, is there anything for the pin seen under "/sys/devices/platform/ocp/" for the pin you are trying to use the config-pin tool with?


This is what I see on a BBBlack running Buster and a 4.19.94-ti-r51 kernel:
$ ls /sys/devices/platform/ocp/ocp\:P8_08_pinmux/
driver  driver_override  modalias  of_node  power  state  subsystem  uevent

$ config-pin -q P8.07

Current mode for P8_07 is:     default

Using the universal-io version of the tool:

$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P8.08
P8_08 Mode: default Direction: in Value: 1

I suspect the pin you are trying to run the command against is not listed under  "/sys/devices/platform/ocp/" .  Have you configured this pin?

Powering a PocketBeagle from a powered USB hub should be fine. 

Jon


Dennis Lee Bieber

unread,
Oct 18, 2020, 1:24:06 PM10/18/20
to Beagleboard
On Sat, 17 Oct 2020 12:05:29 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Szabó Benedek Ákos
<szabobenedekakos-Re...@public.gmane.org> wrote:

>Btw, Im using a Pocketbeagle, I flashed during it was connected to an USB
>HUB with external power supply. Is it ok or not?

Depends on the hub. USB 2 specs are for a maximum of 0.5A (500mA) at 5V
-- giving 2.5W. But if any other devices are attached to that hub, they too
are drawing power, and the hub may only be able to provide around 0.1A per
port.

A 3W charge-only USB power supply might be safer.

Unlike the BBB, the PB only has USB for power input. The BBB has a 5V
barrel connector for power-only supplies, and it is strongly recommended
that such be used for flashing on the BBB.

You never did answer the question of what the LEDs were doing on those
failed boot attempts. So far as I can tell from images, the PB has the same
four status LEDs as the BBB, just located differently. From
https://groups.google.com/forum/#!topic/beagleboard/LHAxeSki-eU

[] [] [] [] - off
[x] [] [] [] - on, starting mmc scan...
[x] [x] [] [] - scanning mmc...
[x] [x] [x] [] - processed boot script...
[x] [x] [x] [x] - jumping into boot...

(After that, if a flasher image is found, the LEDs run a Larson scanner
pattern until flashing is done, and then the board is shutdown; otherwise
they show system activity: heartbeat, eMMC, CPU, SD card.)

Unfortunately, the show-pins PERL script is only BBB aware, not PB.



--
Dennis L Bieber

jonnymo

unread,
Oct 18, 2020, 5:24:17 PM10/18/20
to Beagle Board
From my understanding, the PocketBeagle does not have an eMMC so the Flasher step is not needed.

Jon

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Szabó Benedek Ákos

unread,
Oct 18, 2020, 8:50:37 PM10/18/20
to BeagleBoard
Hi there!
Sorry for the late reply.
So, here is a summary, what I already did, and what I tried:
I have a problem configuring a pin P2_18 and P2_06 on PocketBeagle.

What I'm trying is to get SWCAN working on a GM car, but I have to set it up to HIGH.
When I run config-pin P2_18 hi it returns error:

config-pin P2_18 hi ERROR: open() for /sys/devices/platform/ocp/ocp:P2_18_pinmux/state failed, No such file or directory

I found no P2_18 or P2_06 pinmux file exists here:

/sys/devices/platform/ocp/ocp:

version.sh output:

opt/scripts/tools/version.sh
git:/opt/scripts/:[7cdc270818b76d829d247cf05fe309c320a3929a]
eeprom:[A335PBGL00A21743GPB30299]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-08-25]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gc9b3922522]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-pocketbeagle.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[PB-CAN0-00A0]
UBOOT: Loaded Overlay:[PB-CAN1-00A0]
UBOOT: Loaded Overlay:[PB-MCP2515-SPI1]
kernel:[4.19.94-ti-r50]
nodejs:[v10.21.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/PB-CAN0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/PB-CAN1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr6=/lib/firmware/PB-MCP2515-SPI1.dtbo]
uboot_overlay_options:[uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20200814.0-0~buster+20200814]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev i2c gpio admin spi iio docker tisdk weston-launch xenomai cloud9ide pwm eqep remoteproc]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   53.832040] remoteproc remoteproc0: wkup_m3 is available
[   54.008667] remoteproc remoteproc0: powering up wkup_m3
[   54.008700] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[   54.008997] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   55.838857] remoteproc remoteproc1: 4a334000.pru is available
[   55.872421] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   55.838857] remoteproc remoteproc1: 4a334000.pru is available
[   55.839046] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[   55.872421] remoteproc remoteproc2: 4a338000.pru is available
[   55.872630] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[    0.895597] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.905153] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 002 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

What can cause this error?
I tried to run pinmux-generator, but it throws error:

root@beaglebone:/opt/source/bb.org-overlays/tools/pinmux-generator# ./PocketBeagle.sh pinmux-4.0.1526-setup.run 100%[=====================================================================================================================================================================>] 39.87M 2.91MB/s in 14s 2020-10-17 15:20:15 (2.76 MB/s) - ‘pinmux-4.0.1526-setup.run’ saved [41810329/41810329] ./lib/pinmux.sh: line 220: ./pinmux-4.0.1526-setup.run: cannot execute binary file: Exec format error cp: cannot stat 'tmp/pinmux/deviceData/AM335x/AM335x.json': No such file or directory ################## P1_02 cat: AM335x.json: No such file or directory cat: AM335x.json: No such file or directory cat: AM335x.json: No such file or directory cat: AM335x.json: No such file or directory

Tried to install pinmux manually, but it doesnt support armhf architecture.

Also tried this config-pin command:

/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin 

Without any luck.

jonnymo

unread,
Oct 18, 2020, 9:18:30 PM10/18/20
to Beagle Board
With a PocketBeagle running Debian 10 (Buster) IoT image and kernel 4.19.94-ti-r51 I see this:

debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2_06
P2_06 Mode: default Direction: in Value: 0
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -i P2_06
Pin name: P2_06
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd gpio_input
Function information: gpio1_25 default gpio1_25 gpio1_25 gpio1_25 gpio1_25
Kernel GPIO id: 57
PRU GPIO id: 89
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -l P2_06
default gpio gpio_pu gpio_pd gpio_input

debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2_18
P2_18 Mode: default Direction: in Value: 0
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -i P2_18
Pin name: P2_18
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd gpio_input qep pru_ecap pruin
Function information: gpio1_15 default gpio1_15 gpio1_15 gpio1_15 gpio1_15 eqep2_strobe pru_ecap pru0_in15
Kernel GPIO id: 47
PRU GPIO id: 79
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -l P2_18
default gpio gpio_pu gpio_pd gpio_input qep pru_ecap pruin

debian@beaglebone:~$ config-pin -q P2_18                                        
Current mode for P2_18 is:     default

debian@beaglebone:~$ config-pin -q P2_06

Current mode for P2_06 is:     default

Note, I did do a 'sudo apt-get update' and sudo apt-get upgrade' and then updated the scripts and such listed in the following Beaglebone Upgrade link including the 'update_kernel.sh' script.


Cheers,

Jon

jonnymo

unread,
Oct 18, 2020, 9:32:13 PM10/18/20
to Beagle Board
This is how to set say P2_18 as an output and high.

debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2.18
P2_18 Mode: gpio Direction: in Value: 0
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin P2.18 gpio
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin P2.18 out
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin P2.18 hi
debian@beaglebone:~$ /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2.18
P2_18 Mode: gpio Direction: out Value: 1

I don't think the /usr/bin/config-pin tool can do this.

Cheers,

Jon

Szabó Benedek Ákos

unread,
Oct 19, 2020, 1:12:23 PM10/19/20
to BeagleBoard
Hi Jon!
I upgraded the kernel to the same version as you have.
This is the output:
root@beaglebone:~# /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -q P2_18
P2_18 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P2_18_pinmux/state

Still not working. In uEnv.txt file, I have this added:
uboot_overlay_addr6=/lib/firmware/PB-MCP2515-SPI1.dtbo
This is the MCP2515 which could read the SWCAN bus if it was set to HIGH.

jonnymo

unread,
Oct 19, 2020, 2:06:37 PM10/19/20
to Beagle Board
If you look at the P2_18 define, do you see a state listed?
Ex:
debian@beaglebone:~$ ls -lt /sys/devices/platform/ocp/ocp:P2_18_pinmux/state
-rw-rw-r-- 1 root gpio 4096 Oct 19 07:17 /sys/devices/platform/ocp/ocp:P2_18_pinmux/state

I have no other overlays enabled, so perhaps try removing what you have enabled and then see if the config-pin tool will work. Perhaps something in the overlay is over writing the pinmux config:
This is my config:

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[20c080bc91f243ef852a704758788a31083b0f9e]
eeprom:[A335PBGL00A21750EPB01280]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-08-25]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gc9b3922522]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-pocketbeagle.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
kernel:[4.19.94-ti-r51]
nodejs:[v10.21.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]

Cheers,

Jon




jonnymo

unread,
Oct 19, 2020, 8:30:14 PM10/19/20
to Beagle Board
It looks like P2_18 and P2_06 are being disabled in  PB-MCP2515-SPI1 to prevent a driver load but I suppose this is by design. 

/opt/source/bb.org-overlays/src/arm/PB-MCP2515-SPI1.dts
        fragment@1 {
                target = <&ocp>;
                __overlay__ {
                        P2_25_pinmux { status = "disabled"; };  /* SPI1 MOSI - gpio1_9 */
                        P2_27_pinmux { status = "disabled"; };  /* SPI1 MISO - gpio1_8 */
                        P2_29_pinmux { status = "disabled"; };  /* SPI1 CLK - gpio0_7 */
                        P2_30_pinmux { status = "disabled"; };  /* SPI1 CS0 - gpio3_17 */
                        P2_31_pinmux { status = "disabled"; };  /* SPI1 CS1 - gpio0_19 */
                        P2_08_pinmux { status = "disabled"; };  /* SWC nINT */
                        P2_32_pinmux { status = "disabled"; };  /* SWC nRESET */
                        P2_06_pinmux { status = "disabled"; };  /* SWC M0 */
                        P2_18_pinmux { status = "disabled"; };  /* SWC M1 */
                };
        }

Have you looked at this older issue posting for  PB-MCP2515-SPI1? Perhaps this will help.


Jon
Reply all
Reply to author
Forward
0 new messages