@bodhi Yes, I meant the linux-3.10.x-bsp.txz GPL source. My idea was to try and build Synology stock kernel and presuming it brought the 4 ports up then work back through the source code till I found which bit made it work but, like you I hadn't found anything with generic search queries and then when I failed to get it built anyway I gave up. I can leave this RS816 available for testinby richjn - Debian
@bodhi Last update as I'm giving up on this but thanks for your help along the way. Although I have given up I'm still happy to test possible solutions anyone might come up with. Having got my compile environment up and running modifying dts and compiling to dtb all worked fine and I was able to test every variable of "okay" in the modified DS116 file but no changes apartby richjn - Debian
@bodhi Really sorry I was incorrect suggesting that previously both drives were on sata. I just ran the old version again and its one on sata one on pcie as with the latest, however, the pcie one is on a different port. Old armada-385-synology-rs816.dtb platform-soc:pcie-pci-0000:02:00.0-ata-2 New armada-385-synology-rs816.dtb platform-soc:pcie-pci-0000:01:00.0-ata-2by richjn - Debian
@bodhi Thanks for decoding the synology-rs816.dtb the output is the same as I'm getting which means either there were no #includes or dtc is stripping them off for you too. I have researched a little and it appears dtc has no way of resolving #includes and hands the job of to cpp and as you have already said yourself you need to be in the build tree for that to work. I wonder if the same iby richjn - Debian
@bodhi I have already built qemu (with kvm accel) and installed debian-9.9.0 I just need to setup my cross-compile environment and I'm all set to go. I've never used virtualbox but I have heard good things about it.... maybe one day I will give it a try. Void Linux use runit as well and they add the odd patch but basically no real devel work going on. Having said that its feature coby richjn - Debian
@bodhi I don't understand why but I get the same result with dtc whilst logged into Debian. As a way forward can you decompile the synology-385-rs816-stock.dtb (re-attached here) I dumped and post the dts back. You have already provided the others as dts and the dtsi are human readable anyway so by using the new #include format I can recompile any trial dtbs I produce and proceed witby richjn - Debian
@bodhi I had read I was able to do it outside of the build environment and it was more convenient for me to do so but because my copy of dtc was stripping #includes I totally missed the DTSI chain of includes which have gpio.h and others within the chain... Duh. Basically I had been wasting my time. I need to decide whether to just do this from within the usb rootfs = slow or take time out toby richjn - Debian
@bodhi I was trying to do this from my main linux box but it appears I will just keep having a bad day if I use dtc and should instead do this direct whilst logged into your rootfs or maybe setup a VM Can you let me know what commands you use to extract / compile please to save me falling into another hole. I will re-run all of my trials again tomorrow, taking special notice that pcie is dby richjn - Debian
@bodhi QuoteThe DTB basically inlcudes in all the "parent" DTSI nodes The light has just been switched on!!! Quote > but when I try the other way round I get errors am > I doing something wrong ? I am not sure why. Snip from your DTS amarda-385-synology-rs816.dts // SPDX-License-Identifier: (GPL-2.0 OR MIT) /* * Device Tree file for Synology RS816 NAS * *by richjn - Debian
@bodhi I did try multiple variations of disabling and enabling the various "status" sections with no joy but I'm very happy to give your modified version a go :-) EDIT I should have added that I was making changes to the dumped synology-rs816-stock.dtb not the ds116 or the ds116 based armada-385-synology-rs816.dtbby richjn - Debian
@bodhi Just a quick update. I have exhausted all the options I can think of for modifying the DTB although I readily accept my knowledge is insufficient for that to be taken as a statement it can't be done. I have moved onto the Synology GPL kernel source code and on a positive the source is at least the current dsm version at 3.10.105. To start I have simply taken the Synology providedby richjn - Debian
@bodhi Just for something to try I booted with ds116.dtb then upgraded the kernel to your latest uname -a Linux debian 4.20.6-mvebu-tld-1 #2 SMP PREEMPT Tue Feb 5 16:14:01 PST 2019 armv7l GNU/Linux I then rebooted back in again with ds116.dtb which worked but I apart from the kernel nothing changed sata wise. Next I booted with synology-rs816-stock.dtb (the one I dumped) this got stucby richjn - Debian
> We might find the kernel source and how it activate the other 2 SATAs in the above. I have downloaded the kernel source and will take a look tomorrow. > In stock u-boot, we might find other aspects like LEDs GPIOs. But as I recall from zifxify'post, > stock u-boot does not activate all SATA ports. I think you're correct I spent quite a bit of time looking at u-boot anby richjn - Debian
Hi Sorry a bit slow I've been without power all day. cat /proc/mtd dev: size erasesize name mtd0: 00400000 00001000 "boot" mtd1: 00400000 00001000 "spi-rootfs" dd if=/dev/mtd0 of=synology-rs816-stock.dtb bs=1 count=65536 skip=917504 65536+0 records in 65536+0 records out 65536 bytes (66 kB, 64 KiB) copied, 1.39867 s, 46.9 kB/sby richjn - Debian
@rayknight provided a link to sourceforge which I have followed down to the armada38x branch. I will start making my way through and see what I can turn up. I have electrical work taking place tomorrow which will knock me off-line for most of the day. https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/22259branch/armada38x-source/ Edit: Quick search through and theby richjn - Debian
Just done a run with the ds116.dtb from the dts folder in your rootfs and confirm this boots to debian root@debian:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 1.8T 0 disk |-sda1 8:1 1 2.4G 0 part |-sda2 8:2 1 2G 0 part `-sda3 8:3 1 1.8T 0 part sdb 8:16 1 3.8G 0 disk `-sdb1 8:17 1 3.8G 0 part / mtdbby richjn - Debian
@bodi This is my new profile name. Richardby richjn - Debian