Hi,
I'm want to install Debian on the Synology DS215j. I'm not an expert and have tried to follow the other threads on installing Debian on the DS214 and DS216j but without success.
Refs:
Debian on Synology DS214
Posted by lonestar
https://forum.doozan.com/read.php?2,133377
Debian on Synology DS216
Posted by Robin
https://forum.doozan.com/read.php?2,137280
So far I've followed the generic guide for the initial installation of the rootfs:
Linux Kernel 6.12.6 MVEBU package and Debian armhf rootfs
https://forum.doozan.com/read.php?2,32146
========================================================================
Updated 16 Dec 2023:
I used the generic armada-375-db device tree source file:
I connected a UART/USB for serial access to the DS215j. The case needs to be opened with the UART pins just next the Fan header (refs: https://www.netbsd.org/ports/sandpoint/instSynology.html).
To boot from USB I followed the instructions from the DS214 thread, but the kernel panic's when loading the I2C module, see below:
Debian on Synology DS214
https://forum.doozan.com/read.php?2,133377,page=2
I plugged the USB memory stick into the USB-3 port of DS-215j (I tried the USB-2 port but it did not work).
Using stock u-boot and the serial console to boot into the usb stick:
I understand that the device tree source (dts) needs to be updated to get the specific hardware to work (https://developer.toradex.com/software/linux-resources/device-tree/device-tree-overview/). Where the .dts file customises (enables/disables/properties) different hardware functions (SoC, board) that are defined in the SoC level .dtsi file.
Checking the DS215j PCB, it has the following components:
SOC: Armada 375 (88F6720)
Network: Marvell 88E1514
Microcontroller: Microchip PIC16F1829
Nor Flash: Macronix MX25L6406E
I've done the following to setup the custom kernal, short of compiling with a working DTS.
Download bodhi's linux 6.12.6 tar file and extract files:
The two important files are:
config-6.12.6-mvebu-tld-1
linux-6.12.6-mvebu-tld-1.patch
Download linux kernel source repo.
Checkout the 6.12.6 version to match the patch file.
Find the correct tag:
Copy bodhi's config file to the source directory:
Apply the patch.
There are not many DTS file for the armada-375 (doesn't seem very popular :( ).
The DS215j was last mentioned by Robin early last year:
https://forum.doozan.com/read.php?2,137280,137285#msg-137285
"I will also try to add/improve/confirm support for a few other devices as I got my hands on a DS215j that looks similar to a DS214. I already got the stock bootlog on this one and I'll try a few things later. I also got a DS214 but sadly the UART remains silent, i don't know if it is known to be capricious but i got no luck so far."
bodhi suggested the following:
https://forum.doozan.com/read.php?2,137280,137291#msg-137291
"DS214 is a different SoC (Armada XP). It's a bit older than this Armada 385. But the DS414 DTS should be a good one to use as reference."
So I've compared the DTS files of the previous (armada-370 / armada-xp) and later (armada-385) models, but I'm a bit lost as I'm not an expert.
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-xp-synology-ds414.dts
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-370-synology-ds213j.dts
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-385-synology-ds218j.dts
At this point I'm out of my depth as each is different enough that I'm not sure how to apply it for use with the armada-375-db.dtsi
Does anyone have a DTS for the the Synology DS215j or suggested approach?
Appreciate any help.
I'm want to install Debian on the Synology DS215j. I'm not an expert and have tried to follow the other threads on installing Debian on the DS214 and DS216j but without success.
Refs:
Debian on Synology DS214
Posted by lonestar
https://forum.doozan.com/read.php?2,133377
Debian on Synology DS216
Posted by Robin
https://forum.doozan.com/read.php?2,137280
So far I've followed the generic guide for the initial installation of the rootfs:
Linux Kernel 6.12.6 MVEBU package and Debian armhf rootfs
https://forum.doozan.com/read.php?2,32146
========================================================================
Updated 16 Dec 2023:
I used the generic armada-375-db device tree source file:
# cd media/user1/usbstick # cp -a uImage uImage.orig # cp -a zImage-6.6.2-mvebu-tld-1 zImage.fdt # cat dts/armada-375-db.dtb >> zImage.fdt # mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-6.6.2-mvebu-tld-1 -d zImage.fdt uImage tld-1 -d zImage.fdt uImage Image Name: Linux-6.6.2-mvebu-tld-1 Created: Fri Jan 10 22:14:11 2025 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5192781 Bytes = 5071.08 KiB = 4.95 MiB Load Address: 00008000 Entry Point: 00008000 # umount /media/user1/usbstick
I connected a UART/USB for serial access to the DS215j. The case needs to be opened with the UART pins just next the Fan header (refs: https://www.netbsd.org/ports/sandpoint/instSynology.html).
To boot from USB I followed the instructions from the DS214 thread, but the kernel panic's when loading the I2C module, see below:
Debian on Synology DS214
https://forum.doozan.com/read.php?2,133377,page=2
I plugged the USB memory stick into the USB-3 port of DS-215j (I tried the USB-2 port but it did not work).
Using stock u-boot and the serial console to boot into the usb stick:
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 ## Booting kernel from Legacy Image at 02000000 ... Image Name: Linux-6.6.2-mvebu-tld-1 Created: 2025-01-10 11:14:11 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5192781 Bytes = 5 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 ... [ 0.000000][ T0] Booting Linux on physical CPU 0x0 [ 0.000000][ T0] Linux version 6.6.2-mvebu-tld-1 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, 3 [ 0.000000][ T0] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d [ 0.000000][ T0] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000][ T0] OF: fdt: Machine model: Marvell Armada 375 Development Board [ 0.000000][ T0] Memory policy: Data cache writealloc [ 0.000000][ T0] Zone ranges: [ 0.000000][ T0] Normal [mem 0x0000000000000000-0x000000001fffffff] [ 0.000000][ T0] HighMem empty [ 0.000000][ T0] Movable zone start for each node [ 0.000000][ T0] Early memory node ranges [ 0.000000][ T0] node 0: [mem 0x0000000000000000-0x000000001fffffff] [ 0.000000][ T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff] [ 0.000000][ T0] percpu: Embedded 29 pages/cpu s25364 r8192 d85228 u118784 [ 0.000000][ T0] Kernel command line: console=ttyS0,115200 ip=off root=/dev/sda1 rw syno_hw_versio8 [ 0.000000][ T0] Unknown kernel command line parameters "syno_hw_version=DS215j ihd_num=2 netif_nu. [ 0.000000][ T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000][ T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000][ T0] Built 1 zonelists, mobility grouping on. Total pages: 129920 [ 0.000000][ T0] mem auto-init: stack:off, heap alloc:on, heap free:off [ 0.000000][ T0] Memory: 495072K/524288K available (10240K kernel code, 873K rwdata, 3492K rodata,) [ 0.000000][ T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 ... [ 3.511655][ T1] usb usb3: SerialNumber: f1058000.usb [ 3.524512][ T1] hub 3-0:1.0: USB hub found [ 3.529096][ T1] hub 3-0:1.0: 1 port detected [ 3.535960][ T1] usbcore: registered new interface driver usblp [ 3.542515][ T1] usbcore: registered new interface driver usb-storage [ 3.550464][ T1] mousedev: PS/2 mouse device common for all mice [ 3.560118][ T1] rtc-mv f1010300.rtc: registered as rtc0 [ 3.565789][ T1] rtc-mv f1010300.rtc: setting system clock to 2025-01-10T22:21:47 UTC (1736547707) [ 3.575559][ T1] i2c_dev: i2c /dev entries driver [ 3.583007][ C0] 8<--- cut here --- [ 3.586796][ C0] Unable to handle kernel NULL pointer dereference at virtual address 00000002 whend [ 3.596503][ C0] [00000002] *pgd=00000000 [ 3.600806][ C0] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 3.606849][ C0] Modules linked in: [ 3.610625][ C0] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.2-mvebu-tld-1 #1 [ 3.618239][ C0] Hardware name: Marvell Armada 375 (Device Tree) [ 3.624538][ C0] PC is at mv64xxx_i2c_intr+0x1bc/0x5cc [ 3.629987][ C0] LR is at arch_spin_lock+0xc/0x48 [ 3.634990][ C0] pc : [<c07949fc>] lr : [<c0163d54>] psr: 80000193 [ 3.641988][ C0] sp : e0801f50 ip : c3221e00 fp : e082dd20 [ 3.647940][ C0] r10: c3221e6c r9 : 00000007 r8 : 000346dc [ 3.653892][ C0] r7 : c0df00c4 r6 : c1a3a4a0 r5 : 00000000 r4 : c1a3a440 [ 3.661152][ C0] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 [ 3.668412][ C0] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none [ 3.676373][ C0] Control: 10c5387d Table: 0000404a DAC: 00000051 [ 3.682846][ C0] Register r0 information: NULL pointer [ 3.688280][ C0] Register r1 information: NULL pointer [ 3.693710][ C0] Register r2 information: NULL pointer [ 3.699140][ C0] Register r3 information: NULL pointer [ 3.704569][ C0] Register r4 information: slab kmalloc-rnd-14-1k start c1a3a400 pointer offset 64 4 [ 3.714645][ C0] Register r5 information: NULL pointer [ 3.720074][ C0] Register r6 information: slab kmalloc-rnd-14-1k start c1a3a400 pointer offset 1604 [ 3.730232][ C0] Register r7 information: non-slab/vmalloc memory [ 3.736622][ C0] Register r8 information: non-paged memory [ 3.742399][ C0] Register r9 information: non-paged memory [ 3.748177][ C0] Register r10 information: slab kmalloc-256 start c3221e00 pointer offset 108 size6 [ 3.757810][ C0] Register r11 information: 2-page vmalloc region starting at 0xe082c000 allocated c [ 3.769366][ C0] Register r12 information: slab kmalloc-256 start c3221e00 pointer offset 0 size 26 [ 3.778826][ C0] Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) [ 3.785563][ C0] Stack: (0xe0801f50 to 0xe0802000) [ 3.790647][ C0] 1f40: 00000032 c1a3a440 00010001 c2db76c0 [ 3.799571][ C0] 1f60: c3221e00 c3221e6c 00000000 00000032 c18b7500 c0173268 c3221e00 1ebd8000 [ 3.808493][ C0] 1f80: c3221e00 c0b82d98 c3221e6c c3221e6c 60000013 c0173324 c3221e00 c0b82d98 [ 3.817415][ C0] 1fa0: c3221e6c c0173388 c3221e00 c0b82d98 c3221e18 c0177954 c0f5dcb8 c100a68c [ 3.826337][ C0] 1fc0: e0809100 e0801fd8 60000013 c0172b60 c0f5dcb8 c0577f5c e082dd28 00000000 [ 3.835259][ C0] 1fe0: ffffffff e082dd5c 60000013 c0a87354 c0a8d824 60000013 ffffffff c0a575ec [ 3.844179][ C0] mv64xxx_i2c_intr from __handle_irq_event_percpu+0x38/0xe8 [ 3.851472][ C0] __handle_irq_event_percpu from handle_irq_event_percpu+0xc/0x38 [ 3.859280][ C0] handle_irq_event_percpu from handle_irq_event+0x38/0x5c [ 3.866389][ C0] handle_irq_event from handle_fasteoi_irq+0xc0/0x150 [ 3.873147][ C0] handle_fasteoi_irq from handle_irq_desc+0x1c/0x2c [ 3.879727][ C0] handle_irq_desc from gic_handle_irq+0x58/0x64 [ 3.885964][ C0] gic_handle_irq from generic_handle_arch_irq+0x28/0x3c [ 3.892892][ C0] generic_handle_arch_irq from call_with_stack+0x18/0x20 [ 3.899906][ C0] call_with_stack from __irq_svc+0x98/0xc8 [ 3.905695][ C0] Exception stack(0xe082dd28 to 0xe082dd70) [ 3.911477][ C0] dd20: c3221e6c 60000013 00000004 00000005 c3221e00 c2db76c0 [ 3.920398][ C0] dd40: 00000000 00000032 60000013 c3221ed4 c3221e6c 00000f07 c3221e00 e082dd78 [ 3.929317][ C0] dd60: c0a8d820 c0a8d824 60000013 ffffffff [ 3.935095][ C0] __irq_svc from _raw_spin_unlock_irqrestore+0x1c/0x48 [ 3.941938][ C0] _raw_spin_unlock_irqrestore from __setup_irq+0x568/0x6c8 [ 3.949130][ C0] __setup_irq from request_threaded_irq+0x110/0x13c [ 3.955702][ C0] request_threaded_irq from mv64xxx_i2c_probe+0x240/0x530 [ 3.962807][ C0] mv64xxx_i2c_probe from platform_probe+0x58/0xac [ 3.969218][ C0] platform_probe from really_probe+0x188/0x394 [ 3.975360][ C0] really_probe from __driver_probe_device+0x1a0/0x1cc [ 3.982109][ C0] __driver_probe_device from driver_probe_device+0x38/0xb4 [ 3.989295][ C0] driver_probe_device from __driver_attach+0x130/0x15c [ 3.996130][ C0] __driver_attach from bus_for_each_dev+0x78/0xb8 [ 4.002529][ C0] bus_for_each_dev from bus_add_driver+0xe4/0x208 [ 4.008926][ C0] bus_add_driver from driver_register+0xb8/0x100 [ 4.015238][ C0] driver_register from do_one_initcall+0x58/0x240 [ 4.021640][ C0] do_one_initcall from kernel_init_freeable+0x208/0x24c [ 4.028566][ C0] kernel_init_freeable from kernel_init+0x14/0x130 [ 4.035053][ C0] kernel_init from ret_from_fork+0x14/0x28 [ 4.040839][ C0] Exception stack(0xe082dfb0 to 0xe082dff8) [ 4.046620][ C0] dfa0: 00000000 00000000 00000000 00000000 [ 4.055539][ C0] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.064458][ C0] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 4.071811][ C0] Code: e2431008 e3d11008 0a00003b e5941064 (e1d100b2) [ 4.078636][ C0] ---[ end trace 0000000000000000 ]--- [ 4.083977][ C0] Kernel panic - not syncing: Fatal exception in interrupt [ 4.091065][ C1] CPU1: stopping [ 4.091077][ C1] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 6.6.2-mvebu-tld-1 #1 [ 4.091090][ C1] Hardware name: Marvell Armada 375 (Device Tree) [ 4.091098][ C1] unwind_backtrace from show_stack+0x10/0x14 [ 4.091125][ C1] show_stack from dump_stack_lvl+0x40/0x4c [ 4.091141][ C1] dump_stack_lvl from do_handle_IPI+0x84/0x11c [ 4.091159][ C1] do_handle_IPI from ipi_handler+0x14/0x20 [ 4.091176][ C1] ipi_handler from handle_percpu_devid_irq+0x4c/0xe8 [ 4.091197][ C1] handle_percpu_devid_irq from handle_irq_desc+0x1c/0x2c [ 4.091222][ C1] handle_irq_desc from gic_handle_irq+0x58/0x64 [ 4.091248][ C1] gic_handle_irq from generic_handle_arch_irq+0x28/0x3c [ 4.091268][ C1] generic_handle_arch_irq from call_with_stack+0x18/0x20 [ 4.091286][ C1] call_with_stack from __irq_svc+0x98/0xc8 [ 4.091301][ C1] Exception stack(0xe087df58 to 0xe087dfa0) [ 4.091311][ C1] df40: 00000001 c0de2baf [ 4.091322][ C1] df60: 00001ce4 00000001 00000000 00000000 00000001 c18bba80 c100a010 c100a070 [ 4.091333][ C1] df80: 00000000 00000000 c1003d40 e087dfa8 c0a87e38 c0a87e3c 20000113 ffffffff [ 4.091340][ C1] __irq_svc from default_idle_call+0x28/0x2c [ 4.091357][ C1] default_idle_call from do_idle+0x108/0x280 [ 4.091375][ C1] do_idle from cpu_startup_entry+0x28/0x2c [ 4.091390][ C1] cpu_startup_entry from secondary_start_kernel+0xfc/0x11c [ 4.091408][ C1] secondary_start_kernel from 0x101460 [ 4.236054][ C0] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
I understand that the device tree source (dts) needs to be updated to get the specific hardware to work (https://developer.toradex.com/software/linux-resources/device-tree/device-tree-overview/). Where the .dts file customises (enables/disables/properties) different hardware functions (SoC, board) that are defined in the SoC level .dtsi file.
Checking the DS215j PCB, it has the following components:
SOC: Armada 375 (88F6720)
Network: Marvell 88E1514
Microcontroller: Microchip PIC16F1829
Nor Flash: Macronix MX25L6406E
I've done the following to setup the custom kernal, short of compiling with a working DTS.
Download bodhi's linux 6.12.6 tar file and extract files:
$ tar xvf linux-6.12.6-mvebu-tld-1-bodhi.tar.bz2
The two important files are:
config-6.12.6-mvebu-tld-1
linux-6.12.6-mvebu-tld-1.patch
Download linux kernel source repo.
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Checkout the 6.12.6 version to match the patch file.
Find the correct tag:
$ git tag -l | grep 6.12.6 v2.6.12.6 v6.12.6 $ git checkout -b ds215j_6.12.6 v6.12.6
Copy bodhi's config file to the source directory:
$ cp ../config-6.12.6-mvebu-tld-1 .config
Apply the patch.
patch -p1 < ../linux-6.12.6-mvebu-tld-1.patch
There are not many DTS file for the armada-375 (doesn't seem very popular :( ).
The DS215j was last mentioned by Robin early last year:
https://forum.doozan.com/read.php?2,137280,137285#msg-137285
"I will also try to add/improve/confirm support for a few other devices as I got my hands on a DS215j that looks similar to a DS214. I already got the stock bootlog on this one and I'll try a few things later. I also got a DS214 but sadly the UART remains silent, i don't know if it is known to be capricious but i got no luck so far."
bodhi suggested the following:
https://forum.doozan.com/read.php?2,137280,137291#msg-137291
"DS214 is a different SoC (Armada XP). It's a bit older than this Armada 385. But the DS414 DTS should be a good one to use as reference."
So I've compared the DTS files of the previous (armada-370 / armada-xp) and later (armada-385) models, but I'm a bit lost as I'm not an expert.
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-xp-synology-ds414.dts
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-370-synology-ds213j.dts
./arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dtsarmada-385-synology-ds218j.dts
At this point I'm out of my depth as each is different enough that I'm not sure how to apply it for use with the armada-375-db.dtsi
Does anyone have a DTS for the the Synology DS215j or suggested approach?
Appreciate any help.