Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

debian on synology ds214 - periphery issues (2 replies)

$
0
0
Hi all,

I am currently playing around a bit with my Synology DS214 NAS. I have successfully installed debian on it.
If someone wants to do the same here are the steps I took. Afterwards I have a few remaining issues where I would appreciate any help.

Note: DO NOT EVER CALL SAVEENV ON THE STOCK U-BOOT LOADER.
It will overwrite your kernel in the SPI flash and for some reason the stock u-boot will then no longer boot. If this happened to you anyways: overwrite the u-boot env checksum in flash at address 1.000.000 (decimal). Then at least stock u-boot itself will load again. You can then load the kernel via serial and the initrd from the SPI flash.

1.) getting u-boot and debian to work:
- I based my work on the DS414 which is already supported.
- I had to change the board init code to reduce the ram to 512M
in u-boot
change board/Synology/ds414/ds414.c: CS0 size from 0x3FFFFFE1 to 0x1FFFFFE1

- the 5.13.8 kernel was not very stable, but just enough to get install the 6.0.7 kernel, which works very well. Took a few reboots. So if you see problems like a kernel dump about cpu stalls, just try again.

2.) rootfs on the external usb ssd
- I flashed a new u-boot onto the spi flash and can boot debian off an externally connected usb ssd.
- I copied the rootfs from the https://forum.doozan.com/read.php?2,32146 thread to the ssd as an ext2 filesystem (ext4 might work too).
commands for u-boot:
- plug the ssd on the back usb (front one doesn't work). I use the one near the ethernet port.
- pci enum (<-- this is very important, took me quite a while to find out that usb needs this.)
- usb start
- ext2load usb 0:1 0x02000000 /boot/uImage
- ext2load usb 0:1 0x08000000 /boot/uInitrd
- bootm 0x02000000 0x08000000

3.) kwboot
- connect a uart to the PINs as shown in the attached screenshot. The six pins can be reached without opening the device.
- call "kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot/u-boot/u-boot-with-spl.kwb -a" to start your self-built u-boot

4.) my issues
currently at least the following periphery doesn't work:
4.1) ethernet:
ds414 had two ports, ds214 only has one, but it doesn't work. The port is shown as link up, but no data is sent or received. dhcp request times out.
In my experiments I focused on u-boot and tested with "ping myotherhost". I tried to edit the u-boot device tree and changed values.

I tried the following:
ethernet@70000 {
status = "okay";
pinctrl-0 = <&ge1_rgmii_pins>;
pinctrl-names = "default";
phy = <&phy1>;
phy-mode = "rgmii-id";
};

phy0 leads to an error message
pinctrl as ge0... has no effect
ethernet as @74000 has no effect
ethernet as @74000 and pinctrl as ge0 has no effect
ethernet as ge0_gmii_pins has no effect (see ethtool output of original firmware)

4.2) sata enclosure
the hard disk in the enclosure is not detected.

4.3) front usb
not detected
this is not important for me

4.4) fan
pwmconfig of fancontrol shows no pwm found.


To debug these issues I can boot to the original firmware and enter the shell. The original formware is based on kernel 3.2 and has no device tree yet, so no /proc/device-tree entries.

original.txt = stock firmware dmesg + u-boot + ethtool
myboot-nonet.log = my dmesg

Viewing all articles
Browse latest Browse all 3247

Trending Articles