Quantcast
Channel: Linux Device Hacking
Viewing all 46989 articles
Browse latest View live

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Check this to see if the DS116 LEDs can be used for RS816.

In Debian,

ls -l /sys/class/leds/

cat /sys/class/leds/ds116:orange:disk/trigger

echo default-on > /sys/class/leds/ds116:orange:disk/trigger
echo none > /sys/class/leds/ds116:orange:disk/trigger

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

1. Does the power off work with ./boot/dts/armada-385-synology-ds116.dtb ?

I actually meant armada-385-synology-ds116.dtb instead of ds116.dtb.

(Debian) Poweroff from Debian works but SATA ports keeps active (drive spinning when actually plugging and unplugging the drives (after poweroff command ofcourse) in the two of four drive bays) and the power-on leds keeps flickering. (it's not possible to power-on the device using the power-button)

(Debian) This behavior (flickering) starts already when starting up (normal) but does not change during booting Debian.

(DSM) With DSM there's a beep when the device is fully started up and the powerled stops flickering and just blinks.

(DSM) Shutdown using powerbutton, the device beeps and the powerled start blinking until the device is fully shutdown.

(Debian) Reboot from Debian works.

Quote

Check this to see if the DS116 LEDs can be used for RS816.
In Debian,

ls -l /sys/class/leds/

$ ds116:orange:disk -> ../../devices/platform/soc/soc:gpio-leds/leds/ds116:orange:disk

cat /sys/class/leds/ds116:orange:disk/trigger

$[none] rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usbport usb-gadget usb-host timer oneshot disk-activity ide-disk1 ide-disk2 mtd nand-disk heartbeat gpio default-on flash torch panic f1072004.mdio-mii:01:1Gbps f1072004.mdio-mii:01:100Mbps f1072004.mdio-mii:01:10Mbps

No led change (powerled, ethernet led{1,2}, four drive status indicator leds, status indicator )with following commands
echo default-on > /sys/class/leds/ds116:orange:disk/trigger
echo none > /sys/class/leds/ds116:orange:disk/trigger

Re: Debian on Synology RS816 (Armada 385)

Debian on MyBookLive (Apollo-3G)

Compile wireless driver rtl8188eu

$
0
0
I'm trying to get my wireless card working in monitor mode. To do this I need to compile the driver. I think my issue is kirkwood related, so I'm asking here.

I'm trying this: https://github.com/mfruba/kernel

[root] [~/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417] # make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv5tel CROSS_COMPILE= -C /lib/modules/4.19.0-kirkwood-tld-1/build M=/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
Makefile:619: arch/armv5tel/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv5tel/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2

OK, so then I try this:

[root] [~/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417] # ARCH=arm make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.19.0-kirkwood-tld-1/build M=/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
  CC [M]  /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o
In file included from ./include/linux/compat.h:16:0,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:41,
                 from /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/osdep_service_linux.h:3 ,
                 from /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/osdep_service.h:45,
                 from /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/drv_types.h:32,
                 from /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.c:22:
./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
 #include <sys/socket.h>   /* for struct sockaddr.  */
                                                      ^
compilation terminated.
scripts/Makefile.build:305: recipe for target '/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o' failed
make[2]: *** [/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o] Error 1
Makefile:1517: recipe for target '_module_/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417' failed
make[1]: *** [_module_/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2

[root] [~] # cat /etc/debian_version
9.6
[root] [~] # uname -a
Linux backup 4.19.0-kirkwood-tld-1 #1 PREEMPT Mon Oct 22 17:08:01 PDT 2018 armv5tel GNU/Linux
[root] [~] # dmesg | grep -i nsa
[    0.000000] OF: fdt: Machine model: ZyXEL NSA310

How can I compile this driver on this machine?

Re: Debian on Synology RS816 (Armada 385)

$
0
0
> (Debian) Poweroff from Debian works but SATA ports
> keeps active (drive spinning when actually
> plugging and unplugging the drives (after poweroff
> command ofcourse) in the two of four drive bays)

This actually makes sense. As I said, I need to creat a new DTS. The reason for the SATA ports behavior is the RS816 has 4 SATA ports, but the DS116 has only 2 SATA ports. This behavior has nothing to do with Power Off.

The important thing is that PowerOff works to shutdown the box.

> (Debian) This behavior (flickering) starts already
> when starting up (normal) but does not change
> during booting Debian.

Power button LED definition is not yet in the DTS. We need to determine if the Power LED can be controlled.

And looks like the orange:disk LED definition on the DS116 is not applicable to this RS816.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
For /etc/fw_env.config, try this content:
# MTD device name       Device offset   Env. size       Flash sector size        Number of sectors
/dev/mtd1   0x3E0000   0x10000   0x1000

And test the definition:
fw_printenv

Re: Compile wireless driver rtl8188eu

$
0
0
jevgienij Wrote:
-------------------------------------------------------
> I'm trying to get my wireless card working in
> monitor mode. To do this I need to compile the
> driver. I think my issue is kirkwood related, so
> I'm asking here.
>
> I'm trying this:
> https://github.com/mfruba/kernel
>
>
> [root]
> [~/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417]
> # make
> "******************************************"
> "NO SKRC,we will use default KSRC"
> "******************************************"
> make ARCH=armv5tel CROSS_COMPILE= -C
> /lib/modules/4.19.0-kirkwood-tld-1/build
> M=/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417
>  modules
> make[1]: Entering directory
> '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
> Makefile:619: arch/armv5tel/Makefile: No such file
> or directory
> make[1]: *** No rule to make target
> 'arch/armv5tel/Makefile'.  Stop.
> make[1]: Leaving directory
> '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
> Makefile:1368: recipe for target 'modules' failed
> make: *** [modules] Error 2
>
>
> OK, so then I try this:
>
>
> [root]
> [~/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417]
> # ARCH=arm make
> "******************************************"
> "NO SKRC,we will use default KSRC"
> "******************************************"
> make ARCH=arm CROSS_COMPILE= -C
> /lib/modules/4.19.0-kirkwood-tld-1/build
> M=/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417
>  modules
> make[1]: Entering directory
> '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
> "******************************************"
> "NO SKRC,we will use default KSRC"
> "******************************************"
>   CC [M] 
> /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o
> In file included from
> ./include/linux/compat.h:16:0,
>                  from
> ./include/linux/ethtool.h:17,
>                  from
> ./include/linux/netdevice.h:41,
>                  from
> /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/osdep_service_linux.h:3
> ,
>                  from
> /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/osdep_service.h:45,
>                  from
> /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/include/drv_types.h:32,
>                  from
> /root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.c:22:
> ./include/linux/if.h:28:54: fatal error:
> sys/socket.h: No such file or directory
>  #include <sys/socket.h>   /* for struct sockaddr.
>  */
>                                                   
>    ^
> compilation terminated.
> scripts/Makefile.build:305: recipe for target
> '/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o'
> failed
> make[2]: ***
> [/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o]
> Error 1
> Makefile:1517: recipe for target
> '_module_/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417'
> failed
> make[1]: ***
> [_module_/root/8188eu/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417]
> Error 2
> make[1]: Leaving directory
> '/usr/src/linux-headers-4.19.0-kirkwood-tld-1'
> Makefile:1368: recipe for target 'modules' failed
> make: *** [modules] Error 2
>
>
>
> [root] [~] # cat /etc/debian_version
> 9.6
> [root] [~] # uname -a
> Linux backup 4.19.0-kirkwood-tld-1 #1 PREEMPT Mon
> Oct 22 17:08:01 PDT 2018 armv5tel GNU/Linux
> [root] [~] # dmesg | grep -i nsa
> [    0.000000] OF: fdt: Machine model: ZyXEL
> NSA310
>
>
> How can I compile this driver on this machine?

There was some confirmed report in this forum about this issue (compiling module). I will look in to this eventually when I have time. Pehaps in a couple weeks.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

And test the definition:

fw_printenv

root@debian:~# fw_printenv
CASset=max
MALLOC_len=5
MPmode=SMP
ata_hdd_detect=syno_hdd_detect=39,39,39,39
ata_hdd_enable=syno_hdd_enable=37,37,37,37
autoload=no
baudrate=115200
boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr
bootargs= 
bootargs_dflt=$console $nandEcc $mtdparts_lgcy $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel
bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootspi
bootcmd_auto=stage_boot $boot_order
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot
bootcmd_lgcy=tftpboot 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts_lgcy $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end  video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel;  bootm $loadaddr; 
bootdelay=3
bootftp=run syno_bootargs;tftpboot $loadaddr_kernel $file_kernel;tftpboot $loadaddr_rootfs $file_rootfs;sf probe; sf read $loadaddr_dt $spi_pt_addr_dt $spi_pt_size_dt;fdt addr $loadaddr_dt;bootm $loadaddr_kernel $loadaddr_rootfs $loadaddr_dt;
bootspi=run syno_bootargs;sf probe 0 50000000;sf read $loadaddr_kernel $spi_pt_addr_kernel $spi_pt_size_kernel;sf read $loadaddr_rootfs $spi_pt_addr_rootfs $spi_pt_size_rootfs;sf read $loadaddr_dt $spi_pt_addr_dt $spi_pt_size_dt;bootm $loadaddr_kernel $loadaddr_rootfs $loadaddr_dt;
cacheShare=no
clean_env=sf probe; sf erase $spi_pt_addr_env $spi_pt_size_env; 
console=console=ttyS0,115200
device_partition=0:1
disaMvPnp=no
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:13:27:4d
eth1mtu=1500
eth2addr=00:50:43:13:27:4d
eth2mtu=1500
eth3addr=00:50:43:27:27:13
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:27:27:4d
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=yes
fdtaddr=0x1000000
fdtfile=armada-38x.dtb
file_flash=armada38x/flash.bin
file_kernel=armada38x/uImage
file_rootfs=armada38x/rd.bin
file_uboot=armada38x/uboot.bin
ide_path=/
image_name=uImage
initrd_high=8000000
initrd_name=uInitrd
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
limit_dram_size=yes
loadaddr=0x02000000
loadaddr_dt=0x1000000
loadaddr_kernel=0x2000000
loadaddr_rootfs=0x3000000
loads_echo=0
mtdids=spi0=spi_flash
mtdparts=mtdparts=spi0.0:4m(boot),-(spi-rootfs)
mtdparts_lgcy=mtdparts=spi_flash:4m(boot),-(spi-rootfs)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:4d:27:13
netbsd_en=no
netretry=no
pcieTune=no
pexMode=RC
pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
ramdisk_addr_r=2880000
rootpath=/srv/nfs/
run_script=no
sata_delay_reset=0
sata_dma_mode=yes
script_addr_r=3000000
script_name=boot.scr
sd_detection_dat3=no
spi_pt_addr_dt=0x0E0000
spi_pt_addr_env=0x7e0000
spi_pt_addr_kernel=0x0F0000
spi_pt_addr_rootfs=0x3C0000
spi_pt_size_dt=0x010000
spi_pt_size_env=0x010000
spi_pt_size_kernel=0x2D0000
spi_pt_size_rootfs=0x410000
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts_lgcy root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
syno_boot_dev=/dev/md0
syno_bootargs=setenv bootargs console=ttyS0,115200 ip=off initrd=$loadaddr_rootfs root=$syno_boot_dev rw $syno_extra_args syno_hw_version=$syno_hw_version hd_power_on_seq=$syno_hdd_powerup_seq ihd_num=$syno_hdd_powerup_seq netif_num=$syno_net_if_num $ata_hdd_detect $ata_hdd_enable flash_size=8
syno_extra_args=HddHotplug=4 sata_remap=0>4:4>0
syno_hdd_powerup_seq=4
syno_hw_version=RS816
syno_net_if_num=2
upd_flash=setenv tftpfile $file_flash; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then echo "This may take a while, please be patient..."; sf probe; sf erase 0 +$filesize; sf write $loadaddr 0 $filesize; echo "
Flash Update Done"; fi; 
upd_kernel=setenv tftpfile $file_kernel; mw.b $loadaddr 0xFF $spi_pt_size_kernel; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase $spi_pt_addr_kernel $spi_pt_size_kernel; sf write $loadaddr $spi_pt_addr_kernel $spi_pt_size_kernel; echo "
Kernel Update Done"; fi; 
upd_rootfs=setenv tftpfile $file_rootfs; mw.b $loadaddr 0xFF $spi_pt_size_rootfs; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase $spi_pt_addr_rootfs +$filesize; sf write $loadaddr $spi_pt_addr_rootfs $filesize; echo "
Rootfs Update Done"; fi; 
upd_uboot=setenv tftpfile $file_uboot; tftpboot $loadaddr $tftpfile; if test $? -eq 0; then sf probe; sf erase 0 +$filesize; sf write $loadaddr 0 $filesize; echo "
Uboot Update Done"; fi; 
usb0Mode=host
usbActive=0
usbType=2
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Excellent!

Now try to set some test env.
fw_setenv test1 yes
fw_printenv test1

Reboot, interrupt serial console and
printenv

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

This actually makes sense. As I said, I need to creat a new DTS. The reason for the SATA ports behavior is the RS816 has 4 SATA ports, but the DS116 has only 2 SATA ports. This behavior has nothing to do with Power Off.

Ok, but the fact that the SATA ports are still powered after a shutdown. Is this normal behavior ?

Quote

Now try to set some test env.

fw_setenv test1 yes
fw_printenv test1


Reboot, interrupt serial console and

printenv

Will test later as I do not have a SSH connection working to the laptop (serial) connected to this box.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
>
Quote

> This actually makes sense. As I said, I need to
> creat a new DTS. The reason for the SATA ports
> behavior is the RS816 has 4 SATA ports, but the
> DS116 has only 2 SATA ports. This behavior has
> nothing to do with Power Off.
>
>
> Ok, but the fact that the SATA ports are still
> powered after a shutdown. Is this normal behavior
> ?

No, it is not normal. All 4 ports should shutdown properly (i.e. triggered by the Poweroff). But it is a distinct process after the SATA driver got triggered and starts doing its own thing. If you have 4 SATA drives, then 2 of them should be down when the Poweroff process starts, because the current DTS only specifies 2 SATA ports.

>
>
Quote

> Now try to set some test env.
>
> fw_setenv test1 yes
> fw_printenv test1
>
>
> Reboot, interrupt serial console and
>
> printenv
>
>
> Will test later as I do not have a SSH connection
> working to the laptop (serial) connected to this
> box.

All steps can be done using serial console.

Re: Debian on Synology RS816 (Armada 385)

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

All steps can be done using serial console.

I was connected remotely to a laptop with a serial port (using SSH), and used a screen session to /dev/ttyS0.

Quote

When you said it just works, did you test these codes on /dev/tty1?

Yes, in Debian and DSM as root

echo X > /dev/ttyS1

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

Now try to set some test env.

fw_setenv test1 yes
fw_printenv test1


Reboot, interrupt serial console and

printenv

OK, back to testing and saving envs seems to work :)

root@debian:~# fw_setenv test1 yes
root@debian:~# fw_printenv test1
test1=yes

Marvell>> printenv test1
test1=yes

Re: Debian on Synology RS816 (Armada 385)

$
0
0
zifxify Wrote:
-------------------------------------------------------
>
Quote

> Now try to set some test env.
>
> fw_setenv test1 yes
> fw_printenv test1
>
>
> Reboot, interrupt serial console and
>
> printenv
>
>
> OK, back to testing and saving envs seems to work
> :)
>
>
> root@debian:~# fw_setenv test1 yes
> root@debian:~# fw_printenv test1
> test1=yes
> 
> Marvell>> printenv test1
> test1=yes
>

OK! so SPI is done, successfully :)

We can move on to 4 SATA which is the next important issue. Are they all active in Debian? i.e. the disks can be mounted and accessed?

Re: Debian on Synology RS816 (Armada 385)

$
0
0
Quote

We can move on to 4 SATA which is the next important issue. Are they all active in Debian? i.e. the disks can be mounted and accessed?

The first two SATA ports are supplied with power but only the first one is working correctly. When inserting a drive in the second SATA port, nothing happens. Only harddrive 1 is active in Debian and can be mounted.
SATA port {3,4} are not powered at all.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
I had a virtually identical experience with the Linkstation 441de, Though it's a different SoC the same situation seems to apply. If I'm reading the right specs the armada-385 has 2x sata ports built in just like the armada-370, for the 4+ bay model buffalo uses a seperate sata chip connected via pcie, I'm guessing it's the same for this synology device. If so enabling pcie in the device-tree should allow debian to find all 4 drives. There may also be gpio power pins that need to be enabled for them to show up, usually the boot loader will turn those on if the device is present at boot but if you add those to the device tree it will also ensure the drives come up.

It seems they connect the first two bays on these devices to both the sata chip and the soc sata ports, I've always assumed that is so that the boot loader can access they via SoC for the boot process and then the OS can access them over the PCIe sata chip but I've never confirmed that. Once you get the drives working you'll want to disable the SoC so it doesn't supersede the PCIe sata.

I'm guessing @bohdi knows all that already but I figured I'd share since it tripped me up for a while when I first encountered it.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
@1000001101000,

Thanks for sharing your experience on the a370! it's confirmed my understanding, too.

@zifxify,

I've reread the DTS and the SATA behavior you've observed is what it should be. There is only one active port in the DTS. And it's GPO 15. And there is no PCIe definition in there.


- I need to upload a new DTS/DTB based on the DS116.

- We need to find the GPL u-boot and kernel source where SATA ports are enabled. At the minimum, a GPIO is needed for sata1 (we have sata0 already).

- We need to understand the memory writes commands in u-boot envs

bootcmd=mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootspi
Usually, these mw commands are a quick and dirty way for u-boot to activate SATAs and/or USBs.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
zifxify,

Please try this new armada-385-synology-rs816.dtb.
Viewing all 46989 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>