Welcome! Log In Create A New Profile

Advanced

Debian on Synology DS215j

Posted by ZooMoo 
Re: Debian on Synology DS215j
May 09, 2025 12:00AM
ZooMoo,

I did not have any luck requesting anything from Marvell in the past. I have most of the datasheets for the more popular Marvell SoCs, just not this Armada 375 SoC.

Developers' interest seem to stop cold after the reference board (armada-375-db) was mainline.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
May 09, 2025 02:13AM
This is not looking good without the docs.

What is the latest SoC / NAS you'd recommend that's supported?
Re: Debian on Synology DS215j
May 09, 2025 02:41PM
ZooMoo,

> What is the latest SoC / NAS you'd recommend
> that's supported?

I don't know much about the latest models in the market. I have a few Synolgy DS116 (1-bay) and Thecus N2350 (2-bay) and I like both, especially the DS116. I'm supporting these here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
May 17, 2025 04:19AM
Thanks Bodhi, I've been looking around and not much shows up.

Going back to the DS215j, I want to try to compile and use the Synology DSM kernel (v3.2.4) with your Debian DeBootstrap install.

How do I compile a kernel from source and use it within a Debian Debootstrap install. I guess I'll need some of Synologies custom libraries, but I'm not sure

I've searched online and I could not find anything for this use-case.

I'd need to cross-compile it, but I hope there is some advice or a guide that makes this more clear.
Re: Debian on Synology DS215j
May 17, 2025 02:58PM
ZooMoo,

> How do I compile a kernel from source and use it
> within a Debian Debootstrap install. I guess I'll
> need some of Synologies custom libraries, but I'm
> not sure
>
> I've searched online and I could not find anything
> for this use-case.
>
> I'd need to cross-compile it, but I hope there is
> some advice or a guide that makes this more clear.

There are numerous tutorials on the net about how to build Debian system using debootstrap. For example, see Debian site:

https://wiki.debian.org/Debootstrap

Building custom kernels is needed when Debian does not have support for a specific board. Or the official Debian kernel does not provide all capabilities that you need. That's what I provided here for the Marvell Kirkwoodd SoCs and Armada SoCs. You can also easily find many tutorials on the net about compiling Linux kernel. For example, to cross compile, look for Linaro toolchain.

Sorry, I won't provide hand-on tutorials here, it would take too much of my time. My own policy here is I will only help with something that you cannot find anywhere else.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
July 09, 2025 04:31AM
It's' not so simple given the Synology 3.x kernel needs GCC up to version 8. Which is too old and not available unless running a legacy distribution in a VM.

To build the ancient and modified Synology kernel you need to use their chroot'ed build environment.

Details for setting up the environment are given at:
https://help.synology.com/developer-guide/getting_started/gettingstarted.html

It is focused on application development for the DSM platform, but it turns out you can also build the kernel the same way.


Install necessary packages on your host.
NOTE: I'm using devuan which is missing the dbus-user-session as it depends on systemd. However, it seems it didn't prevent the kernel from being built.

./src/SynologyOpenSource/toolkit$ sudo apt-get install cifs-utils python3 python3-pip


Clone installation script.

./src/SynologyOpenSource/toolkit$ torify git clone https://github.com/SynologyOpenSource/pkgscripts-ng.git
./src/SynologyOpenSource/toolkit$ cd pkgscripts-ng/

./src/SynologyOpenSource/toolkit/pkgscripts-ng$ git checkout DSM7.1

./src/SynologyOpenSource/toolkit/pkgscripts-ng$ sudo ./EnvDeploy -v 7.1 -p armada375
...
[2025-06-29 13:40:19,642] INFO: All task finished.


Build kernel by copying the synology kernel source txz to the "source" folder.

./src/SynologyOpenSource/toolkit/pkgscripts-ng$ cd ..
./src/SynologyOpenSource/toolkit/$ mkdir source && cd source
./src/SynologyOpenSource/toolkit/source$ wget https://global.synologydownload.com/download/ToolChain/Synology%20NAS%20GPL%20Source/7.1.1-42962/armada375/linux-3.x.txz
./src/SynologyOpenSource/toolkit/source$ tar vxf linux-3.x.txz


Build kernel source using pkgscripts tool. There were errors, but it built the zImage despite this.

./src/SynologyOpenSource/toolkit/source$ cd ../pkgscripts-ng/
./src/SynologyOpenSource/toolkit/pkgscripts-ng$ sudo ./PkgCreate.py -v 7.1 -p armada375 -c linux-3.x

########################################################
Error(s) occurred on project "linux-3.x"
########################################################
1 projects, 1 failed, 0 blocked.\n\n[Error] Check [/logs/error.build] for fixing errors.')

----------------------------------------------
============================================================
                Start to run "Build Package"                
------------------------------------------------------------
...
[armada375] env PackageName=linux-3.x /pkgscripts-ng/SynoBuild --armada375 -c --min-sdk 6.2 linux-3.x
Set cache size limit to 8.0 Gbytes
Statistics cleared
[INFO] projectList=linux-3.x
[INFO] Start to build linux-3.x.
[SCRIPT] build script: //source/linux-3.x/SynoBuildConf/build
[INFO] ======= Run build script =======
/source/linux-3.x/crypto/ocf/ep80579/Makefile:75: ICP_ROOT is undefined. Please set the path to EP80579 release package directory "-> setenv ICP_ROOT <path>"
/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-size: 'arch/arm/boot/compressed/../../../../vmlinux': No such file
size: 'arch/arm/boot/compressed/../../../../vmlinux': No such file
./syno_check_env.sh
ARMADA375 platform found...
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
...
  LD [M]  sound/sound_firmware.ko
  LD [M]  sound/soundcore.ko
  AS      arch/arm/boot/compressed/piggy.lzma.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.2.101
Created:      Sun Jun 29 15:13:51 2025
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1933672 Bytes = 1888.35 kB = 1.84 MB
Load Address: 00008000
Entry Point:  00008000
  Image arch/arm/boot/uImage is ready
Error! /arch/arm/boot/uImage does not exist!
[Error] Build project fail!
Time cost: 00:00:26 [Build-->linux-3.x]
[INFO] Build linux-3.x finished!

Find the zImage:

./src/SynologyOpenSource/toolkit$ sudo find ./ -name zImage
./build_env/ds.armada375-7.1/source/linux-3.x/arch/arm/boot/zImage

./src/SynologyOpenSource/toolkit$ ll ./build_env/ds.armada375-7.1/source/linux-3.x/arch/arm/boot/zImage
-rwxr-xr-x 1 root root 1.9M Jun 29 17:13 ./build_env/ds.armada375-7.1/source/linux-3.x/arch/arm/boot/zImage*



Update the USB stick with the Synology 3.x kernel... who know if this will work for a kernel compiled with gcc 8.

NOTE: the doozan zImage is 5.0M whilst the synology zImage is 1.9M. I guess this is because the synology zImage is installed into the SPI chip, hence need to be small.

NOTE 2: no need to copy the DTS.

/media/usb/boot# cp -a /<PATH_TO_SOURCE>/build_env/ds.armada375-7.1/source/linux-3.x/arch/arm/boot/zImage zImage.fdt
/media/usb/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n synology-linux-3.x -d zImage.fdt uImage	
/media/usb/boot# cd && umount /media/usb


Insert USB into DS215j and run the usual incantations via minicom.

Marvell>> setenv usbActive 1
Marvell>> usb start
Marvell>> ext2load usb 0:1 0x02000000 /boot/uImage
5192845 bytes read in 637 ms (7.8 MiB/s)
Marvell>> ext2load usb 0:1 0x08000000 /boot/uInitrd
5257173 bytes read in 225 ms (22.3 MiB/s)
Marvell>> setenv bootargs 'console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8'
Marvell>> bootm 0x02000000 0x08000000

Amazingly it boots, but it fails with the following errors and drops down to a initramfs prompt.

[   71.628934] Archive bit cmd:7ec67b40 not implement.
[   71.633909] Archive bit cmd:7ec67b08 not implement.


I could not find any help online. Is it because it is missing firmware or something?


Full log:
======================================================

BootROM - 1.51
Booting from SPI flash


General initialization - Version: 1.0.0
High speed PHY - Version: 0.1.1 (COM-PHY-V20) 
USB2 UTMI PHY initialized succesfully
USB2 UTMI PHY initialized succesfully
High speed PHY - Ended Successfully

DDR3 Training Sequence - Ver 5.7.1
TWSI Read failed
Error reading from TWSI
DDR3 Training Sequence - Run with PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-g5d1ab78 (Oct 27 2015 - 11:38:34) Marvell version: 2014_T2.0p3

mvBoardTwsiGet: Twsi Read fail
mvBoardIoExpValSet: Error: Read from IO Expander failed
Board: SYNO-DS215j
SoC:   MV88F6720 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 800 [MHz]
       L2     @ 400 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 534 [MHz]
       DDR 16Bit Width, FastPath Memory Access, DLB Enabled
DRAM:  512 MiB

Map:   Code:		0x1fed2000:0x1ff93080
       BSS:		0x1ffefe10
       Stack:		0x1f9c1f20
       Heap:		0x1f9c2000:0x1fed2000

MMC:   MRVL_MMC: 0
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB2.0 1: Device Mode
USB3.0 0: Host Mode
Board configuration detected:
	RGMII0 Module on MAC0
	PON ETH SERDES on MAC1 [SFP]
SERDES configuration:
	Lane #0: PCIe0
	Lane #1: SATA1
	Lane #2: SATA0
	Lane #3: USB3

Synology Model: DS215j
Fan Status: Good

Net:   egiga0, egiga1 [PRIME]
syno: network status self-checking
Using egiga1 device
## Warning: gatewayip needed but not set
## Warning: gatewayip needed but not set
ping failed; host 192.168.27.90 is not alive
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
Erasing SPI flash....Writing to SPI flash.....done
syno: reset for network status 

BootROM - 1.51
Booting from SPI flash


General initialization - Version: 1.0.0
High speed PHY - Version: 0.1.1 (COM-PHY-V20) 
USB2 UTMI PHY initialized succesfully
USB2 UTMI PHY initialized succesfully
High speed PHY - Ended Successfully

DDR3 Training Sequence - Ver 5.7.1
TWSI Read failed
Error reading from TWSI
DDR3 Training Sequence - Run with PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED
l
 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-g5d1ab78 (Oct 27 2015 - 11:38:34) Marvell version: 2014_T2.0p3

mvBoardTwsiGet: Twsi Read fail
mvBoardIoExpValSet: Error: Read from IO Expander failed
Board: SYNO-DS215j
SoC:   MV88F6720 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 800 [MHz]
       L2     @ 400 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 534 [MHz]
       DDR 16Bit Width, FastPath Memory Access, DLB Enabled
DRAM:  512 MiB

Map:   Code:		0x1fed2000:0x1ff93080
       BSS:		0x1ffefe10
       Stack:		0x1f9c1f20
       Heap:		0x1f9c2000:0x1fed2000

MMC:   MRVL_MMC: 0
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB2.0 1: Device Mode
USB3.0 0: Host Mode
Board configuration detected:
	RGMII0 Module on MAC0
	PON ETH SERDES on MAC1 [SFP]
SERDES configuration:
	Lane #0: PCIe0
	Lane #1: SATA1
	Lane #2: SATA0
	Lane #3: USB3

Synology Model: DS215j
Fan Status: Good

Net:   egiga0, egiga1 [PRIME]
syno: network status self-checking
Using egiga1 device
## Warning: gatewayip needed but not set
## Warning: gatewayip needed but not set
ping failed; host 192.168.27.90 is not alive
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
Erasing SPI flash....Writing to SPI flash.....done
syno: reset for network status 

BootROM - 1.51
Booting from SPI flash


General initialization - Version: 1.0.0
High speed PHY - Version: 0.1.1 (COM-PHY-V20) 
USB2 UTMI PHY initialized succesfully
USB2 UTMI PHY initialized succesfully
High speed PHY - Ended Successfully

DDR3 Training Sequence - Ver 5.7.1
TWSI Read failed
Error reading from TWSI
DDR3 Training Sequence - Run with PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-g5d1ab78 (Oct 27 2015 - 11:38:34) Marvell version: 2014_T2.0p3

mvBoardTwsiGet: Twsi Read fail
mvBoardIoExpValSet: Error: Read from IO Expander failed
Board: SYNO-DS215j
SoC:   MV88F6720 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 800 [MHz]
       L2     @ 400 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 534 [MHz]
       DDR 16Bit Width, FastPath Memory Access, DLB Enabled
DRAM:  512 MiB

Map:   Code:		0x1fed2000:0x1ff93080
       BSS:		0x1ffefe10
       Stack:		0x1f9c1f20
       Heap:		0x1f9c2000:0x1fed2000

MMC:   MRVL_MMC: 0
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB2.0 1: Device Mode
USB3.0 0: Host Mode
Board configuration detected:
	RGMII0 Module on MAC0
	PON ETH SERDES on MAC1 [SFP]
SERDES configuration:
	Lane #0: PCIe0
	Lane #1: SATA1
	Lane #2: SATA0
	Lane #3: USB3

Synology Model: DS215j
Fan Status: Good

Net:   egiga0, egiga1 [PRIME]
syno: network status self-checking
Using egiga1 device
## Warning: gatewayip needed but not set
## Warning: gatewayip needed but not set
ping failed; host 192.168.27.90 is not alive
skip auto reset......
SF: Detected MX25L6405D with page size 64 KiB, total 8 MiB
Erasing SPI flash....Writing to SPI flash.....done
Press Ctrl+C to abort autoboot in 3 second
Marvell>> <INTERRUPT>
Marvell>> 
Marvell>> sentetenv usbActive 1
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 
'usbActive' Error: invalid port number 1, switching to port 0
Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Marvell>> ext2load usb 0:1 0x02000000 /boot/uImage
1933736 bytes read in 499 ms (3.7 MiB/s)
Marvell>> ext2load usb 0:1 0x08000000 /boot/uInitrd
5257173 bytes read in 225 ms (22.3 MiB/s)
Marvell>> setenv bootargs 'console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8'
Marvell>> bootm 0x02000000 0x08000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   synology-linux-3.x
   Created:      2025-07-09   7:26:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1933672 Bytes = 1.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 08000000 ...
   Image Name:   initramfs-6.6.2-mvebu-tld-1
   Created:      2023-12-12  22:03:52 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5257109 Bytes = 5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Lin done, booting th
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.2.101 (root@laptop) (gcc version 8.5.0 (GCC) ) #1 SMP Sun Jun 29 15:13:44 CST 2025
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Marvell Armada-375 Board
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] PERCPU: Embedded 7 pages/cpu @8098d000 s5440 r8192 d15040 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8
[    0.000000] Synology Hardware Version: DS215j-j
[    0.000000] Internal HD num: 2
[    0.000000] Internal netif num: 1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 508912k/508912k available, 15376k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xa0800000 - 0xf4000000   (1336 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x804b8000   (4800 kB)
[    0.000000]       .init : 0x804b8000 - 0x804e7540   ( 190 kB)
[    0.000000]       .data : 0x804e8000 - 0x8051ea40   ( 219 kB)
[    0.000000]        .bss : 0x8051ea64 - 0x8058818c   ( 422 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:528
[    0.000000] Initializing Armada-375 SoC Timers
[    0.000000] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
[    0.000167] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    0.090039] pid_max: default: 32768 minimum: 301
[    0.090177] Security Framework initialized
[    0.090205] AppArmor: AppArmor initialized
[    0.090271] Mount-cache hash table entries: 512
[    0.091048] CPU: Testing write buffer coherency: ok
[    0.091189] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.091215] Calibrating local timer... 399.92MHz.
[    0.151068] CPU1: Booted secondary processor
[    0.190044] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.190098] Brought up 2 CPUs
[    0.190112] SMP: Total of 2 processors activated (3188.32 BogoMIPS).
[    0.190888] devtmpfs: initialized
[    0.200278] NET: Registered protocol family 16
[    0.210124] mvBoardTwsiGet: Twsi Read fail
[    0.210133] mvBoardIoExpValSet: Error: Read from IO Expander failed
[    0.210153] L310 cache controller enabled
[    0.210163] l2x0: 8 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x02440000, Cache size: 262144 B
[    0.211733] 
[    0.211739] CPU Interface
[    0.211743] -------------
[    0.211748] SDRAM_CS0 ....base 000000000, size 512MB 
[    0.211764] SDRAM_CS1 ....disable
[    0.211772] SDRAM_CS2 ....disable
[    0.211779] SDRAM_CS3 ....disable
[    0.211786] DEVICE_CS0 ....base 0f4000000, size   1MB 
[    0.211803] DEVICE_CS1 ....no such
[    0.211823] DEVICE_CS2 ....no such
[    0.211841] DEVICE_CS3 ....no such
[    0.211859] PEX0_MEM ....base 0e0000000, size  16MB 
[    0.211872] PEX0_IO ....base 0f1100000, size   1MB 
[    0.211886] PEX1_MEM ....base 0e2000000, size  16MB 
[    0.211899] PEX1_IO ....base 0f1200000, size   1MB 
[    0.211913] INTER_REGS ....base 0f1000000, size   1MB 
[    0.211925] DMA_UART ....no such
[    0.211943] SPI_CS0 ....base 0f0000000, size  16MB 
[    0.211960] SPI_CS1 ....no such
[    0.211978] SPI_CS2 ....no such
[    0.211995] SPI_CS3 ....no such
[    0.212013] SPI_CS4 ....no such
[    0.212030] SPI_CS5 ....no such
[    0.212049] SPI_CS6 ....no such
[    0.212067] SPI_CS7 ....no such
[    0.212085] BOOT_ROM_CS ....no such
[    0.212103] DEV_BOOTCS ....base 0f2000000, size  32MB 
[    0.212119] USB3 ....no such
[    0.212137] CRYPT0_ENG ....base 0f4400000, size  64KB 
[    0.212154] CRYPT1_ENG ....base 0f4480000, size  64KB 
[    0.212168] PP2 - CPU 0 ....no such
[    0.212186] PP2 - CPU 1 ....no such
[    0.212204] 
[    0.212206]   Marvell Armada-375
[    0.212213]  SYNO-DS215j Board - 
[    0.212221]  Soc: MV88F6720 Rev A0
[    0.212225]  LE
[    0.212230]   LSP version: linux-3.2.58-2014_T2.0p2
[    0.212235]   IOCC: Support IO coherency.
[    0.212240]      -> Sync Barrier WA enabled
[    0.212245] 
[    0.213758] USB3 XHCI Device registered successfully
[    0.213768] Initialising USB2-1 HAL
[    0.214103] Registered Marvell USB2 EHCI host controller 1
[    0.214110] Initialising USB2-0 HAL
[    0.214432] Registered Marvell USB2 EHCI host controller 0
[    0.214440] -----> 0x18400 = 0x1040
[    0.214653] Synology Armada375 2-bay GPIO Init
[    0.221618] bio: create slab <bio-0> at 0
[    0.222493] SCSI subsystem initialized
[    0.223848] Switching to clocksource a375_clocksource
[    0.224294] AppArmor: AppArmor Filesystem Enabled
[    0.226363] NET: Registered protocol family 2
[    0.234094] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.234405] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.234648] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[    0.234892] TCP: Hash tables configured (established 16384 bind 16384)
[    0.234900] TCP reno registered
[    0.234910] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.234931] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.235139] NET: Registered protocol family 1
[    0.235336] Trying to unpack rootfs image as initramfs...
[    0.507404] Freeing initrd memory: 5132K
[    0.507470] PCIe: Checking physical bus #0: 
[    0.507477] no link, disabled
[    0.507483] PCIe: Checking physical bus #1: 
[    0.507489] no link, disabled
[    0.508197] Armada 375 hwmon thermal sensor initialized.
[    0.509516]   o	PPv2.1 Giga driver
[    0.509525]   o 4 Giga ports supported
[    0.509531]   o SKB recycle supported (Enabled)
[    0.509537]   o BM supported for CPU: 8 BM pools
[    0.509543]   o HWF supported
[    0.509548]   o RX Queue support: 8 Queues * 512 Descriptors
[    0.509556]   o TX Queue support: 8 Queues * 1024 Descriptors
[    0.509562]   o Driver debug messages enabled
[    0.509567] 
[    0.514450]   o Loading network interface(s) for port #1: cpu_mask=0x3, mtu=1500
[    0.515154] 	o Port 1 is connected to Linux netdevice
[    0.515172] 	o giga p=1: phy=1,  mtu=1500, mac=<MAC_ADDRESS>, speed=AutoNeg (platform)
[    0.518154] 	o eth0, ifindex = 2, GbE port = 1
[    0.518165] 
[    0.518167]     o eth0, phy chipid = 1410dd0, Support WOL = 32
[    0.518181] 
[    0.518377] cesadev_init(804c0f2c)
[    0.519491] audit: initializing netlink socket (disabled)
[    0.519526] type=2000 audit(0.500:1): initialized
[    0.582323] VFS: Disk quotas dquot_6.5.2
[    0.582459] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.583060] msgmni has been set to 1003
[    0.584235] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.584247] io scheduler noop registered
[    0.584301] io scheduler cfq registered (default)
[    0.584379] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[    0.584417] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[    0.620015] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    0.660046] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[    0.680020] mv_xor mv_xor.2: Marvell XOR: ( xor )
[    0.699992] mv_xor mv_xor.3: Marvell XOR: ( fill cpy )
[    0.788213] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.850837] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
[    1.566364] console [ttyS0] enabled
[    1.600365] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
[    1.648061] brd: module loaded
[    1.651148] Loading iSCSI transport class v2.0-870.
[    1.657345] sata_mv sata_mv.0: slots 32 ports 2
[    1.664378] scsi0 : sata_mv
[    1.667697] scsi1 : sata_mv
[    1.670908] ata1: SATA max UDMA/133 irq 58
[    1.675028] ata2: SATA max UDMA/133 irq 58
[   10.218172] ata1: link is slow to respond, please be patient (ready=0)
[   14.717328] ata1: SRST failed (errno=-16)
[   14.721360] ata1: SRST fail, set srst fail flag
[   15.887119] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   15.893423] ata1: link reset sucessfully clear error flags
[   15.917336] ata1.00: ATA-9: WDC WD40PURX-64GVNY0, 80.00A80, max UDMA/133
[   15.924075] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.947313] ata1.00: configured for UDMA/133
[   15.967211] scsi 0:0:0:0: Direct-Access     WDC      WD40PURX-64GVNY0         80.0 PQ: 0 ANSI: 5
[   15.976951] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[   15.984753] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   15.990177] sd 0:0:0:0: [sda] Write Protect is off
[   15.995064] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   16.066510]  sda: unknown partition table
[   16.071230] sd 0:0:0:0: [sda] Attached SCSI disk
[   18.967624] Delay 5 seconds to wait for disk 2 ready.
[   24.305546] ata2: SATA link down (SStatus 0 SControl F300)
[   24.312482] physmap platform flash device: 00800000 at f0000000
[   24.320024] SPI Serial flash detected @ 0xf0000000, 8192KB (128sec x 64KB)
[   24.326959] Searching for RedBoot partition table in SYNOMTD-0 at offset 0x7f0000
[   24.375719] 6 RedBoot partitions found on MTD device SYNOMTD-0
[   24.381581] SYNOMTD flash bank 0: Using RedBoot partition definition
[   24.387969] Creating 6 MTD partitions on "SYNOMTD-0":
[   24.393050] 0x000000000000-0x0000000f0000 : "RedBoot"
[   24.399352] 0x0000000f0000-0x0000003c0000 : "zImage"
[   24.405390] 0x0000003c0000-0x0000007d0000 : "rd.gz"
[   24.411443] 0x0000007d0000-0x0000007e0000 : "vendor"
[   24.416538] vender Mac0 address : <MAC_ADDRESS_2>
[   24.421444] vender Mac1 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.427373] vender Mac2 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.433235] vender Mac3 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.439104] serial number='1560MPN098403'
[   24.444053] 0x0000007e0000-0x0000007f0000 : "RedBoot Config"
[   24.451073] 0x0000007f0000-0x000000800000 : "FIS directory"
[   24.457897] i2c /dev entries driver
[   24.462460] md: raid1 personality registered for level 1
[   24.467866] cpuidle: using governor ladder
[   24.472199] TCP cubic registered
[   24.475447] NET: Registered protocol family 17
[   24.479936] Registering the dns_resolver key type
[   24.484739] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[   24.493082] registered taskstats version 1
[   24.497938] Freeing init memory: 188K
[   24.504508] Archive bit cmd:7eeccd50 not implement.
[   24.513202] Archive bit cmd:7ea94d20 not implement.
[   24.521492] Archive bit cmd:7ed5ad20 not implement.
[   24.529676] Archive bit cmd:7ea89d20 not implement.
[   24.537830] Archive bit cmd:7edc2d10 not implement.
[   24.546084] Archive bit cmd:7ee0fce0 not implement.
[   24.554497] Archive bit cmd:7ea7bce0 not implement.
[   24.563041] Archive bit cmd:7ee97d20 not implement.
Loading, please wait...
[   24.571682] Archive bit cmd:7e8c7ce0 not implement.
[   24.580186] Archive bit cmd:7e9e4d00 not implement.
[   24.588467] Archive bit cmd:7ebf7d00 not implement.
[   24.596731] Archive bit cmd:7ea92cf0 not implement.
[   24.604949] Archive bit cmd:7eeebcf0 not implement.
[   24.613136] Archive bit cmd:7ebb5d10 not implement.
[   24.621296] Archive bit cmd:7e884cd0 not implement.
[   24.635722] Archive bit cmd:7eac7ba0 not implement.
[   24.644662] Archive bit cmd:7e8dab50 not implement.
[   24.653181] Archive bit cmd:7ee6db80 not implement.
[   24.661836] Archive bit cmd:7edd3b60 not implement.
[   24.670445] Archive bit cmd:7ebe5b90 not implement.
[   24.679312] Archive bit cmd:7ef56b70 not implement.
[   24.688210] Archive bit cmd:7eb7bb70 not implement.
[   24.697109] Archive bit cmd:7ec8ab70 not implement.
[   24.719671] Archive bit cmd:7ed12be8 not implement.
Starting systemd-udevd version 2[   24.728233] Archive bit cmd:7ed12ab8 not implement.
52.19-1~deb12u1
[   24.751007] Archive bit cmd:7efedc18 not implement.
[   24.787195] Archive bit cmd:7e83ec18 not implement.
[   25.147412] Archive bit cmd:7ee15c38 not implement.
Begin: Loading essential drivers ... done.
[   25.158559] Archive bit cmd:7ede4b90 not implement.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/lo[   25.173849] Archive bit cmd:7ecc7b60 not implement.
cal-top ... done.
Begin: Running /scripts/local-premount ... done.
[   25.197257] Archive bit cmd:7efaec18 not implement.
Begin: Waiting for root file system ... [   25.208138] Archive bit cmd:7e9eab90 not implement.
[   26.219966] Archive bit cmd:7eab8b80 not implement.
Begin: Running /scripts/local-block ... done.
[   26.230979] Archive bit cmd:7ec01b90 not implement.
[   27.249736] Archive bit cmd:7efd7b80 not implement.
Begin: Running /scripts/local-block ... done.
[   27.260733] Archive bit cmd:7ed3eb90 not implement.
[   28.279575] Archive bit cmd:7ef01b80 not implement.
Begin: Running /scripts/local-block ... done.
[   28.290582] Archive bit cmd:7eb6cb90 not implement.
[   29.309369] Archive bit cmd:7ecbab80 not implement.
Begin: Running /scripts/local-block ... done.
[   29.320349] Archive bit cmd:7e9deb90 not implement.
[   30.339213] Archive bit cmd:7efe7b80 not implement.
Begin: Running /scripts/local-block ... done.
[   30.350207] Archive bit cmd:7e81fb90 not implement.
[   31.368993] Archive bit cmd:7eaa8b80 not implement.
Begin: Running /scripts/local-block ... done.
[   31.380015] Archive bit cmd:7e96bb90 not implement.
[   32.398796] Archive bit cmd:7ece1b80 not implement.
Begin: Running /scripts/local-block ... done.
[   32.409771] Archive bit cmd:7ec4fb90 not implement.
[   33.438589] Archive bit cmd:7ea71b80 not implement.
Begin: Running /scripts/local-block ... done.
[   33.449635] Archive bit cmd:7eb6ab90 not implement.
[   34.478429] Archive bit cmd:7eb4fb80 not implement.
Begin: Running /scripts/local-block ... done.
[   34.489454] Archive bit cmd:7ee3eb90 not implement.
[   35.518200] Archive bit cmd:7ea06b80 not implement.
Begin: Running /scripts/local-block ... done.
[   35.529224] Archive bit cmd:7e8efb90 not implement.
[   36.558034] Archive bit cmd:7ec9fb80 not implement.
Begin: Running /scripts/local-block ... done.
[   36.569042] Archive bit cmd:7ecf6b90 not implement.
[   37.597815] Archive bit cmd:7ed9eb80 not implement.
Begin: Running /scripts/local-block ... done.
[   37.608835] Archive bit cmd:7ea27b90 not implement.
[   38.637665] Archive bit cmd:7ea94b80 not implement.
Begin: Running /scripts/local-block ... done.
[   38.648686] Archive bit cmd:7eb63b90 not implement.
[   39.667439] Archive bit cmd:7ebb0b80 not implement.
Begin: Running /scripts/local-block ... done.
[   39.678451] Archive bit cmd:7ee5cb90 not implement.
[   40.697277] Archive bit cmd:7e866b80 not implement.
Begin: Running /scripts/local-block ... done.
[   40.708288] Archive bit cmd:7ee2cb90 not implement.
[   41.727045] Archive bit cmd:7e828b80 not implement.
Begin: Running /scripts/local-block ... done.
[   41.738047] Archive bit cmd:7e99ab90 not implement.
[   42.756872] Archive bit cmd:7eba6b80 not implement.
Begin: Running /scripts/local-block ... done.
[   42.767880] Archive bit cmd:7eb6fb90 not implement.
[   43.786656] Archive bit cmd:7eab9b80 not implement.
Begin: Running /scripts/local-block ... done.
[   43.797676] Archive bit cmd:7ee6cb90 not implement.
[   44.816515] Archive bit cmd:7e83db80 not implement.
Begin: Running /scripts/local-block ... done.
[   44.827470] Archive bit cmd:7ef68b90 not implement.
[   45.846284] Archive bit cmd:7edebb80 not implement.
Begin: Running /scripts/local-block ... done.
[   45.857284] Archive bit cmd:7ee2cb90 not implement.
[   46.876117] Archive bit cmd:7ed1bb80 not implement.
Begin: Running /scripts/local-block ... done.
[   46.887119] Archive bit cmd:7e950b90 not implement.
[   47.905910] Archive bit cmd:7e9c0b80 not implement.
Begin: Running /scripts/local-block ... done.
[   47.916932] Archive bit cmd:7e94bb90 not implement.
[   48.935704] Archive bit cmd:7ebb1b80 not implement.
Begin: Running /scripts/local-block ... done.
[   48.946716] Archive bit cmd:7ebdeb90 not implement.
[   49.965513] Archive bit cmd:7e953b80 not implement.
Begin: Running /scripts/local-block ... done.
[   49.976528] Archive bit cmd:7eb73b90 not implement.
[   50.995329] Archive bit cmd:7ec91b80 not implement.
Begin: Running /scripts/local-block ... done.
[   51.006343] Archive bit cmd:7ec01b90 not implement.
[   52.025131] Archive bit cmd:7e835b80 not implement.
Begin: Running /scripts/local-block ... done.
[   52.036253] Archive bit cmd:7eefdb90 not implement.
[   53.054920] Archive bit cmd:7ef9bb80 not implement.
Begin: Running /scripts/local-block ... done.
[   53.065927] Archive bit cmd:7ee88b90 not implement.
[   54.084762] Archive bit cmd:7edcfb80 not implement.
Begin: Running /scripts/local-block ... done.
[   54.095805] Archive bit cmd:7ec7db90 not implement.
[   55.114536] Archive bit cmd:7e9f7b80 not implement.
Begin: Running /scripts/local-block ... done.
[   55.125543] Archive bit cmd:7ec18b90 not implement.
[   56.144379] Archive bit cmd:7ebc5b80 not implement.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root f[   56.157031] Archive bit cmd:7ed91b90 not implement.
ile system device.  Common problems:
 - Boot args (cat /proc/cm[   56.167102] Archive bit cmd:7e97cb00 not implement.
dline)
   - Check rootdelay= (d[   56.176025] Archive bit cmd:7e9feb10 not implement.
id the system wait long enough?)
 - Missing mod[   56.184147] Archive bit cmd:7e9abb40 not implement.
ules (cat /proc/modules; ls /dev)
chvt: can't open console
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!


BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) ls
[   71.628934] Archive bit cmd:7ec67b40 not implement.
[   71.633909] Archive bit cmd:7ec67b08 not implement.
bin      dev      init     proc     run      scripts  tmp      var
conf     etc      lib      root     sbin     sys      usr
Re: Debian on Synology DS215j
July 09, 2025 02:28PM
ZooMoo,

> To build the ancient and modified Synology kernel
> you need to use their chroot'ed build
> environment.

> Amazingly it boots, but it fails with the
> following errors and drops down to a initramfs
> prompt.
>
>
> [   71.628934] Archive bit cmd:7ec67b40 not
> implement.
> [   71.633909] Archive bit cmd:7ec67b08 not
> implement.
>
>
>
> I could not find any help online. Is it because it
> is missing firmware or something?

I vaguely remember from a long time ago, this probably was the "kernel too old" error. You can try running this Debian stretch rootfs.

Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
md5:
e18a9df63e9de5e2c19265b21d081dcb
sha256:
87b283df02e34a6217f269f53d20816d885802e9148330455c15a788e38e891b

CORRECTION:

sha256:
1ce340b3db2bfbd0e1d706ed1fda0d4dc8f79830ab5285b1f50299aee25ae2d7

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



Edited 1 time(s). Last edit at 07/12/2025 10:39AM by bodhi.
Re: Debian on Synology DS215j
July 10, 2025 03:22AM
mmm I'm getting a different sha256. I tried downloading twice, but got the same checksum.

$ sha256sum Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 
1ce340b3db2bfbd0e1d706ed1fda0d4dc8f79830ab5285b1f50299aee25ae2d7  Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2

$ ll Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 
-rw-r--r-- 1 user1 user1 229M Jul 10 11:19 Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
Re: Debian on Synology DS215j
July 10, 2025 11:42AM
Name: Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
Size: 239492598 bytes (228 MiB)
SHA256: 1ce340b3db2bfbd0e1d706ed1fda0d4dc8f79830ab5285b1f50299aee25ae2d7

Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 File extracts OK
Re: Debian on Synology DS215j
July 10, 2025 08:39PM
Thanks @daviddyer.

I'll wait for bodhi to chime in with an update. Either his check sum is wrong or the file is wrong.
Re: Debian on Synology DS215j
July 11, 2025 01:47AM
Those checksums are definitely wrong since they appear in the kernel thread for a different file.
https://forum.doozan.com/read.php?2,32146,page=1
Re: Debian on Synology DS215j
July 12, 2025 04:36AM
Thanks guys,

I was in transit. Just settled in, and I'll check the checksum. Most probably a copy/paste error.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
July 12, 2025 10:38AM
Yes,

The correct sha256 hash is what you've reported.:

1ce340b3db2bfbd0e1d706ed1fda0d4dc8f79830ab5285b1f50299aee25ae2d7

(Surely what I posted was for kernel linux-5.1.7-mvebu-tld-1-bodhi.tar.bz2).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
July 24, 2025 06:03AM
I've tried out the 4.14 rootfs and the previous error has gone, but now the issue is related to the HDD.

$ sudo su -

# rm -rf /media/user1/usbstick/*
# tar xjf Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 -C /media/user1/usbstick/

# cd /media/user1/usbstick/boot/
root@host:/media/user1/usbstick/boot# ZIMAGE=/home/user1/Synology_Debian/src/SynologyOpenSource/toolkit/build_env/ds.armada375-7.1/source/linux-3.x/arch/arm/boot/zImage
root@host:/media/user1/usbstick/boot# cp -a ${ZIMAGE} zImage.fdt
root@host:/media/user1/usbstick/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n synology-linux-3.2 -d zImage.fdt uImage	
root@host:/media/user1/usbstick/boot# cd && umount /media/user1/usbstick


In seriel console:

Marvell>> setenv usbActive 1
Marvell>> usb start
Marvell>> ext2load usb 0:1 0x02000000 /boot/uImage
5192845 bytes read in 637 ms (7.8 MiB/s)
Marvell>> ext2load usb 0:1 0x08000000 /boot/uInitrd
5257173 bytes read in 225 ms (22.3 MiB/s)
Marvell>> setenv bootargs 'console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8'
Marvell>> bootm 0x02000000 0x08000000




The output from the boot process:

Marvell>> setenv bootargs 'console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8'
Marvell>> bootm 0x02000000 0x08000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   synology-linux-3.2
   Created:      2025-07-24  10:29:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1933672 Bytes = 1.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 08000000 ...
   Image Name:   initramfs-4.12.4-mvebu-tld-1
   Created:      2017-08-22  11:10:43 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7070172 Bytes = 6.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Lin done, booting th[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.2.101 (root@host) (gcc version 8.5.0 (GCC) ) #1 SMP Sun Jun 29 15:13:44 CST 2025
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Marvell Armada-375 Board
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] PERCPU: Embedded 7 pages/cpu @8098d000 s5440 r8192 d15040 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8
[    0.000000] Synology Hardware Version: DS215j-j
[    0.000000] Internal HD num: 2
[    0.000000] Internal netif num: 1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 507140k/507140k available, 17148k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xa0800000 - 0xf4000000   (1336 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x804b8000   (4800 kB)
[    0.000000]       .init : 0x804b8000 - 0x804e7540   ( 190 kB)
[    0.000000]       .data : 0x804e8000 - 0x8051ea40   ( 219 kB)
[    0.000000]        .bss : 0x8051ea64 - 0x8058818c   ( 422 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:528
[    0.000000] Initializing Armada-375 SoC Timers
[    0.000000] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
[    0.000167] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    0.090037] pid_max: default: 32768 minimum: 301
[    0.090175] Security Framework initialized
[    0.090203] AppArmor: AppArmor initialized
[    0.090267] Mount-cache hash table entries: 512
[    0.091044] CPU: Testing write buffer coherency: ok
[    0.091188] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.091213] Calibrating local timer... 399.91MHz.
[    0.151066] CPU1: Booted secondary processor
[    0.190039] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.190095] Brought up 2 CPUs
[    0.190111] SMP: Total of 2 processors activated (3188.32 BogoMIPS).
[    0.190882] devtmpfs: initialized
[    0.200276] NET: Registered protocol family 16
[    0.210114] mvBoardTwsiGet: Twsi Read fail
[    0.210124] mvBoardIoExpValSet: Error: Read from IO Expander failed
[    0.210145] L310 cache controller enabled
[    0.210155] l2x0: 8 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x02440000, Cache size: 262144 B
[    0.211722] 
[    0.211728] CPU Interface
[    0.211733] -------------
[    0.211738] SDRAM_CS0 ....base 000000000, size 512MB 
[    0.211754] SDRAM_CS1 ....disable
[    0.211761] SDRAM_CS2 ....disable
[    0.211768] SDRAM_CS3 ....disable
[    0.211776] DEVICE_CS0 ....base 0f4000000, size   1MB 
[    0.211792] DEVICE_CS1 ....no such
[    0.211811] DEVICE_CS2 ....no such
[    0.211830] DEVICE_CS3 ....no such
[    0.211848] PEX0_MEM ....base 0e0000000, size  16MB 
[    0.211861] PEX0_IO ....base 0f1100000, size   1MB 
[    0.211875] PEX1_MEM ....base 0e2000000, size  16MB 
[    0.211888] PEX1_IO ....base 0f1200000, size   1MB 
[    0.211902] INTER_REGS ....base 0f1000000, size   1MB 
[    0.211915] DMA_UART ....no such
[    0.211933] SPI_CS0 ....base 0f0000000, size  16MB 
[    0.211950] SPI_CS1 ....no such
[    0.211968] SPI_CS2 ....no such
[    0.211986] SPI_CS3 ....no such
[    0.212004] SPI_CS4 ....no such
[    0.212022] SPI_CS5 ....no such
[    0.212040] SPI_CS6 ....no such
[    0.212058] SPI_CS7 ....no such
[    0.212076] BOOT_ROM_CS ....no such
[    0.212094] DEV_BOOTCS ....base 0f2000000, size  32MB 
[    0.212110] USB3 ....no such
[    0.212128] CRYPT0_ENG ....base 0f4400000, size  64KB 
[    0.212145] CRYPT1_ENG ....base 0f4480000, size  64KB 
[    0.212159] PP2 - CPU 0 ....no such
[    0.212177] PP2 - CPU 1 ....no such
[    0.212196] 
[    0.212198]   Marvell Armada-375
[    0.212204]  SYNO-DS215j Board - 
[    0.212212]  Soc: MV88F6720 Rev A0
[    0.212217]  LE
[    0.212221]   LSP version: linux-3.2.58-2014_T2.0p2
[    0.212227]   IOCC: Support IO coherency.
[    0.212232]      -> Sync Barrier WA enabled
[    0.212236] 
[    0.213751] USB3 XHCI Device registered successfully
[    0.213761] Initialising USB2-1 HAL
[    0.214096] Registered Marvell USB2 EHCI host controller 1
[    0.214104] Initialising USB2-0 HAL
[    0.214423] Registered Marvell USB2 EHCI host controller 0
[    0.214430] -----> 0x18400 = 0x1040
[    0.214641] Synology Armada375 2-bay GPIO Init
[    0.221633] bio: create slab <bio-0> at 0
[    0.222505] SCSI subsystem initialized
[    0.223860] Switching to clocksource a375_clocksource
[    0.224308] AppArmor: AppArmor Filesystem Enabled
[    0.226370] NET: Registered protocol family 2
[    0.234117] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.234431] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.234673] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[    0.234917] TCP: Hash tables configured (established 16384 bind 16384)
[    0.234925] TCP reno registered
[    0.234934] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.234958] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.235176] NET: Registered protocol family 1
[    0.235377] Trying to unpack rootfs image as initramfs...
[    0.698681] Freeing initrd memory: 6904K
[    0.698747] PCIe: Checking physical bus #0: 
[    0.698754] no link, disabled
[    0.698760] PCIe: Checking physical bus #1: 
[    0.698765] no link, disabled
[    0.699420] Armada 375 hwmon thermal sensor initialized.
[    0.700726]   o	PPv2.1 Giga driver
[    0.700735]   o 4 Giga ports supported
[    0.700741]   o SKB recycle supported (Enabled)
[    0.700747]   o BM supported for CPU: 8 BM pools
[    0.700752]   o HWF supported
[    0.700758]   o RX Queue support: 8 Queues * 512 Descriptors
[    0.700765]   o TX Queue support: 8 Queues * 1024 Descriptors
[    0.700772]   o Driver debug messages enabled
[    0.700777] 
[    0.705506]   o Loading network interface(s) for port #1: cpu_mask=0x3, mtu=1500
[    0.706209] 	o Port 1 is connected to Linux netdevice
[    0.706227] 	o giga p=1: phy=1,  mtu=1500, mac=<MAC_ADDRESS> speed=AutoNeg (platform)
[    0.709001] 	o eth0, ifindex = 2, GbE port = 1
[    0.709012] 
[    0.709014]     o eth0, phy chipid = 1410dd0, Support WOL = 32
[    0.709027] 
[    0.709210] cesadev_init(804c0f2c)
[    0.710348] audit: initializing netlink socket (disabled)
[    0.710385] type=2000 audit(0.700:1): initialized
[    0.773272] VFS: Disk quotas dquot_6.5.2
[    0.773407] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.773999] msgmni has been set to 1003
[    0.775149] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.775162] io scheduler noop registered
[    0.775216] io scheduler cfq registered (default)
[    0.775292] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[    0.775329] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[    0.809965] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    0.849976] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[    0.869947] mv_xor mv_xor.2: Marvell XOR: ( xor )
[    0.889930] mv_xor mv_xor.3: Marvell XOR: ( fill cpy )
[    0.975758] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.020439] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
[    1.735953] console [ttyS0] enabled
[    1.780194] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
[    1.817586] brd: module loaded
[    1.820677] Loading iSCSI transport class v2.0-870.
[    1.826781] sata_mv sata_mv.0: slots 32 ports 2
[    1.833752] scsi0 : sata_mv
[    1.837065] scsi1 : sata_mv
[    1.840249] ata1: SATA max UDMA/133 irq 58
[    1.844369] ata2: SATA max UDMA/133 irq 58
[   10.377863] ata1: link is slow to respond, please be patient (ready=0)
[   14.876887] ata1: SRST failed (errno=-16)
[   14.880917] ata1: SRST fail, set srst fail flag
[   16.166619] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   16.172922] ata1: link reset sucessfully clear error flags
[   16.196834] ata1.00: ATA-9: WDC WD40PURX-64GVNY0, 80.00A80, max UDMA/133
[   16.203572] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   16.226814] ata1.00: configured for UDMA/133
[   16.246659] scsi 0:0:0:0: Direct-Access     WDC      WD40PURX-64GVNY0         80.0 PQ: 0 ANSI: 5
[   16.256430] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
[   16.264233] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   16.269660] sd 0:0:0:0: [sda] Write Protect is off
[   16.274549] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   16.318680]  sda: unknown partition table
[   16.323369] sd 0:0:0:0: [sda] Attached SCSI disk
[   19.257167] Delay 5 seconds to wait for disk 2 ready.
[   24.594772] ata2: SATA link down (SStatus 0 SControl F300)
[   24.601647] physmap platform flash device: 00800000 at f0000000
[   24.609187] SPI Serial flash detected @ 0xf0000000, 8192KB (128sec x 64KB)
[   24.616127] Searching for RedBoot partition table in SYNOMTD-0 at offset 0x7f0000
[   24.664693] 6 RedBoot partitions found on MTD device SYNOMTD-0
[   24.670559] SYNOMTD flash bank 0: Using RedBoot partition definition
[   24.676946] Creating 6 MTD partitions on "SYNOMTD-0":
[   24.682026] 0x000000000000-0x0000000f0000 : "RedBoot"
[   24.688290] 0x0000000f0000-0x0000003c0000 : "zImage"
[   24.694295] 0x0000003c0000-0x0000007d0000 : "rd.gz"
[   24.700323] 0x0000007d0000-0x0000007e0000 : "vendor"
[   24.705419] vender Mac0 address : 00:11:32:49:8c:f8
[   24.710324] vender Mac1 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.716249] vender Mac2 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.722110] vender Mac3 doesn't set ucSum:0x00 Buf:0x00 Sum:0.
[   24.727980] serial number='<SERIAL_NUMBER>'
[   24.732888] 0x0000007e0000-0x0000007f0000 : "RedBoot Config"
[   24.739923] 0x0000007f0000-0x000000800000 : "FIS directory"
[   24.746702] i2c /dev entries driver
[   24.751240] md: raid1 personality registered for level 1
[   24.756644] cpuidle: using governor ladder
[   24.760972] TCP cubic registered
[   24.764219] NET: Registered protocol family 17
[   24.768714] Registering the dns_resolver key type
[   24.773522] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[   24.781851] registered taskstats version 1
[   24.786720] Freeing init memory: 188K
Loading, please wait...
starting version 232
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
chvt: can't open console
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!


BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) cat /proc/cmdline
console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_version=DS215j ihd_num=2 netif_num=1 flash_size=8
(initramfs) cat /proc/modules

The below error is because I've only installed a single drive (/dev/sda) that is unallocated.

[   16.318680]  sda: unknown partition table


I assumed it was unnecessary to format the HDD, but what file system or partition structure should I create on the HDD?
Re: Debian on Synology DS215j
July 24, 2025 12:33PM
I think we want a single partition, ext3.
Re: Debian on Synology DS215j
July 24, 2025 01:32PM
> I assumed it was unnecessary to format the HDD,
> but what file system or partition structure should
> I create on the HDD?

The instruction is in the rootfs installation

Quote

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. This step should be done at Linux command line using fdisk, mkfs.ext3 (don't use GUI or gparted). Once you have booted the box, then you could try GPT partition and/or Ext4 (Ext4 might work for some MVEBU box).

This is true for all version of the rootfs (since Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 to Debian-6.6.2-mvebu-tld-1-rootfs-bodhi.tar.bz2).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
July 26, 2025 08:08AM
The above problem is because the USB memory stick that boots bodhi's rootfs with the synology kernel is not detected once the kernel starts...

The drivers seem to be loaded according to the logs in the previous post:

...
[    0.213751] USB3 XHCI Device registered successfully
[    0.213761] Initialising USB2-1 HAL
[    0.214096] Registered Marvell USB2 EHCI host controller 1
[    0.214104] Initialising USB2-0 HAL
[    0.214423] Registered Marvell USB2 EHCI host controller 0
[    0.214430] -----> 0x18400 = 0x1040
...


But no USB devices or hub are found and so the USB stick fails to be assigned to /dev/sda1.

Instead the HDD is found and assigned /dev/sda1, which leads to the rest of the errors and the confusion.


Compared to the previous attempts with 6.12 kernel + DTS where the USB devices/hubs is found and mounted, there is a lot more usb activity. Logs from previous post in this thread (https://forum.doozan.com/read.php?2,138851,139229#msg-139229):

...

[    2.880171][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[    2.889234][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.897259][    T1] usb usb1: Product: EHCI Host Controller
[    2.902869][    T1] usb usb1: Manufacturer: Linux 6.12.6-mvebu-tld-1 ehci_hcd
[    2.910063][    T1] usb usb1: SerialNumber: f1054000.usb
[    2.916820][    T1] hub 1-0:1.0: USB hub found
[    2.921384][    T1] hub 1-0:1.0: 1 port detected
[    2.928886][    T1] xhci-hcd f1058000.usb: xHCI Host Controller
[    2.934962][    T1] xhci-hcd f1058000.usb: new USB bus registered, assigned bus number 2
[    2.943262][    T1] xhci-hcd f1058000.usb: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000000010
[    2.953760][    T1] xhci-hcd f1058000.usb: irq 41, io mem 0xf1058000
[    2.960459][    T1] xhci-hcd f1058000.usb: xHCI Host Controller
[    2.966516][    T1] xhci-hcd f1058000.usb: new USB bus registered, assigned bus number 3
[    2.974815][    T1] xhci-hcd f1058000.usb: Host supports USB 3.0 SuperSpeed
[    2.982129][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[    2.991210][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.999269][    T1] usb usb2: Product: xHCI Host Controller
[    3.004926][    T1] usb usb2: Manufacturer: Linux 6.12.6-mvebu-tld-1 xhci-hcd
[    3.012130][    T1] usb usb2: SerialNumber: f1058000.usb
[    3.018831][    T1] hub 2-0:1.0: USB hub found
[    3.023458][    T1] hub 2-0:1.0: 1 port detected
[    3.029203][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.038339][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.12
[    3.047430][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.055596][    T1] usb usb3: Product: xHCI Host Controller
[    3.061211][    T1] usb usb3: Manufacturer: Linux 6.12.6-mvebu-tld-1 xhci-hcd
...
Starting systemd-udevd version 252.19-1~deb12u1
[    4.564091][   T28] scsi 2:0:0:0: Direct-Access     Kingston DT 101 II        1.00 PQ: 0 ANSI: 2
[    4.580837][ T1182] sd 2:0:0:0: [sda] 7847936 512-byte logical blocks: (4.02 GB/3.74 GiB)
[    4.589537][ T1182] sd 2:0:0:0: [sda] Write Protect is off
[    4.595559][ T1182] sd 2:0:0:0: [sda] No Caching mode page found
[    4.601626][ T1182] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.644343][ T1182]  sda: sda1
[    4.648214][ T1182] sd 2:0:0:0: [sda] Attached SCSI removable disk
...

Why is the Synology kernel not finding the USB hub correctly?

Is there a parameter missing or something?


The kernel config looks okay:

/toolkit/build_env/ds.armada375-7.1/source/linux-3.x$ grep "^CONFIG_USB" .config
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_NET_QMI_WWAN_SYNO=m
CONFIG_USB_HID=m
CONFIG_USB_HIDDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=m
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_ARCH_HAS_XHCI=y
CONFIG_USB=m
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_ETRON_HCD=m
CONFIG_USB_ETRON_HCD_DEBUGGING=y
CONFIG_USB_ETRON_HUB=y
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM_SYNO=m
CONFIG_USB_STORAGE=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USBIP_CORE=m
CONFIG_USBIP_HOST=m
CONFIG_USBIP_DEBUG=y
Re: Debian on Synology DS215j
July 28, 2025 07:48AM
> Why is the Synology kernel not finding the USB hub
> correctly?
>
> Is there a parameter missing or something?

Modern Linux kernels (eg. 6.12.x) use device tree to activate USB port. There is no other extra step.

Older Linux kernels (i.e non-FDT), like 3.x.y, hard code the setup for each specific ARM board. For example, DS215j board set up is different from WD MyCloud Gen2 board set up code.

Customized Linux kernel 3.x kernels like this Synology DS215j could have some setup code that activate the USB or HDD port in their own quirky way.

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



Edited 2 time(s). Last edit at 07/28/2025 10:55AM by bodhi.
Re: Debian on Synology DS215j
August 03, 2025 03:14AM
Synology are using rc-scripts to do (some of?) the magic.
Just focusing on the USB problem, in the DSM it uses RC scripts to load the usb related kernel modules.

In the DSM kernel logs it has the following message regarding USB that the Debian kernel does not have.

START /linuxrc.syno
Insert basic USB modules...

According to the "Running Debian on a Synology DS212J" article by tangrs (https://blog.tangrs.id.au/2021/11/19/running-debian-on-a-synology-ds212j/) the linuxrc.syno script can be extracted from the initrd file.
Which in tern is from the Synology PAT firmware archive.

Download DSM.

$ wget https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_DS215j_42962.pat -O DSM_DS215j_7.1.1.42962.pat

$ file DSM_DS215j_7.1.1.42962.pat
DSM_DS215j_7.1.1.42962.pat: Synology archive

I used the patology python script (https://github.com/sud0woodo/patology) to extract the Synology archive.

$ mkdir DSM_DS215j_7.1.1.42962.pat.extract
$ cd DSM_DS215j_7.1.1.42962.pat.extract
$ python3 patology.py --infile ../DSM_DS215j_7.1.1.42962.pat --dump
...
2025-08-01 16:02:22 - INFO - Successfully dumped texts/jpn/strings [15615]
2025-08-01 16:02:22 - INFO - Successfully dumped texts/hun/strings [13767]
2025-08-01 16:02:22 - INFO - Successfully dumped texts/tha/strings [23189]
2025-08-01 16:02:22 - INFO - Succesfully dumped files from archive
2025-08-01 16:02:22 - INFO - msgblock sizes check out, file successfully parsed
2025-08-01 16:02:22 - INFO - Closing archive: DSM_DS215j_7.1.1.42962.pat


The rd.bin is the actual uImage file:

$ file rd.bin 
rd.bin: u-boot legacy uImage, synology_armada375_ds215j 42962, Linux/ARM, RAMDisk Image (gzip), 3640780 bytes, Thu Sep 22 10:04:17 2022, Load Address: 0X8000000, Entry Point: 0X8000000, Header CRC: 0XFEA668E5, Data CRC: 0XBD4111CC

Binwalk tells us more.

$ binwalk rd.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             uImage header, header size: 64 bytes, header CRC: 0xFEA668E5, created: 2022-09-22 10:04:17, image size: 3640780 bytes, Data Address: 0x8000000, Entry Point: 0x8000000, data CRC: 0xBD4111CC, OS: Linux, CPU: ARM, image type: RAMDisk Image, compression type: gzip, image name: "synology_armada375_ds215j 42962"
64            0x40            LZMA compressed data, properties: 0x5D, dictionary size: 67108864 bytes, uncompressed size: -1 bytes
2249352       0x225288        MySQL ISAM index file Version 1

Extract the files using binwalk.

$ binwalk --extract --directory output_directory rd.bin

$ cd output_directory/_rd.bin.extracted

$ ls
40  40.7z

$ file 40
40: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=<UUID>

Mount the file using loop back.

$ mkdir /tmp/zImage
$ sudo mount -t ext2 -o loop 40 /tmp/zImage/

$ sudo ls -l /tmp/zImage/
total 48
lrwxrwxrwx  1 root root     7 Sep 22  2022 bin -> usr/bin
drwxr-xr-x  3 root root  1024 Sep 22  2022 dev
drwxr-xr-x  7 root root  1024 Aug  3 17:17 etc
lrwxrwxrwx  1 root root     3 Sep 22  2022 etc.defaults -> etc
lrwxrwxrwx  1 root root    11 Apr 29  2022 init -> bin/busybox
lrwxrwxrwx  1 root root     7 Sep 22  2022 lib -> usr/lib
lrwxrwxrwx  1 root root    11 Apr 29  2022 linuxrc -> bin/busybox
-rwxr-xr-x  1 root root   391 Jun 22  2022 linuxrc.syno
-rwxr-xr-x  1 root root 23113 Jun 22  2022 linuxrc.syno.impl
drwx------  2 root root 12288 Sep 22  2022 lost+found
drwxr-xr-x  2 root root  1024 Sep 22  2022 mnt
drwxr-xr-x  2 root root  1024 Sep 22  2022 proc
drwx------  2 root root  1024 Sep 22  2022 root
drwxr-xr-x  3 root root  1024 Sep 22  2022 run
lrwxrwxrwx  1 root root     8 Sep 22  2022 sbin -> usr/sbin
dr-xr-xr-x  2 root root  1024 Sep 22  2022 sys
drwxrwxrwt  2 root root  1024 Sep 22  2022 tmp
drwxr-xr-x  8 root root  1024 Sep 22  2022 usr
drwxr-xr-x 10 root root  1024 Sep 22  2022 var
drwxrwxrwx  2 root root  1024 Sep 22  2022 volume1

Digging through the files for the message "Insert basic USB modules...", the linuxrc.syno rc script calls linuxrc.syno.impl to initiates the USB:

linuxrc.syno.impl contains the following relevant parts:

$ sudo cat /tmp/zImage/linuxrc.syno.impl
...
USB_MODULES="phy-stih407-usb phy-st-usb3 phy-rtk-rle0599 phy-rtk-usb2 phy-rtk-usb3 phy-rtk-rle0599_1619 phy-rtk-usb2_1619 phy-rtk-usb3_1619 usb-common usbcore dwc3 rtk-usb-manager dwc3-rtk-type_c_1619 dwc3-rtk_1619 hiusb-otg hiusb-ehci-hi3536 hiusb-xhci-hi3536 ehci-hcd ehci-pci ehci-platform ohci-hcd uhci-hcd xhci-hcd xhci-plat-hcd xhci-pci st-hcd dwc3-st dwc3-rtk ehci-orion"
...
# insert basic USB modules for detect f401/FDT
echo "Insert basic USB modules..."
SYNOLoadModules $USB_MODULES


Where the SYNOLoadModules() command is defined in ./etc/rc.subr:

$ sudo cat /tmp/zImage/etc/rc.subr

# Load kernel modules in sequence, and also pass arguments if specified
# in /etc/modules.conf as the following format:
#     module_iscsi_trgt_args_rs18016xsp="pretty high priority"
#     module_iscsi_trgt_args_2_6_32_x86_64="high priority"
#     module_iscsi_trgt_args_2_6_32="lower priority"
#     module_iscsi_trgt_args_bromolow="this platform priority"
#     module_iscsi_trgt_args="general use"
SYNOLoadModules()
{
	local _mod= _modpath= _args= _env=
	local _kv=$(KernelVersion)
	local _pf=$(PlatformGet)
	local _mach=$(/bin/uname -m)
	local _model=$(ModelGet)
	local _moddir=/lib/modules
	local _suffix=".ko"

	[ -f /etc.defaults/modules.conf ] && source /etc.defaults/modules.conf
	[ -f /etc/modules.local.conf ] && source /etc/modules.local.conf # for customization

	for _mod in "$@"; do
		_modpath=${_moddir}/${_mod}${_suffix}

		#use basename to grep the final module name of "_mod".
		#	ex. if there is "/lib/modules/backports_dvb/xxx.ko", "xxx.ko" will be taken from "backports_dvb/xxx.ko".
		local _basename_mod=`/usr/bin/basename $_mod`
		SYNOCheckModule $_basename_mod && continue

		if [ -f ${_modpath} ]; then
			# try to find if there's any argument for this module
			for _env in \
				"_${_model//\+/p}" \
				"_${_kv//./_}_${_mach}" \
				"_${_kv//./_}" \
				"_${_pf}" \
				""
			do
				eval _args=\$module_${_basename_mod//-/_}_args${_env}
				[ -n "$_args" ] && break;
			done

			RCMsg "Loading module $_mod" \
			/sbin/insmod $_modpath $_args
		fi
	done
}

Not sure how to proceed, Synology have made a highly customise (aka a messy non standard distro).

I hope we can learn enough from their scripts to proceed.

What do you think?
Re: Debian on Synology DS215j
August 04, 2025 01:21PM
> The rd.bin is the actual uImage file:

It's not an uImage file, which contains the kernel. It's a uInitrd file, which contains the initrd.


> $ file rd.bin 
> rd.bin: u-boot legacy uImage,
> synology_armada375_ds215j 42962, Linux/ARM,
> RAMDisk Image (gzip), 3640780 bytes, Thu Sep 22
> 10:04:17 2022, Load Address: 0X8000000, Entry
> Point: 0X8000000, Header CRC: 0XFEA668E5, Data
> CRC: 0XBD4111CC
>

The above is correct, it's a ramdisk image.

> Binwalk tells us more.
>
>
> $ binwalk rd.bin 
> 
> DECIMAL       HEXADECIMAL     DESCRIPTION
> --------------------------------------------------------------------------------
> 0             0x0             uImage header,
> header size: 64 bytes, header CRC: 0xFEA668E5,
> created: 2022-09-22 10:04:17, image size: 3640780
> bytes, Data Address: 0x8000000, Entry Point:
> 0x8000000, data CRC: 0xBD4111CC, OS: Linux, CPU:
> ARM, image type: RAMDisk Image, compression type:
> gzip, image name: "synology_armada375_ds215j
> 42962"
> 64            0x40            LZMA compressed
> data, properties: 0x5D, dictionary size: 67108864
> bytes, uncompressed size: -1 bytes
> 2249352       0x225288        MySQL ISAM index
> file Version 1
>

Binwalk knows it is a u-boot ramdisk image. But the terminology it used was misleading.

> 0             0x0             uImage header,
> header size: 64 bytes, header CRC: 0xFEA668E5,

It should be called u-boot image header, which means the u-boot header for an image (kernel or ramdisk).

>
> $ mkdir /tmp/zImage
> $ sudo mount -t ext2 -o loop 40 /tmp/zImage/
>

zImage is the compress image for a kernel file (not ramdisk). So /tmp/zImage really should be named /tmp/Inird.

> I hope we can learn enough from their scripts to
> proceed.
>
> What do you think?

Sorry, I don't have any idea about stock FW.

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



Edited 1 time(s). Last edit at 08/04/2025 01:24PM by bodhi.
James Heung
Re: Debian on Synology DS215j
October 08, 2025 03:56AM
Hi Bodhi,
Could you please help me figure out how to connect to the TTL on my DS215J? Currently, my device has a few issues: the power LED is blinking blue, and the HDD LED is also blinking yellow. I’m really worried about what might be wrong with it and would greatly appreciate your guidance on both identifying the problem and how to fix it.
If you have any ideas or suggestions, could you please send them to me via email ( Jamesheung88@gmail.com )? It would mean a lot to me—thank you so much for your help and time!

- James
Re: Debian on Synology DS215j
October 08, 2025 02:21PM
James,

I'd prefer if you have any question, post here so others can benefit from it.

We have Wiki thread.

Starting on how to buy parts for serial console, and then see pinouts for Synology NAS.

Quote

Unbricking with Serial Console & JTAG console
...
Serial Port connector - what are people using to make it work
....
Synology NAS Serial Console
...

And also see here:
https://forum.doozan.com/read.php?3,140212,140213#msg-140213

Most Synology NASs have the same serial pinouts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
October 08, 2025 02:29PM
@ZooMoo,

If you are still looking into the stock kernel, I'd suggest this is something worth investigating.

[    0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x8000000 root=/dev/md0 rw syno_hw_version=DS215jv10 hd_power_on_seq=2 ihd_num=2 netif_num=1 flash_size=8


Look for hd_power_on_seq argument and how it is handled. You might find a GPIO used to enable HDD power. It might have an effect on Ethernet, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
October 19, 2025 06:10AM
bodhi Wrote:
-------------------------------------------------------
> @ZooMoo,
>
>
> [    0.000000] Kernel command line:
> console=ttyS0,115200 ip=off initrd=0x8000000
> root=/dev/md0 rw syno_hw_version=DS215jv10
> hd_power_on_seq=2 ihd_num=2 netif_num=1
> flash_size=8
>
>
> Look for hd_power_on_seq argument and how
> it is handled. You might find a GPIO used to
> enable HDD power. It might have an effect on
> Ethernet, too.

Thanks bodhi, funny you suggested this.

Earlier, I reached out to the marvell ethernet develops for help. They suggested to look at the pincrtl settings of u-boot even though the MDIO looks okay.

Unfortunately, as found earlier, we cannot check what the mdio settings should be in u-boot.

Marvell>> mdio list
Unknown command 'mdio' - try 'help'
Marvell>> mii info
Unknown command 'mii' - try 'help'


It got me thinking about pinctrl and whether other functions (i2c, Sata, etc) were missing from the DTS. Which relates to your point of the SATA option (hd_power_on_seq=2) used by synology's kernel and what's equivalent in the DTS.

With the current DTS the SATA drive powers up, but is not found with the 6.6 kernel.


[    2.797874][    T1] sata_mv f10a0000.sata: slots 32 ports 2
[    2.807171][    T1] scsi host0: sata_mv
[    2.812909][    T1] scsi host1: sata_mv
[    2.817263][    T1] ata1: SATA max UDMA/133 irq 43
[    2.822098][    T1] ata2: SATA max UDMA/133 irq 43
...
[    3.158671][  T699] ata1: SATA link down (SStatus 0 SControl F300)


I looked at the Synology kernel source for how it handles the kernel parameters, but I didn't get much insight as it's nested through a series of functions. I couldn't understand how it worked vs what a stock kernel does with DTS.

Instead, I modified the stock 6.6 DTS by adding the pinctrl's that I think are used to detect the presence of a SATA drive.

I got the pin definitions from the dts file ( arch/arm/boot/dts/armada-375-db.dts ) in the synology kernel 3.10 source tree (https://global.synologydownload.com/download/ToolChain/Synology%20NAS%20GPL%20Source/7.1.1-42962/armada38x/linux-3.10.x-bsp.txz), even though it's not used for the 375 ... odd.

However, it has not helped as the sata drive is still not detected (I'm not surprised, but I'm guessing here). Here is what I added:

&pinctrl {
	...
	
	sata_sd_pins: sata-sd-pins {
		marvell,pins = "mpp63", "mpp66";
		marvell,function = "gpio";
	};

}

...

&sata {
	pinctrl-names = "default";
	pinctrl-0 = <&sata_sd_pins>;
	nr-ports = <2>;
	status = "okay";
};


It seems the problem for both the sata detection and ethernet are related to the pinctrl. And maybe power regulation settings for SATA?
Re: Debian on Synology DS215j
October 19, 2025 03:34PM
ZooMoo,


> I looked at the Synology kernel source for how it
> handles the kernel parameters, but I didn't get
> much insight as it's nested through a series of
> functions. I couldn't understand how it worked vs
> what a stock kernel does with DTS.

Stock kernel does not use DTS (it was too old). Usually you will find a xxx_setup.c in the old mainline kernel. But this stock kernel uses Marvell patch (out of tree), and it was actually as old as kernel 2.6.3.x.

>
> Instead, I modified the stock 6.6 DTS by adding
> the pinctrl's that I think are used to detect the
> presence of a SATA drive.

> I got the pin definitions from the dts file (
> arch/arm/boot/dts/armada-375-db.dts

I suspect this is something Marvell worked on, but never complete. During kernel 3.x, the FDT transition was in effect, a lot of vendors started converting their xxx_setup.c to DTS.

> It seems the problem for both the sata detection
> and ethernet are related to the pinctrl. And maybe
> power regulation settings for SATA?

Yes, I think they are related. In the GPL source, the data structure name seems to indicate "eth" and "sata" are related in some way, but I could not figure out what yet.

And lacking of pintctrl is likely one of the problems (like the developers suggested). Unfortunately, there is no Armada 375 board in mainline, except for the armada-375-db.dts (reference board).

I'll revisit the GPL when I have some time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Synology DS215j
November 01, 2025 07:00PM
Thanks Bodhi for the explanation.
Re: Debian on Synology DS215j
November 10, 2025 03:50PM
ZooMoo,

Here is the latest DTB and DTS.

I digged a bit deeper in various places to create the pins for ethernet. This has pinctrl definition for ge0 and ge1. We are using ge1 pins in this version.

Without the Datasheet, there is still some unknowns. Not sure if this will make a difference.

====

Also, I don't recall you have tried to set the NIC to use flow control? the mvpp2 driver seems to have some restriction about setting the pause paramaters.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-375-synology-ds215j.dtb (12.7 KB)
open | download - armada-375-synology-ds215j.dts (2.9 KB)
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: