Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 19, 2019 05:06PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 19, 2019 05:19PM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 19, 2019 05:30PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 19, 2019 05:31PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 19, 2019 05:37PM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 21, 2019 07:10PM |
Registered: 5 years ago Posts: 258 |
[66517.863078] usb 1-2: new high-speed USB device number 2 using xhci_hcd [66518.013465] usb 1-2: New USB device found, idVendor=0930, idProduct=6544 [66518.020242] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [66518.027447] usb 1-2: Product: USB Flash Memory [66518.031931] usb 1-2: Manufacturer: [66518.036151] usb 1-2: SerialNumber: 001D92DC4AE6C910F3C50294 [66518.074210] usb-storage 1-2:1.0: USB Mass Storage device detected [66518.085982] scsi host2: usb-storage 1-2:1.0 [66518.095316] usbcore: registered new interface driver usb-storage [66518.108440] usbcore: registered new interface driver uas [66519.124589] scsi 2:0:0:0: Direct-Access USB Flash Memory 1.00 PQ: 0 ANSI: 2 [66519.138704] sd 2:0:0:0: Attached scsi generic sg1 type 0 [66519.145636] sd 2:0:0:0: [sdb] 7823296 512-byte logical blocks: (4.01 GB/3.73 GiB) [66519.164334] sd 2:0:0:0: [sdb] Write Protect is off [66519.169229] sd 2:0:0:0: [sdb] Mode Sense: 65 44 09 30
root@ls421de-stretch:/dev# find /dev/disk/by-path/ /dev/disk/by-path/ /dev/disk/by-path/platform-soc:pcie-controller-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0-part1 /dev/disk/by-path/platform-soc:pcie-controller-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0
root@ls421de-stretch:~# ls -l /sys/class/block/sdb lrwxrwxrwx 1 root root 0 Mar 21 19:09 /sys/class/block/sdb -> ../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0/block/sdb root@ls421de-stretch:~#
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 24, 2019 02:02PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 24, 2019 03:11PM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 25, 2019 10:18AM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 25, 2019 10:56AM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 25, 2019 12:02PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 26, 2019 05:09PM |
Registered: 14 years ago Posts: 41 |
|| [ "$1" == "shutdown" ]
#!/bin/bash which phytool > /dev/null if [ $? -ne 0 ]; then exit fi if [ "$1" == "halt" ] || [ "$1" == "poweroff" ] || [ "$1" == "shutdown" ]; then led2=8 else led2=9 fi current_reg="$(phytool write eth0/0/22 3 && phytool read eth0/0/16)" phytool write eth0/0/22 0 if [ ${#current_reg} -ne 6 ]; then exit fi new_reg=${current_reg:0:3}$led2${current_reg:4:2} phytool write eth0/0/22 3 && phytool write eth0/0/16 $new_reg phytool write eth0/0/22 0
chmod 755 /usr/local/bin/ls400-restart.sh
[Unit] Description = Set PHY LED2 pin to signal restart rather than poweroff [Service] Type=oneshot RemainAfterExit=true ExecStop=/usr/local/bin/ls400-restart.sh [Install] WantedBy = multi-user.target
$ ls -lha /lib/systemd/system/ls* -rw-r--r-- 1 root root 205 Mär 26 22:47 /lib/systemd/system/ls400-restart.service
systemctl enable ls400-restart.service ; systemctl start ls400-restart.service
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 26, 2019 05:25PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 26, 2019 05:39PM |
Registered: 5 years ago Posts: 258 |
phytool write eth0/0/22 3 && phytool write eth0/0/16 0x0881; phytool write eth0/0/22 0 shutdown now**note you need all 3 phytool commands on one line when running interactively. This is because the network is disconnected when you run the first command and reconnects after the last one which is not normally a problem when running at shutdown but can cause problems over ssh if you're not careful.
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 26, 2019 06:10PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 26, 2019 06:25PM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 27, 2019 11:25AM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 27, 2019 11:36AM |
Registered: 5 years ago Posts: 258 |
phytool write eth0/0/22 3 && phytool read eth0/0/16; phytool write eth0/0/22 0 phytool write eth0/0/22 3 && phytool write eth0/0/16 0x0881; phytool write eth0/0/22 0 phytool write eth0/0/22 3 && phytool read eth0/0/16; phytool write eth0/0/22 0
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 27, 2019 11:47AM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 27, 2019 02:07PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 27, 2019 02:19PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 02:14PM |
Registered: 14 years ago Posts: 41 |
root@debian:~# cat /etc/triggerhappy/triggers.d/1.conf KEY_OPTION 1 /bin/echo 1 >>/sys/devices/platform/gpio-leds/leds/led\:function\:red/brightness KEY_OPTION 0 /bin/echo 0 >>/sys/devices/platform/gpio-leds/leds/led\:function\:red/brightness
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 02:30PM |
Registered: 5 years ago Posts: 258 |
root@ls421de-stretch:~# /etc/init.d/triggerhappy stop [ ok ] Stopping triggerhappy (via systemctl): triggerhappy.service. root@ls421de-stretch:~# /etc/init.d/triggerhappy start [ ok ] Starting triggerhappy (via systemctl): triggerhappy.service. root@ls421de-stretch:~# /etc/init.d/triggerhappy restart [ ok ] Restarting triggerhappy (via systemctl): triggerhappy.service.
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 03:46PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 03:55PM |
Registered: 5 years ago Posts: 258 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 04:04PM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 28, 2019 04:35PM |
Registered: 5 years ago Posts: 258 |
#!/bin/bash # place in /lib/systemd/system-shutdown/ for debian based systems # other systems it's /usr/lib/systemd/system-shutdown/ phytool="/usr/local/bin/phytool" ifup eth0 sleep 5 if [ "$1" == "halt" ] || [ "$1" == "poweroff" ]; then led2=8 else led2=9 fi current_reg="$($phytool write eth0/0/22 3 && $phytool read eth0/0/16)" $phytool write eth0/0/22 0 ##don't try to make the change if the lookup failed if [ ${#current_reg} -eq 6 ]; then new_reg=${current_reg:0:3}$led2${current_reg:4:2} $phytool write eth0/0/22 3 && $phytool write eth0/0/16 $new_reg $phytool write eth0/0/22 0 fi ifdown eth0
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 30, 2019 03:50AM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 30, 2019 04:25AM |
Registered: 14 years ago Posts: 41 |
Re: Debian Stretch on Armada-370 Buffalo Devices (LS2XX, LS4XX, TS1XXX) March 30, 2019 02:55PM |
Registered: 5 years ago Posts: 258 |