Welcome! Log In Create A New Profile

Advanced

Debian on Synology RS816 (Armada 385)

Posted by zifxify 
Re: Debian on Synology RS816 (Armada 385)
January 17, 2019 11:10AM
zifxify,

> Unknown command 'ext2load' - try 'help'

This is the real reason why it did not work. ext2load command is not available in this stock u-boot. Let me take a closer look at the options to see if we need to do tftpboot for now.

Your kwboot did not work, I assume? I was hoping to boot it properly with UART. But if that's too much trouble, then we should come back to kwboot later.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 17, 2019 11:19AM
sudo parted --script /dev/sdX \ mklabel msdos \ mkpart primary ext3 1MiB 100%
sudo mkfs.ext3 -L rootfs /dev/sdX1

ROOTFSDIR=$(mktemp -d)
sudo mount /dev/sdX1 $ROOTFSDIR

OK at this point so far. But, a reminder that you should use the whole USB drive for the single partition.


The below is wrong. You must be root user, sudo will not work.

sudo tar -C $ROOTFSDIR -jxvf Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
cp -a zImage-4.12.4-mvebu-tld-1 zImage


So become root first, and then tar and cp.

su -
tar -C $ROOTFSDIR -jxvf Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
cd $ROOTFSDIR/boot
cp -a zImage-4.12.4-mvebu-tld-1 zImage

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 17, 2019 11:34AM
Revise bootenvs to use tftpboot.


With the USB rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 plugged in. And the kernel files zImage and uInitird were copied to tftp root.

Power up. Interrupt serial console, and,

setenv usb_setup 'setenv usbActive 1; setenv usbType 3; usb start;'                
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x3000000
setenv load_image_addr 0x02000000
setenv load_image 'echo loading zImage from tftpserver ...; tftpboot $load_image_addr zImage'
setenv load_initrd 'echo loading uInitrd from tftpserver ...; tftpboot $load_initrd_addr uInitrd'
setenv load_dtb 'echo loading DTB from flash ...; sf probe 0 50000000; sf read $load_dtb_addr $spi_pt_addr_dt $spi_pt_size_dt'
setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
setenv bootcmd_exec 'echo Booting Debian . . .; run usb_setup;  run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; run load_dtb; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
setenv bootcmd 'mw 0xf10a2620 0x251;mw 0xf10a2e20 0x251;usb xhciinit; run bootcmd_exec; run bootspi'

And then

boot

Please post the entire serial console log.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 17, 2019 12:02PM
Marvell>> boot
(Re)start USB controller...
USB0:   Port (usbActive) : 0	Interface (usbType = 3) : USB XHCI 1.00
USB1:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
Booting Debian . . .
(Re)start USB...
USB0:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading zImage from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'zImage'.
Load address: 0x2000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##############
	 4.4 MiB/s
done
Bytes transferred = 4021296 (3d5c30 hex)
loading uInitrd from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'uInitrd'.
Load address: 0x3000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###########################
	 4.5 MiB/s
done
Bytes transferred = 7070236 (6be21c hex)
loading DTB from flash ...
SF: Detected N25Q64 with page size 64 KiB, total 8 MiB
## Loading init Ramdisk from Legacy Image at 03000000 ...
   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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff9000, end 00fffa9b ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017

[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] OF: fdt: Machine model: Synology RS816

[    0.000000] bootconsole [earlycon0] enabled

[    0.000000] Memory policy: Data cache writealloc

[    0.000000] percpu: Embedded 17 pages/cpu @ef7c9000 s40460 r8192 d20980 u69632

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608

[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:4m(boot),-(spi-rootfs) earlyprintk=serial

[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

[    0.000000] Memory: 1019072K/1048576K available (8192K kernel code, 712K rwdata, 2080K rodata, 1024K init, 331K bss, 29504K reserved, 0K cma-reserved, 262144K highmem)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)

[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)

[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)

[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)

[    0.000000]       .data : 0xc0d00000 - 0xc0db2308   ( 713 kB)

[    0.000000]        .bss : 0xc0db9a84 - 0xc0e0ca58   ( 332 kB)

[    0.000000] Preemptible hierarchical RCU implementation.

[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2

[    0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] L2C-310 enabling early BRESP for Cortex-A9

[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled

[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB

[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x46070001

[    0.000000] Selected CPU frequency (16) unsupported

[    0.000000] Division by zero in kernel.

[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.12.4-mvebu-tld-1 #1

[    0.000000] Hardware name: Marvell Armada 380/385 (Device Tree)

[    0.000000] [<c0116150>] (unwind_backtrace) from [<c0110bcc>] (show_stack+0x10/0x14)

[    0.000000] [<c0110bcc>] (show_stack) from [<c04df674>] (dump_stack+0x70/0x8c)

[    0.000000] [<c04df674>] (dump_stack) from [<c04de174>] (Ldiv0+0x8/0x10)

[    0.000000] [<c04de174>] (Ldiv0) from [<c0548ac4>] (clk_cpu_recalc_rate+0x2c/0x30)

[    0.000000] [<c0548ac4>] (clk_cpu_recalc_rate) from [<c0545720>] (clk_register+0x38c/0x590)

[    0.000000] [<c0545720>] (clk_register) from [<c0c32b54>] (of_cpu_clk_setup+0x1bc/0x27c)

[    0.000000] [<c0c32b54>] (of_cpu_clk_setup) from [<c0c323c4>] (of_clk_init+0x174/0x214)

[    0.000000] [<c0c323c4>] (of_clk_init) from [<c0c03930>] (time_init+0x20/0x2c)

[    0.000000] [<c0c03930>] (time_init) from [<c0c00af8>] (start_kernel+0x210/0x394)

[    0.000000] [<c0c00af8>] (start_kernel) from [<0000807c>] (0x807c)

[    0.000000] Division by zero in kernel.

[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.12.4-mvebu-tld-1 #1

[    0.000000] Hardware name: Marvell Armada 380/385 (Device Tree)

[    0.000000] [<c0116150>] (unwind_backtrace) from [<c0110bcc>] (show_stack+0x10/0x14)

[    0.000000] [<c0110bcc>] (show_stack) from [<c04df674>] (dump_stack+0x70/0x8c)

[    0.000000] [<c04df674>] (dump_stack) from [<c04de174>] (Ldiv0+0x8/0x10)

[    0.000000] [<c04de174>] (Ldiv0) from [<c0548ac4>] (clk_cpu_recalc_rate+0x2c/0x30)

[    0.000000] [<c0548ac4>] (clk_cpu_recalc_rate) from [<c0545720>] (clk_register+0x38c/0x590)

[    0.000000] [<c0545720>] (clk_register) from [<c0c32b54>] (of_cpu_clk_setup+0x1bc/0x27c)

[    0.000000] [<c0c32b54>] (of_cpu_clk_setup) from [<c0c323c4>] (of_clk_init+0x174/0x214)

[    0.000000] [<c0c323c4>] (of_clk_init) from [<c0c03930>] (time_init+0x20/0x2c)

[    0.000000] [<c0c03930>] (time_init) from [<c0c00af8>] (start_kernel+0x210/0x394)

[    0.000000] [<c0c00af8>] (start_kernel) from [<0000807c>] (0x807c)

[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns

[    0.000000] Console: colour dummy device 80x30
Re: Debian on Synology RS816 (Armada 385)
January 17, 2019 10:16PM
zifxify,

That was a good progress to be able to boot the kernel images to that point. But it looks to me the stock DTS is probably too old.

At this point, I would say we need the DTS source. It should be downloaded from Synology, or we have to make our own from the Thecus N2350 DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 18, 2019 06:06AM
I tried to extract and convert the dtb to dts.

./extract-dtb.py zImage 
Dumped 00_kernel, start=0 end=2380
Dumped 01_dtbdump__p@-.dtb, start=2380 end=2558520
Extracted 1 appended dtbs + kernel to dtb

dtc -I dtb -O dts -o armada-385-synology-rs816.dts 01_dtbdump__p@-.dtb
FATAL ERROR: Error reading DT blob: Bad address



Edited 1 time(s). Last edit at 01/18/2019 06:56AM by zifxify.
Re: Debian on Synology RS816 (Armada 385)
January 18, 2019 06:22AM
more luck

dtc -I dtb -O dts -o armada-385-synology-rs816.dts dtbdump_3.dtb 
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/bootrom has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/cesa-sram has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/devbus-bootcs has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/devbus-cs0 has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/devbus-cs1 has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/devbus-cs2 has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/devbus-cs3 has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/internal-regs has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/internal-regs/mdio has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/internal-regs/cache-controller has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/internal-regs/pinctrl has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/pcie-controller has a reg or ranges property, but no unit name



Edited 2 time(s). Last edit at 01/18/2019 12:34PM by zifxify.
Attachments:
open | download - armada-385-synology-rs816.dts (18 KB)
open | download - dtbdump_3.dtb (64 KB)
Re: Debian on Synology RS816 (Armada 385)
January 18, 2019 12:31PM
bootlog when using the synology ds116 dtb.

Marvell>> boot
(Re)start USB controller...
USB0:   Port (usbActive) : 0	Interface (usbType = 3) : USB XHCI 1.00
USB1:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
Booting Debian . . .
(Re)start USB...
USB0:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading zImage from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'zImage'.
Load address: 0x2000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##############
	 5 MiB/s
done
Bytes transferred = 4021296 (3d5c30 hex)
loading uInitrd from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'uInitrd'.
Load address: 0x3000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###########################
	 5 MiB/s
done
Bytes transferred = 7070236 (6be21c hex)
loading DTB from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'ds116.dtb'.
Load address: 0x1000000
Loading: *##
	 1.4 MiB/s
done
Bytes transferred = 17345 (43c1 hex)
## Loading init Ramdisk from Legacy Image at 03000000 ...
   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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff3c0 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017

[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] OF: fdt: Machine model: Synology DS116

[    0.000000] bootconsole [earlycon0] enabled

[    0.000000] Memory policy: Data cache writealloc

[    0.000000] percpu: Embedded 17 pages/cpu @ef7c7000 s40460 r8192 d20980 u69632

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608

[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:4m(boot),-(spi-rootfs) earlyprintk=serial

[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

[    0.000000] Memory: 1019060K/1048576K available (8192K kernel code, 712K rwdata, 2080K rodata, 1024K init, 331K bss, 29516K reserved, 0K cma-reserved, 262144K highmem)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)

[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)

[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)

[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)

[    0.000000]       .data : 0xc0d00000 - 0xc0db2308   ( 713 kB)

[    0.000000]        .bss : 0xc0db9a84 - 0xc0e0ca58   ( 332 kB)

[    0.000000] Preemptible hierarchical RCU implementation.

[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2

[    0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] L2C-310 enabling early BRESP for Cortex-A9

[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9

[    0.000000] L2C-310 D prefetch enabled, offset 1 lines

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled

[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB

[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001

[    0.000000] Selected CPU frequency (16) unsupported

[    0.000000] Switching to timer-based delay loop, resolution 40ns

[    0.000002] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns

[    0.007880] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns

[    0.019028] Console: colour dummy device 80x30

[    0.023540] Calibrating local timer... 933.04MHz.

[    0.083557] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)

[    0.093944] pid_max: default: 32768 minimum: 301

[    0.098683] Security Framework initialized

[    0.102872] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.109544] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.116944] CPU: Testing write buffer coherency: ok

[    0.121988] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

[    0.163558] Setting up static identity map for 0x100000 - 0x100060

[    0.169851] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4

[    0.175128] mvebu-pmsu: Initializing Power Management Service Unit

[    0.233518] smp: Bringing up secondary CPUs ...

[    0.293543] Booting CPU 1

[    0.296365] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

[    0.296405] smp: Brought up 1 node, 2 CPUs

[    0.306283] SMP: Total of 2 processors activated (100.00 BogoMIPS).

[    0.312602] CPU: All CPU(s) started in SVC mode.

[    0.317697] devtmpfs: initialized

[    0.322596] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

[    0.330478] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.340363] futex hash table entries: 512 (order: 3, 32768 bytes)

[    0.346620] prandom: seed boundary self test passed

[    0.352995] prandom: 100 self tests passed

[    0.357172] pinctrl core: initialized pinctrl subsystem

[    0.362960] NET: Registered protocol family 16

[    0.367914] DMA: preallocated 256 KiB pool for atomic coherent allocations

[    0.375692] cpuidle: using governor ladder

[    0.379862] cpuidle: using governor menu

[    0.383945] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

[    0.392003] hw-breakpoint: maximum watchpoint size is 4 bytes.

[    0.397990] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling

[    0.406143] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling

[    0.427121] reg-fixed-voltage usb3-vbus0: could not find pctldev for node /soc/internal-regs/pinctrl@18000/xhci0_vbus_pins, deferring probe

[    0.439807] reg-fixed-voltage usb3-vbus1: could not find pctldev for node /soc/internal-regs/pinctrl@18000/xhci1_vbus_pins, deferring probe

[    0.452867] vgaarb: loaded

[    0.455852] SCSI subsystem initialized

[    0.463786] usbcore: registered new interface driver usbfs

[    0.469394] usbcore: registered new interface driver hub

[    0.474867] usbcore: registered new device driver usb

[    0.480278] media: Linux media interface: v0.10

[    0.484953] Linux video capture interface: v2.00

[    0.490345] clocksource: Switched to clocksource armada_370_xp_clocksource

[    0.526494] VFS: Disk quotas dquot_6.6.0

[    0.530573] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

[    0.542525] NET: Registered protocol family 2

[    0.547319] TCP established hash table entries: 8192 (order: 3, 32768 bytes)

[    0.554506] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

[    0.561059] TCP: Hash tables configured (established 8192 bind 8192)

[    0.567513] UDP hash table entries: 512 (order: 2, 16384 bytes)

[    0.573530] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

[    0.580052] NET: Registered protocol family 1

[    0.594693] RPC: Registered named UNIX socket transport module.

[    0.600685] RPC: Registered udp transport module.

[    0.605449] RPC: Registered tcp transport module.

[    0.610212] RPC: Registered tcp NFSv4.1 backchannel transport module.

[    0.616810] Unpacking initramfs...

[    0.818675] Freeing initrd memory: 6908K

[    0.822817] NetWinder Floating Point Emulator V0.97 (double precision)

[    0.829569] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available

[    0.838375] audit: initializing netlink subsys (disabled)

[    0.844004] audit: type=2000 audit(0.813:1): state=initialized audit_enabled=0 res=1

[    0.844114] Initialise system trusted keyrings

[    0.844131] Key type blacklist registered

[    0.844185] workingset: timestamp_bits=30 max_order=18 bucket_order=0

[    0.851816] zbud: loaded

[    0.872298] NFS: Registering the id_resolver key type

[    0.877414] Key type id_resolver registered

[    0.881679] Key type id_legacy registered

[    0.885757] nfs4filelayout_init: NFSv4 File Layout Driver Registering...

[    0.892527] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

[    0.899024] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.

[    0.906350] orangefs_debugfs_init: called with debug mask: :none: :0:

[    0.912950] orangefs_init: module version upstream loaded

[    0.920252] Key type asymmetric registered

[    0.924425] Asymmetric key parser 'x509' registered

[    0.929383] bounce: pool size: 64 pages

[    0.933319] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)

[    0.940775] io scheduler noop registered

[    0.944762] io scheduler deadline registered

[    0.949116] io scheduler cfq registered (default)

[    0.954497] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver

[    0.962586] mv_xor f1060800.xor: Marvell shared XOR driver

[    1.020678] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )

[    1.028490] mv_xor f1060900.xor: Marvell shared XOR driver

[    1.090675] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )

[    1.122433] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

[    1.130860] m25p80 spi0.0: found n25q064, expected mx25l6405d

[    1.136666] m25p80 spi0.0: n25q064 (8192 Kbytes)

[    1.142297] 2 cmdlinepart partitions found on MTD device spi0.0

[    1.148272] Creating 2 MTD partitions on "spi0.0":

[    1.153136] 0x000000000000-0x000000400000 : "boot"

[    1.168554] 0x000000400000-0x000000800000 : "spi-rootfs"

[    1.184887] libphy: Fixed MDIO Bus: probed

[    1.189386] libphy: orion_mdio_bus: probed

[    1.196553] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled

[    1.205160] mvneta f1070000.ethernet eth0: Using hardware mac address 00:50:43:27:27:4d

[    1.213385] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[    1.219974] ehci-pci: EHCI PCI platform driver

[    1.224529] ehci-orion: EHCI orion driver

[    1.228992] usbcore: registered new interface driver usblp

[    1.234573] usbcore: registered new interface driver usb-storage

[    1.240789] mousedev: PS/2 mouse device common for all mice

[    1.246989] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0

[    1.254669] i2c /dev entries driver

[    1.281484] gpio-fan soc:gpio-fan: GPIO fan initialized

[    1.296927] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().

[    1.309171] thermal thermal_zone0: Temperature sensor reading not valid

[    1.315853] thermal thermal_zone0: failed to read out thermal zone (-5)

[    1.322766] orion_wdt: Initial timeout 171 sec

[    1.328326] marvell-cesa f1090000.crypto: CESA device successfully registered

[    1.335625] hidraw: raw HID events driver (C) Jiri Kosina

[    1.341235] usbcore: registered new interface driver usbhid

[    1.346863] usbhid: USB HID core driver

[    1.350904] drop_monitor: Initializing network drop monitor service

[    1.357249] Netfilter messages via NETLINK v0.30.

[    1.362053] ip_set: protocol 6

[    1.365319] NET: Registered protocol family 10

[    1.370227] Segment Routing with IPv6

[    1.374009] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver

[    1.380555] NET: Registered protocol family 17

[    1.385084] 8021q: 802.1Q VLAN Support v1.8

[    1.389349] Key type dns_resolver registered

[    1.393775] ThumbEE CPU extension supported.

[    1.398111] Registering SWP/SWPB emulation handler

[    1.403235] registered taskstats version 1

[    1.407394] Loading compiled-in X.509 certificates

[    1.412292] zswap: loaded using pool lzo/zbud

[    1.453481] Key type big_key registered

[    1.460013] Key type encrypted registered

[    1.465328] v5.0-sata0: supplied by pwr_en_sata0

[    1.470069] ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1

[    1.476260] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x1 impl platform mode

[    1.485357] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 

[    1.494596] scsi host0: ahci-mvebu

[    1.498245] scsi host1: ahci-mvebu

[    1.501840] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 41

[    1.509802] ata2: DUMMY

[    1.512474] xhci-hcd f10f0000.usb3: xHCI Host Controller

[    1.517856] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 1

[    1.525461] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010

[    1.534053] xhci-hcd f10f0000.usb3: irq 42, io mem 0xf10f0000

[    1.539934] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

[    1.546784] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.554060] usb usb1: Product: xHCI Host Controller

[    1.558998] usb usb1: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd

[    1.565496] usb usb1: SerialNumber: f10f0000.usb3

[    1.570567] hub 1-0:1.0: USB hub found

[    1.574437] hub 1-0:1.0: 1 port detected

[    1.578542] xhci-hcd f10f0000.usb3: xHCI Host Controller

[    1.583941] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2

[    1.591513] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.

[    1.599695] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

[    1.606542] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.613817] usb usb2: Product: xHCI Host Controller

[    1.618754] usb usb2: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd

[    1.625253] usb usb2: SerialNumber: f10f0000.usb3

[    1.630231] hub 2-0:1.0: USB hub found

[    1.634067] hub 2-0:1.0: 1 port detected

[    1.638288] xhci-hcd f10f8000.usb3: xHCI Host Controller

[    1.643678] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 3

[    1.651269] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010

[    1.659851] xhci-hcd f10f8000.usb3: irq 43, io mem 0xf10f8000

[    1.665724] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002

[    1.672572] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.679843] usb usb3: Product: xHCI Host Controller

[    1.684788] usb usb3: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd

[    1.691285] usb usb3: SerialNumber: f10f8000.usb3

[    1.696267] hub 3-0:1.0: USB hub found

[    1.700094] hub 3-0:1.0: 1 port detected

[    1.704204] xhci-hcd f10f8000.usb3: xHCI Host Controller

[    1.709579] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4

[    1.717149] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.

[    1.725337] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003

[    1.732183] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.739452] usb usb4: Product: xHCI Host Controller

[    1.744396] usb usb4: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd

[    1.750893] usb usb4: SerialNumber: f10f8000.usb3

[    1.755870] hub 4-0:1.0: USB hub found

[    1.759696] hub 4-0:1.0: 1 port detected

[    1.764096] armada38x-rtc f10a3800.rtc: setting system clock to 2019-01-18 19:25:22 UTC (1547839522)

[    1.773446] v12.0-sata0: supplied by pwr_en_sata0

[    1.778232] v12.0-sata0: disabling

[    1.781747] Warning: unable to open an initial console.

[    1.842633] ata1: SATA link down (SStatus 0 SControl 300)

[    1.858680] Freeing unused kernel memory: 1024K

[    1.897776] systemd-udevd[1304]: starting version 232

[    1.904463] random: systemd-udevd: uninitialized urandom read (16 bytes read)

[    1.910638] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.911184] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.911228] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.911509] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.911716] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.911904] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.912088] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.912253] random: udevadm: uninitialized urandom read (16 bytes read)

[    1.912426] random: udevadm: uninitialized urandom read (16 bytes read)

[    3.310353] usb 1-1: new high-speed USB device number 2 using xhci-hcd

[    3.480617] usb 1-1: New USB device found, idVendor=7614, idProduct=2419

[    3.487371] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[    3.494566] usb 1-1: Product: JMicron JMF60X SSD

[    3.499244] usb 1-1: Manufacturer: JMicron

[    3.503408] usb 1-1: SerialNumber: 0000000000033

[    3.509703] usb-storage 1-1:1.0: USB Mass Storage device detected

[    3.515994] scsi host2: usb-storage 1-1:1.0

[    3.522291] usbcore: registered new interface driver uas

[    4.580769] scsi 2:0:0:0: Direct-Access                                Dev PQ: 0 ANSI: 0 CCS

[    4.599901] sd 2:0:0:0: [sda] 63062016 512-byte logical blocks: (32.3 GB/30.1 GiB)

[    4.607830] sd 2:0:0:0: [sda] Write Protect is off

[    4.612884] sd 2:0:0:0: [sda] Asking for cache data failed

[    4.618429] sd 2:0:0:0: [sda] Assuming drive cache: write through

[    4.625740]  sda: sda1

[    4.629080] sd 2:0:0:0: [sda] Attached SCSI disk

[    4.675845] random: fast init done
Attachments:
open | download - ds116.dtb (16.9 KB)
Re: Debian on Synology RS816 (Armada 385)
January 18, 2019 10:12PM
zifxify,

Good works :)

Now we knew that the DS116 is a close cousin of this RS816. We can switch to mainline version in the rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2. So copy that DTB to your tftp root and try that to get more accurate kernel booting log. Where the difference shows, we'll need to adjust the DTS and recompile.

./boot/dts/armada-385-synology-ds116.dtb


is this the last line you see on serial console?
[    4.675845] random: fast init done

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 01/18/2019 10:18PM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 12:53AM
is this the last line you see on serial console?

[    4.675845] random: fast init done

yes but now with your mainline ds116 dtb, it does boot succesfully :) (thank you), although the lights aren't working correctly.

Marvell>> boot
(Re)start USB controller...
USB0:   Port (usbActive) : 0	Interface (usbType = 3) : USB XHCI 1.00
USB1:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
Booting Debian . . .
(Re)start USB...
USB0:   Port (usbActive) : 1	Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading zImage from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'zImage'.
Load address: 0x2000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##############
	 4.9 MiB/s
done
Bytes transferred = 4021296 (3d5c30 hex)
loading uInitrd from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'uInitrd'.
Load address: 0x3000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###########################
	 4.8 MiB/s
done
Bytes transferred = 7070236 (6be21c hex)
loading DTB from tftpserver ...
Using egiga0 device
TFTP from server 172.16.10.18; our IP address is 172.16.10.150
Filename 'armada-385-synology-ds116.dtb'.
Load address: 0x1000000
Loading: *##
	 1 MiB/s
done
Bytes transferred = 17256 (4368 hex)
## Loading init Ramdisk from Legacy Image at 03000000 ...
   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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff367 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

Limit DDR size at 3GB due to power of 2 requirement of Address decoding

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017

[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] OF: fdt: Machine model: Synology DS116

[    0.000000] bootconsole [earlycon0] enabled

[    0.000000] Memory policy: Data cache writealloc

[    0.000000] percpu: Embedded 17 pages/cpu @ef7c7000 s40460 r8192 d20980 u69632

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608

[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:4m(boot),-(spi-rootfs) earlyprintk=serial

[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

[    0.000000] Memory: 1019060K/1048576K available (8192K kernel code, 712K rwdata, 2080K rodata, 1024K init, 331K bss, 29516K reserved, 0K cma-reserved, 262144K highmem)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)

[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)

[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)

[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)

[    0.000000]       .data : 0xc0d00000 - 0xc0db2308   ( 713 kB)

[    0.000000]        .bss : 0xc0db9a84 - 0xc0e0ca58   ( 332 kB)

[    0.000000] Preemptible hierarchical RCU implementation.

[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2

[    0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] L2C-310 enabling early BRESP for Cortex-A9

[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9

[    0.000000] L2C-310 D prefetch enabled, offset 1 lines

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled

[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB

[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001

[    0.000000] Selected CPU frequency (16) unsupported

[    0.000000] Switching to timer-based delay loop, resolution 40ns

[    0.000003] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns

[    0.007880] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns

[    0.019025] Console: colour dummy device 80x30

[    0.023536] Calibrating local timer... 933.13MHz.

[    0.083561] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)

[    0.093948] pid_max: default: 32768 minimum: 301

[    0.098686] Security Framework initialized

[    0.102875] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.109547] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.116950] CPU: Testing write buffer coherency: ok

[    0.121997] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

[    0.163569] Setting up static identity map for 0x100000 - 0x100060

[    0.169859] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4

[    0.175130] mvebu-pmsu: Initializing Power Management Service Unit

[    0.233536] smp: Bringing up secondary CPUs ...

[    0.293569] Booting CPU 1

[    0.296392] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

[    0.296433] smp: Brought up 1 node, 2 CPUs

[    0.306312] SMP: Total of 2 processors activated (100.00 BogoMIPS).

[    0.312631] CPU: All CPU(s) started in SVC mode.

[    0.317734] devtmpfs: initialized

[    0.322649] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

[    0.330533] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.340418] futex hash table entries: 512 (order: 3, 32768 bytes)

[    0.346674] prandom: seed boundary self test passed

[    0.353049] prandom: 100 self tests passed

[    0.357227] pinctrl core: initialized pinctrl subsystem

[    0.363019] NET: Registered protocol family 16

[    0.367989] DMA: preallocated 256 KiB pool for atomic coherent allocations

[    0.383519] cpuidle: using governor ladder

[    0.387698] cpuidle: using governor menu

[    0.391773] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

[    0.399830] hw-breakpoint: maximum watchpoint size is 4 bytes.

[    0.405814] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling

[    0.413958] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling

[    0.435104] reg-fixed-voltage usb3-vbus0: could not find pctldev for node /soc/internal-regs/pinctrl@18000/xhci0_vbus_pins, deferring probe

[    0.447726] reg-fixed-voltage usb3-vbus1: could not find pctldev for node /soc/internal-regs/pinctrl@18000/xhci1_vbus_pins, deferring probe

[    0.460785] vgaarb: loaded

[    0.463776] SCSI subsystem initialized

[    0.467992] usbcore: registered new interface driver usbfs

[    0.473600] usbcore: registered new interface driver hub

[    0.479029] usbcore: registered new device driver usb

[    0.484443] media: Linux media interface: v0.10

[    0.489075] Linux video capture interface: v2.00

[    0.494466] clocksource: Switched to clocksource armada_370_xp_clocksource

[    0.530791] VFS: Disk quotas dquot_6.6.0

[    0.534845] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

[    0.547054] NET: Registered protocol family 2

[    0.551827] TCP established hash table entries: 8192 (order: 3, 32768 bytes)

[    0.558996] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

[    0.565558] TCP: Hash tables configured (established 8192 bind 8192)

[    0.572011] UDP hash table entries: 512 (order: 2, 16384 bytes)

[    0.578015] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

[    0.584559] NET: Registered protocol family 1

[    0.589163] RPC: Registered named UNIX socket transport module.

[    0.595170] RPC: Registered udp transport module.

[    0.599934] RPC: Registered tcp transport module.

[    0.604715] RPC: Registered tcp NFSv4.1 backchannel transport module.

[    0.611299] Unpacking initramfs...

[    0.813617] Freeing initrd memory: 6908K

[    0.817798] NetWinder Floating Point Emulator V0.97 (double precision)

[    0.824576] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available

[    0.833342] audit: initializing netlink subsys (disabled)

[    0.838895] audit: type=2000 audit(0.814:1): state=initialized audit_enabled=0 res=1

[    0.839093] Initialise system trusted keyrings

[    0.839118] Key type blacklist registered

[    0.839172] workingset: timestamp_bits=30 max_order=18 bucket_order=0

[    0.846708] zbud: loaded

[    0.867225] NFS: Registering the id_resolver key type

[    0.872343] Key type id_resolver registered

[    0.876607] Key type id_legacy registered

[    0.880685] nfs4filelayout_init: NFSv4 File Layout Driver Registering...

[    0.887457] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

[    0.893957] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.

[    0.901287] orangefs_debugfs_init: called with debug mask: :none: :0:

[    0.907882] orangefs_init: module version upstream loaded

[    0.915233] Key type asymmetric registered

[    0.919394] Asymmetric key parser 'x509' registered

[    0.924351] bounce: pool size: 64 pages

[    0.928290] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)

[    0.935747] io scheduler noop registered

[    0.939734] io scheduler deadline registered

[    0.944089] io scheduler cfq registered (default)

[    0.949461] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver

[    0.957512] mv_xor f1060800.xor: Marvell shared XOR driver

[    1.014801] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )

[    1.022611] mv_xor f1060900.xor: Marvell shared XOR driver

[    1.084798] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )

[    1.114886] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

[    1.122294] console [ttyS0] disabled

[    1.146266] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 21, base_baud = 12500000) is a 16550A

[    1.155318] console [ttyS0] enabled
[    1.155318] console [ttyS0] enabled

[    1.162405] bootconsole [earlycon0] disabled
[    1.162405] bootconsole [earlycon0] disabled

[    1.191640] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 22, base_baud = 12500000) is a 16550A
[    1.202192] m25p80 spi0.0: found n25q064, expected mx25l6405d
[    1.208051] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    1.212692] 2 cmdlinepart partitions found on MTD device spi0.0
[    1.218645] Creating 2 MTD partitions on "spi0.0":
[    1.223456] 0x000000000000-0x000000400000 : "boot"
[    1.238802] 0x000000400000-0x000000800000 : "spi-rootfs"
[    1.255082] libphy: Fixed MDIO Bus: probed
[    1.259525] libphy: orion_mdio_bus: probed
[    1.266625] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.275203] mvneta f1070000.ethernet eth0: Using hardware mac address 00:50:43:27:27:4d
[    1.283396] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.290015] ehci-pci: EHCI PCI platform driver
[    1.294527] ehci-orion: EHCI orion driver
[    1.298954] usbcore: registered new interface driver usblp
[    1.304501] usbcore: registered new interface driver usb-storage
[    1.310674] mousedev: PS/2 mouse device common for all mice
[    1.316857] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    1.324524] i2c /dev entries driver
[    1.355812] gpio-fan soc:gpio-fan: GPIO fan initialized
[    1.371217] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    1.383729] orion_wdt: Initial timeout 171 sec
[    1.389265] marvell-cesa f1090000.crypto: CESA device successfully registered
[    1.396546] hidraw: raw HID events driver (C) Jiri Kosina
[    1.402098] usbcore: registered new interface driver usbhid
[    1.407719] usbhid: USB HID core driver
[    1.411690] drop_monitor: Initializing network drp monitor service
[    1.418026] Netfilter messages via NETLINK v0.30.
[    1.422758] ip_set: protocol 6
[    1.425999] NET: Registered protocol family 10
[    1.430869] Segment Routing with IPv6
[    1.434598] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.441101] NET: Registered protocol family 17
[    1.445597] 8021q: 802.1Q VLAN Support v1.8
[    1.449819] Key type dns_resolver registered
[    1.454178] ThumbEE CPU extension supported.
[    1.458489] Registering SWP/SWPB emulation handler
[    1.463553] registered taskstats version 1
[    1.467679] Loading compiled-in X.509 certificates
[    1.472516] zswap: loaded using pool lzo/zbud
[    1.515050] Key type big_key registered
[    1.521649] Key type encrypted registered
[    1.526920] v5.0-sata0: supplied by pwr_en_sata0
[    1.531621] ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1
[    1.537785] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x1 impl platform mode
[    1.546880] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.556119] scsi host0: ahci-mvebu
[    1.559751] scsi host1: ahci-mvebu
[    1.563284] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 40
[    1.571251] ata2: DUMMY
[    1.573856] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.579211] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 1
[    1.586800] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.595387] xhci-hcd f10f0000.usb3: irq 41, io mem 0xf10f0000
[    1.601237] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.608063] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.615321] usb usb1: Product: xHCI Host Controller
[    1.620218] usb usb1: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd
[    1.626690] usb usb1: SerialNumber: f10f0000.usb3
[    1.631766] hub 1-0:1.0: USB hub found
[    1.635560] hub 1-0:1.0: 1 port detected
[    1.639614] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.644965] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.652516] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.660697] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    1.667521] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.674779] usb usb2: Product: xHCI Host Controller
[    1.679675] usb usb2: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd
[    1.686147] usb usb2: SerialNumber: f10f0000.usb3
[    1.691136] hub 2-0:1.0: USB hub found
[    1.694922] hub 2-0:1.0: 1 port detected
[    1.699099] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.704441] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 3
[    1.712024] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.720608] xhci-hcd f10f8000.usb3: irq 42, io mem 0xf10f8000
[    1.726452] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    1.733269] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.740529] usb usb3: Product: xHCI Host Controller
[    1.745433] usb usb3: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd
[    1.751900] usb usb3: SerialNumber: f10f8000.usb3
[    1.756892] hub 3-0:1.0: USB hub found
[    1.760672] hub 3-0:1.0: 1 port detected
[    1.764736] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.770074] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.777633] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.785815] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    1.792632] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.799891] usb usb4: Product: xHCI Host Controller
[    1.804795] usb usb4: Manufacturer: Linux 4.12.4-mvebu-tld-1 xhci-hcd
[    1.811262] usb usb4: SerialNumber: f10f8000.usb3
[    1.816250] hub 4-0:1.0: USB hub found
[    1.820028] hub 4-0:1.0: 1 port detected
[    1.824377] armada38x-rtc f10a3800.rtc: setting system clock to 2019-01-19 07:43:54 UTC (1547883834)
[    1.833726] v12.0-sata0: supplied by pwr_en_sata0
[    1.838486] v12.0-sata0: disabling
[    1.907618] ata1: SATA link down (SStatus 0 SControl 300)
[    1.923633] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    1.965807] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.968903] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.969463] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.969508] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.969791] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.969978] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.970150] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.970338] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.970500] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.970664] random: udevadm: uninitialized urandom read (16 bytes read)
Begin: Loading essential drivers ... done.
[    3.364475] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.534743] usb 1-1: New USB device found, idVendor=7614, idProduct=2419
[    3.541473] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.548649] usb 1-1: Product: JMicron JMF60X SSD
[    3.553285] usb 1-1: Manufacturer: JMicron
[    3.557404] usb 1-1: SerialNumber: 0000000000033
[    3.563692] usb-storage 1-1:1.0: USB Mass Storage device detected
[    3.569961] scsi host2: usb-storage 1-1:1.0
[    3.576186] usbcore: registered new interface driver uas
[    4.654892] scsi 2:0:0:0: Direct-Access                                Dev PQ: 0 ANSI: 0 CCS
[    4.674065] sd 2:0:0:0: [sda] 63062016 512-byte logical blocks: (32.3 GB/30.1 GiB)
[    4.681942] sd 2:0:0:0: [sda] Write Protect is off
[    4.686928] sd 2:0:0:0: [sda] Asking for cache data failed
[    4.692437] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.700493]  sda: sda1
[    4.703812] sd 2:0:0:0: [sda] Attached SCSI disk
[    4.741634] random: fast init done
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so sk[   12.371560] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
ipping root file system
[   12.385829] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

INIT: version 2.88 booting

[info] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'debian'...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Synthesizing the initial hotplug events...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Waiting for /dev to be fully populated...[   13.386879] sd 2:0:0:0: Attached scsi generic sg0 type 0
[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Activating swap:[?25l[?1c7[ ok 8[?25h[?0c.
[   13.901518] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sda1 
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 22019/1974272 files, 317504/7882496 blocks
[?25l[?1c7[ ok 8[?25h[?0c.
[   14.019192] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[....] Will now activate lvm and md swap:[?25l[?1c7[ ok 8[?25h[?0cdone.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.[?25l[?1c7[ ok 8[?25h[?0c.
[....] Cleaning up temporary files...[....] Cleaning /tmp...[?25l[?1c7[ ok 8[?25h[?0cdone.
 /tmp[?25l[?1c7[ ok 8[?25h[?0c.
[....] Will now mount local filesystems:[?25l[?1c7[ ok 8[?25h[?0c.
[....] Will now activate swapfile swap:[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Checking minimum space in /tmp...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Cleaning up temporary files...[?25l[?1c7[ ok 8[?25h[?0c.
[....] Setting kernel variables...[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Initializing random number generator...[?25l[?1c7[ ok 8[?25h[?0cdone.
[   15.045263] m88e1318_get_wol: phy_id = 0x1410dd1 OK
[   15.050270] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:50:43:27:27:4d
Sending on   LPF/eth0/00:50:43:27:27:4d
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   21.294903] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.302955] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPREQUEST of 172.16.10.39 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 172.16.10.39 from 172.16.10.1
DHCPACK of 172.16.10.39 from 172.16.10.1
bound to 172.16.10.39 -- renewal in 2917 seconds.
[?25l[?1c7[ ok 8[?25h[?0cdone.
[....] Starting RPC port mapper daemon: rpcbind[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting NFS common utilities: statd idmapd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Cleaning up temporary files...[?25l[?1c7[ ok 8[?25h[?0c.

INIT: Entering runlevel: 2

[info] Using makefile-style concurrent boot in runlevel 2.
[....] Not starting NFS kernel daemon: no exports. ...[?25l[?1c7[warn8[?25h[?0c (warning).
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2565 (syslogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting system message bus: dbus[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2563 (klogd)
[?25l[?1c7[ ok 8[?25h[?0c.
[....] Starting NTP server: ntpd[?25l[?1c7[ ok 8[?25h[?0c.
[   34.606335] random: crng init done
[....] Running local boot scripts (/etc/rc.local)[?25l[?1c7[ ok 8[?25h[?0c.


Debian GNU/Linux 9 debian ttyS0

debian login: root

Password: 
Last login: Tue Aug 22 17:09:50 PDT 2017 from 192.168.0.220 on pts/0
Linux debian 4.12.4-mvebu-tld-1 #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian
172.16.10.39 
Synology DS116
Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017
Debian 9.1
Fri Jan 18 23:47:00 PST 2019 up 2 minutes
root@debian:~# 
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 01:48AM
Awesome :)

Now you should double check the system specs to see if everything is what it supposed to be: RAM, CPU, SPI, RTC, sensors,...etc.

The LED lights should not be difficult. We can figure out those from GPL source, or from stock OS while it is running.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 03:46AM
bodhi Wrote:
-------------------------------------------------------
> Awesome :)
>
> Now you should double check the system specs to
> see if everything is what it supposed to be: RAM,
> CPU, SPI, RTC, sensors,...etc.
>
> The LED lights should not be difficult. We can
> figure out those from GPL source, or from stock OS
> while it is running.

The fans are running at low speed and ethernet connection works. (only one visible and mac-address isn't correct) Memory 1G DDR3 seems ok.
Which commands should I test for SPI ?

/sys/devices/virtual/thermal/cooling_device0# ls
. .. cur_state max_state power subsystem type uevent

cat cur_state (max 7)
1

root@debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00001000 "boot"
mtd1: 00400000 00001000 "spi-rootfs"

root@debian:~# cat /proc/meminfo
MemTotal: 1026992 kB
MemFree: 949412 kB
MemAvailable: 855140 kB

root@debian:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 50.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1

processor : 1
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 50.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1

Hardware : Marvell Armada 380/385 (Device Tree)
Revision : 0000
Serial : 0000000000000000

root@debian:~# dmesg | grep rtc
[ 1.338662] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[ 1.841304] armada38x-rtc f10a3800.rtc: setting system clock to 2019-01-19 09:48:56 UTC (1547891336)

Sensors: System Temperatures: cpu: 70.4C mobo: N/A
Fan Speeds (in rpm): cpu: 1500 (min)
Fan Speeds (in rpm): cpu: 4000 (max)



Edited 1 time(s). Last edit at 01/19/2019 04:07AM by zifxify.
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 06:11AM
SPI looks fine as mtds in the kernel log now. Further check:

1. Check SPI mtds

dmesg | grep -i spi
cat /proc/mtd

2. We need to look for where is the envs and adjust the location in /etc/fw_env.config, and then

fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 07:09AM
root@debian:~# dmesg | grep -i spi
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:4m(boot),-(spi-rootfs) earlyprintk=serial init=/bin/systemd
[    1.240774] m25p80 spi0.0: found n25q064, expected mx25l6405d
[    1.246548] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    1.251211] 2 cmdlinepart partitions found on MTD device spi0.0
[    1.257154] Creating 2 MTD partitions on "spi0.0":
[    1.277303] 0x000000400000-0x000000800000 : "spi-rootfs"


admin@SrvNas1:~$ dmesg | grep -i spi
[   36.554075] m25p80 spi0.0: n25q064 (8192 Kbytes)
[   36.558723] Searching for RedBoot partition table in spi0.0 at offset 0x7f0000
[   36.661899] 6 RedBoot partitions found on MTD device spi0.0
[   36.667494] Creating 6 MTD partitions on "spi0.0":


root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00001000 "boot"
mtd1: 00400000 00001000 "spi-rootfs"


admin@SrvNas1:~$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000f0000 00010000 "RedBoot"
mtd1: 002d0000 00010000 "zImage"
mtd2: 00410000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00010000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"

----
Moderator edit: use code tags



Edited 2 time(s). Last edit at 01/19/2019 09:18AM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 09:21AM
These are correct mtd definition. Stock mtds definition (from stock DTB) is apparently legacy and obsolete.

root@debian:~# dmesg | grep -i spi
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:4m(boot),-(spi-rootfs) earlyprintk=serial init=/bin/systemd
[    1.240774] m25p80 spi0.0: found n25q064, expected mx25l6405d
[    1.246548] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    1.251211] 2 cmdlinepart partitions found on MTD device spi0.0
[    1.257154] Creating 2 MTD partitions on "spi0.0":
[    1.277303] 0x000000400000-0x000000800000 : "spi-rootfs"

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00001000 "boot"
mtd1: 00400000 00001000 "spi-rootfs"

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 11:33AM
In stock OS,

ls -l /sys/class/leds/
ls -lR /proc/device-tree/

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 12:05PM
What am I doing wrong ? This isn't correct :/

# MTD device name       Device offset   Env. size       Flash sector size        
Number of sectors
 
/dev/mtd0               0x00000000      0x00400000      0x00001000      400
/dev/mtd1               0x00000000      0x00400000      0x00001000      400

(and only 2 of the 4 sata ports works because of ds116 dtb)



Edited 1 time(s). Last edit at 01/19/2019 12:10PM by zifxify.
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 12:20PM
admin@SrvNas1:~$ ls -l /sys/class/leds/
total 0

admin@SrvNas1:~$ ls -lR /proc/device-tree/
ls: cannot access /proc/device-tree/: No such file or directory
Re: Debian on Synology RS816 (Armada 385)
January 19, 2019 11:12PM
> What am I doing wrong ? This isn't correct :/
>
>
> # MTD device name       Device offset   Env. size 
>      Flash sector size        
> Number of sectors
>  
> /dev/mtd0               0x00000000      0x00400000
>      0x00001000      400
> /dev/mtd1               0x00000000      0x00400000
>      0x00001000      400
>

Is that what's in stock OS? They are indeed not making any sense. Try again In stock OS,

cat /etc/fw_env.config


> (and only 2 of the 4 sata ports works because of
> ds116 dtb)

This is expected. So this is one of differences you've found.

> admin@SrvNas1:~$ ls -l /sys/class/leds/
> total 0
>
> admin@SrvNas1:~$ ls -lR /proc/device-tree/
> ls: cannot access /proc/device-tree/: No such file
> or directory

Stock OS does not enumerate the LEDs and no device-tree enumeration either. We will need to look in GPL source to find the correct LEDs definition. But LEDs are only cosmetics, so it can be done later.

I will create a new DTS for this box and upload the DTB here (possibly later today or tomorrow).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 03:56AM
Quote

Is that what's in stock OS? They are indeed not making any sense. Try again In stock OS,

cat /etc/fw_env.config

No, I did not know what I was doing, sorry. In stock OS there's not such a thing as fw_env.config

I have searched in the u-boot sources (include/configs/board) for the RS816.h ( CONFIG_ENV_SIZE, CONFIG_ENV_SECT_SIZE ,CONFIG_ENV_OFFSET,... but no luck)

But I think /dev/mtd1 should be the correct one.

cat mtd1 | hexdump -C | grep bootargs
003e00e0  74 5f 73 63 72 00 62 6f  6f 74 61 72 67 73 3d 20  |t_scr.bootargs= |
003e00f0  00 62 6f 6f 74 61 72 67  73 5f 64 66 6c 74 3d 24  |.bootargs_dflt=$|
003e0120  24 62 6f 6f 74 61 72 67  73 5f 72 6f 6f 74 20 6e  |$bootargs_root n|
003e0160  62 6f 6f 74 61 72 67 73  5f 65 6e 64 20 24 6d 76  |bootargs_end $mv|
003e01d0  00 62 6f 6f 74 61 72 67  73 5f 65 6e 64 3d 3a 31  |.bootargs_end=:1|
003e02e0  73 65 74 65 6e 76 20 62  6f 6f 74 61 72 67 73 20  |setenv bootargs |
003e0410  76 20 62 6f 6f 74 61 72  67 73 20 24 63 6f 6e 73  |v bootargs $cons|
003e0430  64 70 61 72 74 73 20 24  62 6f 6f 74 61 72 67 73  |dparts $bootargs|
003e0470  72 76 65 72 69 70 24 62  6f 6f 74 61 72 67 73 5f  |rverip$bootargs_|
003e05c0  63 79 20 24 62 6f 6f 74  61 72 67 73 5f 72 6f 6f  |cy $bootargs_roo|
003e0600  69 70 24 62 6f 6f 74 61  72 67 73 5f 65 6e 64 20  |ip$bootargs_end |
003e0f10  6e 76 20 62 6f 6f 74 61  72 67 73 20 24 63 6f 6e  |nv bootargs $con|


mtd1: https://ufile.io/jjx1f
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 04:42AM
zifxify Wrote:
-------------------------------------------------------
>
Quote

> Is that what's in stock OS? They are indeed not
> making any sense. Try again In stock OS,
>
> cat /etc/fw_env.config
>
>
> No, I did not know what I was doing, sorry. In
> stock OS there's not such a thing as
> fw_env.config
>
> I have searched in the u-boot sources
> (include/configs/board) for the RS816.h (
> CONFIG_ENV_SIZE, CONFIG_ENV_SECT_SIZE
> ,CONFIG_ENV_OFFSET,... but no luck)
>
> But I think /dev/mtd1 should be the correct one.
>
>
> cat mtd1 | hexdump -C | grep bootargs
> 003e00e0  74 5f 73 63 72 00 62 6f  6f 74 61 72 67
> 73 3d 20  |t_scr.bootargs= |
> 003e00f0  00 62 6f 6f 74 61 72 67  73 5f 64 66 6c
> 74 3d 24  |.bootargs_dflt=$|
> 003e0120  24 62 6f 6f 74 61 72 67  73 5f 72 6f 6f
> 74 20 6e  |$bootargs_root n|
> 003e0160  62 6f 6f 74 61 72 67 73  5f 65 6e 64 20
> 24 6d 76  |bootargs_end $mv|
> 003e01d0  00 62 6f 6f 74 61 72 67  73 5f 65 6e 64
> 3d 3a 31  |.bootargs_end=:1|
> 003e02e0  73 65 74 65 6e 76 20 62  6f 6f 74 61 72
> 67 73 20  |setenv bootargs |
> 003e0410  76 20 62 6f 6f 74 61 72  67 73 20 24 63
> 6f 6e 73  |v bootargs $cons|
> 003e0430  64 70 61 72 74 73 20 24  62 6f 6f 74 61
> 72 67 73  |dparts $bootargs|
> 003e0470  72 76 65 72 69 70 24 62  6f 6f 74 61 72
> 67 73 5f  |rverip$bootargs_|
> 003e05c0  63 79 20 24 62 6f 6f 74  61 72 67 73 5f
> 72 6f 6f  |cy $bootargs_roo|
> 003e0600  69 70 24 62 6f 6f 74 61  72 67 73 5f 65
> 6e 64 20  |ip$bootargs_end |
> 003e0f10  6e 76 20 62 6f 6f 74 61  72 67 73 20 24
> 63 6f 6e  |nv bootargs $con|
>
>
>
> mtd1: https://ufile.io/jjx1f

Mtd1 indeed :) I forgot that I’ve already figured out this location from uboot envs! sorry for the confusion and unecessary question (must have mixed up with LEDs issue).

Will be back shortly with fw_env.config.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 05:50AM
Quote

Mtd1 indeed :) I forgot that I’ve already figured out this location from uboot envs!

Lol, I don't even find it in the sources and you just read almost everything from envs :)

some further remarks on the current working state of the rs816 (using the ds116.dtb)

When I power off the device booted from debian, both sata ports {1,2} stay active until the device is reset (unplugging power).
Also the start button does not work to power off the device, or to start it again after a poweroff command from debian.
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 08:31AM
1. Does the power off work with ./boot/dts/armada-385-synology-ds116.dtb ?

2. Power button in Debian

Quote

Also the start button does not work to power off the device, or to start it again after a poweroff command from debian.

This is actually normal. The power button must be

a) specified in the DTS.
b) A key daemon such as esekeyd must be installed in the rootfs to process the key push/release. See Wkiki thread:

Quote

Key daemon (button control)

Multimedia keyboard daemon for Linux

I'll check the DTS to see if power button is specified.

UPDATE:

Power button is not specified in the armada-385-synology-ds116.dts. So we need to find it in GPL source.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/20/2019 08:51AM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 09:03AM
Check this to see if the DS116 LEDs can be used for RS816.

In Debian,

ls -l /sys/class/leds/

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

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

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 09:56AM
Quote

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

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

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

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

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

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

(Debian) Reboot from Debian works.

Quote

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

ls -l /sys/class/leds/

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

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

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

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



Edited 1 time(s). Last edit at 01/20/2019 10:00AM by zifxify.
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 10:26AM
Found this: https://www.synology-wiki.de/index.php/LEDs_und_Buttons and this just works.
There's a second serial port on the device (also with header).
Only the ethernet leds and drive leds chars I have not found yet.
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 10:35PM
> (Debian) Poweroff from Debian works but SATA ports
> keeps active (drive spinning when actually
> plugging and unplugging the drives (after poweroff
> command ofcourse) in the two of four drive bays)

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

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

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

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

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

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 11:00PM
For /etc/fw_env.config, try this content:
# MTD device name       Device offset   Env. size       Flash sector size        Number of sectors
/dev/mtd1   0x3E0000   0x10000   0x1000

And test the definition:
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
January 20, 2019 11:50PM
Quote

And test the definition:

fw_printenv

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

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

Reboot, interrupt serial console and
printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
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: