U-Boot v2016.09 and Pogoplug LED Light

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

U-Boot v2016.09 and Pogoplug LED Light

Postby woody » Thu Oct 17, 2019 8:42 pm

I've updated my Pogoplug E02 device to U-Boot v2016.09 and kernel 5.3.6-1. After the updates, the LED light on the front panel doesn't seem to be working anymore and it doesn't seem to be available. Is there a kernel module or u-boot setting that will get the LED working again?
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby moonman » Fri Oct 18, 2019 12:27 am

I don't have an E02 anymore, unfortunately. What's the output of
$this->bbcode_second_pass_code('', 'ls /sys/class/leds/')
and
$this->bbcode_second_pass_code('', 'dmesg | grep Machine')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby karog » Fri Oct 18, 2019 5:57 am

I also have a pogo E02 running
alarm/uboot-pogo_e02 2016.09-1 [installed]
$ uname -a
Linux e02 5.3.6-1-ARCH #1 PREEMPT Sat Oct 12 17:32:18 UTC 2019 armv5tel GNU/Linux
with no lit led.

Here is the requested output:
$this->bbcode_second_pass_code('', '
$ ls /sys/class/leds/
pogo_e02:green:health pogo_e02:orange:fault
$ dmesg|grep -i machine
[Sat Oct 12 18:06:42 2019] OF: fdt: Machine model: Cloud Engines Pogoplug E02
')

The following will light the led
$this->bbcode_second_pass_code('', '
$ cd /sys/devices/platform/gpio-leds/leds/pogo_e02:green:health
$ cat brightness
0
$ echo 1 > brightness
$ cat brightness
1
')
LED is now lit green. Similar works for orange.

But how to get old behavior of lighting on boot? I tried
$this->bbcode_second_pass_code('', 'fw_setenv arcNumber 3542')
but still no lit LED after reboot.
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby moonman » Fri Oct 18, 2019 7:36 am

arcNumber is for old non-fdt kernels so it will have to effect.

The patch is in place to turn the led on automatically: https://github.com/archlinuxarm/PKGBUIL ... ult-.patch

What's the output of
$this->bbcode_second_pass_code('', ' cat /sys/class/leds/pogo_e02:green:health/trigger')
It should be [default-on]

And what's the default brightness value? it should be 255
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby woody » Fri Oct 18, 2019 1:26 pm

OK, I got the same values as karog for 'ls /sys/class/leds/' and 'dmesg | Machine'.

But:
$this->bbcode_second_pass_code('', 'cat /sys/class/leds/pogo_e02:green:health/trigger
[none] usb-gadget usb-host kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock f1072004.mdio-bus-mii:00:link f1072004.mdio-bus-mii:00:1Gbps f1072004.mdio-bus-mii:00:100Mbps f1072004.mdio-bus-mii:00:10Mbps timer oneshot disk-activity disk-read disk-write ide-disk sata-disk1 sata-disk2 mtd nand-disk heartbeat cpu cpu0 activity default-on panic netdev')

Any idea what I need to do to make it work?
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby moonman » Fri Oct 18, 2019 2:18 pm

well, to turn it on manually
$this->bbcode_second_pass_code('', 'echo "default-on" > /sys/class/leds/pogo_e02:green:health/trigger')

To make it permanent:
$this->bbcode_second_pass_code('', 'echo "w /sys/class/leds/pogo_e02\:green\:health/trigger - - - - default-on" > /usr/lib/tmpfiles.d/leds.conf')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby woody » Fri Oct 18, 2019 8:05 pm

Ok that turned on the green LED for me. Two more questions:

1. Do I need to do something similar to set up the orange LED to display for a fault?

2. Previously, I had my Pogo set up to show disk activity by blinking the LED. It used this bash script to make it work:

$this->bbcode_second_pass_code('', '#!/bin/bash
/usr/bin/iostat -z -d 3 | /usr/bin/sed -u -e '1d' -e 's/Device.*/none/' -e 's/sd.*/heartbeat/' -e '/^$/d' > /sys/class/leds/status\:orange\:fault/trigger &')

Is there a way to get that working again?
-------------------------------------------------------
Edit: After some experimenting, I made a change to the script and I think it's working ok now:

$this->bbcode_second_pass_code('', '#!/bin/bash
/usr/bin/iostat -z -d 3 | /usr/bin/sed -u -e '1d' -e 's/Device.*/none/' -e 's/sd.*/heartbeat/' -e '/^$/d' > /sys/class/leds/pogo_e02\:orange\:fault/trigger &')

I don't know if the orange LED will show a fault condition, though.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby moonman » Fri Oct 18, 2019 10:02 pm

The script is completely unnecessary. Look into "netdev" trigger. You can use tmpfiles to enable it on boot just like above.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby woody » Fri Oct 18, 2019 10:41 pm

Great, I'll check it out. Why is it called 'netdev' though?. I tried using 'disk-activity', 'disk-read', 'disk-write', triggers, but they didn't seem to do anything. What activity triggers 'netdev'?
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: U-Boot v2016.09 and Pogoplug LED Light

Postby moonman » Sat Oct 19, 2019 12:18 am

You can read about it in the comments: https://lore.kernel.org/patchwork/patch/856323/
(I couldn't find any actual documentation).

For me on GoFlexHome I did this to make orange LED indicate network activity on eth0.
$this->bbcode_second_pass_code('', 'cd /sys/class/leds/status\:orange\:fault/
echo "netdev" > trigger
echo 1 > rx
echo 1 > tx
echo "eth0" > device_name')

And so tmpfiles does this:

/usr/lib/tmpfiles.d/leds.conf
$this->bbcode_second_pass_code('', 'w /sys/class/leds/status\:orange\:fault/trigger - - - - netdev
w /sys/class/leds/status\:orange\:fault/device_name - - - - eth0
w /sys/class/leds/status\:orange\:fault/rx - - - - 1
w /sys/class/leds/status\:orange\:fault/tx - - - - 1')

Edit: sorry, I misread your post on my phone, I though you were looking for network activity LED. AFAIK there isn't a straightforward one for USB hdd's, so your script should do. The available triggers will only work with hdds attached to sata ports (which E02 has none).
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 6 guests