Welcome! Log In Create A New Profile

Advanced

Debian on Synology RS816 (Armada 385)

Posted by zifxify 
Re: Debian on Synology RS816 (Armada 385)
May 13, 2019 04:46AM
Richard,

> Not a typo;
> rootfs is on 10GB raid 1
> swap 2GB raid 1
> files 5.4TB raid 5
>
> Your rootfs stripped down a bit but including dev
> tools takes up 875M so circa 10%. This box won't
> have much in the way of software installed so 10GB
> should be fine. All data will go on the raid 5
> mount.

I see.


> Now the install is complete I am just preparing my
> build environment including building linux-5.1.1
> then I will be ready to test v9 DTS.

> I may have a new challenge for you,

Oh no :)

> I hooked up my
> Synology 5 bay nas via serial and was surprised to
> see it used grub as a boot loader, I didn't spend
> anytime with it but I bet grub has been stripped
> of most of its modules. One for the future perhaps
> :)

That 5-bay Synology might be Intel SoC? I don't think ARM SoCs use Grub for boot loader! that'd be the first.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 13, 2019 05:12AM
@bodhi
Yes 4 core Intel Atom @2.4ghz, actually quite a quick box with 4 x nic's 2 x e-sata plus pcie based ssd cache accelerator. It used to be my main backup box with 5 x 8TB 7,000rpm HDD's but its been retired for a couple of years.

I know a little bit more about grub than I do u-boot but still next to nothing when it comes to hacking. Recovery from a console is very doable with grub but not so easy if Synology have stripped out modules (like usb loading) I'm only speculating but I wouldn't mind betting some kind of network capabilities will be in there though. When we get through this one I will post all I can find into a new thread and see what others may be able to chip in.

Back to watching paint dry AKA my kernel to finish building.
Re: Debian on Synology RS816 (Armada 385)
May 13, 2019 02:34PM
@bodhi
All done at last!
Booted with v9 DTS and the led's operate as you described
Both echo commands work
root@debian:~# echo none > /sys/class/leds/rs816:green:sata1/trigger
root@debian:~# echo ide-disk1 > /sys/class/leds/rs816:green:sata1/trigger

In terms of variance from stock we have the following;

1) Power LED in stock flashes until the system is up then stays on solid green. On ours the LED continues to flash.

2) NIC LED's in stock is solid green if ethernet cable is plugged in and flashes green on activity. On ours it is tied to HDD LED's and performs in the same manner as the HDD LED

3) HDD LED in stock is solid green for disk inserted and ok, solid amber for disk inserted not ok / booting and in both cases flashes on activity. On ours default is off and flashes on activity for all.

4) STATUS LED in stock shows green for ok. In ours is not active at all.

None of these variances bother me personally but do you think adding "default-state = "on";" to the gpio-leds section would work illuminating the LED then flash on activity which would get us nearer stock ?

EDIT
On 2) I omitted in Ours that the NIC LED's only light when an ethernet cable is inserted as per stock.



Edited 1 time(s). Last edit at 05/13/2019 02:51PM by richjn.
Re: Debian on Synology RS816 (Armada 385)
May 13, 2019 06:12PM
Richard,


> 1) Power LED in stock flashes until the system is
> up then stays on solid green. On ours the LED
> continues to flash.

This we need to work on. It seems there must be a GPIO for this (unless they hardwired Power LED to something).

>
> 2) NIC LED's in stock is solid green if ethernet
> cable is plugged in and flashes green on activity.
> On ours it is tied to HDD LED's and performs in
> the same manner as the HDD LED

Not sure why. It should not be tied to HDD LED.

>
> 3) HDD LED in stock is solid green for disk
> inserted and ok, solid amber for disk inserted not
> ok / booting and in both cases flashes on
> activity.

> On ours default is off and flashes on
> activity for all.

This is the prefered behavior. HDD LED should be off all the time and flash only on activity.

>
> 4) STATUS LED in stock shows green for ok. In ours
> is not active at all.

Ok. So this is the System LED then. Does User's Manual describe what this LED for?

> None of these variances bother me personally but
> do you think adding "default-state = "on";" to the
> gpio-leds section would work illuminating the LED
> then flash on activity which would get us nearer
> stock ?

I think that's not consistent with most other NAS :) Power LED should be on. System LED should be on. Peripheral (USB, HDD, Network) should be off and flash on activity.

But of course, the behavior is what you want your box to be. If you look at /etc/rc.local, I have some LED controls in there. Any customization you'd like can be done at that time.

For example, if you have a SMART status that you want to see (eg. SMART disk error rate increased by certain margin), the LED can be used to turn amber, and red to show a warning or an urgent warning that your disk about to fail.

>
> EDIT
> On 2) I omitted in Ours that the NIC LED's only
> light when an ethernet cable is inserted as per
> stock.

That's good.

====

It seems there is more works to do on LEDs that we want to do out eventually. Except for the Power LED, it should be fixed sooner because the annoying light flashing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 12:00AM
@zifxify,

I sent you PM.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 12:18AM
Richard,

As I mentioned, could you downgrade your kernel to on your rootfs to 4.12.4-mvebu-tld-1 and see if things work the same way?

It it is not convenient, it’s ok. I will just release kernel 5.1-mvebu-tld-1 with the v9 DTS. And the next user will test it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/14/2019 12:20AM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 01:42AM
@bodhi
Been out all morning but replied via pm before I saw your above post.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 03:39AM
Richard,

Thanks for the confirmation!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 04:30AM
@bohdi
Slightly pointless post but just wanted to say I am trying to track down what controls the power LED states. I was very careful going through the gpio pins last time but I admit my attention was more on the other LED's so I will redo the pin cycling just to be 100% sure its not gpio linked.

I think the answer may be found in the synobios module but as a propriety piece of software finding current versions is proving tough but the DSM 4.* versions I have found does suggest the module exposes a number of interfaces we can't see in stock Debian.

Anyway just wanted to say I am still on the job :)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 04:38AM
Richard,

> I think the answer may be found in the synobios
> module but as a propriety piece of software
> finding current versions is proving tough but the
> DSM 4.* versions I have found does suggest the
> module exposes a number of interfaces we can't see
> in stock Debian.

Ah! we want to compare that with what we see run my latest patched kernel. A lot of those are in the initramfs modules already, I hope.

> Anyway just wanted to say I am still on the job :)

Real engineer won't leave stones unturned :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 04:49AM
@bodhi
I'm running linux-5.1.1 patched with your 4.20.6 patch and using your config updated simply via make menuconfig to get new configs plus a couple of minor changes from me.

Does your latest patch contain more goodies ? and if so can I get a copy please.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 04:50AM
Hi Richard,

We should try the fan speed to see if it can be controlled at each speed specified in the DTS.

Does your hwmon have some target like this?

/sys/class/hwmon/hwmon1/fan1_target

What is in

ls -l /sys/class/hwmon/hwmon*

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 04:54AM
Richard,

> I'm running linux-5.1.1 patched with your 4.20.6
> patch and using your config updated simply via
> make menuconfig to get new configs plus a couple
> of minor changes from me.

I think it is all I got.

>
> Does your latest patch contain more goodies ? and
> if so can I get a copy please.

No difference from that last patch. Just more configs that are available in mainline kernel 5.1, on top of 4.20.6 configs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 05:13AM
@bohdi
Yes, the fan control it was on my list for later but you are right it does need to be bottomed out.
ls -l /sys/class/hwmon/hwmon*
lrwxrwxrwx 1 root root 0 May 14 18:04 /sys/class/hwmon/hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:01/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 May 14 18:04 /sys/class/hwmon/hwmon1 -> ../../devices/platform/gpio-fan/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 May 14 18:04 /sys/class/hwmon/hwmon2 -> ../../devices/virtual/thermal/thermal_zone0/hwmon2

We have 7 control speeds in our DTS
echo 1 > /sys/class/hwmon/hwmon1/fan1_target

Sets the fan to high speed echo 2 - 7 doesn't change anything echo 0 takes us back to low speed.

The following link is old but interesting and suggests without Synology module all you get is two speeds.

Synology synobios
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 05:47AM
@bodhi
Power LED is not on gpio

From the synobios write up linked above the Power LED can be set to solid (non-flashing) with the following
printf  "\\x34" > /dev/ttyS1

And the status LED set to green with
printf  "\\x38" > /dev/ttyS1

But apart from "looking nice" just setting them without some condition being met seems pointless and is it even possible to implement in the DTS ?



Edited 1 time(s). Last edit at 05/14/2019 05:48AM by richjn.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 05:49PM
@bodhi
Thinking through things that need attention / implementing

1) Fix poweroff
Currently from Debian filesystems are unmounted but the disks are left powered and the system is in a "hung" state requiring the mains to be switched off / on before you can power back up. I have removed the poweroff function in the v10 DTS attached to see if it made any difference but it doesn't.
Also holding the power button on the front panel does nothing but perhaps it needs a keybind mapping first to work, this was evident both before and after I removed the poweroff function in the DTS

2) Fan Control
Also in v10 DTS I have reduced the fan control levels to two (0 and 1) and for my own use I plan to echo the fan speed increase from the user environment based on polling cpu temp in hwmon0. Whether it will ever be triggered on this box is a question as even on low fan speed (default at boot) I can't get this box hot even whilst compiling the kernel.

3) HDD LED's
I plan to set the power led and status led to solid green in rc.local then use smartd and mdmon to flash them orange in addition to emailing me in the event of a fault.

4) NIC LED's
Currently activity is being generated by the HDD trigger not network activity. When enabling GPIO pin 6 the NIC led's are brought up in addition to the HDD leds it is odd though that only NIC's with an ethernet cable plugged in will light up. I'm not sure where to go on this one.

5) Flash MTD
I would like to flash zImage and the DTS ? to mtd and update fw_envs, If you could give me some pointers I would very much appreciate it.
Attachments:
open | download - armada-385-synology-rs816-v10.dts (6.4 KB)
open | download - armada-385-synology-rs816-v10.dtb (17.7 KB)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 06:44PM
Richard,

Let me go through the list one-by-one in the next series of posts.

2) Fan

Two speeds is what I got on the Thecus N2350, too.

It seems that mainline Armada GPIO fan control is generic. Not enough granularity, but it is usable.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:05PM
1) Fix poweroff
Currently from Debian filesystems are unmounted but the disks are left powered and the system is in a "hung" state requiring the mains to be switched off / on before you can power back up. I have removed the poweroff function in the v10 DTS attached to see if it made any difference but it doesn't.
Also holding the power button on the front panel does nothing but perhaps it needs a keybind mapping first to work, this was evident both before and after I removed the poweroff function in the DTS

====

The Power Off should be in the DTS. It is apparently GPIO poweroff, as the DS116 DTS already has this. The GPIO number is most likely the same for both boxes (i.e. same vendor). In a rare scenario, it could be different.

So boot with serial console (some activity can only be observed with serial console), with V9 DTS, if that's the only difference from these 2 versions. And shutdown:
shutdown -h now

Pease post the tail end of serial console log where the shutdown begins. And describe what the power state of the box after (fan, disk, LED).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:07PM
3) HDD LED's
I plan to set the power led and status led to solid green in rc.local then use smartd and mdmon to flash them orange in addition to emailing me in the event of a fault.

===

That's your customization for your box. So it sounds good, whatever you want the behavior to be!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:10PM
4) NIC LED's
Currently activity is being generated by the HDD trigger not network activity. When enabling GPIO pin 6 the NIC led's are brought up in addition to the HDD leds it is odd though that only NIC's with an ethernet cable plugged in will light up. I'm not sure where to go on this one.

===

Strange behavior, I think we don't know something about the NIC setup (in code). Is this the same chip as the DS166 box has?

It does not light up without a cable plugged in. That's normal.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:14PM
5) Flash MTD
I would like to flash zImage and the DTS ? to mtd and update fw_envs, If you could give me some pointers I would very much appreciate it.

===

This is something we should do next. More important than other peripheral stuff :)

Please make a separate post when we start doing this.

- Boot with the serial console.
- Login and

cat /proc/mtd
cat /etc/fw_env.config
fw_printenv

And post the entire serial console log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:28PM
@bodhi
I had started the shutdown -h before I saw your last post I will get to the flash bit straight after this post.

The system is going down for system halt NOW!
INIT: Switching to run[info] Using makefile-style concurrent boot in runlevel 0.
[ ok ] Stopping hotplug events dispatcher: systemd-udevd.
[....] Stopping busybox' klogd implementation: klogd2780 (klogd)
Stopped klogd (pid 2780).
. ok
[info] Saving the system clock.
[info] Hardware Clock updated to Wed May 15 08:23:46 AWST 2019.
[ ok ] Stopping MD monitoring service: mdadm --monitor.
[....] Stopping busybox' syslogd implementation: syslogd2753 (syslogd)
. ok
[ ok ] Asking all remaining processes to terminate...done.
[ ok ] All processes ended within 1 seconds...done.
[....] Deconfiguring network interfaces...Removed stale PID file
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:50:43:1c:24:27
Sending on   LPF/eth0/00:50:43:1c:24:27
Sending on   Socket/fallback
DHCPRELEASE of 192.168.1.33 on eth0 to 192.168.1.2 port 67
invoke-rc.d: -----------------------------------------------------
invoke-rc.d: WARNING: 'invoke-rc.d ntp try-restart' called
invoke-rc.d: during shutdown sequence.
invoke-rc.d: enabling safe mode: initscript policy layer disabled
invoke-rc.d: -----------------------------------------------------
[   90.740166] mvneta f1070000.ethernet eth0: Link is Down
done.
[ ok ] Saving random seed...done.
[....] Will now unmount temporary filesystems:umount: /tmp unmounted
. ok
[....] Will now deactivate swap:swapoff /dev/md1
. ok
[....] Will now unmount local filesystems:umount: /files (/dev/md2) unmounted
. ok
[....] Mounting root filesystem read-only...[   91.522327] EXT4-fs (md0): re-mounted. Opts: (null)
done.
[ ok ] Waiting for MD arrays to become idle...done.
[info] Will now halt.
[   92.792409] sd 2:0:0:0: [sdd] Synchronizing SCSI cache
[   92.797783] sd 2:0:0:0: [sdd] Stopping disk
[   93.525534] sd 3:0:0:0: [sdc] Synchronizing SCSI cache
[   93.530885] sd 3:0:0:0: [sdc] Stopping disk
[   94.245769] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
[   94.251124] sd 4:0:0:0: [sdb] Stopping disk
[   94.980048] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[   94.985409] sd 1:0:0:0: [sda] Stopping disk
[   95.710746] reboot: System halted

Fans running
Disks running but not sure if all (I will recheck this later once flash process complete)
HDD led's no activity
Power led on



Edited 1 time(s). Last edit at 05/14/2019 08:19PM by richjn.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 07:35PM
@bodhi

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00001000 "boot"
mtd1: 00400000 00001000 "spi-rootfs"

cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1               0x0000          0x80000         0x20000                 4

fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 08:20PM
@bodhi
Out for 2 hours
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 09:27PM
Repost and updates for Power off.

1) Fix poweroff
Currently from Debian filesystems are unmounted but the disks are left powered and the system is in a "hung" state requiring the mains to be switched off / on before you can power back up. I have removed the poweroff function in the v10 DTS attached to see if it made any difference but it doesn't.
Also holding the power button on the front panel does nothing but perhaps it needs a keybind mapping first to work, this was evident both before and after I removed the poweroff function in the DTS

====

The Power Off should be in the DTS. It is apparently GPIO poweroff, as the DS116 DTS already has this. The GPIO number is most likely the same for both boxes (i.e. same vendor). In a rare scenario, it could be different.

So boot with serial console (some activity can only be observed with serial console), with V9 DTS, if that's the only difference from these 2 versions. And shutdown:
shutdown -h now

Pease post the tail end of serial console log where the shutdown begins. And describe what the power state of the box after (fan, disk, LED).

UPDATE 1:

Richard's observation and log above:
https://forum.doozan.com/read.php?2,76314,83894#msg-83894

Quote

Fans running
Disks running but not sure if all (I will recheck this later once flash process complete)
HDD led's no activity
Power led on

The shutdown log was clean. It seems to be working if HDD disk is not running. The regulators should turn off the HDDs.

We knew now that Power LED is controlled through ttyS01, not GPIO. So the Power LED is on does not mean the system was not shutdown.

Also the fan is still a separate issue to be worked on. IOW, the fan is on does not mean the system was not shutdown, either.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 09:44PM
@bodhi
Just tested the following

printf  "\\x31" > /dev/ttyS1

This pulls the plug on everything but not sure how you could implement that in a custom poweroff script i.e. once the filesystem is down /dev/ttyS1 no longer exists but posting in the hope you may know a way to implement it.
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 10:14PM
Repost and updates for Power off.

1) Fix poweroff
Currently from Debian filesystems are unmounted but the disks are left powered and the system is in a "hung" state requiring the mains to be switched off / on before you can power back up. I have removed the poweroff function in the v10 DTS attached to see if it made any difference but it doesn't.
Also holding the power button on the front panel does nothing but perhaps it needs a keybind mapping first to work, this was evident both before and after I removed the poweroff function in the DTS

====

The Power Off should be in the DTS. It is apparently GPIO poweroff, as the DS116 DTS already has this. The GPIO number is most likely the same for both boxes (i.e. same vendor). In a rare scenario, it could be different.

So boot with serial console (some activity can only be observed with serial console), with V9 DTS, if that's the only difference from these 2 versions. And shutdown:
shutdown -h now

Pease post the tail end of serial console log where the shutdown begins. And describe what the power state of the box after (fan, disk, LED).

UPDATE 1:

Richard's observation and log above:
https://forum.doozan.com/read.php?2,76314,83894#msg-83894

Quote

Fans running
Disks running but not sure if all (I will recheck this later once flash process complete)
HDD led's no activity
Power led on

The shutdown log was clean. It seems to be working if HDD disk is not running. The regulators should turn off the HDDs.

We knew now that Power LED is controlled through ttyS01, not GPIO. So the Power LED is on does not mean the system was not shutdown.

Also the fan is still a separate issue to be worked on. IOW, the fan is on does not mean the system was not shutdown, either.

UPDATE 2:

I took back what I said above! the DS116 does not have GPIO power off. Only the poweroff node:

poweroff@12100 {
                                compatible = "synology,power-off";
                                reg = <0x12100 0x100>;
                                clocks = <&coreclk 0>;
                        };

And what Richard said above seems to be how stock OS power off the box

printf  "\\x31" > /dev/ttyS1

So this might need kernel configuration changes (if we don't want to use Synology's hack).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 10:40PM
@bodhi
Maybe one of
# CONFIG_POWER_AVS is not set          
CONFIG_POWER_RESET=y                
# CONFIG_POWER_RESET_BRCMKONA is not set
# CONFIG_POWER_RESET_BRCMSTB is not set
CONFIG_POWER_RESET_GPIO=y           
CONFIG_POWER_RESET_GPIO_RESTART=y       
# CONFIG_POWER_RESET_LTC2952 is not set
# CONFIG_POWER_RESET_QNAP is not set
# CONFIG_POWER_RESET_RESTART is not set 
# CONFIG_POWER_RESET_VERSATILE is not set   
# CONFIG_POWER_RESET_SYSCON is not set
# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set
# CONFIG_SYSCON_REBOOT_MODE is not set   
CONFIG_POWER_SUPPLY=y

I will rebuild with all of them enabled if you think it worthwhile trying ?
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 10:50PM
Richard,

Definitely! but only one is needed.

> I will rebuild with all of them enabled if you
> think it worthwhile trying ?

This is the one. It should work with Synology, according to the author's comment.

CONFIG_POWER_RESET_QNAP

Quote

* QNAP Turbo NAS Board power off. Can also be used on Synology devices.
*
* Copyright (C) 2012 Andrew Lunn .......

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology RS816 (Armada 385)
May 14, 2019 10:59PM
@bodhi
Running now but it will take a while
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: