Welcome! Log In Create A New Profile

Advanced

Debian on Synology DS210j

Posted by Ivanj 
Debian on Synology DS210j
April 24, 2025 07:25AM
Hello Bodhi,

I got Synology DS210j. Let's make it work with Debian.

Hooked up the serial console, and it's different than DS211.
Pins are upfront of the device and are horizontal with markings JMP2, and you need to use to lower three pins:
From the front side perspective lower row: RX(?), TX, GND
From the front side perspective upper row: ???, ???, VCC (3.3V)
I have determined GND and VCC (3.3V) using multimeter.

I can't get it to receive input from the serial console, I tried all pin combinations but to no luck. Any ideas what can be tried?

Interestingly it boots to a linux kernel, although there are no drives hooked up, and it reports only "Flash: 4 MB" (how is it possible to fit?):

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: Synology Disk Station LE 

U-Boot 1.1.4 (Sep 24 2009 - 10:47:44) Marvell version: 3.4.4

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 0068B43C

Soc: 88F6281 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
[4096kB@f8000000] Flash:  4 MB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Using default environment


CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled

Module 1 is AUDIO

USB 0: host mode
PEX 0: interface detected no Link.

Synology Model: DS210jr1
Fan Status: Good

Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 
## Booting image at f8080000 ...
   Image Name:   Linux-2.6.32.12
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1550948 Bytes =  1.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at f8280000 ...
   Image Name:   synology_88f6281_210j 5967
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    993873 Bytes = 970.6 kB
   Load Address: 00800000
   Entry Point:  00800000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 2.6.32.12 (root@build4) (gcc version 4.6.4 (Marvell GCC release 20150204-c4
af733b 64K MAXPAGESIZE ALIGN CVE-2015-0235) ) #5967 Fri Nov 3 17:20:31 CST 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Feroceon-KW
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Sys Clk = 200000000, Tclk = 166666667
[    0.000000] Synology Board ID: 21
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x00800040,4M root=/dev/md0 rw sy
no_hw_version=DS210jv20 ihd_num=2 netif_num=1
[    0.000000] Synology Hardware Version: DS210jv20-j
[    0.000000] Internal HD num: 2
[    0.000000] Internal netif num: 1
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 114104KB available (3648K code, 519K data, 124K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:128
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Calibrating delay loop... 794.62 BogoMIPS (lpj=3973120)
[    0.230000] Mount-cache hash table entries: 512
[    0.230000] CPU: Testing write buffer coherency: ok
[    0.230000] devtmpfs: initialized
[    0.230000] xor: measuring software checksum speed
[    0.280000]    arm4regs  :   723.600 MB/sec
[    0.330000]    8regs     :   434.400 MB/sec
[    0.380000]    32regs    :   560.800 MB/sec
[    0.380000] xor: using function: arm4regs (723.600 MB/sec)
[    0.380000] NET: Registered protocol family 16
[    0.380000] Feroceon L2: Enabling L2
[    0.380000] Feroceon L2: Cache support initialised, in WT override mode.
[    0.390000] 
[    0.390000] CPU Interface
[    0.390000] -------------
[    0.390000] SDRAM_CS0 ....base 00000000, size 128MB 
[    0.390000] SDRAM_CS1 ....disable
[    0.390000] SDRAM_CS2 ....disable
[    0.390000] SDRAM_CS3 ....disable
[    0.390000] PEX0_MEM ....base e0000000, size 128MB 
[    0.390000] PEX0_IO ....base f2000000, size   1MB 
[    0.390000] PEX1_MEM ....no such
[    0.390000] PEX1_IO ....no such
[    0.390000] INTER_REGS ....base f1000000, size   1MB 
[    0.390000] NFLASH_CS ....base fa000000, size   2MB 
[    0.390000] SPI_CS ....base f4000000, size  16MB 
[    0.390000] BOOT_ROM_CS ....no such
[    0.390000] DEV_BOOTCS ....no such
[    0.390000] CRYPT_ENG ....base f0000000, size   2MB 
[    0.390000]  Detected Tclk 200000000 and SysClk 400000000 
[    0.400000] Synology 6281 1, 2 bay GPIO Init
[    0.890000] PEX0 interface detected no Link.
[    0.890000] PCI: bus0: Fast back to back transfers enabled
[    0.890000] mvPexLocalBusNumSet: ERR. Invalid PEX interface 1
[    0.900000] bio: create slab <bio-0> at 0
[    0.900000] vgaarb: loaded
[    0.900000] SCSI subsystem initialized
[    1.080000] raid6: int32x1     71 MB/s
[    1.250000] raid6: int32x2     98 MB/s
[    1.420000] raid6: int32x4     92 MB/s
[    1.590000] raid6: int32x8     99 MB/s
[    1.590000] raid6: using algorithm int32x8 (99 MB/s)
[    1.590000] Switching to clocksource kw_clocksource
[    1.590000] NET: Registered protocol family 2
[    1.590000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    1.590000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    1.590000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    1.590000] TCP: Hash tables configured (established 4096 bind 4096)
[    1.590000] TCP reno registered
[    1.590000] NET: Registered protocol family 1
[    1.590000] RPC: Registered udp transport module.
[    1.590000] RPC: Registered tcp transport module.
[    1.590000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.590000] Trying to unpack rootfs image as initramfs...
[    3.520000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    3.540000] Freeing initrd memory: 4096K
[    3.540000] XOR registered 4 channels
[    3.540000] XOR 2nd invalidate WA enabled
[    3.540000] VFS: Disk quotas dquot_6.5.2
[    3.540000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.540000] msgmni has been set to 231
[    3.540000] alg: No test for md5 (md5-generic)
[    3.540000] alg: No test for des (des-generic)
[    3.540000] alg: No test for des3_ede (des3_ede-generic)
[    3.540000] alg: No test for stdrng (krng)
[    3.540000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    3.540000] io scheduler noop registered
[    3.540000] io scheduler anticipatory registered (default)
[    3.550000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.560000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    3.570000] console [ttyS0] enabled
[    3.570000] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
[    3.580000] brd: module loaded
[    3.590000] sata_mv sata_mv.0: version 1.28
[    3.590000] sata_mv sata_mv.0: slots 32 ports 2
[    3.600000] scsi0 : sata_mv
[    3.600000] scsi1 : sata_mv
[    3.600000] ata1: SATA max UDMA/133 irq 21
[    3.610000] ata2: SATA max UDMA/133 irq 21
[    3.960000] ata1: SATA link down (SStatus 0 SControl F300)
[    6.960000] Delay 5 seconds to wait for disk 2 ready.
[   12.310000] ata2: SATA link down (SStatus 0 SControl F300)
[   12.310000] physmap platform flash device: 00400000 at f8000000
[   12.320000] SPI Serial flash detected @ 0xf8000000, 4096KB (64sec x 64KB)
[   12.330000] Searching for RedBoot partition table in SYNOMTD-0 at offset 0x3f0000
[   12.340000] 6 RedBoot partitions found on MTD device SYNOMTD-0
[   12.340000] SYNOMTD flash bank 0: Using RedBoot partition definition
[   12.350000] Creating 6 MTD partitions on "SYNOMTD-0":
[   12.360000] 0x000000000000-0x000000080000 : "RedBoot"
[   12.360000] 0x000000080000-0x000000280000 : "zImage"
[   12.370000] 0x000000280000-0x0000003c0000 : "rd.gz"
[   12.370000] 0x0000003c0000-0x0000003d0000 : "vendor"
[   12.380000] vender Mac1 checksum error ucSum:0x00 Buf:0x00 Sum:0.
[   12.390000] vender Mac2 checksum error ucSum:0x00 Buf:0x00 Sum:0.
[   12.390000] vender Mac3 checksum error ucSum:0x00 Buf:0x00 Sum:0.
[   12.400000] serial number='A4G6N00185'
[   12.400000] 0x0000003d0000-0x0000003f0000 : "RedBoot Config"
[   12.410000] 0x0000003f0000-0x000000400000 : "FIS directory"
[   12.420000] mvCpuIfTargetWinBaseLowGet:ERR. Getting target 11 failed.
[   12.420000] mvCpuIfTargetWinSizeGet:ERR. Getting target 11 failed.
[   12.430000] 
[   12.430000] ERROR: flashInfoFill - Failed to get Device Base address and Size (spi_flash 0)Loading Ma
rvell Ethernet Driver:
[   12.440000]   o Cached descriptors in DRAM
[   12.440000]   o DRAM SW cache-coherency
[   12.450000]   o 2 Giga ports supported
[   12.450000]   o Single RX Queue support - ETH_DEF_RXQ=0
[   12.460000]   o Single TX Queue support - ETH_DEF_TXQ=0
[   12.460000]   o TCP segmentation offload (TSO) supported
[   12.470000]   o Receive checksum offload supported
[   12.470000]   o Transmit checksum offload supported
[   12.480000]   o SKB Recycle supported - (Enabled)
[   12.480000]   o Rx descripors: q0=128
[   12.490000]   o Tx descripors: q0=532
[   12.490000]   o Loading network interface(s):
[   12.500000]     o  register under mv88fx_eth platform
[   12.500000]     o eth0, ifindex = 2, GbE port = 0
[   12.510000]     o eth0, phy chipid = 1410e40, Support WOL = 0
[   12.510000] 
[   12.510000] md: linear personality registered for level -1
[   12.520000] md: raid0 personality registered for level 0
[   12.530000] md: raid1 personality registered for level 1
[   12.530000] md: raid10 personality registered for level 10
[   12.540000] md: raid6 personality registered for level 6
[   12.540000] md: raid5 personality registered for level 5
[   12.550000] md: raid4 personality registered for level 4
[   12.550000] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
[   12.560000] cpuidle: using governor ladder
[   12.570000] TCP cubic registered
[   12.570000] NET: Registered protocol family 17
[   12.570000] NET: Registered protocol family 15
[   12.580000] registered taskstats version 1
[   12.580000] md: Waiting for all devices to be available before autodetect
[   12.590000] md: If you don't use raid, use raid=noautodetect
[   12.600000] md: Autodetecting RAID arrays.
[   12.600000] md: Scanned 0 and added 0 devices.
[   12.600000] md: autorun ...
[   12.610000] md: ... autorun DONE.
[   12.610000] RAMDISK: lzma image found at block 0
[   14.640000] VFS: Mounted root (ext2 filesystem) on device 1:0.
START /linuxrc.syno
Insert basic USB modules...
:: Loading module usbcore[   15.040000] usbcore: registered new interface driver usbfs
[   15.060000] usbcore: registered new interface driver hub
[   15.060000] usbcore: registered new interface driver ethub
[   15.100000] usbcore: registered new device driver usb
 ... [  OK  ]
:: Loading module ehci-hcd[   15.190000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.200000] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   15.200000] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   15.240000] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   15.260000] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   15.260000] usb usb1: configuration #1 chosen from 1 choice
[   15.290000] hub 1-0:1.0: USB hub found
[   15.290000] hub 1-0:1.0: 1 port detected
 ... [  OK  ]
:: Loading module xhci-hcd ... [  OK  ]
[   15.560000] ds210j_synobios: module license 'Synology Inc.' taints kernel.
[   15.560000] Disabling lock debugging due to kernel taint
[   15.600000] correction with 0x03
[   15.690000] 2025-4-24 12:8:47 UTC
[   15.690000] synobios: load, major number 201
[   15.700000] Brand: Synology
[   15.700000] Model: DS-210j
[   15.700000] This is default settings: set group disks wakeup number to 1, spinup time deno 1
[   15.710000] synobios cpu_arch proc entry initialized
[   15.720000] synobios crypto_hw proc entry initialized
[   15.720000] synobios syno_platform proc entry initialized
[   15.730000] usb 1-1: new high speed USB device using orion-ehci and address 2
mknod: /dev/synobios: File exists
Starting /usr/syno/bin/synocfgen...
/usr/syno/bin/synocfgen returns 0
[   15.780000] synobios: unload
Exit on error [1] DISK NOT INSTALLED...
Thr Apr 24 12:08:47 UTC 2025
sys /sys sysfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
linuxrc.syno failed on 1
starting pid 514, tty '': '/etc/rc'
[   15.880000] Got empty serial number. Generate serial number from product.
[   15.880000] usb 1-1: configuration #1 chosen from 1 choice
[   15.910000] hub 1-1:1.0: USB hub found
[   15.910000] hub 1-1:1.0: 4 ports detected
:: Starting /etc/rc
:: Mounting procfs ... [  OK  ]
:: Mounting tmpfs ... [  OK  ]
:: Mounting devpts ... [  OK  ]
:: Mounting sysfs ... [  OK  ]
:: Checking new disks ...
No new disk. Do nothing.
[   16.290000] md: md1 stopped.
mdadm: stopped /dev/md1
rc: Use all internal disk as swap.
rc: No internal disk installed.
[   16.550000] Unable to find swap-space signature
swapon: /dev/md1: Invalid argument
:: Loading module fat ... [  OK  ]
:: Loading module vfat ... [  OK  ]
:: Mounting usbfs ... [  OK  ]
:: Loading module sky2[   17.450000] sky2 driver version 1.25
 ... [  OK  ]
:: Loading module synobios[   17.560000] correction with 0x03
[   17.650000] 2025-4-24 12:8:49 UTC
[   17.660000] synobios: load, major number 201
[   17.660000] Brand: Synology
[   17.660000] Model: DS-210j
[   17.670000] This is default settings: set group disks wakeup number to 1, spinup time deno 1
[   17.680000] synobios cpu_arch proc entry initialized
[   17.680000] synobios crypto_hw proc entry initialized
[   17.690000] synobios syno_platform proc entry initialized
 ... [  OK  ]
cat: can't open '/proc/sys/kernel/syno_skip_vender_mac_interfaces': No such file or directory
[   18.030000] eth0: mac address changed
[   20.090000] eth0: started
udhcpc (v1.16.1) started
eth0      Link encap:Ethernet  HWaddr 00:11:32:06:B0:VCCF9  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:11 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

:: Starting syslogd ... [  OK  ]
:: Starting scemd
:: Starting services in background
Starting findhostd in flash_rd...
Starting services in flash_rd...
Running /usr/syno/etc/rc.d/J30DisableNCQ.sh...
cat: can't open '/sys/block/sd*/device//model': No such file or directory
Running /usr/syno/etc/rc.d/J80ADTFanControl.sh...
:: Loading module usb-storage[   28.080000] Initializing USB Mass Storage driver...
[   28.080000] usbcore: registered new interface driver usb-storage
[   28.090000] USB Mass Storage support registered.
 ... [  OK  ]
============ Date ============
Thr Apr 24 12:08:59 UTC 2025
==============================
starting pid 13Thu Apr 24 12:09:00 2025

DiskStation login: 
Re: Debian on Synology DS210j
April 24, 2025 02:53PM
Ivan,

> I got Synology DS210j. Let's make it work with
> Debian.

Sure. Should not be too difficult, since the DS210 DTS was already in mainline, and in our rootfs at /boot/dts/kirkwood-ds210.dtb.

> From the front side perspective lower row: RX(?),
> TX, GND
> From the front side perspective upper row: ???,
> ???, VCC (3.3V)
> I have determined GND and VCC (3.3V) using
> multimeter.
>
> I can't get it to receive input from the serial
> console, I tried all pin combinations but to no
> luck. Any ideas what can be tried?

If you are seeing the boot log then the TX is correct.

Knowing Synology design layout, that pin next to TX should be RX. The orientation might be different in each Sylonogy boxes. But usually it is like this:
Pin 1 is marked with a triangle (or square)

	2 4 6 
	1 3 5
	^
1 3.3V 
2 GND 
4 TX 
6 RX

Have you tried swaping 2 and 6? or use another wire for RX (in case the current wire does not have good connector)?

> Interestingly it boots to a linux kernel, although
> there are no drives hooked up, and it reports only
> "Flash: 4 MB" (how is it possible to fit?):

It is possible because the linux-2.6.32.x kernel is very small and the Diskstation initial rootfs is very small, just enough to start the box. And later the real rootfs (DSM) will be on HDD.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 24, 2025 07:56PM
1 3.3V - Measured this voltage when powered
2 GND - Measured, beeps on multimeter when connected to this pin and metal part of the chassis
4 TX - when powered it is 3.3V, works since I am seeing the output
6 RX - when powered it is 3.3V, but RX doesn't happen

I have tried for RX pins, 1, 2, 3, 5, and 6, and it doesn't work. Cold booted the machine every time.
I have three USB serial port devices, none of them worked for RX, while they all work on my DS211.
I also tried the kwboot, to no avail.

I think this rules out all but something being wrong with the RX on the DS210j, like its UART chip.

I did notice something strange. DS210j boots soon as the power is plugged in. but at that moment, if GND is connected it seems that my usb hub crashes for a second or two, and then recovers. I connected it directly to the desktop it seems that it was not crashing any more.

Are there any alternatives?
Could I just install DSM, ssh to it, and flash the u-boot from there somehow?

BTW, I looked at Synology machines and their processors.
DS210 and DS210j are quite different:
Model	CPU Model	Cores(each)	Threads(each)	FPU	Package Arch	RAM
DS210+	Freescale	 MPC8533E	1	1	✓	Ppc853x	DDR 512MB
DS210j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB

Other DS Nases with Marvell Kirkwood 88F6281 (memory might differ) are:
Model	CPU Model	Cores(each)	Threads(each)	FPU	Package Arch	RAM
DS212j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 256MB
DS411j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB
DS211j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB
DS410j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB
DS110j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB

From those, only DS411j is currently supported by you.
Re: Debian on Synology DS210j
April 24, 2025 08:34PM
> 1 3.3V - Measured this voltage when powered
> 2 GND - Measured, beeps on multimeter when
> connected to this pin and metal part of the
> chassis
> 4 TX - when powered it is 3.3V, works since I am
> seeing the output
> 6 RX - when powered it is 3.3V, but RX doesn't
> happen
>
> I have tried for RX pins, 1, 2, 3, 5, and 6, and
> it doesn't work. Cold booted the machine every
> time.
> I have three USB serial port devices, none of them
> worked for RX, while they all work on my DS211.
> I also tried the kwboot, to no avail.

Right! kwboot only works if both RX and TX are working, because of the handshake.

> I think this rules out all but something being
> wrong with the RX on the DS210j, like its UART
> chip.

I once have this problem, and it turned out the RX wire connector on the NAS side was no good (cheap wires). Hence my suggestion. Sounds like you don't have that problem.

I don't recall if I configure a keyboard in these Kirkwood u-boots. It's possible to use keyboard for input along with serial port RX. But it won't work in this case.

But we don't have u-boot for this box yet. The 2017.07 Dockstar or GoFlex Net u-boot might work in a minimal way, but not recommended now because you cannot recover without a working serial console.

> I did notice something strange. DS210j boots soon
> as the power is plugged in. but at that moment, if
> GND is connected it seems that my usb hub crashes
> for a second or two, and then recovers. I
> connected it directly to the desktop it seems that
> it was not crashing any more.

It might be the behavior of this stock u-boot.


> Could I just install DSM, ssh to it, and flash the
> u-boot from there somehow?

Yes and no. No: because we don't have new u-boot. Yes: you can set up envs in DSM to boot Debian. But as always, a serial console is needed for recovery soI don't think you should try that yet.

>
> Are there any alternatives?

Try remove the NAS RX wire, power up and then connect it quickly, hopefully you can interrupt countdown, if it got pass the countdown, try hitting <Return> when you see the DiskStation login prompt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 24, 2025 09:11PM
Quote
bodhi
I don't recall if I configure a keyboard in these Kirkwood u-boots. It's possible to use keyboard for input along with serial port RX. But it won't work in this case.
Tried connecting the keyboard, no luck.

Quote
bodhi
It might be the behavior of this stock u-boot.
I am also hoping that's the case, so if we can get any other working u-boot, RX might start working.

Quote
bodhi
Try remove the NAS RX wire, power up and then connect it quickly, hopefully you can interrupt countdown, if it got pass the countdown, try hitting <Return> when you see the DiskStation login prompt.
Tried dozen times, no luck.

Quote
bodhi
Yes and no. No: because we don't have new u-boot. Yes: you can set up envs in DSM to boot Debian. But as always, a serial console is needed for recovery soI don't think you should try that yet.
If we can't get it to work with debian, it will go to e-waste, so I am ok with the risks, please provide guidance on how to do it with DSM.
Re: Debian on Synology DS210j
April 24, 2025 10:28PM
> If we can't get it to work with debian, it will go
> to e-waste, so I am ok with the risks, please
> provide guidance on how to do it with DSM.

Sure, I'll post the instruction. With luck, we might discover why RX does not work once you logged into DSM.

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



Edited 1 time(s). Last edit at 04/24/2025 10:33PM by bodhi.
Re: Debian on Synology DS210j
April 24, 2025 10:39PM
A slight off topic question for you.

In the interest of science :) I tried to set up DSM on one of my Synology boxes. And then used the Web interface to enable SSH. I entered user name and password for the admin user.

But when I tried to SSH in, the password did not take. Have you any tips about this? did you have any problem like that? did you use 'admin" user or create a new user?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 25, 2025 03:20PM
Install Debian on USB drive in SynologyDSM

A. Connect serial console

B. Prepare the Debian roofs on USB

C. Installation

On a terminal, log into DSM using SSH.

C.1. Verify the MTD partitions

In dmesg, the MTD partitions should show

[    7.609392] Creating 6 MTD partitions on "spi0.0":
[    7.614230] 0x000000000000-0x0000000f0000 : "RedBoot"
[    7.620146] 0x0000000f0000-0x0000003c0000 : "zImage"
[    7.625995] 0x0000003c0000-0x0000007d0000 : "rd.gz"
[    7.631702] 0x0000007d0000-0x0000007e0000 : "vendor"
[    7.664209] 0x0000007e0000-0x0000007f0000 : "RedBoot Config"
[    7.671042] 0x0000007f0000-0x000000800000 : "FIS directory"

C.2. Setup fw_env.config

cat /etc/fw_env.config
If the fw_env.config already exists, comment out the current content (comment starts with #) and add the mtd4 definition.
/dev/mtd4 0x00000 0x10000 0x10000
If the fw_env.config does not exist, go ahead and create one with the mtd4 definition as above.

C.3. Setup FW tools

Check the availabity.
which fw_printenv
which fw_setenv

If fw_printenv and fw_setenvs are not available, download the binpack at Dropbox.

linux-tools-installation-bodhi.tar.gz
md5: 
e58f442411eb35e641d40ea0577e00ff
sha256: 
88dfa8eadb319e2e286320643a654bf89bff0b0d450562fce09938e7f3b0007d
Extract the content, it will create a tools folder.

Try listing the envs
cd tools
./fw_printenv
If the envs are listed as expected, create the fw_setenv binary
ln -s fw_printenv fw_setenv

C.4. Set envs to boot Debian.

TBD: Let's see what are the stock envs before we work on this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 29, 2025 06:53PM
Hello Bodhi,

Regarding:
Quote
bodhi
But when I tried to SSH in, the password did not take. Have you any tips about this? did you have any problem like that? did you use 'admin" user or create a new user?

When I was installing DSM I got asked to setup admin password. I just put admin.
When logging in with ssh I used admin@ account but I was not able to do sudo or su.
Then I logged in using root@ and admin password and that worked.

DSM 5.2 is no longer available on Synology site.
You can find DSM 5.2 at:
https://web.archive.org/web/20210413185701/https://archive.synology.com/download/Os/DSM/5.2-5967

dmesg is in attached.

fw_printenv was not available so I downloaded it from your link.

I created /etc/fw_env.config as per your instructions and got:
DiskStation> fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
Attachments:
open | download - DS210j dsm5.2 dmesg.txt (16.6 KB)
Re: Debian on Synology DS210j
April 29, 2025 10:14PM
Ivan,

A bit of bad news: it is likely yours is one of those Synology NAS that will corrupt the DSM kernel if you try to save the envs while at u-boot console.

U-Boot 1.1.4 (Sep 24 2009 - 10:47:44) Marvell version: 3.4.4

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 0068B43C

Soc: 88F6281 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
[4096kB@f8000000] Flash:  4 MB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Using default environment
The environment is not stored in SPI flash. The u-boot internal envs are used to boot this box. They've fixed it in the later Synology models so that mtd4 is used properly in those boxes.

Looks like we are stuck here until you can figure out the serial console RX port problem.

Or you could find the JTAG port on this board, solder a header in and then use the rPi to connect to it as a serial console or JTAG console. JTAG approach is a lot of work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 30, 2025 12:43AM
Ivan,

But before you throw this box away, we should give it one last shot. I can build a special u-boot verison for this based on the DS211. These boxes have 128MB RAM so they are very close. But they have different SoC (6282 vs 6281).

I won't do it from the ground up, just change the DS211 configs a little to use the DS210 DTS (for the 6281 SoC purpose) and use some good looking identification string. And then you try kwboot it. If the port RX is really bad hardware wise, kwboot will fail.

If that's the case, we'll flash it blind to SPI. If it can start and run to the prompt, then there is a very good chance it will work booting Debian. If it cannot start then it's really a brick :)

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



Edited 1 time(s). Last edit at 04/30/2025 02:51AM by bodhi.
Re: Debian on Synology DS210j
April 30, 2025 03:43AM
Hello Bodhi,

BTW, there is this topic: https://forum.doozan.com/read.php?3,116934
Seems like @twizzter was able to boot the u-boot with ZyXEL NSA310, although it has 256MB ram (vs 120MG on my DS210j).
So he didn't have issues with the RX since he was able to kwboot.
Maybe we can pick up from there?

As for JTAG I found this two posts:
https://forum.doozan.com/read.php?3,21789
https://forum.doozan.com/read.php?2,127079,127629#msg-127629
Are there any other resources on JTAG?
I might want to try it to learn something new.

But first let's first try to flash the u-boot, and see if we can get it to work that way. My understanding is that even if I mess up the u-boot, JTAG can come to rescue, is that right?

kwbooting is not an option since RX on the serial console is not functional, so we'll have to flash the u-boot from DSM system.
Re: Debian on Synology DS210j
April 30, 2025 02:16PM
Ivan,

> BTW, there is this topic:
> https://forum.doozan.com/read.php?3,116934
> Seems like @twizzter was able to boot the u-boot
> with ZyXEL NSA310, although it has 256MB ram (vs
> 120MG on my DS210j).
> So he didn't have issues with the RX since he was
> able to kwboot.
> Maybe we can pick up from there?

No, that was likely not the same problem.

> As for JTAG I found this two posts:
> https://forum.doozan.com/read.php?3,21789
> https://forum.doozan.com/read.php?2,127079,127629#msg-127629
> Are there any other resources on JTAG?
> I might want to try it to learn something new.

Those 2 are very good tutorials.

>
> But first let's first try to flash the u-boot, and
> see if we can get it to work that way. My
> understanding is that even if I mess up the
> u-boot, JTAG can come to rescue, is that right?

JTAG is the last resort. But only if the board has JTAG header (ususally unpopulated, just 20 solder buttons, 10 per row).

>
> kwbooting is not an option since RX on the serial
> console is not functional, so we'll have to flash
> the u-boot from DSM system.

It's always worth a try running kwboot first. Which u-boot image has you tried running kwboot with? the DS112v10j? and did you run with the USB rootfs attached or without?

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



Edited 1 time(s). Last edit at 04/30/2025 02:18PM by bodhi.
Re: Debian on Synology DS210j
April 30, 2025 03:42PM
Quote
bodhi
It's always worth a try running kwboot first. Which u-boot image has you tried running kwboot with? the DS112v10j? and did you run with the USB rootfs attached or without?
I can't really run the kwboot, because of the RX problem with the serial console, so it is not an option. Are you suggesting that there is another way to run kwboot without the serial console? I can't try the netconsole either because I can't change the env, and not sure if the stock u-boot would support it.

AFAIK the only way possible in this circumstance is to try to flash another u-boot from the DSM system, since I am able to boot and ssh into it.
Re: Debian on Synology DS210j
April 30, 2025 04:53PM
Ivan,

> It's always worth a try running kwboot first.
> Which u-boot image has you tried running kwboot
> with? the DS112v10j? and did you run with the USB
> rootfs attached or without?
> [/quote]
> I can't really run the kwboot, because of the RX
> problem with the serial console, so it is not an
> option.

You can run and see it fails. Running kwboot successfully is another story.

What I meant is you should try to run kwboot with the new u-boot (which I will build) to see it fails and in what way. I'm interested in seeing that, even it will fail the same way as before with other u-boot image.

And if it behaves the same, you can flash it to SPI. If it behaves differently, we'd want to know why.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 30, 2025 05:48PM
Sounds good, Bodhi. I will wait for your new u-boot and instructions to flash it from the DSM system.
Thanks for all the help!
Re: Debian on Synology DS210j
April 30, 2025 08:22PM
OK so this box has 128MB RAM. But the DS112 and DS211 both have 256MB (mainline DTS has a wrong memory capacity for both).

New u-boot will be a bit slower coming then I thought.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
April 30, 2025 08:34PM
Ivan,

Could you do the research about this box vs the DS109? these 2 have the same SoC and same memory.

But what about the peripherals? do they both have UBS 2.0?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
May 01, 2025 12:22AM
Ivan,

Log into DSM and,

cat /proc/mtd
which flashcp
flashcp --help
ls -l /lib/ld*

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



Edited 1 time(s). Last edit at 05/01/2025 12:23AM by bodhi.
Re: Debian on Synology DS210j
May 01, 2025 12:58AM
Quote
Bodhi
Could you do the research about this box vs the DS109? these 2 have the same SoC and same memory.
But what about the peripherals? do they both have UBS 2.0?
According to this article DS109 has "The CPU is Marvell’s "Kirkwood" 88F6281, clocked at 1.2 GHz. Memory is 128 MB." So it seems to be the same, but is only 1 bay. DS210j has 2 USB 2.0 ports in the back and one upfront, and from the photos from the above link, looks like exactly the same configuration for DS109.
The one difference is the eSATA port that DS109 has, and DS210j doesn't.


DiskStation> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00010000 "RedBoot"
mtd1: 00200000 00010000 "zImage"
mtd2: 00140000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00020000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"
DiskStation> which flashcp
DiskStation> flashcp --help
-ash: flashcp: not found
DiskStation> ls -l /lib/ld*
lrwxrwxrwx    1 root     root             7 Apr 29 16:57 /lib/ld-linux.so.3 -> ld.so.1
-rwxr-xr-x    1 root     root        134508 Apr 26  2016 /lib/ld.so.1
DiskStation> 
Re: Debian on Synology DS210j
May 01, 2025 03:23PM
Looks like the best candidate is the Synology DS411j u-boot. Also, we know this u-boot image has been installed here and working.

Warning: by flashing the new u-boot, you will no longer able to boot DSM. And if the new u-boot does not work for this DS210j, then it will be a brick. The only way to recover is either running kwboot (if your serial console is working), or connect JTAG.

Dowload the latest version for ds411j

https://forum.doozan.com/read.php?3,135762

Quote

Update 14 Oct 2023

Download at Dropbox
uboot.2023.04-tld-1.ds411j.bodhi.tar

UART booting

As a precaution before flashing, please run kwboot with the image uboot.2023.04-tld-1.ds411j.kwb, if your serial console is connected and working. Here is an example how to run kwboot

https://forum.doozan.com/read.php?3,51739,51919#msg-51919


Installation Instruction

1. Prepare the rootfs

Follow the instruction in https://forum.doozan.com/read.php?2,12096 and create a USB rootfs using Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

1.1. Create the uEnv.txt in the rootfs /boot with this content:

devices=usb
ethaddr=ba:e8:e7:09:2b:f4
dtb_file=/boot/dts/kirkwood-ds210.dtb
Note that the MAC address used here is a random local MAC addr.

1.2. Copy the u-boot image tarball to the rootfs

And extract it to a directory.

2. Log in to Synology DSM

Insert the USB rootfs. And mount it. Assuming it's mounted at /media/sdb1

cp -ai /media/sdb1/usr/sbin/flashcp /usr/sbin

3. Flash DS411j u-boot image

3.1. Check the mtds

cat /proc/mtd
Expected output
dev:    size   erasesize  name
mtd0: 00080000 00010000 "RedBoot"
mtd1: 00200000 00010000 "zImage"
mtd2: 00140000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00020000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"

3.2. Backup stock mtds

Backup the stock mtds so you can go back to it if needed.

dd if=/dev/mtd0 of=mtd0.ds210j conv=sync
dd if=/dev/mtd1 of=mtd1.ds210j conv=sync
dd if=/dev/mtd2 of=mtd2.ds210j conv=sync
dd if=/dev/mtd3 of=mtd3.ds210j conv=sync
dd if=/dev/mtd4 of=mtd4.ds210j conv=sync
dd if=/dev/mtd5 of=mtd5.ds210j conv=sync

3.3 Write u-boot image to mtd0

/usr/sbin/flashcp -v uboot.2023.04-tld-1.ds411j.kwb /dev/mtd0
Expected output:
Erasing blocks: xxx/xxx (100%)
Writing data: 512k/0k (100%)
Verifying data: 512k/0k (100%)

If everything went well, reboot the box.

shutdown -r now

Obseve the serial boot log, and save the entire log.

4. Adjustment of the envs

To tailor the envs to your environment, use uEnv.txt for now. Don't do any saveenv in serial console, or fw_setenv in Debian, until the next Section 5 is written.

5. TBD

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
May 02, 2025 06:15PM
Bodhi,

I followed all the steps, and got to the flashing u-boot step:
DiskStation> /usr/sbin/flashcp -v uboot.2023.04-tld-1.ds411j.kwb /dev/mtd0
/usr/sbin/flashcp: /lib/libc.so.6: version `GLIBC_2.33' not found (required by /usr/sbin/flashcp)
/usr/sbin/flashcp: /lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/sbin/flashcp)
DiskStation>

Perhaps statically compiled flashcp would work?
Re: Debian on Synology DS210j
May 02, 2025 07:31PM
> Perhaps statically compiled flashcp would work?

Or find an older version of flashcp.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS210j
May 03, 2025 12:24AM
Ivan,

Log in to Synology DSM.

which busybox
busybox --help

=====

Use dd to flash will work too, but it does not provide any error output so there is no way to know if the flashing was successful.

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



Edited 1 time(s). Last edit at 05/03/2025 12:31AM by bodhi.
Re: Debian on Synology DS210j
May 03, 2025 02:40AM
Hello Bodhi,

DiskStation> which busybox
/bin/busybox
DiskStation> busybox --help
BusyBox v1.16.1 (2016-04-26 17:12:35 CST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as.

Currently defined functions:
	[, [[, arp, arping, ash, awk, basename, blockdev, cat, catv, chgrp, chmod, chown, chroot, clear, cmp, cp, crond, cut, date, dd,
	dhcprelay, diff, dirname, dmesg, dnsdomainname, du, dumpleases, echo, egrep, env, ether-wake, expr, false, fdisk, fgrep, find,
	flock, free, freeramdisk, get_key_value, getopt, getty, grep, head, hostname, hwclock, id, ifconfig, inetd, insmod, ipcalc, ipcs,
	kill, killall, killps, ln, logger, login, losetup, ls, lsmod, makedevs, mkdir, mknod, mkswap, modprobe, more, mount, mv, netstat,
	nohup, nslookup, pidof, ping, ping6, pkill, printf, ps, pwd, readlink, realpath, renice, reset, resize, rm, rmdir, rmmod, route,
	run-parts, sed, seq, setsid, sh, sleep, sort, stat, stty, su, swapoff, swapon, sync, synodd, tail, taskset, tee, telnet, telnetd,
	test, time, top, touch, tr, traceroute, traceroute6, true, tty, udhcpd, umount, uname, uniq, uptime, usleep, vconfig, vi, wc,
	which, who, whoami, xargs, yes

DiskStation>

DiskStation> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00010000 "RedBoot"
mtd1: 00200000 00010000 "zImage"
mtd2: 00140000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00020000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"

And finally:
DiskStation> dd if=uboot.2023.04-tld-1.ds411j.kwb of=/dev/mtd0
1024+0 records in
1024+0 records out
DiskStation>

Now it's bricked. When turned on, the fan just starts full speed, and no output on the serial console.
The next step is JTAG debricking, probably try to flash back the stock u-boot at least. But that would have to wait for some future time if I get some free time to focus on it.

Thanks Bodhi for providing guidance!
Re: Debian on Synology DS210j
May 03, 2025 01:36PM
Ivan,

Quote

DiskStation> dd if=uboot.2023.04-tld-1.ds411j.kwb of=/dev/mtd0
1024+0 records in
1024+0 records out
DiskStation>

Now it's bricked. When turned on, the fan just starts full speed, and no output on the serial console.

You're a bit impatient. It's not hard to make flashcp work in DSM.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: