Welcome! Log In Create A New Profile

Advanced

Debian on Synology RS816 (Armada 385)

Posted by zifxify 
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 10:33PM
Richard,

Temporarily take out DTB loading to see if the kernel image is good.

setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; bootm $load_image_addr'

This time you could run imi to check the image (uImage is a u-boot image, unlike zImage).

So independenly from the bootcmd_exec, we could check:

run load_image
imi $load_image_addr

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



Edited 1 time(s). Last edit at 05/21/2019 10:40PM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 10:41PM
I think your images size is probably wrong.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 11:06PM
I agree, the 0x2000 might be cutting the image off. Try;

scsi read $load_image_addr 0x5000 0x2F00
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 11:11PM
@bodhi & jdwl101

Several things have changed today but if you recall I had already tried imi on zImage AND uImage with 0x2F00 and it made no difference. I will nonetheless redo the test because we have swapped a few things since then.

I'm away for 30 mins will try on my return.
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 11:25PM
Ok, sorry about that, I'm following the thread but didn't see that.

Even if imi fails still try to boot the uImage. Would be interesting to see what it does.
Re: Debian on Synology RS816 (Armada 385)
May 21, 2019 11:36PM
@bodhi & @jdwl101

Decided to press on I have some other stuff I need to complete but it can wait a bit longer.

I think we might be getting close :)

I left the DTB bit in for this run was going to leave it out on the next run but good news is whatever else we have changed today plus the 0X2F00 size increase and imi now passes :)

Marvell>> <INTERRUPT>
Marvell>> scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Found 1 device(s).
Marvell>> setenv ipaddr 192.168.1.250
Marvell>> setenv serverip 192.168.1.2
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_image 'echo loading zImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
Marvell>> setenv load_dtb 'echo loading DTB from tftpserver ...; tftpboot $load_dtb_addr armada-385-synology-rs816-v12.dtb'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=20 $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_dtb; bootm $load_image_addr - $load_dtb_addr'
Marvell>> setenv bootcmd 'run bootcmd_exec; run bootspi'
Marvell>> run load_image
loading zImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
Marvell>> imi $load_image_addr

## Checking Image at 02000000 ...
   Legacy image found
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   5:15:56 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4841504 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Marvell>> boot
Booting Debian . . .
loading zImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
loading DTB from tftpserver ...
Using egiga0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.250
Filename 'armada-385-synology-rs816-v12.dtb'.
Load address: 0x1000000
Loading: ##
         743.2 KiB/s
done
Bytes transferred = 18265 (4759 hex)
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   5:15:56 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4841504 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 00ff8000, end 00fff758 ... 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.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000210, r2=0x00000000
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Berlin
ffffffff        Marvell Armada 39x (Device Tree)
ffffffff        Marvell Armada 380/385 (Device Tree)
ffffffff        Marvell Armada 375 (Device Tree)
ffffffff        Marvell Armada 370/XP (Device Tree)
ffffffff        Marvell Dove

Please check your kernel config and/or bootloader.

Is the above error is because my 5.1.2-rj was built before @bodhi including the rs816 in his patch ?
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 12:40AM
Richard,

>
> I left the DTB bit in for this run was going to
> leave it out on the next run but good news is
> whatever else we have changed today plus the
> 0X2F00 size increase and imi now passes :)

Cool! that because this combination: correct uImage generation and the image size that J has posted.

> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
>
> Error: invalid dtb and unrecognized/unsupported
> machine ID


Very good first attempt!

This is what we load while booting wih zImage:

Marvell>> setenv load_dtb_addr      0x1000000
Marvell>> setenv load_image_addr 0x02000000

Because stock u-boot is old and has many shortcoming in reallocation, the addresses might need to be different when booting with uImage. DTB is usually need to be loaded far after uImage in memory.

Try
setenv load_dtb_addr      0x3400000

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



Edited 1 time(s). Last edit at 05/22/2019 12:47AM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 01:10AM
@bodhi

mboot sure seems picky!!

No joy on this one but success must just around the corner

Boot
Marvell>> <INTERRUPT>
Marvell>> scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Found 1 device(s).
Marvell>> setenv ipaddr 192.168.1.250
Marvell>> setenv serverip 192.168.1.2
Marvell>> setenv load_dtb_addr 0x3400000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_image 'echo loading uImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
Marvell>> setenv load_dtb 'echo loading DTB from tftpserver ...; tftpboot $load_dtb_addr armada-385-synology-rs816-v12.dtb'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=20 $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_dtb; bootm $load_image_addr - $load_dtb_addr'
Marvell>> setenv bootcmd 'run bootcmd_exec; run bootspi'
Marvell>> boot
Booting Debian . . .
loading uImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
loading DTB from tftpserver ...
Using egiga0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.250
Filename 'armada-385-synology-rs816-v12.dtb'.
Load address: 0x3400000
Loading: ##
         495.1 KiB/s
done
Bytes transferred = 18265 (4759 hex)
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   5:15:56 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4841504 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 03400000
   Booting using the fdt blob at 0x03400000
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 00ff8000, end 00fff758 ... 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.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000210, r2=0x00000000
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Berlin
ffffffff        Marvell Armada 39x (Device Tree)
ffffffff        Marvell Armada 380/385 (Device Tree)
ffffffff        Marvell Armada 375 (Device Tree)
ffffffff        Marvell Armada 370/XP (Device Tree)
ffffffff        Marvell Dove

Please check your kernel config and/or bootloader.

Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 01:58AM
@bodhi
Just as an aside, when using dd M is equivalent to MiB

From man dd
N and BYTES may be followed by the  following  multiplicative  suffixes:  c=1,  w=2,  b=512,  kB=1000,  K=1024,  MB=1000*1000,  M=1024*1024,  xM=M,
       GB=1000*1000*1000, G=1024*1024*1024, and so on for T, P, E, Z, Y.  Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 02:11AM
Richard,

OK. So we'll go the fastest route to get there (not trying to figure out the correct address for DTB).

This time, don't load the DTB separately. We'll append it to uImage.


On RS816 (or another Linux box is OK, just like when you make uImage above).

cd /boot
cp -a zImage zImage.fdt
cat /boot/dts/armada-385-synology-rs816.dtb >> zImage.fdt
cp -a uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.1.2-mvebu-tld-1 -d zImage.fdt uImage

And then write the uImage to disk like you did before

dd if=uImage of=/dev/sda bs=1MiB seek=10

When booting, this time the envs should be:

setenv load_image_addr 0x02000000
setenv load_image 'echo loading uImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=20 $mtdparts earlyprintk=serial"'
setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; bootm $load_image_addr'
setenv bootcmd 'run bootcmd_exec; run bootspi'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 02:40AM
@bodhi

WIN :)

Just remember on this box you do need scsi init first

Marvell>> <INTERRUPT>
Marvell>> scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Found 1 device(s).
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_image 'echo loading uImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=20 $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; bootm $load_image_addr'
Marvell>> setenv bootcmd 'run bootcmd_exec; run bootspi'
Marvell>> boot
Booting Debian . . .
loading uImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   8:28:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4859769 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.1.2-rj (root@debian) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PREEMPT Sun May 19 12:13:42 AWST 2019
[    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 RS116
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4dc with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu s41932 r8192 d23604 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:896k(u-boot),64k(dtb),7104k(kernel),-(env) earlyprintk=serial
[    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: 1024872K/1048576K available (9216K kernel code, 836K rwdata, 2496K rodata, 1024K init, 330K bss, 23704K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 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.000006] sched_clock: 64 bits at 933MHz, resolution 1ns, wraps every 4398046511103ns
[    0.007975] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x1ae5b571769, max_idle_ns: 881590513431 ns
[    0.019058] Switching to timer-based delay loop, resolution 1ns
[    0.025104] Ignoring duplicate/late registration of read_current_timer delay
[    0.032120] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043336] Console: colour dummy device 80x30
[    0.047775] Calibrating delay loop (skipped), value calculated using timer frequency.. 1866.00 BogoMIPS (lpj=9330000)
[    0.058339] pid_max: default: 32768 minimum: 301
[    0.063016] LSM: Security Framework initializing
[    0.067655] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074238] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.081536] *** VALIDATE proc ***
[    0.084909] *** VALIDATE cgroup1 ***
[    0.088472] *** VALIDATE cgroup2 ***
[    0.092052] CPU: Testing write buffer coherency: ok
[    0.096916] CPU0: Spectre v2: using BPIALL workaround
[    0.102044] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.165010] Setting up static identity map for 0x100000 - 0x100060
[    0.171225] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.176427] mvebu-pmsu: Initializing Power Management Service Unit
[    0.194991] rcu: Hierarchical SRCU implementation.
[    0.234991] smp: Bringing up secondary CPUs ...
[    0.295046] Booting CPU 1
[    0.297788] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.297791] CPU1: Spectre v2: using BPIALL workaround
[    0.308507] smp: Brought up 1 node, 2 CPUs
[    0.312582] SMP: Total of 2 processors activated (3732.00 BogoMIPS).
[    0.318921] CPU: All CPU(s) started in SVC mode.
[    0.324001] devtmpfs: initialized
[    0.329006] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.336874] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.346668] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352828] xor: measuring software checksum speed
[    0.454986]    arm4regs  :  2938.000 MB/sec
[    0.554987]    8regs     :  2220.400 MB/sec
[    0.654986]    32regs    :  2349.200 MB/sec
[    0.659146] xor: using function: arm4regs (2938.000 MB/sec)
[    0.664691] prandom: seed boundary self test passed
[    0.670661] prandom: 100 self tests passed
[    0.674735] pinctrl core: initialized pinctrl subsystem
[    0.680597] NET: Registered protocol family 16
[    0.685490] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.692650] audit: initializing netlink subsys (disabled)
[    0.698098] audit: type=2000 audit(0.670:1): state=initialized audit_enabled=0 res=1
[    0.715015] cpuidle: using governor ladder
[    0.719102] cpuidle: using governor menu
[    0.723115] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.731135] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.737046] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.745115] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.935105] raid6: int32x8  gen()   311 MB/s
[    1.105049] raid6: int32x8  xor()   243 MB/s
[    1.275025] raid6: int32x4  gen()   303 MB/s
[    1.444991] raid6: int32x4  xor()   253 MB/s
[    1.615090] raid6: int32x2  gen()   337 MB/s
[    1.785046] raid6: int32x2  xor()   336 MB/s
[    1.955131] raid6: int32x1  gen()   294 MB/s
[    2.125021] raid6: int32x1  xor()   304 MB/s
[    2.129268] raid6: using algorithm int32x2 gen() 337 MB/s
[    2.134638] raid6: .... xor() 336 MB/s, rmw enabled
[    2.139494] raid6: using intx1 recovery algorithm
[    2.145484] vgaarb: loaded
[    2.148404] SCSI subsystem initialized
[    2.152537] usbcore: registered new interface driver usbfs
[    2.158060] usbcore: registered new interface driver hub
[    2.163398] usbcore: registered new device driver usb
[    2.168825] media: Linux media interface: v0.10
[    2.173370] videodev: Linux video capture interface: v2.00
[    2.179001] pps_core: LinuxPPS API ver. 1 registered
[    2.183940] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.193072] PTP clock support registered
[    2.197759] clocksource: Switched to clocksource arm_global_timer
[    2.545555] VFS: Disk quotas dquot_6.6.0
[    2.549512] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.562210] NET: Registered protocol family 2
[    2.566854] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.574500] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.581551] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.588016] TCP: Hash tables configured (established 8192 bind 8192)
[    2.594389] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.600312] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.606768] NET: Registered protocol family 1
[    2.611358] RPC: Registered named UNIX socket transport module.
[    2.617248] RPC: Registered udp transport module.
[    2.621940] RPC: Registered tcp transport module.
[    2.626619] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.633201] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.639837] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.649124] Initialise system trusted keyrings
[    2.653564] Key type blacklist registered
[    2.657616] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.664108] zbud: loaded
[    2.667061] NFS: Registering the id_resolver key type
[    2.672126] Key type id_resolver registered
[    2.676286] Key type id_legacy registered
[    2.680288] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.686956] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.693389] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.700669] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.707145] orangefs_init: module version upstream loaded
[    2.716162] async_tx: api initialized (async)
[    2.720519] Key type asymmetric registered
[    2.724594] Asymmetric key parser 'x509' registered
[    2.729476] bounce: pool size: 64 pages
[    2.733353] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    2.740762] io scheduler bfq registered
[    2.746075] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    2.754821] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    2.760738] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.766197] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    2.773129] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    2.780553] PCI: bus0: Fast back to back transfers disabled
[    2.786103] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.794088] pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.802067] pci 0000:00:04.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.810399] pci 0000:00:02.0: ASPM: current common clock configuration is broken, reconfiguring
[    2.848449] PCI: bus1: Fast back to back transfers disabled
[    2.854748] PCI: bus2: Fast back to back transfers enabled
[    2.860974] PCI: bus3: Fast back to back transfers enabled
[    2.866463] pci 0000:00:02.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    2.873314] pci 0000:00:02.0: BAR 13: assigned [io  0x10000-0x10fff]
[    2.879643] pci 0000:00:02.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    2.886831] pci 0000:00:03.0: BAR 6: assigned [mem 0xe0200000-0xe02007ff pref]
[    2.894023] pci 0000:00:04.0: BAR 6: assigned [mem 0xe0300000-0xe03007ff pref]
[    2.901218] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    2.908409] pci 0000:01:00.0: BAR 5: assigned [mem 0xe0010000-0xe00107ff]
[    2.915166] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1001f]
[    2.921409] pci 0000:01:00.0: BAR 0: assigned [io  0x10020-0x10027]
[    2.927646] pci 0000:01:00.0: BAR 2: assigned [io  0x10028-0x1002f]
[    2.933888] pci 0000:01:00.0: BAR 1: assigned [io  0x10030-0x10033]
[    2.940130] pci 0000:01:00.0: BAR 3: assigned [io  0x10034-0x10037]
[    2.946368] pci 0000:00:02.0: PCI bridge to [bus 01]
[    2.951313] pci 0000:00:02.0:   bridge window [io  0x10000-0x10fff]
[    2.957550] pci 0000:00:02.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    2.964310] pci 0000:00:03.0: PCI bridge to [bus 02]
[    2.969256] pci 0000:00:04.0: PCI bridge to [bus 03]
[    2.974240] pcieport 0000:00:02.0: enabling device (0140 -> 0143)
[    2.980805] mv_xor f1060800.xor: Marvell shared XOR driver
[    3.048098] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    3.056397] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.118098] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    3.160517] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.168062] printk: console [ttyS0] disabled
[    3.192382] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 22, base_baud = 12500000) is a 16550A
[    3.201333] printk: console [ttyS0] enabled
[    3.201333] printk: console [ttyS0] enabled
[    3.209740] printk: bootconsole [earlycon0] disabled
[    3.209740] printk: bootconsole [earlycon0] disabled
[    3.240414] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 23, base_baud = 12500000) is a 16550A
[    3.260444] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
[    3.268586] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    3.277909] scsi host0: ahci
[    3.281082] scsi host1: ahci
[    3.284224] scsi host2: ahci
[    3.287356] scsi host3: ahci
[    3.290449] ata1: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010100 irq 48
[    3.297892] ata2: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010180 irq 48
[    3.305322] ata3: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010200 irq 48
[    3.312756] ata4: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010280 irq 48
[    3.321472] m25p80 spi0.0: found n25q064, expected mx25l6405d
[    3.327361] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.332021] 4 cmdlinepart partitions found on MTD device spi0.0
[    3.337973] Creating 4 MTD partitions on "spi0.0":
[    3.342785] 0x000000000000-0x0000000e0000 : "u-boot"
[    3.348309] 0x0000000e0000-0x0000000f0000 : "dtb"
[    3.353502] 0x0000000f0000-0x0000007e0000 : "kernel"
[    3.358966] 0x0000007e0000-0x000000800000 : "env"
[    3.364840] libphy: Fixed MDIO Bus: probed
[    3.369507] libphy: orion_mdio_bus: probed
[    3.374360] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    3.382956] mvneta f1070000.ethernet eth0: Using random mac address ce:49:c6:2c:01:a7
[    3.391043] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.397612] ehci-pci: EHCI PCI platform driver
[    3.402116] ehci-orion: EHCI orion driver
[    3.406587] usbcore: registered new interface driver usblp
[    3.412129] usbcore: registered new interface driver usb-storage
[    3.418316] mousedev: PS/2 mouse device common for all mice
[    3.424519] armada38x-rtc f10a3800.rtc: registered as rtc0
[    3.430201] i2c /dev entries driver
[    3.460523] gpio-fan gpio-fan: GPIO fan initialized
[    3.466981] orion_wdt: Initial timeout 171 sec
[    3.483502] marvell-cesa f1090000.crypto: CESA device successfully registered
[    3.490816] hidraw: raw HID events driver (C) Jiri Kosina
[    3.496389] usbcore: registered new interface driver usbhid
[    3.501996] usbhid: USB HID core driver
[    3.506033] drop_monitor: Initializing network drop monitor service
[    3.512556] NET: Registered protocol family 10
[    3.517473] Segment Routing with IPv6
[    3.521236] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.527751] NET: Registered protocol family 17
[    3.532300] 8021q: 802.1Q VLAN Support v1.8
[    3.536525] Key type dns_resolver registered
[    3.540903] ThumbEE CPU extension supported.
[    3.545196] Registering SWP/SWPB emulation handler
[    3.550277] registered taskstats version 1
[    3.554390] Loading compiled-in X.509 certificates
[    3.559248] zswap: loaded using pool lzo/zbud
[    3.564475] Key type big_key registered
[    3.568622] Key type encrypted registered
[    3.574178] v5.0-sata0: supplied by pwr_en_sata0
[    3.578862] v12.0-sata0: supplied by pwr_en_sata0
[    3.583991] ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1
[    3.590153] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x1 impl platform mode
[    3.599249] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    3.608491] scsi host4: ahci-mvebu
[    3.612149] scsi host5: ahci-mvebu
[    3.615692] ata5: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 41
[    3.623676] ata6: DUMMY
[    3.626339] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    3.631718] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 1
[    3.639301] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010
[    3.648592] xhci-hcd f10f0000.usb3: irq 42, io mem 0xf10f0000
[    3.649016] ata1: SATA link down (SStatus 0 SControl 300)
[    3.654517] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.01
[    3.659847] ata2: SATA link down (SStatus 0 SControl 300)
[    3.668110] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.668113] usb usb1: Product: xHCI Host Controller
[    3.668116] usb usb1: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    3.668119] usb usb1: SerialNumber: f10f0000.usb3
[    3.673608] ata3: SATA link down (SStatus 0 SControl 300)
[    3.681118] hub 1-0:1.0: USB hub found
[    3.685776] ata4: SATA link down (SStatus 0 SControl 300)
[    3.691350] hub 1-0:1.0: 1 port detected
[    3.714723] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    3.720077] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    3.727604] xhci-hcd f10f0000.usb3: Host supports USB 3.0  SuperSpeed
[    3.734111] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.742302] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.01
[    3.750614] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.757874] usb usb2: Product: xHCI Host Controller
[    3.762772] usb usb2: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    3.768374] usb usb2: SerialNumber: f10f0000.usb3
[    3.773298] hub 2-0:1.0: USB hub found
[    3.777076] hub 2-0:1.0: 1 port detected
[    3.781331] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    3.786674] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 3
[    3.794253] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010
[    3.803543] xhci-hcd f10f8000.usb3: irq 43, io mem 0xf10f8000
[    3.809473] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.01
[    3.817788] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.825042] usb usb3: Product: xHCI Host Controller
[    3.829948] usb usb3: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    3.835545] usb usb3: SerialNumber: f10f8000.usb3
[    3.840480] hub 3-0:1.0: USB hub found
[    3.844260] hub 3-0:1.0: 1 port detected
[    3.848354] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    3.853696] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    3.861231] xhci-hcd f10f8000.usb3: Host supports USB 3.0  SuperSpeed
[    3.867729] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.875916] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.01
[    3.884226] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.891487] usb usb4: Product: xHCI Host Controller
[    3.896386] usb usb4: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    3.901988] usb usb4: SerialNumber: f10f8000.usb3
[    3.906905] hub 4-0:1.0: USB hub found
[    3.910695] hub 4-0:1.0: 1 port detected
[    3.915134] armada38x-rtc f10a3800.rtc: setting system clock to 2019-05-22T08:36:02 UTC (1558514162)
[    3.924512] v5.0-sata1: supplied by pwr_en_sata1
[    3.929194] v12.0-sata0: supplied by pwr_en_sata1
[    3.933986] v12.0-sata0: disabling
[    3.937402] v5.0-sata1: disabling
[    3.940748] v12.0-sata0: disabling
[    3.944457] Waiting 20 sec before mounting root device...
[    4.117813] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.124752] ata5.00: ATA-9: ST2000VN004-2E4164, SC60, max UDMA/133
[    4.130971] ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 32)
[    4.138346] ata5.00: configured for UDMA/133
[    4.152908] scsi 4:0:0:0: Direct-Access     ATA      ST2000VN004-2E41 SC60 PQ: 0 ANSI: 5
[    4.161494] sd 4:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    4.169417] sd 4:0:0:0: [sda] 4096-byte physical blocks
[    4.174755] sd 4:0:0:0: [sda] Write Protect is off
[    4.179621] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.267834]  sda: sda1
[    4.270823] sd 4:0:0:0: [sda] Attached SCSI removable disk
[   24.177792] md: Waiting for all devices to be available before autodetect
[   24.184610] md: If you don't use raid, use raid=noautodetect
[   24.190716] md: Autodetecting RAID arrays.
[   24.194830] md: autorun ...
[   24.197633] md: ... autorun DONE.
[   24.275829] random: fast init done
[   24.522894] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   24.530645] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   24.584459] devtmpfs: mounted
[   24.588721] Freeing unused kernel memory: 1024K
[   24.593553] Checked W+X mappings: passed, no W+X pages found
[   24.599247] Run /sbin/init as init process
INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
ERROR: could not open /proc/stat: No such file or directory
findfs: unable to resolve 'LABEL=rootfs'
[warn] Files under mount point '/run' will be hidden. ... (warning).
[ ok ] Starting hotplug events dispatcher: systemd-udevd.
[ ok ] Synthesizing the initial hotplug events (subsystems)...done.
[ ok ] Synthesizing the initial hotplug events (devices)...done.
[....] Waiting for /dev to be fully populated...[   26.713669] systemd-udevd[1709]: Using default interface naming scheme 'v240'.
[   26.727299] systemd-udevd[1709]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   26.741131] systemd-udevd[1709]: Could not generate persistent MAC address for eth0: No such file or directory
[   26.962997] sd 4:0:0:0: Attached scsi generic sg0 type 0
[   27.183429] systemd-udevd[1711]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   27.195049] systemd-udevd[1708]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   27.206613] systemd-udevd[1704]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   27.218689] systemd-udevd[1711]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   28.261140] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.33.1
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -y -C0 /dev/sda1
e2fsck 1.44.5 (15-Dec-2018)
rootfs: clean, 120388/122093568 files, 8485299/488347392 blocks
. ok
[   30.436677] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Starting Setting kernel variables: sysctl.
[....] Initializing random number generator...[   31.461449] random: dd: uninitialized urandom read (512 bytes read)
done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[   31.816434] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   31.825318] mvneta f1070000.ethernet eth0: configuring for phy/sgmii link mode
Listening on LPF/eth0/ce:49:c6:2c:01:a7
Sending on   LPF/eth0/ce:49:c6:2c:01:a7
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
[   37.058026] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   37.065906] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER of 192.168.1.243 from 192.168.1.2
DHCPREQUEST for 192.168.1.243 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.243 from 192.168.1.2
[   43.819678] random: crng init done
invoke-rc.d: could not determine current runlevel
bound to 192.168.1.243 -- renewal in 1453 seconds.
done.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting fan speed regulator: fancontrol.
[ ok ] Starting MD monitoring service: mdadm --monitor.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 10 debian ttyS0
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 02:45AM
@bodhi

For users to use this method to bring raid up on big gpt disks we do need to put uInitrd in there as well. No we have uImage working do you want to try ? Only thing I will be unable to test is whether it will then boot raid but it works at all in should do raid as well in theory.
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 03:14AM
Richard,

> WIN :)

>
> Debian GNU/Linux 10 debian ttyS0

Nice :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 03:35AM
Richard,

> For users to use this method to bring raid up on
> big gpt disks we do need to put uInitrd in there
> as well.

Yes. Having Initrd is always the best solution, IMO, whether you run Debian or Arch or Gentoo, or any Linux distro.... The flexibility it provides is never could be dupplicated in the kernel (not meant to be).

So let store uInitrd to disk and load it. Using J's example (good works Eine and J :).

Here the Initrd is written to the 20MB location on disk:
dd if=uInitrd of=/dev/sda bs=1MiB seek=20

In u-boot, changes in our envs would be:

setenv load_initrd 'echo loading uInitrd from raw HDD ...; scsi read $load_initrd_addr 0xA000 0x4F00'
setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; bootm $load_image_addr $load_initrd_addr'

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



Edited 1 time(s). Last edit at 05/22/2019 03:50AM by bodhi.
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 03:36AM
@bodhi
Shiraz all round I reckon :)

Let me know if there's anything else you want to try / test as my next task will be to put this box back into production, which will take a few days.

After that I will be converting my other rs816 over to native Debian, this box has 4 x 8TB drives so I will be need to play around with options to boot on raid with gpt. Whilst I'm doing that I'm happy to be asked to test anything that you can't think of right now, I will post here when I make a start on that.

If you need to get my attention just PM me as I tend not to subscribe to notifications although having said that this project has been great fun and very informative so I suspect I may well be "lurking" in the background :)
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 03:53AM
@bodhi
Lol I even did a page refresh before I posted and nothing, we must have hit post message within seconds of each other.

I will set up the test disk and report back soon
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 04:17AM
@bodhi

More winning = more shiraz

Marvell>> <INTERRUPT>
Marvell>> <INTERRUPT>
Marvell>> scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Found 1 device(s).
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_initrd_addr 0x3000000
Marvell>> setenv load_image 'echo loading uImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
Marvell>> setenv load_initrd 'echo loading uInitrd from raw HDD ...; scsi read $load_initrd_addr 0xA000 0x4F00'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=20  $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; bootm $load_image_addr $load_initrd_addr'
Marvell>> setenv bootcmd 'run bootcmd_exec; run bootspi'
Marvell>> boot
Booting Debian . . .
loading uImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
loading uInitrd from raw HDD ...

SCSI read: device 0 block # 40960, count 20224 ... 20224 blocks read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   8:28:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4859769 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-5.1.2-rj
   Created:      2019-05-22  10:00:25 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9878742 Bytes = 9.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.1.2-rj (root@debian) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PREEMPT Sun May 19 12:13:42 AWST 2019
[    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 RS116
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4dc with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu s41932 r8192 d23604 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:896k(u-boot),64k(dtb),7104k(kernel),-(env) earlyprintk=serial
[    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: 1015224K/1048576K available (9216K kernel code, 836K rwdata, 2496K rodata, 1024K init, 330K bss, 33352K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 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.000005] sched_clock: 64 bits at 933MHz, resolution 1ns, wraps every 4398046511103ns
[    0.007975] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x1ae5b571769, max_idle_ns: 881590513431 ns
[    0.019059] Switching to timer-based delay loop, resolution 1ns
[    0.025106] Ignoring duplicate/late registration of read_current_timer delay
[    0.032122] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043340] Console: colour dummy device 80x30
[    0.047779] Calibrating delay loop (skipped), value calculated using timer frequency.. 1866.00 BogoMIPS (lpj=9330000)
[    0.058342] pid_max: default: 32768 minimum: 301
[    0.063020] LSM: Security Framework initializing
[    0.067658] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074241] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.081538] *** VALIDATE proc ***
[    0.084912] *** VALIDATE cgroup1 ***
[    0.088475] *** VALIDATE cgroup2 ***
[    0.092056] CPU: Testing write buffer coherency: ok
[    0.096920] CPU0: Spectre v2: using BPIALL workaround
[    0.102047] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.165011] Setting up static identity map for 0x100000 - 0x100060
[    0.171225] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.176426] mvebu-pmsu: Initializing Power Management Service Unit
[    0.194992] rcu: Hierarchical SRCU implementation.
[    0.234992] smp: Bringing up secondary CPUs ...
[    0.295048] Booting CPU 1
[    0.297789] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.297791] CPU1: Spectre v2: using BPIALL workaround
[    0.308509] smp: Brought up 1 node, 2 CPUs
[    0.312584] SMP: Total of 2 processors activated (3732.00 BogoMIPS).
[    0.318922] CPU: All CPU(s) started in SVC mode.
[    0.324002] devtmpfs: initialized
[    0.329006] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.336873] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.346667] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352827] xor: measuring software checksum speed
[    0.454987]    arm4regs  :  2938.000 MB/sec
[    0.554988]    8regs     :  2220.400 MB/sec
[    0.654987]    32regs    :  2348.800 MB/sec
[    0.659147] xor: using function: arm4regs (2938.000 MB/sec)
[    0.664692] prandom: seed boundary self test passed
[    0.670662] prandom: 100 self tests passed
[    0.674735] pinctrl core: initialized pinctrl subsystem
[    0.680596] NET: Registered protocol family 16
[    0.685490] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.692649] audit: initializing netlink subsys (disabled)
[    0.698098] audit: type=2000 audit(0.670:1): state=initialized audit_enabled=0 res=1
[    0.715016] cpuidle: using governor ladder
[    0.719104] cpuidle: using governor menu
[    0.723116] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.731136] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.737045] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.745114] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.935120] raid6: int32x8  gen()   311 MB/s
[    1.105062] raid6: int32x8  xor()   243 MB/s
[    1.275042] raid6: int32x4  gen()   303 MB/s
[    1.444993] raid6: int32x4  xor()   253 MB/s
[    1.615002] raid6: int32x2  gen()   337 MB/s
[    1.785008] raid6: int32x2  xor()   336 MB/s
[    1.955103] raid6: int32x1  gen()   300 MB/s
[    2.124997] raid6: int32x1  xor()   304 MB/s
[    2.129244] raid6: using algorithm int32x2 gen() 337 MB/s
[    2.134614] raid6: .... xor() 336 MB/s, rmw enabled
[    2.139470] raid6: using intx1 recovery algorithm
[    2.145458] vgaarb: loaded
[    2.148378] SCSI subsystem initialized
[    2.152502] usbcore: registered new interface driver usbfs
[    2.158022] usbcore: registered new interface driver hub
[    2.163359] usbcore: registered new device driver usb
[    2.168787] media: Linux media interface: v0.10
[    2.173335] videodev: Linux video capture interface: v2.00
[    2.178960] pps_core: LinuxPPS API ver. 1 registered
[    2.183899] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.193031] PTP clock support registered
[    2.197720] clocksource: Switched to clocksource arm_global_timer
[    2.545503] VFS: Disk quotas dquot_6.6.0
[    2.549460] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.562179] NET: Registered protocol family 2
[    2.566828] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.574475] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.581525] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.587991] TCP: Hash tables configured (established 8192 bind 8192)
[    2.594364] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.600292] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.606742] NET: Registered protocol family 1
[    2.611337] RPC: Registered named UNIX socket transport module.
[    2.617227] RPC: Registered udp transport module.
[    2.621919] RPC: Registered tcp transport module.
[    2.626598] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.633099] Unpacking initramfs...
[    2.900903] Freeing initrd memory: 9648K
[    2.904889] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.911616] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.920994] Initialise system trusted keyrings
[    2.925433] Key type blacklist registered
[    2.929660] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.936133] zbud: loaded
[    2.939089] NFS: Registering the id_resolver key type
[    2.944122] Key type id_resolver registered
[    2.948299] Key type id_legacy registered
[    2.952293] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.958968] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.965392] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.972676] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.979169] orangefs_init: module version upstream loaded
[    3.124516] async_tx: api initialized (async)
[    3.128901] Key type asymmetric registered
[    3.132976] Asymmetric key parser 'x509' registered
[    3.137880] bounce: pool size: 64 pages
[    3.141768] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.149179] io scheduler bfq registered
[    3.154478] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    3.163250] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    3.169159] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.174619] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    3.181480] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.188881] PCI: bus0: Fast back to back transfers disabled
[    3.194432] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.202415] pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.210397] pci 0000:00:04.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.218730] pci 0000:00:02.0: ASPM: current common clock configuration is broken, reconfiguring
[    3.258405] PCI: bus1: Fast back to back transfers disabled
[    3.264710] PCI: bus2: Fast back to back transfers enabled
[    3.270939] PCI: bus3: Fast back to back transfers enabled
[    3.276428] pci 0000:00:02.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    3.283279] pci 0000:00:02.0: BAR 13: assigned [io  0x10000-0x10fff]
[    3.289608] pci 0000:00:02.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    3.296796] pci 0000:00:03.0: BAR 6: assigned [mem 0xe0200000-0xe02007ff pref]
[    3.303989] pci 0000:00:04.0: BAR 6: assigned [mem 0xe0300000-0xe03007ff pref]
[    3.311183] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    3.318375] pci 0000:01:00.0: BAR 5: assigned [mem 0xe0010000-0xe00107ff]
[    3.325132] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1001f]
[    3.331374] pci 0000:01:00.0: BAR 0: assigned [io  0x10020-0x10027]
[    3.337612] pci 0000:01:00.0: BAR 2: assigned [io  0x10028-0x1002f]
[    3.343853] pci 0000:01:00.0: BAR 1: assigned [io  0x10030-0x10033]
[    3.350095] pci 0000:01:00.0: BAR 3: assigned [io  0x10034-0x10037]
[    3.356333] pci 0000:00:02.0: PCI bridge to [bus 01]
[    3.361277] pci 0000:00:02.0:   bridge window [io  0x10000-0x10fff]
[    3.367514] pci 0000:00:02.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    3.374274] pci 0000:00:03.0: PCI bridge to [bus 02]
[    3.379220] pci 0000:00:04.0: PCI bridge to [bus 03]
[    3.384201] pcieport 0000:00:02.0: enabling device (0140 -> 0143)
[    3.390752] mv_xor f1060800.xor: Marvell shared XOR driver
[    3.448071] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    3.456366] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.518059] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    3.560620] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.568166] printk: console [ttyS0] disabled
[    3.592485] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 22, base_baud = 12500000) is a 16550A
[    3.601435] printk: console [ttyS0] enabled
[    3.601435] printk: console [ttyS0] enabled
[    3.609840] printk: bootconsole [earlycon0] disabled
[    3.609840] printk: bootconsole [earlycon0] disabled
[    3.640502] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 23, base_baud = 12500000) is a 16550A
[    3.660530] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
[    3.668672] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    3.678002] scsi host0: ahci
[    3.681196] scsi host1: ahci
[    3.684340] scsi host2: ahci
[    3.687479] scsi host3: ahci
[    3.690573] ata1: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010100 irq 48
[    3.698016] ata2: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010180 irq 48
[    3.705446] ata3: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010200 irq 48
[    3.712881] ata4: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010280 irq 48
[    3.721592] m25p80 spi0.0: found n25q064, expected mx25l6405d
[    3.727480] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.732142] 4 cmdlinepart partitions found on MTD device spi0.0
[    3.738094] Creating 4 MTD partitions on "spi0.0":
[    3.742907] 0x000000000000-0x0000000e0000 : "u-boot"
[    3.748422] 0x0000000e0000-0x0000000f0000 : "dtb"
[    3.753610] 0x0000000f0000-0x0000007e0000 : "kernel"
[    3.759063] 0x0000007e0000-0x000000800000 : "env"
[    3.764953] libphy: Fixed MDIO Bus: probed
[    3.769640] libphy: orion_mdio_bus: probed
[    3.779098] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    3.787669] mvneta f1070000.ethernet eth0: Using random mac address da:13:1c:6a:c4:db
[    3.795821] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.802446] ehci-pci: EHCI PCI platform driver
[    3.806942] ehci-orion: EHCI orion driver
[    3.811439] usbcore: registered new interface driver usblp
[    3.816969] usbcore: registered new interface driver usb-storage
[    3.823158] mousedev: PS/2 mouse device common for all mice
[    3.829365] armada38x-rtc f10a3800.rtc: registered as rtc0
[    3.835029] i2c /dev entries driver
[    3.869890] gpio-fan gpio-fan: GPIO fan initialized
[    3.876329] orion_wdt: Initial timeout 171 sec
[    3.942762] marvell-cesa f1090000.crypto: CESA device successfully registered
[    3.950126] hidraw: raw HID events driver (C) Jiri Kosina
[    3.955745] usbcore: registered new interface driver usbhid
[    3.961385] usbhid: USB HID core driver
[    3.965430] drop_monitor: Initializing network drop monitor service
[    3.971944] NET: Registered protocol family 10
[    3.976857] Segment Routing with IPv6
[    3.980601] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.987113] NET: Registered protocol family 17
[    3.991659] 8021q: 802.1Q VLAN Support v1.8
[    3.995881] Key type dns_resolver registered
[    4.000259] ThumbEE CPU extension supported.
[    4.004553] Registering SWP/SWPB emulation handler
[    4.009628] registered taskstats version 1
[    4.013741] Loading compiled-in X.509 certificates
[    4.018601] zswap: loaded using pool lzo/zbud
[    4.049056] ata1: SATA link down (SStatus 0 SControl 300)
[    4.054825] Key type big_key registered
[    4.059607] ata2: SATA link down (SStatus 0 SControl 300)
[    4.070154] ata3: SATA link down (SStatus 0 SControl 300)
[    4.080703] ata4: SATA link down (SStatus 0 SControl 300)
[    4.087974] Key type encrypted registered
[    4.093508] v5.0-sata0: supplied by pwr_en_sata0
[    4.098221] v12.0-sata0: supplied by pwr_en_sata0
[    4.103354] ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1
[    4.109525] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x1 impl platform mode
[    4.118628] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    4.127872] scsi host4: ahci-mvebu
[    4.131520] scsi host5: ahci-mvebu
[    4.135064] ata5: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 41
[    4.143041] ata6: DUMMY
[    4.145705] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    4.151062] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 1
[    4.158657] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010
[    4.167949] xhci-hcd f10f0000.usb3: irq 42, io mem 0xf10f0000
[    4.173876] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.01
[    4.182197] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.189457] usb usb1: Product: xHCI Host Controller
[    4.194355] usb usb1: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    4.199965] usb usb1: SerialNumber: f10f0000.usb3
[    4.204935] hub 1-0:1.0: USB hub found
[    4.208723] hub 1-0:1.0: 1 port detected
[    4.212805] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    4.218161] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    4.225688] xhci-hcd f10f0000.usb3: Host supports USB 3.0  SuperSpeed
[    4.232192] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.240382] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.01
[    4.248691] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.255944] usb usb2: Product: xHCI Host Controller
[    4.260847] usb usb2: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    4.266443] usb usb2: SerialNumber: f10f0000.usb3
[    4.271368] hub 2-0:1.0: USB hub found
[    4.275147] hub 2-0:1.0: 1 port detected
[    4.279393] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    4.284737] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 3
[    4.292314] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010
[    4.301602] xhci-hcd f10f8000.usb3: irq 43, io mem 0xf10f8000
[    4.307515] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.01
[    4.315827] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.323089] usb usb3: Product: xHCI Host Controller
[    4.327992] usb usb3: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    4.333588] usb usb3: SerialNumber: f10f8000.usb3
[    4.338520] hub 3-0:1.0: USB hub found
[    4.342300] hub 3-0:1.0: 1 port detected
[    4.346374] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    4.351735] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    4.359267] xhci-hcd f10f8000.usb3: Host supports USB 3.0  SuperSpeed
[    4.365766] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.373951] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.01
[    4.382260] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.389520] usb usb4: Product: xHCI Host Controller
[    4.394418] usb usb4: Manufacturer: Linux 5.1.2-rj xhci-hcd
[    4.400019] usb usb4: SerialNumber: f10f8000.usb3
[    4.404939] hub 4-0:1.0: USB hub found
[    4.408727] hub 4-0:1.0: 1 port detected
[    4.413162] armada38x-rtc f10a3800.rtc: setting system clock to 2019-05-22T10:14:53 UTC (1558520093)
[    4.422554] v5.0-sata1: supplied by pwr_en_sata1
[    4.427219] v12.0-sata0: supplied by pwr_en_sata1
[    4.431997] v12.0-sata0: disabling
[    4.435413] v5.0-sata1: disabling
[    4.438760] v12.0-sata0: disabling
[    4.637732] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.644670] ata5.00: ATA-9: ST2000VN004-2E4164, SC60, max UDMA/133
[    4.650889] ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 32)
[    4.658429] ata5.00: configured for UDMA/133
[    4.672989] scsi 4:0:0:0: Direct-Access     ATA      ST2000VN004-2E41 SC60 PQ: 0 ANSI: 5
[    4.681566] sd 4:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    4.689495] sd 4:0:0:0: [sda] 4096-byte physical blocks
[    4.694842] sd 4:0:0:0: [sda] Write Protect is off
[    4.699707] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.783807]  sda: sda1
[    4.786789] sd 4:0:0:0: [sda] Attached SCSI removable disk
[    4.793571] Freeing unused kernel memory: 1024K
[    4.828016] Checked W+X mappings: passed, no W+X pages found
[    4.833702] Run /init as init process
Loading, please wait...
Starting version 241
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.33.1
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1
rootfs: clean, 120388/122093568 files, 8485301/488347392 blocks
done.
[   25.623360] random: fast init done
[   25.901433] 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.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Starting hotplug events dispatcher: systemd-udevd.
[ ok ] Synthesizing the initial hotplug events (subsystems)...done.
[ ok ] Synthesizing the initial hotplug events (devices)...done.
[....] Waiting for /dev to be fully populated...[   27.991549] systemd-udevd[1772]: Using default interface naming scheme 'v240'.
[   27.999185] systemd-udevd[1772]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   28.011121] systemd-udevd[1772]: Could not generate persistent MAC address for eth0: No such file or directory
[   28.231153] sd 4:0:0:0: Attached scsi generic sg0 type 0
[   28.443849] systemd-udevd[1779]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   28.455863] systemd-udevd[1780]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   28.467930] systemd-udevd[1774]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   28.484086] systemd-udevd[1779]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   29.588926] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Starting Setting kernel variables: sysctl.
[....] Initializing random number generator...[   30.579693] random: dd: uninitialized urandom read (512 bytes read)
done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[   30.887712] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   30.896610] mvneta f1070000.ethernet eth0: configuring for phy/sgmii link mode
Listening on LPF/eth0/da:13:1c:6a:c4:db
Sending on   LPF/eth0/da:13:1c:6a:c4:db
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
[   35.057993] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   35.065893] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 192.168.1.243 from 192.168.1.2
DHCPREQUEST for 192.168.1.243 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.243 from 192.168.1.2
[   40.236840] random: mktemp: uninitialized urandom read (6 bytes read)
invoke-rc.d: could not determine current runlevel
bound to 192.168.1.243 -- renewal in 1575 seconds.
done.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[   40.710760] random: crng init done
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting fan speed regulator: fancontrol.
[ ok ] Starting MD monitoring service: mdadm --monitor.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 10 debian ttyS0


Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 04:51AM
Richard,

> More winning = more shiraz

Awesome! that's 2 glasses of red in less than an hour, time for me to go to bed :))

We are basically done now.

But one more thing to close the loop. In addition to what envs we have so far to boot kernel images uImage and uInitrd from HDD, now we can set the root device to its label.

setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=20 $mtdparts earlyprintk=serial"'

Please try that. And in your post, you can include the HHD write commands for the uInitrd and its output.

dd if=uInitrd of=/dev/sda bs=1MiB seek=20

and then the boot log for this run with root device LABEL rootfs.


I'll check back tomorrow.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 05:27AM
@bodhi
Results below all good!

So I will make a start pushing this one back to production, I agree with your initrd comments but I will leave it as is flash > zImage load raid1 but the next one with 8TB drives I suspect I will go with our just tested raw sector procedure.

I'm not a very good proof reader as I tend to see what I think is there not what is actually there but if you want an extra pair of eyes to check over anything before it hits the wiki I'm happy to do that.

Oh, and just as you thought it was safe..... don't forget I have an Intel based DS1517+ complete with grub (grub totally crippled I expect) which I was thinking of tackling at some point........interested ? :)

Copy uInitrd to raw sector HDD
root@debian:~# cd /boot
root@debian:/boot# dd if=uInitrd of=/dev/sda bs=1MiB seek=20
9+1 records in
9+1 records out
9878806 bytes (9.9 MB, 9.4 MiB) copied, 0.0933899 s, 106 MB/s

Boot with root=LABEL=rootfs
Marvell>> <INTERRUPT>
Marvell>> scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Found 1 device(s).
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_initrd_addr 0x3000000
Marvell>> setenv load_image 'echo loading uImage from raw HDD ...; scsi device 0; scsi read $load_image_addr 0x5000 0x2F00'
Marvell>> setenv load_initrd 'echo loading uInitrd from raw HDD ...; scsi read $load_initrd_addr 0xA000 0x4F00'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=20  $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting Debian . . .; run set_bootargs; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; run load_image; run load_initrd; bootm $load_image_addr $load_initrd_addr'
Marvell>> setenv bootcmd 'run bootcmd_exec; run bootspi'
Marvell>> boot
Booting Debian . . .
loading uImage from raw HDD ...

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: ST2000VN004-2E41 Rev: SC60
            Type: Hard Disk
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
... is now current device

SCSI read: device 0 block # 20480, count 12032 ... 12032 blocks read: OK
loading uInitrd from raw HDD ...

SCSI read: device 0 block # 40960, count 20224 ... 20224 blocks read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.1.2-rj
   Created:      2019-05-22   8:28:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4859769 Bytes = 4.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-5.1.2-rj
   Created:      2019-05-22  10:00:25 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9878742 Bytes = 9.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Result
root@debian:~#
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 01:19PM
Thanks Richard,

Looks good!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 02:51PM
congrats! This one was a real bugger, very surprising that Synology hamstrings their boxes uboot!
Re: Debian on Synology RS816 (Armada 385)
May 22, 2019 05:53PM
When I have chance, I will rebuild stock uboot to make it boot properly!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 12:03AM
Richard,

> I'm not a very good proof reader as I tend to see
> what I think is there not what is actually there
> but if you want an extra pair of eyes to check
> over anything before it hits the wiki I'm happy to
> do that.

OK.

>
> Oh, and just as you thought it was safe..... don't
> forget I have an Intel based DS1517+ complete with
> grub (grub totally crippled I expect) which I was
> thinking of tackling at some
> point........interested ? :)

Sorry, I'm only interested in ARM boxes :) Besides, I'm not going to hack another box for a while (day job is taking precedent). I only have time to help troubleshoot problems with booting.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 03:34AM
@bodhi
Quote

Sorry, I'm only interested in ARM boxes :)

I may have the same view too after the Ds1517+ leaves me with a bloody nose :) but ever the mug I will give it a try one day.

First rs816 is back in the rack and running well. I will take the other down shortly and convert it over to native Debian but I may pause to see if I can get stock u-boot to build then, if so, update it / add in the missing bits. I have built myself 2019.04 version of uboot-tools which includes kwboot (not sure why Arch leave that out of their package) I tested it out with the instructions you had given as part of SPI flash process and it worked fine so hopefully this will offer me a recovery route if things go wrong.
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 03:50AM
Richard,

> I have built myself
> 2019.04 version of uboot-tools which includes
> kwboot (not sure why Arch leave that out of their
> package) I tested it out with the instructions you
> had given as part of SPI flash process and it
> worked fine so hopefully this will offer me a
> recovery route if things go wrong.

Please post that kwboot session if you were successful! It is an important part of the hacking process. It gives user the confidence that their box won't be bricked by a typo or misstep.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 04:11AM
@bodhi
The box is back in the rack and in production, the issue is I have no serial access to it short of taking it back out of the rack and placing it next to my PC. As soon as I take the other one out of production I can do that plus any other re-runs you may require to complete the documentation of this conversion. I agree it would be good to give users that extra confidence so I will take my other rs816 down before I mess around with u-boot in order to do the kwboot run as soon as possible.
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 02:39PM
@bodhi
Regret to report some poor testing on my part which has only come to light now whilst trying to bring my second rs816 off-line for conversion. In order to take the second box out I needed to configure the second nic of the box which had already been converted but the second nic is not being "seen" in Debian.
I'm afraid my testing had been as simple as swapping the wire from one port to the other and noting the appropriate front panel led light up.

root@debian:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1024
    link/ether 3a:35:02:b3:c3:52 brd ff:ff:ff:ff:ff:ff

u-boot see's it
U-Boot 2013.01-g74a026b-dirty (Dec 30 2015 - 14:40:58) Marvell version: 2015_T1.0p16

Board: SYNO-RS816
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1866 [MHz]
       L2     @ 933 [MHz]
       TClock @ 200 [MHz]
       DDR3    @ 933 [MHz]
       DDR3 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
MMC:   mv_sdh: 0
SF: Detected N25Q64 with page size 64 KiB, total 8 MiB
PCI-e 1 (IF 0 - bus 0) Root Complex Interface, Detected Link X1, GEN 2.0
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:                    0x3ff3b000:0x3ffc91bc
       BSS:                     0x3ffef688
       Stack:                   0x3fa2af20
       Heap:                    0x3fa2b000:0x3ff3b000
       U-Boot Environment:      0x007e0000:0x007f0000 (SPI)

Board configuration detected:

Synology Model: RS816

Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   SGMII   |     0x01     |
| egiga2 |   SGMII   |     0x00     |
egiga0 [PRIME], egiga2
Press Ctrl+C to abort autoboot in 3 second
Marvell>> <INTERRUPT>

In our DTS we have
mdio@72004 {
				pinctrl-names = "default";
				pinctrl-0 = <&mdio_pins>;

				phy0: ethernet-phy@1 {
					reg = <1>;
				};
			};

I have already tried using the stock memory pokes just in case that was what they were for but no change so I will try changing the DTS to add it in, it may be as simple as adding it to the mdio@72004 section quoted above, and if that doesn't work go back to powering gpio's up one at a time and see if that does it.

I know you need to concentrate on your day job so please view this post as a heads up and not a request for help, I will post back when I have fixed it but I will need to wait till tomorrow before I can look at it.
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 03:38PM
It's probably about as simple as changing it to this:

mdio@72004 {
				phy0: ethernet-phy@0 {
					reg = <0>;
				};

				phy1: ethernet-phy@1 {
					reg = <1>;
				};
			};

For most device's it either "0" or "1" though it was "8" for some SoCs if I remember correctly. The stock device tree and/or trial and error can probably get you the answer.
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 05:18PM
Richard,

Replace the mdio node with


mdio@72004 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&mdio_pins>;

                                phy0: ethernet-phy@0 {
                                        reg = <0>;
                                };

                                phy1: ethernet-phy@1 {
                                        reg = <1>;
                                };
                        };

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Synology RS816 (Armada 385)
May 23, 2019 05:40PM
Thanks both for helping
I don't have time to try much this morning but do have time for a couple of test;

The dts also contains the following section do I need to expand that as well ?

ethernet@70000 {
				pinctrl-names = "default";
				phy = <&phy0>;
				phy-mode = "sgmii";
				buffer-manager = <&bm>;
				bm,pool-long = <0>;
				status = "okay";
			};

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: