Welcome! Log In Create A New Profile

Advanced

Restore uboot for Synology DS414

Posted by bignellrp 
Re: Restore uboot for Synology DS414
April 12, 2020 05:05PM
bignellrp,

> GOT IT!!! I 100% owe you a beer. I will
> certainly be donating to the charity from your
> link. (https://www.doctorswithoutborders.org/)
>

Awesome!

The reason it did not like the label was because you did not load uInitrd. The root device /dev/sda1 points the kernel to the first disk. In this case it works because it is the only disk in the system. When you load initrd, it will find the disk partition with label rootfs. And then it does not matter how many partitions/disks you have plugged in, the kernel will always able to find the rootfs.

Quote

=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial'
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 227 ms (21.3 MiB/s)
=> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-5.2.9-mvebu-tld-1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5074784 Bytes = 4.8 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image

Starting kernel ...


Quote

> 192.168.0.37
> Synology DS414
> Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM)
> (gcc version 7.4.0 (Ubuntu/Linaro
> 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19
> 12:47:39 PDT 2019
> Debian 10.0
> Sun Apr 12 05:48:40 PDT 2020 up 4 minutes


OK so it is all set! Now before flashing u-boot inside Debian, we need to define the mtd devices (mtdparts) in bootargs. The ones we have now came from the DTS, so it is likely write-protected. And the definition is misleading, it is actually u-boot (not RedBoot).

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "RedBoot"
mtd1: 002d0000 00001000 "zImage"
mtd2: 00430000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "RedBoot config"
mtd5: 00010000 00001000 "FIS directory"

This box predefine mtds are slightly different from the RS816. But basically the boot loader is in mtd0. So we can flash it without worrying (based on the RS816 example).

Let me write the flashing commands in the next post.

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



Edited 1 time(s). Last edit at 04/12/2020 05:07PM by bodhi.
Re: Restore uboot for Synology DS414
April 12, 2020 05:12PM
bignellrp ,

What is the size of uboot_DS414r1.bin in bytes?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 12, 2020 05:47PM
Restore stock u-boot.

Prerequisite:

Make sure the uboot_DS414r1.bin size is less than or equal to 832K. If it is larger, then it will not work.

Flashing Steps:

Repeat the kwboot booting. Interrupt serial console and

setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=spi0.0:832K(u-boot),-(data) earlyprintk=serial'

And then load and boot

ext2load usb 0:1 2000000 boot/uImage

Let it boot all the way into Debian. Login, and verify the mtds. We want to see 2 partition. And the 1st looks like:

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "u-boot"

If the mtd0 looks like above, go ahead and flash

flash_unlock /dev/mtd0
flashcp -v uboot_DS414r1.bin   /dev/mtd0

Note that if flash_unlock give you error, you can ignore it. If there is error after flashcp here then stop and post the entire serial console log until this point.


Now if kwboot is still running, it is OK. It runs as a normal serial comm terminal too. Or you can start picocom/minicom to run a regular serial console.

Reboot and let it boot automatically, watch the serial console to observe progress. See if stock u-boot can run. Interrupt serial console. And see if the envs are normal.

Done.

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



Edited 2 time(s). Last edit at 04/13/2020 05:44PM by bodhi.
Re: Restore uboot for Synology DS414
April 13, 2020 01:52AM
First attempt to boot back into debian with the new bootargs failed. Something about the label again:

I'll try again


 92 % [......................................................................]
 93 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.....................................................]
[Type Ctrl-\ + c to quit]


U-Boot 2019.10-tld-1 (Apr 09 2020 - 16:26:57 -0700)

SoC:   MV78230-B0 at 1333 MHz
I2C:   ready
DRAM:  1 GiB (667 MHz, 32-bit, ECC not enabled)
Loading Environment from SPI Flash... SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@12000
Out:   serial@12000
Err:   serial@12000
Model: Synology DS414
Board: DS414
Net:   
Warning: ethernet@70000 (eth0) using random MAC address - 6a:8f:6a:eb:21:ea
eth0: ethernet@70000
Warning: ethernet@74000 (eth1) using random MAC address - b2:69:e6:99:9b:b6
, eth1: ethernet@74000
starting USB...
Bus usb@50000: USB EHCI 1.00
scanning bus usb@50000 for devices... 
USB retry period from the environment: 0 second(s)
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  0 
device 0 offset 0xd0000, size 0x700000
SF: 7340032 bytes @ 0xd0000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> setenv mtdparts 'mtdparts=spi0.0:832K(u-boot),-(data)'
=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial'
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 226 ms (21.4 MiB/s)
=> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5074784 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
[    0.000000][    T0] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: div instructions available: patching division code
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS414
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 21 pages/cpu s55244 r8192 d22580 u86016
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Memory: 1023808K/1048576K available (10240K kernel code, 833K rwdata, 2724K rodata, 1024K init, 343K bss, 24768K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x30c/0x830 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1a096b00 -> 0x1a096b02
[    0.000000][    T0] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a096b02
[    0.000000][    T0] Switching to timer-based delay loop, resolution 40ns
[    0.000005][    T0] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.008557][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.020795][    T0] Console: colour dummy device 80x30
[    0.025969][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.037074][    T0] pid_max: default: 32768 minimum: 301
[    0.042535][    T0] LSM: Security Framework initializing
[    0.047922][    T0] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.055268][    T0] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.063487][    T0] *** VALIDATE proc ***
[    0.067653][    T0] *** VALIDATE cgroup1 ***
[    0.071951][    T0] *** VALIDATE cgroup2 ***
[    0.076277][    T0] CPU: Testing write buffer coherency: ok
[    0.082079][    T1] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.140234][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.147383][    T1] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x2
[    0.153366][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.180197][    T1] rcu: Hierarchical SRCU implementation.
[    0.220196][    T1] smp: Bringing up secondary CPUs ...
[    0.280299][    T1] Booting CPU 1
[    0.284042][    T0] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.294137][    T1] smp: Brought up 1 node, 2 CPUs
[    0.305348][    T1] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.312342][    T1] CPU: All CPU(s) started in SVC mode.
[    0.318363][    T1] devtmpfs: initialized
[    0.325715][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.334571][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.345150][    T1] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352121][    T1] xor: measuring software checksum speed
[    0.450185][    T1]    arm4regs  :  1290.800 MB/sec
[    0.550185][    T1]    8regs     :   810.000 MB/sec
[    0.650184][    T1]    32regs    :  1146.400 MB/sec
[    0.655076][    T1] xor: using function: arm4regs (1290.800 MB/sec)
[    0.661372][    T1] prandom: seed boundary self test passed
[    0.669267][    T1] prandom: 100 self tests passed
[    0.674082][    T1] pinctrl core: initialized pinctrl subsystem
[    0.681358][    T1] NET: Registered protocol family 16
[    0.686859][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.695016][    T1] audit: initializing netlink subsys (disabled)
[    0.701307][   T33] audit: type=2000 audit(0.680:1): state=initialized audit_enabled=0 res=1
[    0.710234][    T1] cpuidle: using governor ladder
[    0.715066][    T1] cpuidle: using governor menu
[    0.719898][   T12] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.729665][   T12] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.736357][   T13] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.960393][    T1] raid6: int32x8  gen()   227 MB/s
[    1.130327][    T1] raid6: int32x8  xor()   134 MB/s
[    1.300426][    T1] raid6: int32x4  gen()   206 MB/s
[    1.470241][    T1] raid6: int32x4  xor()   163 MB/s
[    1.640402][    T1] raid6: int32x2  gen()   197 MB/s
[    1.810207][    T1] raid6: int32x2  xor()   210 MB/s
[    1.980255][    T1] raid6: int32x1  gen()   135 MB/s
[    2.150302][    T1] raid6: int32x1  xor()   182 MB/s
[    2.155296][    T1] raid6: using algorithm int32x8 gen() 227 MB/s
[    2.161404][    T1] raid6: .... xor() 134 MB/s, rmw enabled
[    2.166999][    T1] raid6: using intx1 recovery algorithm
[    2.173629][    T1] vgaarb: loaded
[    2.177677][    T1] SCSI subsystem initialized
[    2.183025][    T1] usbcore: registered new interface driver usbfs
[    2.189351][    T1] usbcore: registered new interface driver hub
[    2.195526][    T1] usbcore: registered new device driver usb
[    2.201923][    T1] media: Linux media interface: v0.10
[    2.207279][    T1] videodev: Linux video capture interface: v2.00
[    2.213851][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.219548][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.229496][    T1] PTP clock support registered
[    2.235911][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    2.788420][    T1] VFS: Disk quotas dquot_6.6.0
[    2.793106][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.813995][    T1] NET: Registered protocol family 2
[    2.819624][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.828043][    T1] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.835862][    T1] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.843091][    T1] TCP: Hash tables configured (established 8192 bind 8192)
[    2.850248][    T1] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.856920][    T1] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.864204][    T1] NET: Registered protocol family 1
[    2.869743][    T1] RPC: Registered named UNIX socket transport module.
[    2.876402][    T1] RPC: Registered udp transport module.
[    2.881815][    T1] RPC: Registered tcp transport module.
[    2.887241][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.894399][    T1] PCI: CLS 0 bytes, default 64
[    2.899389][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.906867][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.918138][    T1] Initialise system trusted keyrings
[    2.923317][    T1] Key type blacklist registered
[    2.928216][    T1] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.935477][    T1] zbud: loaded
[    2.939408][    T1] NFS: Registering the id_resolver key type
[    2.945187][    T1] Key type id_resolver registered
[    2.950104][    T1] Key type id_legacy registered
[    2.954830][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.962265][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.969583][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.977787][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.985067][    T1] orangefs_init: module version upstream loaded
[    2.992912][    T1] async_tx: api initialized (async)
[    2.998009][    T1] Key type asymmetric registered
[    3.002814][    T1] Asymmetric key parser 'x509' registered
[    3.008454][    T1] bounce: pool size: 64 pages
[    3.013100][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    3.023930][    T1] armada-xp-pinctrl f1018000.pin-ctrl: registered pinctrl driver
[    3.034576][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.042028][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.048244][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.055836][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.062922][    T1] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    3.069678][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.077553][    T1] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    3.084291][    T1] pci 0000:00:05.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.092891][    T1] PCI: bus0: Fast back to back transfers disabled
[    3.099218][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.107967][    T1] pci 0000:00:05.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.116896][    T1] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    3.123645][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x14000000-0x140fffff 64bit]
[    3.131180][    T1] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x00ff]
[    3.137791][    T1] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    3.149633][    T1] PCI: bus1: Fast back to back transfers disabled
[    3.155946][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.163488][    T1] pci 0000:02:00.0: [1b6f:7023] type 00 class 0x0c0330
[    3.170263][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.177819][    T1] pci 0000:02:00.0: enabling Extended Tags
[    3.183563][    T1] pci 0000:02:00.0: supports D1 D2
[    3.188557][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot
[    3.195545][    T1] pci 0000:00:05.0: ASPM: current common clock configuration is broken, reconfiguring
[    3.227038][    T1] PCI: bus2: Fast back to back transfers disabled
[    3.233333][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    3.240734][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    3.248345][    T1] pci 0000:00:05.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    3.255950][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    3.263021][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    3.270974][    T1] pci 0000:00:05.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    3.278931][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff 64bit]
[    3.286979][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10000-0x100ff]
[    3.293964][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    3.299653][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    3.306650][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    3.314162][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf8107fff 64bit]
[    3.322209][    T1] pci 0000:00:05.0: PCI bridge to [bus 02]
[    3.327899][    T1] pci 0000:00:05.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    3.335478][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    3.342403][    T1] pcieport 0000:00:05.0: enabling device (0140 -> 0142)
[    3.349293][    T1] pci 0000:02:00.0: enabling device (0140 -> 0142)
[    3.356466][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.416569][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.426483][    T1] mv_xor f10f0900.xor: Marvell shared XOR driver
[    3.486581][    T1] mv_xor f10f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.576434][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.585699][    T1] printk: console [ttyS0] disabled
[    3.610825][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 19, base_baud = 15625000) is a 16550A
[    3.620596][    T1] printk: console [ttyS0] enabled
[    3.620596][    T1] printk: console [ttyS0] enabled
[    3.630397][    T1] printk: bootconsole [earlycon0] disabled
[    3.630397][    T1] printk: bootconsole [earlycon0] disabled
[    3.662807][    T1] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 20, base_baud = 15625000) is a 16550A
[    3.674334][    T1] sata_mv 0000:01:00.0: enabling device (0140 -> 0143)
[    3.681193][    T1] sata_mv 0000:01:00.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[    3.692145][    T1] scsi host0: sata_mv
[    3.696593][    T1] scsi host1: sata_mv
[    3.700978][    T1] scsi host2: sata_mv
[    3.705355][    T1] scsi host3: sata_mv
[    3.709572][    T1] ata1: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8022000 irq 41
[    3.717977][    T1] ata2: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8024000 irq 41
[    3.726369][    T1] ata3: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8026000 irq 41
[    3.734745][    T1] ata4: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8028000 irq 41
[    3.744907][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.750311][    T1] 6 fixed-partitions partitions found on MTD device spi0.0
[    3.757395][    T1] Creating 6 MTD partitions on "spi0.0":
[    3.762906][    T1] 0x000000000000-0x0000000d0000 : "RedBoot"
[    3.769718][    T1] 0x0000000d0000-0x0000003a0000 : "zImage"
[    3.776473][    T1] 0x0000003a0000-0x0000007d0000 : "rd.gz"
[    3.783065][    T1] 0x0000007d0000-0x0000007e0000 : "vendor"
[    3.789771][    T1] 0x0000007e0000-0x0000007f0000 : "RedBoot config"
[    3.797166][    T1] 0x0000007f0000-0x000000800000 : "FIS directory"
[    3.805409][    T1] libphy: Fixed MDIO Bus: probed
[    3.810984][    T1] libphy: orion_mdio_bus: probed
[    3.818849][    T1] mvneta f1070000.ethernet eth0: Using hardware mac address 6a:8f:6a:eb:21:ea
[    3.829062][    T1] mvneta f1074000.ethernet eth1: Using hardware mac address b2:69:e6:99:9b:b6
[    3.838141][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.845404][    T1] ehci-pci: EHCI PCI platform driver
[    3.850656][    T1] ehci-orion: EHCI orion driver
[    3.855509][    T1] orion-ehci f1050000.usb: EHCI Host Controller
[    3.861663][    T1] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    3.870061][    T1] orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
[    3.915933][    T1] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    3.922788][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.931803][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.939758][    T1] usb usb1: Product: EHCI Host Controller
[    3.945349][    T1] usb usb1: Manufacturer: Linux 5.2.9-mvebu-tld-1 ehci_hcd
[    3.952431][    T1] usb usb1: SerialNumber: f1050000.usb
[    3.958217][    T1] hub 1-0:1.0: USB hub found
[    3.962714][    T1] hub 1-0:1.0: 1 port detected
[    3.967988][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    3.973940][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    3.982181][    T1] xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490
[    3.992522][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    4.001565][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.009524][    T1] usb usb2: Product: xHCI Host Controller
[    4.015114][    T1] usb usb2: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    4.022196][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    4.027941][    T1] hub 2-0:1.0: USB hub found
[    4.032436][    T1] hub 2-0:1.0: 2 ports detected
[    4.037583][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    4.043532][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    4.051683][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    4.058750][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.067398][ T1221] ata1: SATA link down (SStatus 0 SControl 300)
[    4.067714][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    4.082792][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.090756][    T1] usb usb3: Product: xHCI Host Controller
[    4.096362][    T1] usb usb3: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    4.103431][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    4.109297][    T1] hub 3-0:1.0: USB hub found
[    4.113792][    T1] hub 3-0:1.0: 2 ports detected
[    4.119733][    T1] usbcore: registered new interface driver usblp
[    4.126113][    T1] usbcore: registered new interface driver usb-storage
[    4.133289][    T1] mousedev: PS/2 mouse device common for all mice
[    4.140606][    T1] i2c /dev entries driver
[    4.148675][    T1] rtc-s35390a 0-0030: registered as rtc0
[    4.257049][    T1] watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
[    4.266151][    T1] watchdog: f1020300.watchdog: falling back to default timeout (171)
[    4.274448][    T1] orion_wdt: Initial timeout 171 sec
[    4.290214][    T1] device-mapper: uevent: version 1.0.3
[    4.295790][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    4.325302][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    4.332570][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    4.339934][   T23] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    4.341575][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    4.354761][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    4.361610][    T1] device-mapper: raid: Loading target version 1.14.0
[    4.373100][    T1] marvell-cesa f1090000.crypto: CESA device successfully registered
[    4.381308][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    4.387976][    T1] usbcore: registered new interface driver usbhid
[    4.394264][    T1] usbhid: USB HID core driver
[    4.399303][    T1] drop_monitor: Initializing network drop monitor service
[    4.406678][    T1] NET: Registered protocol family 10
[    4.408390][ T1225] ata2: SATA link down (SStatus 0 SControl 300)
[    4.418584][    T1] Segment Routing with IPv6
[    4.423013][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.430779][    T1] NET: Registered protocol family 17
[    4.436139][    T1] 8021q: 802.1Q VLAN Support v1.8
[    4.441072][    T1] Key type dns_resolver registered
[    4.446271][    T1] ThumbEE CPU extension supported.
[    4.451258][    T1] Registering SWP/SWPB emulation handler
[    4.457272][    T1] registered taskstats version 1
[    4.462080][    T1] Loading compiled-in X.509 certificates
[    4.467682][    T1] zswap: loaded using pool lzo/zbud
[    4.474712][    T1] Key type big_key registered
[    4.479973][    T1] Key type encrypted registered
[    4.558221][   T23] usb 1-1: New USB device found, idVendor=18a5, idProduct=0240, bcdDevice= 1.00
[    4.567151][   T23] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.575008][   T23] usb 1-1: Product: STORE N GO
[    4.579667][   T23] usb 1-1: Manufacturer: Verbatim
[    4.584568][   T23] usb 1-1: SerialNumber: 07B21107CD4F328B
[    4.590846][   T23] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.598076][   T23] scsi host4: usb-storage 1-1:1.0
[    4.747838][ T1229] ata3: SATA link down (SStatus 0 SControl 300)
[    5.088659][ T1233] ata4: SATA link down (SStatus 0 SControl 300)
[    5.637701][ T1237] scsi 4:0:0:0: Direct-Access     Verbatim STORE N GO       PMAP PQ: 0 ANSI: 0 CCS
[    5.650396][    T7] sd 4:0:0:0: [sda] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
[    5.659264][    T7] sd 4:0:0:0: [sda] Write Protect is off
[    5.665258][    T7] sd 4:0:0:0: [sda] No Caching mode page found
[    5.671373][    T7] sd 4:0:0:0: [sda] Assuming drive cache: write through
[    5.688314][    T7]  sda: sda1
[    5.695015][    T7] sd 4:0:0:0: [sda] Attached SCSI removable disk
[   25.477669][    T1] rtc-s35390a 0-0030: setting system clock to 2020-04-13T06:46:55 UTC (1586760415)
[   25.487602][    T1] Waiting 10 sec before mounting root device...
[   35.716132][    T1] md: Waiting for all devices to be available before autodetect
[   35.723648][    T1] md: If you don't use raid, use raid=noautodetect
[   35.730926][    T1] md: Autodetecting RAID arrays.
[   35.735752][    T1] md: autorun ...
[   35.739318][    T1] md: ... autorun DONE.
[   35.770912][    T1] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   35.778896][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   35.792534][    C0] random: fast init done
[   35.813825][    T1] devtmpfs: mounted
[   35.819501][    T1] Freeing unused kernel memory: 1024K
[   35.837634][    T1] Checked W+X mappings: passed, no W+X pages found
[   35.844027][    T1] 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...[   39.267844][ T1739] systemd-udevd[1739]: Using default interface naming scheme 'v240'.
[   39.284463][ T1733] systemd-udevd[1733]: Using default interface naming scheme 'v240'.
[   39.363491][ T1733] systemd-udevd[1733]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   39.364472][ T1739] systemd-udevd[1739]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   39.430291][ T1729] systemd-udevd[1729]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   39.430732][ T1736] systemd-udevd[1736]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   39.449490][ T1729] systemd-udevd[1729]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
[   39.460709][ T1732] systemd-udevd[1732]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   39.618708][ T1730] usbcore: registered new interface driver uas
Re: Restore uboot for Synology DS414
April 13, 2020 01:59AM
Attempt 2 with initrd loaded

 93 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.....................................................]
[Type Ctrl-\ + c to quit]


U-Boot 2019.10-tld-1 (Apr 09 2020 - 16:26:57 -0700)

SoC:   MV78230-B0 at 1333 MHz
I2C:   ready
DRAM:  1 GiB (667 MHz, 32-bit, ECC not enabled)
Loading Environment from SPI Flash... SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@12000
Out:   serial@12000
Err:   serial@12000
Model: Synology DS414
Board: DS414
Net:   
Warning: ethernet@70000 (eth0) using random MAC address - 6a:8f:6a:eb:21:ea
eth0: ethernet@70000
Warning: ethernet@74000 (eth1) using random MAC address - 92:68:23:d6:4a:66
, eth1: ethernet@74000
starting USB...
Bus usb@50000: USB EHCI 1.00
scanning bus usb@50000 for devices... 
USB retry period from the environment: 0 second(s)
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  0 
device 0 offset 0xd0000, size 0x700000
SF: 7340032 bytes @ 0xd0000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> ext2ls usb 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 lost+found
<DIR>       4096 etc
<DIR>       4096 mnt
<DIR>       4096 sbin
<DIR>       4096 root
<DIR>       4096 dev
<DIR>       4096 usr
<DIR>       4096 srv
<DIR>       4096 boot
<DIR>       4096 media
<DIR>       4096 proc
<DIR>       4096 var
<DIR>       4096 run
<DIR>       4096 bin
<DIR>       4096 opt
<DIR>       4096 tmp
<DIR>       4096 lib
<DIR>       4096 home
<DIR>       4096 sys
=> ext2ls usb 0:1 boot/
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 dts
         3266081 System.map-5.2.9-mvebu-tld-1
         5057632 vmlinuz-5.2.9-mvebu-tld-1
         9488554 initrd.img-5.2.9-mvebu-tld-1
         9676808 linux-headers-5.2.9-mvebu-tld-1_1.0_armhf.deb
         5057632 zImage-5.2.9-mvebu-tld-1
         5057632 zImage
         9488618 uInitrd
          183639 config-5.2.9-mvebu-tld-1
         5074784 zImage.fdt
         5074848 uImage
=> setenv mtdparts 'mtdparts=spi0.0:832K(u-boot),-(data)'
=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial'
=> ext2load usb 0:1 8000000 boot/uInitrd
9488618 bytes read in 367 ms (24.7 MiB/s)
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 227 ms (21.3 MiB/s)
=> bootm 0x2000000 0x8000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5074784 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 08000000 ...
   Image Name:   initramfs-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9488554 Bytes = 9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image
   Loading Ramdisk to 3f23d000, end 3fb498aa ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
[    0.000000][    T0] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: div instructions available: patching division code
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS414
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 21 pages/cpu s55244 r8192 d22580 u86016
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Memory: 1014540K/1048576K available (10240K kernel code, 833K rwdata, 2724K rodata, 1024K init, 343K bss, 34036K reserved, 0K cma-reserved, 252876K highmem)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x30c/0x830 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1a096b00 -> 0x1a096b02
[    0.000000][    T0] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a096b02
[    0.000000][    T0] Switching to timer-based delay loop, resolution 40ns
[    0.000005][    T0] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.008556][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.020795][    T0] Console: colour dummy device 80x30
[    0.025969][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.037074][    T0] pid_max: default: 32768 minimum: 301
[    0.042534][    T0] LSM: Security Framework initializing
[    0.047920][    T0] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.055267][    T0] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.063495][    T0] *** VALIDATE proc ***
[    0.067661][    T0] *** VALIDATE cgroup1 ***
[    0.071959][    T0] *** VALIDATE cgroup2 ***
[    0.076287][    T0] CPU: Testing write buffer coherency: ok
[    0.082088][    T1] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.140233][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.147382][    T1] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x2
[    0.153364][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.180195][    T1] rcu: Hierarchical SRCU implementation.
[    0.220195][    T1] smp: Bringing up secondary CPUs ...
[    0.280297][    T1] Booting CPU 1
[    0.284039][    T0] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.294135][    T1] smp: Brought up 1 node, 2 CPUs
[    0.305345][    T1] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.312339][    T1] CPU: All CPU(s) started in SVC mode.
[    0.318377][    T1] devtmpfs: initialized
[    0.325734][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.334604][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.345186][    T1] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352156][    T1] xor: measuring software checksum speed
[    0.450183][    T1]    arm4regs  :  1290.800 MB/sec
[    0.550184][    T1]    8regs     :   810.000 MB/sec
[    0.650183][    T1]    32regs    :  1146.400 MB/sec
[    0.655075][    T1] xor: using function: arm4regs (1290.800 MB/sec)
[    0.661371][    T1] prandom: seed boundary self test passed
[    0.669265][    T1] prandom: 100 self tests passed
[    0.674080][    T1] pinctrl core: initialized pinctrl subsystem
[    0.681359][    T1] NET: Registered protocol family 16
[    0.686858][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.695018][    T1] audit: initializing netlink subsys (disabled)
[    0.701309][   T33] audit: type=2000 audit(0.680:1): state=initialized audit_enabled=0 res=1
[    0.710233][    T1] cpuidle: using governor ladder
[    0.715065][    T1] cpuidle: using governor menu
[    0.719900][   T12] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.729667][   T12] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.736359][   T13] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.950371][    T1] raid6: int32x8  gen()   227 MB/s
[    1.120306][    T1] raid6: int32x8  xor()   134 MB/s
[    1.290251][    T1] raid6: int32x4  gen()   206 MB/s
[    1.460264][    T1] raid6: int32x4  xor()   163 MB/s
[    1.630370][    T1] raid6: int32x2  gen()   197 MB/s
[    1.800219][    T1] raid6: int32x2  xor()   210 MB/s
[    1.970263][    T1] raid6: int32x1  gen()   135 MB/s
[    2.140278][    T1] raid6: int32x1  xor()   182 MB/s
[    2.145257][    T1] raid6: using algorithm int32x8 gen() 227 MB/s
[    2.151378][    T1] raid6: .... xor() 134 MB/s, rmw enabled
[    2.156965][    T1] raid6: using intx1 recovery algorithm
[    2.163208][    T1] vgaarb: loaded
[    2.167001][    T1] SCSI subsystem initialized
[    2.171867][    T1] usbcore: registered new interface driver usbfs
[    2.178106][    T1] usbcore: registered new interface driver hub
[    2.184303][    T1] usbcore: registered new device driver usb
[    2.190310][    T1] media: Linux media interface: v0.10
[    2.195584][    T1] videodev: Linux video capture interface: v2.00
[    2.201899][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.207575][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.217463][    T1] PTP clock support registered
[    2.223426][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    2.775941][    T1] VFS: Disk quotas dquot_6.6.0
[    2.780627][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.798091][    T1] NET: Registered protocol family 2
[    2.803833][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.812220][    T1] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.820208][    T1] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.827565][    T1] TCP: Hash tables configured (established 8192 bind 8192)
[    2.834797][    T1] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.841445][    T1] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.848747][    T1] NET: Registered protocol family 1
[    2.854347][    T1] RPC: Registered named UNIX socket transport module.
[    2.860981][    T1] RPC: Registered udp transport module.
[    2.866422][    T1] RPC: Registered tcp transport module.
[    2.871835][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.879006][    T1] PCI: CLS 0 bytes, default 64
[    2.883813][    T1] Trying to unpack rootfs image as initramfs...
[    2.889930][    T1] Unable to handle kernel paging request at virtual address ff23d000
[    2.897867][    T1] pgd = (ptrval)
[    2.901277][    T1] [ff23d000] *pgd=00000000
[    2.905562][    T1] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    2.911584][    T1] Modules linked in:
[    2.915347][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.9-mvebu-tld-1 #1
[    2.922935][    T1] Hardware name: Marvell Armada 370/XP (Device Tree)
[    2.929487][    T1] PC is at unpack_to_rootfs+0x128/0x2f4
[    2.934903][    T1] LR is at kmem_cache_alloc_trace+0x54/0x1a0
[    2.940750][    T1] pc : [<c0e02bfc>]    lr : [<c02861a4>]    psr: 20000113
[    2.947729][    T1] sp : ef0b1e90  ip : 0000001c  fp : c0e6283c
[    2.953663][    T1] r10: c0fd0650  r9 : c0fb27d0  r8 : 00000000
[    2.959597][    T1] r7 : 00000000  r6 : ff23d000  r5 : 0090c8aa  r4 : c0e63cc8
[    2.966837][    T1] r3 : 00000000  r2 : 00000000  r1 : ef7d09ec  r0 : 00000000
[    2.974078][    T1] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    2.981928][    T1] Control: 10c5387d  Table: 0000406a  DAC: 00000051
[    2.988385][    T1] Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
[    2.995103][    T1] Stack: (0xef0b1e90 to 0xef0b2000)
[    3.000169][    T1] 1e80:                                     c0e6283c c0f04d48 c0fae520 c0fd0648
[    3.009067][    T1] 1ea0: 00000000 00000000 c0e79800 efffcd80 c0e6283c c0f04d48 c0c6ba3d 444f66dc
[    3.017965][    T1] 1ec0: 00000000 c0fd064c c0fae520 c0fd0648 c0e0322c 00000000 c0e79800 efffcd80
[    3.026863][    T1] 1ee0: c0e6283c c0e0327c ffffe000 c0fae520 c0f04d48 c01037d8 c0cbb64d c014498c
[    3.035761][    T1] 1f00: 00000000 ef0b1f00 00000000 c0e00670 c0da7310 0000013c 00000005 00000005
[    3.044659][    T1] 1f20: 00000000 c0da8bc0 0000013b c0da8bc0 c0e62818 efffcdbb efffcdc7 444f66dc
[    3.053557][    T1] 1f40: c0e6283c 444f66dc 00000006 c0fae520 00000006 c0fd0600 c0e62830 c0fd0600
[    3.062454][    T1] 1f60: c0e79800 c0e01284 00000005 00000005 00000000 c0e00670 c0a3af74 0000013c
[    3.071351][    T1] 1f80: 00000000 00000000 c0a3af74 00000000 00000000 00000000 00000000 00000000
[    3.080249][    T1] 1fa0: 00000000 c0a3af7c 00000000 c01010e8 00000000 00000000 00000000 00000000
[    3.089146][    T1] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.098043][    T1] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    3.106949][    T1] [<c0e02bfc>] (unpack_to_rootfs) from [<c0e0327c>] (populate_rootfs+0x50/0xbc)
[    3.115850][    T1] [<c0e0327c>] (populate_rootfs) from [<c01037d8>] (do_one_initcall+0xe4/0x26c)
[    3.124750][    T1] [<c01037d8>] (do_one_initcall) from [<c0e01284>] (kernel_init_freeable+0x364/0x3bc)
[    3.134174][    T1] [<c0e01284>] (kernel_init_freeable) from [<c0a3af7c>] (kernel_init+0x8/0x10c)
[    3.143073][    T1] [<c0a3af7c>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    3.151358][    T1] Exception stack(0xef0b1fb0 to 0xef0b1ff8)
[    3.157120][    T1] 1fa0:                                     00000000 00000000 00000000 00000000
[    3.166017][    T1] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.174913][    T1] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.182244][    T1] Code: 0a000064 ebcc9032 e1c421d0 e1cd21f0 (e5d63000) 
[    3.189055][    T1] ---[ end trace b4f8607050bccde7 ]---
[    3.194466][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    3.202847][    C1] CPU1: stopping
[    3.206263][    C1] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D           5.2.9-mvebu-tld-1 #1
[    3.215245][    C1] Hardware name: Marvell Armada 370/XP (Device Tree)
[    3.221802][    C1] [<c0117684>] (unwind_backtrace) from [<c0112034>] (show_stack+0x10/0x14)
[    3.230267][    C1] [<c0112034>] (show_stack) from [<c0a258a8>] (dump_stack+0x70/0x8c)
[    3.238211][    C1] [<c0a258a8>] (dump_stack) from [<c0115338>] (handle_IPI+0x2b8/0x3d4)
[    3.246330][    C1] [<c0115338>] (handle_IPI) from [<c05a2024>] (armada_370_xp_handle_irq+0x8c/0xa0)
[    3.255490][    C1] [<c05a2024>] (armada_370_xp_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8)
[    3.264558][    C1] Exception stack(0xef0cff68 to 0xef0cffb0)
[    3.270322][    C1] ff60:                   00000000 0000089c ef7e34a0 c0120634 00000000 00000000
[    3.279220][    C1] ff80: c0f04d48 00000002 ffffe000 c0f04dac c0d04d83 00000000 00000000 ef0cffb8
[    3.288116][    C1] ffa0: c010e8a4 c0154030 60000113 ffffffff
[    3.293883][    C1] [<c01021cc>] (__irq_svc) from [<c0154030>] (do_idle+0x13c/0x270)
[    3.301650][    C1] [<c0154030>] (do_idle) from [<c01543f8>] (cpu_startup_entry+0x18/0x1c)
[    3.309938][    C1] [<c01543f8>] (cpu_startup_entry) from [<00102d6c>] (0x102d6c)
[    3.317446][    T1] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
Re: Restore uboot for Synology DS414
April 13, 2020 02:17AM
bignellrp,

Let's go back to booting with root=/dev/sda1. Meaning don't load uInitrd.

This u-boot does not like the variable mtdparts.

Try again with my modified post above.

https://forum.doozan.com/read.php?3,99414,99774#msg-99774

I've changed this env, and removed the mtdparts env.
setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=spi0.0:832K(u-boot),-(data) earlyprintk=serial'

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 13, 2020 05:47AM
I cant get it to boot with those mtdparts vars....


 87 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.....................................................]
[Type Ctrl-\ + c to quit]


U-Boot 2019.10-tld-1 (Apr 09 2020 - 16:26:57 -0700)

SoC:   MV78230-B0 at 1333 MHz
I2C:   ready
DRAM:  1 GiB (667 MHz, 32-bit, ECC not enabled)
Loading Environment from SPI Flash... SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@12000
Out:   serial@12000
Err:   serial@12000
Model: Synology DS414
Board: DS414
Net:   
Warning: ethernet@70000 (eth0) using random MAC address - 62:68:99:f9:43:29
eth0: ethernet@70000
Warning: ethernet@74000 (eth1) using random MAC address - 92:1d:70:ca:61:12
, eth1: ethernet@74000
starting USB...
Bus usb@50000: USB EHCI 1.00
scanning bus usb@50000 for devices... 
USB retry period from the environment: 0 second(s)
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  0 
device 0 offset 0xd0000, size 0x700000
SF: 7340032 bytes @ 0xd0000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=3 mtdparts=spi0.0:832K(u-boot),-(data) earlyprintk=serial'
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 230 ms (21 MiB/s)
=> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5074784 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
[    0.000000][    T0] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: div instructions available: patching division code
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS414
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 21 pages/cpu s55244 r8192 d22580 u86016
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=3 mtdparts=spi0.0:832K(u-boot),-(data) earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Memory: 1023808K/1048576K available (10240K kernel code, 833K rwdata, 2724K rodata, 1024K init, 343K bss, 24768K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x30c/0x830 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1a096b00 -> 0x1a096b02
[    0.000000][    T0] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a096b02
[    0.000000][    T0] Switching to timer-based delay loop, resolution 40ns
[    0.000005][    T0] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.008556][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.020794][    T0] Console: colour dummy device 80x30
[    0.025969][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.037074][    T0] pid_max: default: 32768 minimum: 301
[    0.042534][    T0] LSM: Security Framework initializing
[    0.047921][    T0] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.055268][    T0] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.063495][    T0] *** VALIDATE proc ***
[    0.067662][    T0] *** VALIDATE cgroup1 ***
[    0.071960][    T0] *** VALIDATE cgroup2 ***
[    0.076287][    T0] CPU: Testing write buffer coherency: ok
[    0.082087][    T1] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.140231][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.147382][    T1] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x2
[    0.153364][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.180195][    T1] rcu: Hierarchical SRCU implementation.
[    0.220195][    T1] smp: Bringing up secondary CPUs ...
[    0.280296][    T1] Booting CPU 1
[    0.284037][    T0] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.294133][    T1] smp: Brought up 1 node, 2 CPUs
[    0.305344][    T1] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.312337][    T1] CPU: All CPU(s) started in SVC mode.
[    0.318358][    T1] devtmpfs: initialized
[    0.325705][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.334558][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.345137][    T1] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352109][    T1] xor: measuring software checksum speed
[    0.450183][    T1]    arm4regs  :  1290.800 MB/sec
[    0.550184][    T1]    8regs     :   810.000 MB/sec
[    0.650183][    T1]    32regs    :  1146.400 MB/sec
[    0.655075][    T1] xor: using function: arm4regs (1290.800 MB/sec)
[    0.661372][    T1] prandom: seed boundary self test passed
[    0.669266][    T1] prandom: 100 self tests passed
[    0.674081][    T1] pinctrl core: initialized pinctrl subsystem
[    0.681363][    T1] NET: Registered protocol family 16
[    0.686862][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.695021][    T1] audit: initializing netlink subsys (disabled)
[    0.701311][   T33] audit: type=2000 audit(0.680:1): state=initialized audit_enabled=0 res=1
[    0.710232][    T1] cpuidle: using governor ladder
[    0.715065][    T1] cpuidle: using governor menu
[    0.719898][   T12] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.729665][   T12] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.736358][   T13] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.960456][    T1] raid6: int32x8  gen()   227 MB/s
[    1.130359][    T1] raid6: int32x8  xor()   134 MB/s
[    1.300423][    T1] raid6: int32x4  gen()   206 MB/s
[    1.470240][    T1] raid6: int32x4  xor()   163 MB/s
[    1.640437][    T1] raid6: int32x2  gen()   197 MB/s
[    1.810193][    T1] raid6: int32x2  xor()   210 MB/s
[    1.980252][    T1] raid6: int32x1  gen()   135 MB/s
[    2.150229][    T1] raid6: int32x1  xor()   182 MB/s
[    2.155221][    T1] raid6: using algorithm int32x8 gen() 227 MB/s
[    2.161330][    T1] raid6: .... xor() 134 MB/s, rmw enabled
[    2.166924][    T1] raid6: using intx1 recovery algorithm
[    2.173553][    T1] vgaarb: loaded
[    2.177601][    T1] SCSI subsystem initialized
[    2.182951][    T1] usbcore: registered new interface driver usbfs
[    2.189277][    T1] usbcore: registered new interface driver hub
[    2.195450][    T1] usbcore: registered new device driver usb
[    2.201850][    T1] media: Linux media interface: v0.10
[    2.207204][    T1] videodev: Linux video capture interface: v2.00
[    2.213775][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.219472][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.229419][    T1] PTP clock support registered
[    2.235825][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    2.788352][    T1] VFS: Disk quotas dquot_6.6.0
[    2.793038][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.813922][    T1] NET: Registered protocol family 2
[    2.819552][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.827972][    T1] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.835791][    T1] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.843020][    T1] TCP: Hash tables configured (established 8192 bind 8192)
[    2.850177][    T1] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.856849][    T1] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.864129][    T1] NET: Registered protocol family 1
[    2.869696][    T1] RPC: Registered named UNIX socket transport module.
[    2.876359][    T1] RPC: Registered udp transport module.
[    2.881773][    T1] RPC: Registered tcp transport module.
[    2.887200][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.894358][    T1] PCI: CLS 0 bytes, default 64
[    2.899351][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.906833][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.918103][    T1] Initialise system trusted keyrings
[    2.923284][    T1] Key type blacklist registered
[    2.928191][    T1] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.935451][    T1] zbud: loaded
[    2.939373][    T1] NFS: Registering the id_resolver key type
[    2.945148][    T1] Key type id_resolver registered
[    2.950066][    T1] Key type id_legacy registered
[    2.954791][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.962226][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.969549][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.977755][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.985041][    T1] orangefs_init: module version upstream loaded
[    2.992861][    T1] async_tx: api initialized (async)
[    2.997958][    T1] Key type asymmetric registered
[    3.002763][    T1] Asymmetric key parser 'x509' registered
[    3.008403][    T1] bounce: pool size: 64 pages
[    3.013046][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    3.023873][    T1] armada-xp-pinctrl f1018000.pin-ctrl: registered pinctrl driver
[    3.034537][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.041990][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.048205][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.055796][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.062883][    T1] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    3.069641][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.077519][    T1] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    3.084257][    T1] pci 0000:00:05.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.092859][    T1] PCI: bus0: Fast back to back transfers disabled
[    3.099185][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.107935][    T1] pci 0000:00:05.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.116865][    T1] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    3.123614][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x14000000-0x140fffff 64bit]
[    3.131150][    T1] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x00ff]
[    3.137767][    T1] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    3.149600][    T1] PCI: bus1: Fast back to back transfers disabled
[    3.155912][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.163450][    T1] pci 0000:02:00.0: [1b6f:7023] type 00 class 0x0c0330
[    3.170224][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.177780][    T1] pci 0000:02:00.0: enabling Extended Tags
[    3.183525][    T1] pci 0000:02:00.0: supports D1 D2
[    3.188519][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot
[    3.195508][    T1] pci 0000:00:05.0: ASPM: current common clock configuration is broken, reconfiguring
[    3.226949][    T1] PCI: bus2: Fast back to back transfers disabled
[    3.233243][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    3.240645][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    3.248256][    T1] pci 0000:00:05.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    3.255862][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    3.262933][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    3.270886][    T1] pci 0000:00:05.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    3.278842][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff 64bit]
[    3.286890][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10000-0x100ff]
[    3.293876][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    3.299565][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    3.306561][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    3.314074][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf8107fff 64bit]
[    3.322121][    T1] pci 0000:00:05.0: PCI bridge to [bus 02]
[    3.327811][    T1] pci 0000:00:05.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    3.335396][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    3.342321][    T1] pcieport 0000:00:05.0: enabling device (0140 -> 0142)
[    3.349211][    T1] pci 0000:02:00.0: enabling device (0140 -> 0142)
[    3.356375][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.416523][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.426454][    T1] mv_xor f10f0900.xor: Marvell shared XOR driver
[    3.486533][    T1] mv_xor f10f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.576522][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.585780][    T1] printk: console [ttyS0] disabled
[    3.610906][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 19, base_baud = 15625000) is a 16550A
[    3.620683][    T1] printk: console [ttyS0] enabled
[    3.620683][    T1] printk: console [ttyS0] enabled
[    3.630484][    T1] printk: bootconsole [earlycon0] disabled
[    3.630484][    T1] printk: bootconsole [earlycon0] disabled
[    3.662901][    T1] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 20, base_baud = 15625000) is a 16550A
[    3.674430][    T1] sata_mv 0000:01:00.0: enabling device (0140 -> 0143)
[    3.681289][    T1] sata_mv 0000:01:00.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[    3.692301][    T1] scsi host0: sata_mv
[    3.696748][    T1] scsi host1: sata_mv
[    3.701125][    T1] scsi host2: sata_mv
[    3.705508][    T1] scsi host3: sata_mv
[    3.709724][    T1] ata1: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8022000 irq 41
[    3.718128][    T1] ata2: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8024000 irq 41
[    3.726521][    T1] ata3: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8026000 irq 41
[    3.734897][    T1] ata4: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8028000 irq 41
[    3.745158][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.750528][    T1] 2 cmdlinepart partitions found on MTD device spi0.0
[    3.757184][    T1] Creating 2 MTD partitions on "spi0.0":
[    3.762693][    T1] 0x000000000000-0x0000000d0000 : "u-boot"
[    3.769463][    T1] 0x0000000d0000-0x000000800000 : "data"
[    3.776946][    T1] libphy: Fixed MDIO Bus: probed
[    3.782356][    T1] libphy: orion_mdio_bus: probed
[    3.790163][    T1] mvneta f1070000.ethernet eth0: Using hardware mac address 62:68:99:f9:43:29
[    3.800392][    T1] mvneta f1074000.ethernet eth1: Using hardware mac address 92:1d:70:ca:61:12
[    3.809458][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.816741][    T1] ehci-pci: EHCI PCI platform driver
[    3.821949][    T1] ehci-orion: EHCI orion driver
[    3.826826][    T1] orion-ehci f1050000.usb: EHCI Host Controller
[    3.832957][    T1] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    3.841351][    T1] orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
[    3.875846][    T1] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    3.882693][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.891710][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.899683][    T1] usb usb1: Product: EHCI Host Controller
[    3.905275][    T1] usb usb1: Manufacturer: Linux 5.2.9-mvebu-tld-1 ehci_hcd
[    3.912358][    T1] usb usb1: SerialNumber: f1050000.usb
[    3.918157][    T1] hub 1-0:1.0: USB hub found
[    3.922650][    T1] hub 1-0:1.0: 1 port detected
[    3.927922][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    3.933874][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    3.942115][    T1] xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490
[    3.952457][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.961471][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.969429][    T1] usb usb2: Product: xHCI Host Controller
[    3.975020][    T1] usb usb2: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    3.982103][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    3.987852][    T1] hub 2-0:1.0: USB hub found
[    3.992353][    T1] hub 2-0:1.0: 2 ports detected
[    3.997521][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    4.003470][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    4.011620][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    4.018686][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.027641][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    4.036733][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.044676][    T1] usb usb3: Product: xHCI Host Controller
[    4.050288][    T1] usb usb3: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    4.057373][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    4.063093][    T1] hub 3-0:1.0: USB hub found
[    4.067301][ T1221] ata1: SATA link down (SStatus 0 SControl 300)
[    4.067617][    T1] hub 3-0:1.0: 2 ports detected
[    4.079600][    T1] usbcore: registered new interface driver usblp
[    4.085979][    T1] usbcore: registered new interface driver usb-storage
[    4.093161][    T1] mousedev: PS/2 mouse device common for all mice
[    4.100478][    T1] i2c /dev entries driver
[    4.108441][    T1] rtc-s35390a 0-0030: registered as rtc0
[    4.216816][    T1] watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
[    4.225806][    T1] watchdog: f1020300.watchdog: falling back to default timeout (171)
[    4.234118][    T1] orion_wdt: Initial timeout 171 sec
[    4.249973][    T1] device-mapper: uevent: version 1.0.3
[    4.255534][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    4.285039][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    4.292308][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    4.299654][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    4.307016][   T23] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    4.311117][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    4.321314][    T1] device-mapper: raid: Loading target version 1.14.0
[    4.332789][    T1] marvell-cesa f1090000.crypto: CESA device successfully registered
[    4.341019][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    4.347734][    T1] usbcore: registered new interface driver usbhid
[    4.354049][    T1] usbhid: USB HID core driver
[    4.359120][    T1] drop_monitor: Initializing network drop monitor service
[    4.366529][    T1] NET: Registered protocol family 10
[    4.372596][    T1] Segment Routing with IPv6
[    4.377106][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.385151][    T1] NET: Registered protocol family 17
[    4.390523][    T1] 8021q: 802.1Q VLAN Support v1.8
[    4.395478][    T1] Key type dns_resolver registered
[    4.400685][    T1] ThumbEE CPU extension supported.
[    4.405696][    T1] Registering SWP/SWPB emulation handler
[    4.411262][ T1225] ata2: SATA link down (SStatus 0 SControl 300)
[    4.416453][    T1] registered taskstats version 1
[    4.422259][    T1] Loading compiled-in X.509 certificates
[    4.427879][    T1] zswap: loaded using pool lzo/zbud
[    4.434802][    T1] Key type big_key registered
[    4.440064][    T1] Key type encrypted registered
[    4.518134][   T23] usb 1-1: New USB device found, idVendor=18a5, idProduct=0240, bcdDevice= 1.00
[    4.527065][   T23] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.534923][   T23] usb 1-1: Product: STORE N GO
[    4.539579][   T23] usb 1-1: Manufacturer: Verbatim
[    4.544479][   T23] usb 1-1: SerialNumber: 07B21107CD4F328B
[    4.550770][   T23] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.568032][   T23] scsi host4: usb-storage 1-1:1.0
[    4.757708][ T1229] ata3: SATA link down (SStatus 0 SControl 300)
[    5.088578][ T1233] ata4: SATA link down (SStatus 0 SControl 300)
[    5.637417][ T1237] scsi 4:0:0:0: Direct-Access     Verbatim STORE N GO       PMAP PQ: 0 ANSI: 0 CCS
[    5.649637][    T7] sd 4:0:0:0: [sda] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
[    5.658678][    T7] sd 4:0:0:0: [sda] Write Protect is off
[    5.664674][    T7] sd 4:0:0:0: [sda] No Caching mode page found
[    5.670781][    T7] sd 4:0:0:0: [sda] Assuming drive cache: write through
[    5.682105][    T7]  sda: sda1
[    5.688802][    T7] sd 4:0:0:0: [sda] Attached SCSI removable disk
[   25.477573][    T1] rtc-s35390a 0-0030: setting system clock to 2020-04-13T15:12:17 UTC (1586790737)
[   25.487505][    T1] Waiting 3 sec before mounting root device...
[   28.516120][    T1] md: Waiting for all devices to be available before autodetect
[   28.523636][    T1] md: If you don't use raid, use raid=noautodetect
[   28.530925][    T1] md: Autodetecting RAID arrays.
[   28.535751][    T1] md: autorun ...
[   28.539318][    T1] md: ... autorun DONE.
[   28.572058][    T1] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   28.580021][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   28.593950][    C0] random: fast init done
[   28.614863][    T1] devtmpfs: mounted
[   28.620529][    T1] Freeing unused kernel memory: 1024K
[   28.637547][    T1] Checked W+X mappings: passed, no W+X pages found
[   28.643933][    T1] 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
[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...[   31.883403][ T1708] systemd-udevd[1708]: Using default interface naming scheme 'v240'.
[   31.897504][ T1709] systemd-udevd[1709]: Using default interface naming scheme 'v240'.
[   32.026966][ T1708] systemd-udevd[1708]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.047053][ T1724] systemd-udevd[1724]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.060529][ T1709] systemd-udevd[1709]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.078707][ T1724] systemd-udevd[1724]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
[   32.099761][ T1714] systemd-udevd[1714]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.165980][ T1711] usbcore: registered new interface driver uas
[   32.193630][ T1712] systemd-udevd[1712]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.321631][ T1713] sd 4:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   43.220062][ T1920] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[   43.854617][ T1920] 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.
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..

--HANGS--


Do you know how i can load the stock uboot bin from your uboot build without booting into debian?



Edited 2 time(s). Last edit at 04/13/2020 10:39AM by bignellrp.
Re: Restore uboot for Synology DS414
April 13, 2020 10:23AM
I tried setting the fstab to /dev/sda1 and disabling the disk check but it still hangs here:

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
[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...[   31.883403][ T1708] systemd-udevd[1708]: Using default interface naming scheme 'v240'.
[   31.897504][ T1709] systemd-udevd[1709]: Using default interface naming scheme 'v240'.
[   32.026966][ T1708] systemd-udevd[1708]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.047053][ T1724] systemd-udevd[1724]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.060529][ T1709] systemd-udevd[1709]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.078707][ T1724] systemd-udevd[1724]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
[   32.099761][ T1714] systemd-udevd[1714]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.165980][ T1711] usbcore: registered new interface driver uas
[   32.193630][ T1712] systemd-udevd[1712]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   32.321631][ T1713] sd 4:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   43.220062][ T1920] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[   43.854617][ T1920] 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.
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..

--HANGS--



Edited 1 time(s). Last edit at 04/13/2020 10:37AM by bignellrp.
Re: Restore uboot for Synology DS414
April 13, 2020 10:52AM
Ok. I made some progress. I noticed the uboot bin was only 809k so i changed the mtdparts to 810k and i can boot.

But i get permission denied on the flash unlock

root@debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000ca800 00001000 "u-boot"
mtd1: 00735800 00001000 "data"
root@debian:~# flash_unlock /dev/mtd0
flash_unlock: error!: could not open: /dev/mtd0
error 13 (Permission denied)

Full serial log below:

 93 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.....................................................]
[Type Ctrl-\ + c to quit]


U-Boot 2019.10-tld-1 (Apr 09 2020 - 16:26:57 -0700)

SoC:   MV78230-B0 at 1333 MHz
I2C:   ready
DRAM:  1 GiB (667 MHz, 32-bit, ECC not enabled)
Loading Environment from SPI Flash... SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@12000
Out:   serial@12000
Err:   serial@12000
Model: Synology DS414
Board: DS414
Net:   
Warning: ethernet@70000 (eth0) using random MAC address - 6e:94:77:6e:c7:f6
eth0: ethernet@70000
Warning: ethernet@74000 (eth1) using random MAC address - ea:94:b3:85:20:27
, eth1: ethernet@74000
starting USB...
Bus usb@50000: USB EHCI 1.00
scanning bus usb@50000 for devices... 
USB retry period from the environment: 0 second(s)
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  0 
=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:810K(u-boot),-(data) earlyprintk=serial'
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 231 ms (21 MiB/s)
=> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5074784 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
[    0.000000][    T0] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: div instructions available: patching division code
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS414
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 21 pages/cpu s55244 r8192 d22580 u86016
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:810K(u-boot),-(data) earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Memory: 1023808K/1048576K available (10240K kernel code, 833K rwdata, 2724K rodata, 1024K init, 343K bss, 24768K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x30c/0x830 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1a096b00 -> 0x1a096b02
[    0.000000][    T0] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a096b02
[    0.000000][    T0] Switching to timer-based delay loop, resolution 40ns
[    0.000005][    T0] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.008557][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.020795][    T0] Console: colour dummy device 80x30
[    0.025970][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.037075][    T0] pid_max: default: 32768 minimum: 301
[    0.042536][    T0] LSM: Security Framework initializing
[    0.047922][    T0] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.055269][    T0] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.063496][    T0] *** VALIDATE proc ***
[    0.067661][    T0] *** VALIDATE cgroup1 ***
[    0.071960][    T0] *** VALIDATE cgroup2 ***
[    0.076286][    T0] CPU: Testing write buffer coherency: ok
[    0.082088][    T1] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.140232][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.147381][    T1] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x2
[    0.153363][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.180196][    T1] rcu: Hierarchical SRCU implementation.
[    0.220196][    T1] smp: Bringing up secondary CPUs ...
[    0.280298][    T1] Booting CPU 1
[    0.284040][    T0] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.294135][    T1] smp: Brought up 1 node, 2 CPUs
[    0.305347][    T1] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.312340][    T1] CPU: All CPU(s) started in SVC mode.
[    0.318363][    T1] devtmpfs: initialized
[    0.325719][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.334593][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.345175][    T1] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352147][    T1] xor: measuring software checksum speed
[    0.450184][    T1]    arm4regs  :  1290.800 MB/sec
[    0.550185][    T1]    8regs     :   810.000 MB/sec
[    0.650184][    T1]    32regs    :  1146.400 MB/sec
[    0.655076][    T1] xor: using function: arm4regs (1290.800 MB/sec)
[    0.661373][    T1] prandom: seed boundary self test passed
[    0.669267][    T1] prandom: 100 self tests passed
[    0.674082][    T1] pinctrl core: initialized pinctrl subsystem
[    0.681366][    T1] NET: Registered protocol family 16
[    0.686863][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.695022][    T1] audit: initializing netlink subsys (disabled)
[    0.701314][   T33] audit: type=2000 audit(0.680:1): state=initialized audit_enabled=0 res=1
[    0.710233][    T1] cpuidle: using governor ladder
[    0.715065][    T1] cpuidle: using governor menu
[    0.719897][   T12] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.729664][   T12] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.736357][   T13] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.950394][    T1] raid6: int32x8  gen()   227 MB/s
[    1.120325][    T1] raid6: int32x8  xor()   134 MB/s
[    1.290425][    T1] raid6: int32x4  gen()   206 MB/s
[    1.460243][    T1] raid6: int32x4  xor()   163 MB/s
[    1.630402][    T1] raid6: int32x2  gen()   197 MB/s
[    1.800237][    T1] raid6: int32x2  xor()   210 MB/s
[    1.970256][    T1] raid6: int32x1  gen()   135 MB/s
[    2.140333][    T1] raid6: int32x1  xor()   183 MB/s
[    2.145312][    T1] raid6: using algorithm int32x8 gen() 227 MB/s
[    2.151435][    T1] raid6: .... xor() 134 MB/s, rmw enabled
[    2.157021][    T1] raid6: using intx1 recovery algorithm
[    2.163279][    T1] vgaarb: loaded
[    2.167065][    T1] SCSI subsystem initialized
[    2.171936][    T1] usbcore: registered new interface driver usbfs
[    2.178175][    T1] usbcore: registered new interface driver hub
[    2.184364][    T1] usbcore: registered new device driver usb
[    2.190374][    T1] media: Linux media interface: v0.10
[    2.195647][    T1] videodev: Linux video capture interface: v2.00
[    2.201950][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.207626][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.217521][    T1] PTP clock support registered
[    2.231334][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    2.783889][    T1] VFS: Disk quotas dquot_6.6.0
[    2.788576][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.806087][    T1] NET: Registered protocol family 2
[    2.811760][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.820148][    T1] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.828142][    T1] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.835493][    T1] TCP: Hash tables configured (established 8192 bind 8192)
[    2.842662][    T1] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.849311][    T1] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.856608][    T1] NET: Registered protocol family 1
[    2.862188][    T1] RPC: Registered named UNIX socket transport module.
[    2.868822][    T1] RPC: Registered udp transport module.
[    2.874257][    T1] RPC: Registered tcp transport module.
[    2.879670][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.886841][    T1] PCI: CLS 0 bytes, default 64
[    2.891828][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.899288][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.909492][    T1] Initialise system trusted keyrings
[    2.914708][    T1] Key type blacklist registered
[    2.919546][    T1] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.926860][    T1] zbud: loaded
[    2.940804][    T1] NFS: Registering the id_resolver key type
[    2.946604][    T1] Key type id_resolver registered
[    2.951510][    T1] Key type id_legacy registered
[    2.956235][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.963667][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.970953][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.979120][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.986423][    T1] orangefs_init: module version upstream loaded
[    2.994217][    T1] async_tx: api initialized (async)
[    2.999287][    T1] Key type asymmetric registered
[    3.004121][    T1] Asymmetric key parser 'x509' registered
[    3.009747][    T1] bounce: pool size: 64 pages
[    3.014367][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    3.024282][    T1] armada-xp-pinctrl f1018000.pin-ctrl: registered pinctrl driver
[    3.033990][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.041569][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.047770][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.055384][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.062473][    T1] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    3.069215][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.077000][    T1] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    3.083757][    T1] pci 0000:00:05.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.092294][    T1] PCI: bus0: Fast back to back transfers disabled
[    3.098590][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.107346][    T1] pci 0000:00:05.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.116220][    T1] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    3.122986][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x14000000-0x140fffff 64bit]
[    3.130498][    T1] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x00ff]
[    3.137053][    T1] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    3.148912][    T1] PCI: bus1: Fast back to back transfers disabled
[    3.155231][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.162730][    T1] pci 0000:02:00.0: [1b6f:7023] type 00 class 0x0c0330
[    3.169481][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.177039][    T1] pci 0000:02:00.0: enabling Extended Tags
[    3.182796][    T1] pci 0000:02:00.0: supports D1 D2
[    3.187777][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot
[    3.194717][    T1] pci 0000:00:05.0: ASPM: current common clock configuration is broken, reconfiguring
[    3.232442][    T1] PCI: bus2: Fast back to back transfers disabled
[    3.238737][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    3.246138][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    3.253752][    T1] pci 0000:00:05.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    3.261358][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    3.268429][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    3.276383][    T1] pci 0000:00:05.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    3.284339][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff 64bit]
[    3.292388][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10000-0x100ff]
[    3.299373][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    3.305063][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    3.312059][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    3.319571][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf8107fff 64bit]
[    3.327618][    T1] pci 0000:00:05.0: PCI bridge to [bus 02]
[    3.333309][    T1] pci 0000:00:05.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    3.340893][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    3.347814][    T1] pcieport 0000:00:05.0: enabling device (0140 -> 0142)
[    3.354703][    T1] pci 0000:02:00.0: enabling device (0140 -> 0142)
[    3.361568][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.422046][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.431851][    T1] mv_xor f10f0900.xor: Marvell shared XOR driver
[    3.492034][    T1] mv_xor f10f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.565894][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.575538][    T1] printk: console [ttyS0] disabled
[    3.600810][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 19, base_baud = 15625000) is a 16550A
[    3.610619][    T1] printk: console [ttyS0] enabled
[    3.610619][    T1] printk: console [ttyS0] enabled
[    3.620418][    T1] printk: bootconsole [earlycon0] disabled
[    3.620418][    T1] printk: bootconsole [earlycon0] disabled
[    3.652790][    T1] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 20, base_baud = 15625000) is a 16550A
[    3.664355][    T1] sata_mv 0000:01:00.0: enabling device (0140 -> 0143)
[    3.671181][    T1] sata_mv 0000:01:00.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[    3.682236][    T1] scsi host0: sata_mv
[    3.686656][    T1] scsi host1: sata_mv
[    3.691027][    T1] scsi host2: sata_mv
[    3.695448][    T1] scsi host3: sata_mv
[    3.699641][    T1] ata1: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8022000 irq 41
[    3.708044][    T1] ata2: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8024000 irq 41
[    3.716435][    T1] ata3: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8026000 irq 41
[    3.724822][    T1] ata4: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8028000 irq 41
[    3.734977][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.740317][    T1] 2 cmdlinepart partitions found on MTD device spi0.0
[    3.746980][    T1] Creating 2 MTD partitions on "spi0.0":
[    3.752500][    T1] 0x000000000000-0x0000000ca800 : "u-boot"
[    3.758176][    T1] mtd: partition "u-boot" doesn't end on an erase/write block -- force read-only
[    3.768325][    T1] 0x0000000ca800-0x000000800000 : "data"
[    3.773860][    T1] mtd: partition "data" doesn't start on an erase/write block boundary -- force read-only
[    3.785567][    T1] libphy: Fixed MDIO Bus: probed
[    3.790988][    T1] libphy: orion_mdio_bus: probed
[    3.798830][    T1] mvneta f1070000.ethernet eth0: Using hardware mac address 6e:94:77:6e:c7:f6
[    3.809086][    T1] mvneta f1074000.ethernet eth1: Using hardware mac address ea:94:b3:85:20:27
[    3.818162][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.825456][    T1] ehci-pci: EHCI PCI platform driver
[    3.830665][    T1] ehci-orion: EHCI orion driver
[    3.835537][    T1] orion-ehci f1050000.usb: EHCI Host Controller
[    3.841686][    T1] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    3.850063][    T1] orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
[    3.881356][    T1] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    3.888215][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.897229][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.905185][    T1] usb usb1: Product: EHCI Host Controller
[    3.910776][    T1] usb usb1: Manufacturer: Linux 5.2.9-mvebu-tld-1 ehci_hcd
[    3.917858][    T1] usb usb1: SerialNumber: f1050000.usb
[    3.923652][    T1] hub 1-0:1.0: USB hub found
[    3.928148][    T1] hub 1-0:1.0: 1 port detected
[    3.933425][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    3.939379][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    3.947627][    T1] xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490
[    3.957966][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.966978][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.974935][    T1] usb usb2: Product: xHCI Host Controller
[    3.980525][    T1] usb usb2: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    3.987607][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    3.993393][    T1] hub 2-0:1.0: USB hub found
[    3.997888][    T1] hub 2-0:1.0: 2 ports detected
[    4.003034][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    4.008988][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    4.017142][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    4.024210][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.033168][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    4.042259][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.050201][    T1] usb usb3: Product: xHCI Host Controller
[    4.055813][    T1] usb usb3: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    4.062828][ T1221] ata1: SATA link down (SStatus 0 SControl 300)
[    4.062898][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    4.074900][    T1] hub 3-0:1.0: USB hub found
[    4.079395][    T1] hub 3-0:1.0: 2 ports detected
[    4.085288][    T1] usbcore: registered new interface driver usblp
[    4.091669][    T1] usbcore: registered new interface driver usb-storage
[    4.098833][    T1] mousedev: PS/2 mouse device common for all mice
[    4.106216][    T1] i2c /dev entries driver
[    4.114291][    T1] rtc-s35390a 0-0030: registered as rtc0
[    4.222503][    T1] watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
[    4.231605][    T1] watchdog: f1020300.watchdog: falling back to default timeout (171)
[    4.239911][    T1] orion_wdt: Initial timeout 171 sec
[    4.255615][    T1] device-mapper: uevent: version 1.0.3
[    4.261213][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    4.270663][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    4.277932][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    4.285277][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    4.292651][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    4.299460][    T1] device-mapper: raid: Loading target version 1.14.0
[    4.306040][   T49] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    4.317296][    T1] marvell-cesa f1090000.crypto: CESA device successfully registered
[    4.325551][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    4.332266][    T1] usbcore: registered new interface driver usbhid
[    4.338584][    T1] usbhid: USB HID core driver
[    4.343663][    T1] drop_monitor: Initializing network drop monitor service
[    4.351022][    T1] NET: Registered protocol family 10
[    4.357172][    T1] Segment Routing with IPv6
[    4.361652][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.369714][    T1] NET: Registered protocol family 17
[    4.375085][    T1] 8021q: 802.1Q VLAN Support v1.8
[    4.380049][    T1] Key type dns_resolver registered
[    4.385259][    T1] ThumbEE CPU extension supported.
[    4.390269][    T1] Registering SWP/SWPB emulation handler
[    4.396626][    T1] registered taskstats version 1
[    4.401504][ T1225] ata2: SATA link down (SStatus 0 SControl 300)
[    4.407660][    T1] Loading compiled-in X.509 certificates
[    4.413254][    T1] zswap: loaded using pool lzo/zbud
[    4.420731][    T1] Key type big_key registered
[    4.425980][    T1] Key type encrypted registered
[    4.523450][   T49] usb 1-1: New USB device found, idVendor=18a5, idProduct=0240, bcdDevice= 1.00
[    4.532399][   T49] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.540262][   T49] usb 1-1: Product: STORE N GO
[    4.544924][   T49] usb 1-1: Manufacturer: Verbatim
[    4.549819][   T49] usb 1-1: SerialNumber: 07B21107CD4F328B
[    4.555958][   T49] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.563288][   T49] scsi host4: usb-storage 1-1:1.0
[    4.743210][ T1229] ata3: SATA link down (SStatus 0 SControl 300)
[    5.084069][ T1233] ata4: SATA link down (SStatus 0 SControl 300)
[    5.623038][ T1237] scsi 4:0:0:0: Direct-Access     Verbatim STORE N GO       PMAP PQ: 0 ANSI: 0 CCS
[    5.635864][    T7] sd 4:0:0:0: [sda] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
[    5.645111][    T7] sd 4:0:0:0: [sda] Write Protect is off
[    5.651133][    T7] sd 4:0:0:0: [sda] No Caching mode page found
[    5.657237][    T7] sd 4:0:0:0: [sda] Assuming drive cache: write through
[    5.669195][    T7]  sda: sda1
[    5.675885][    T7] sd 4:0:0:0: [sda] Attached SCSI removable disk
[   25.463603][    T1] rtc-s35390a 0-0030: setting system clock to 2020-04-13T15:48:00 UTC (1586792880)
[   25.473537][    T1] Waiting 20 sec before mounting root device...
[   45.941513][    T1] md: Waiting for all devices to be available before autodetect
[   45.949029][    T1] md: If you don't use raid, use raid=noautodetect
[   45.956687][    T1] md: Autodetecting RAID arrays.
[   45.961575][    T1] md: autorun ...
[   45.965088][    T1] md: ... autorun DONE.
[   45.996269][    T1] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   46.004237][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   46.017911][    C0] random: fast init done
[   46.039075][    T1] devtmpfs: mounted
[   46.044731][    T1] Freeing unused kernel memory: 1024K
[   46.063053][    T1] Checked W+X mappings: passed, no W+X pages found
[   46.069447][    T1] 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
[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...[   49.356731][ T1713] systemd-udevd[1713]: Using default interface naming scheme 'v240'.
[   49.364469][ T1715] systemd-udevd[1715]: Using default interface naming scheme 'v240'.
[   49.426681][ T1713] systemd-udevd[1713]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.446901][ T1715] systemd-udevd[1715]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.606814][ T1708] systemd-udevd[1708]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.619453][ T1708] systemd-udevd[1708]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
[   49.623240][ T1714] systemd-udevd[1714]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.672717][ T1711] usbcore: registered new interface driver uas
[   49.674612][ T1716] systemd-udevd[1716]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.791261][ T1711] sd 4:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   60.761128][ T1920] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[   61.400628][ T1920] 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.
[ 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 .
[   62.814248][    C1] random: crng init done
[ 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.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...[   64.805788][ T2446] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   64.815571][ T2446] mvneta f1070000.ethernet eth0: configuring for phy/rgmii-id link mode
[   68.982264][   T23] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   68.990845][   T23] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2667 (syslogd)
. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2694 (klogd)
. ok 
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Running local boot scripts (/etc/rc.local)Warning: Bad CRC, using default environment
Warning: Bad CRC, using default environment
[   78.235036][ T2901] Setting Persistent MAC address to 00:00:11:22:33:44
<13>Apr 13 08:48:53 root[2908]: Setting Persistent MAC address to 00:00:11:22:33:44
[   78.333823][   T23] mvneta f1070000.ethernet eth0: Link is Down
[   78.487613][ T2941] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   78.497357][ T2941] mvneta f1070000.ethernet eth0: configuring for phy/rgmii-id link mode
[   82.665643][   T49] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   82.674225][   T49] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
. ok 

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password: 
Last login: Mon Apr 13 08:18:34 PDT 2020 on ttyS0
Linux debian 5.2.9-mvebu-tld-1 #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019 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
192.168.0.37 
Synology DS414
Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
Debian 10.0
Mon Apr 13 08:49:04 PDT 2020 up 1 minute
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000ca800 00001000 "u-boot"
mtd1: 00735800 00001000 "data"
root@debian:~# flash_unlock /dev/mtd0
flash_unlock: error!: could not open: /dev/mtd0
              error 13 (Permission denied)
root@debian:~# 
Re: Restore uboot for Synology DS414
April 13, 2020 01:11PM
I think i see the problem now. Its complaining the value is not on the boundry as i didnt choose a value that was a multiple of 64 bytes

[    3.746980][    T1] Creating 2 MTD partitions on "spi0.0":
[    3.752500][    T1] 0x000000000000-0x0000000ca800 : "u-boot"
[    3.758176][    T1] mtd: partition "u-boot" doesn't end on an erase/write block -- force read-only
[    3.768325][    T1] 0x0000000ca800-0x000000800000 : "data"
[    3.773860][    T1] mtd: partition "data" doesn't start on an erase/write block boundary -- force read-only


If the original cat /proc/mtd showed "000d0000" then a hex to decimal conversion is 851968. Can you set it in bytes?

mtd0: 000d0000 00001000 "RedBoot"

e.g

setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:851968B(u-boot),-(data) earlyprintk=serial'



Edited 1 time(s). Last edit at 04/13/2020 01:11PM by bignellrp.
Re: Restore uboot for Synology DS414
April 13, 2020 01:20PM
I guess not:

[ 3.752183][ T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[ 3.757552][ T1] mtd: bad character after partition (B)

Maybe go as close as possible in multiples of 64 bytes but thats 13x64 = 832K which is what you had before.
Re: Restore uboot for Synology DS414
April 13, 2020 01:27PM
Got it. You have to specify the exact amount in bytes without the B

 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.....................................................]
[Type Ctrl-\ + c to quit]


U-Boot 2019.10-tld-1 (Apr 09 2020 - 16:26:57 -0700)

SoC:   MV78230-B0 at 1333 MHz
I2C:   ready
DRAM:  1 GiB (667 MHz, 32-bit, ECC not enabled)
Loading Environment from SPI Flash... SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@12000
Out:   serial@12000
Err:   serial@12000
Model: Synology DS414
Board: DS414
Net:   
Warning: ethernet@70000 (eth0) using random MAC address - 1a:de:3c:37:5e:cd
eth0: ethernet@70000
Warning: ethernet@74000 (eth1) using random MAC address - e2:39:75:0a:35:41
, eth1: ethernet@74000
starting USB...
Bus usb@50000: USB EHCI 1.00
scanning bus usb@50000 for devices... 
USB retry period from the environment: 0 second(s)
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected n25q064 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  0 
device 0 offset 0xd0000, size 0x700000
SF: 7340032 bytes @ 0xd0000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:851968(u-boot),-(data) earlyprintk=serial'
=> ext2load usb 0:1 2000000 boot/uImage
5074848 bytes read in 231 ms (21 MiB/s)
=> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.2.9-mvebu-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5074784 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
[    0.000000][    T0] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: div instructions available: patching division code
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS414
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] percpu: Embedded 21 pages/cpu s55244 r8192 d22580 u86016
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:851968(u-boot),-(data) earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Memory: 1023808K/1048576K available (10240K kernel code, 833K rwdata, 2724K rodata, 1024K init, 343K bss, 24768K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x30c/0x830 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1a096b00 -> 0x1a096b02
[    0.000000][    T0] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a096b02
[    0.000000][    T0] Switching to timer-based delay loop, resolution 40ns
[    0.000005][    T0] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.008556][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.020794][    T0] Console: colour dummy device 80x30
[    0.025968][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.037074][    T0] pid_max: default: 32768 minimum: 301
[    0.042534][    T0] LSM: Security Framework initializing
[    0.047922][    T0] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.055268][    T0] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.063497][    T0] *** VALIDATE proc ***
[    0.067663][    T0] *** VALIDATE cgroup1 ***
[    0.071961][    T0] *** VALIDATE cgroup2 ***
[    0.076288][    T0] CPU: Testing write buffer coherency: ok
[    0.082088][    T1] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.140233][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.147383][    T1] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x2
[    0.153364][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.180196][    T1] rcu: Hierarchical SRCU implementation.
[    0.220195][    T1] smp: Bringing up secondary CPUs ...
[    0.280297][    T1] Booting CPU 1
[    0.284040][    T0] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.294136][    T1] smp: Brought up 1 node, 2 CPUs
[    0.305346][    T1] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.312340][    T1] CPU: All CPU(s) started in SVC mode.
[    0.318374][    T1] devtmpfs: initialized
[    0.325727][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.334587][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.345166][    T1] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.352135][    T1] xor: measuring software checksum speed
[    0.450184][    T1]    arm4regs  :  1290.800 MB/sec
[    0.550185][    T1]    8regs     :   810.000 MB/sec
[    0.650184][    T1]    32regs    :  1146.400 MB/sec
[    0.655076][    T1] xor: using function: arm4regs (1290.800 MB/sec)
[    0.661373][    T1] prandom: seed boundary self test passed
[    0.669268][    T1] prandom: 100 self tests passed
[    0.674082][    T1] pinctrl core: initialized pinctrl subsystem
[    0.681367][    T1] NET: Registered protocol family 16
[    0.686865][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.695024][    T1] audit: initializing netlink subsys (disabled)
[    0.701316][   T33] audit: type=2000 audit(0.680:1): state=initialized audit_enabled=0 res=1
[    0.710233][    T1] cpuidle: using governor ladder
[    0.715065][    T1] cpuidle: using governor menu
[    0.719899][   T12] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.729666][   T12] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.736358][   T13] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.960396][    T1] raid6: int32x8  gen()   227 MB/s
[    1.130326][    T1] raid6: int32x8  xor()   134 MB/s
[    1.300422][    T1] raid6: int32x4  gen()   206 MB/s
[    1.470239][    T1] raid6: int32x4  xor()   163 MB/s
[    1.640402][    T1] raid6: int32x2  gen()   197 MB/s
[    1.810204][    T1] raid6: int32x2  xor()   210 MB/s
[    1.980254][    T1] raid6: int32x1  gen()   135 MB/s
[    2.150359][    T1] raid6: int32x1  xor()   182 MB/s
[    2.155352][    T1] raid6: using algorithm int32x8 gen() 227 MB/s
[    2.161462][    T1] raid6: .... xor() 134 MB/s, rmw enabled
[    2.167056][    T1] raid6: using intx1 recovery algorithm
[    2.173682][    T1] vgaarb: loaded
[    2.177731][    T1] SCSI subsystem initialized
[    2.183082][    T1] usbcore: registered new interface driver usbfs
[    2.189407][    T1] usbcore: registered new interface driver hub
[    2.195583][    T1] usbcore: registered new device driver usb
[    2.201984][    T1] media: Linux media interface: v0.10
[    2.207337][    T1] videodev: Linux video capture interface: v2.00
[    2.213909][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.219605][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.229553][    T1] PTP clock support registered
[    2.235946][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    2.788408][    T1] VFS: Disk quotas dquot_6.6.0
[    2.793095][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.813998][    T1] NET: Registered protocol family 2
[    2.819630][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    2.828049][    T1] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    2.835868][    T1] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    2.843098][    T1] TCP: Hash tables configured (established 8192 bind 8192)
[    2.850256][    T1] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    2.856930][    T1] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    2.864214][    T1] NET: Registered protocol family 1
[    2.869752][    T1] RPC: Registered named UNIX socket transport module.
[    2.876413][    T1] RPC: Registered udp transport module.
[    2.881826][    T1] RPC: Registered tcp transport module.
[    2.887253][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.894411][    T1] PCI: CLS 0 bytes, default 64
[    2.899393][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.906872][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.918154][    T1] Initialise system trusted keyrings
[    2.923337][    T1] Key type blacklist registered
[    2.928246][    T1] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    2.935510][    T1] zbud: loaded
[    2.939438][    T1] NFS: Registering the id_resolver key type
[    2.945213][    T1] Key type id_resolver registered
[    2.950130][    T1] Key type id_legacy registered
[    2.954856][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.962292][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    2.969605][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.977811][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    2.985094][    T1] orangefs_init: module version upstream loaded
[    2.992940][    T1] async_tx: api initialized (async)
[    2.998040][    T1] Key type asymmetric registered
[    3.002845][    T1] Asymmetric key parser 'x509' registered
[    3.008485][    T1] bounce: pool size: 64 pages
[    3.013132][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    3.023955][    T1] armada-xp-pinctrl f1018000.pin-ctrl: registered pinctrl driver
[    3.034615][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.042068][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.048284][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.055875][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.062961][    T1] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    3.069718][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.077598][    T1] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    3.084336][    T1] pci 0000:00:05.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.092941][    T1] PCI: bus0: Fast back to back transfers disabled
[    3.099261][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.108011][    T1] pci 0000:00:05.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.116942][    T1] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    3.123692][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x14000000-0x140fffff 64bit]
[    3.131234][    T1] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x00ff]
[    3.137849][    T1] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    3.149680][    T1] PCI: bus1: Fast back to back transfers disabled
[    3.155993][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.163529][    T1] pci 0000:02:00.0: [1b6f:7023] type 00 class 0x0c0330
[    3.170304][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.177860][    T1] pci 0000:02:00.0: enabling Extended Tags
[    3.183604][    T1] pci 0000:02:00.0: supports D1 D2
[    3.188598][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot
[    3.195588][    T1] pci 0000:00:05.0: ASPM: current common clock configuration is broken, reconfiguring
[    3.227062][    T1] PCI: bus2: Fast back to back transfers disabled
[    3.233357][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    3.240760][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    3.248372][    T1] pci 0000:00:05.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    3.255978][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    3.263049][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    3.271003][    T1] pci 0000:00:05.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    3.278960][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff 64bit]
[    3.287008][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10000-0x100ff]
[    3.293994][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    3.299683][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    3.306679][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    3.314192][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf8107fff 64bit]
[    3.322239][    T1] pci 0000:00:05.0: PCI bridge to [bus 02]
[    3.327929][    T1] pci 0000:00:05.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    3.335507][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    3.342432][    T1] pcieport 0000:00:05.0: enabling device (0140 -> 0142)
[    3.349323][    T1] pci 0000:02:00.0: enabling device (0140 -> 0142)
[    3.356500][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    3.416622][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.426539][    T1] mv_xor f10f0900.xor: Marvell shared XOR driver
[    3.486645][    T1] mv_xor f10f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    3.576643][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.585911][    T1] printk: console [ttyS0] disabled
[    3.611037][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 19, base_baud = 15625000) is a 16550A
[    3.620809][    T1] printk: console [ttyS0] enabled
[    3.620809][    T1] printk: console [ttyS0] enabled
[    3.630608][    T1] printk: bootconsole [earlycon0] disabled
[    3.630608][    T1] printk: bootconsole [earlycon0] disabled
[    3.663019][    T1] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 20, base_baud = 15625000) is a 16550A
[    3.674557][    T1] sata_mv 0000:01:00.0: enabling device (0140 -> 0143)
[    3.681415][    T1] sata_mv 0000:01:00.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[    3.692367][    T1] scsi host0: sata_mv
[    3.696812][    T1] scsi host1: sata_mv
[    3.701201][    T1] scsi host2: sata_mv
[    3.705578][    T1] scsi host3: sata_mv
[    3.709797][    T1] ata1: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8022000 irq 41
[    3.718201][    T1] ata2: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8024000 irq 41
[    3.726592][    T1] ata3: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8026000 irq 41
[    3.734968][    T1] ata4: SATA max UDMA/133 mmio m1048576@0xf8000000 port 0xf8028000 irq 41
[    3.745131][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.750501][    T1] 2 cmdlinepart partitions found on MTD device spi0.0
[    3.757150][    T1] Creating 2 MTD partitions on "spi0.0":
[    3.762659][    T1] 0x000000000000-0x0000000d0000 : "u-boot"
[    3.769378][    T1] 0x0000000d0000-0x000000800000 : "data"
[    3.776872][    T1] libphy: Fixed MDIO Bus: probed
[    3.782684][    T1] libphy: orion_mdio_bus: probed
[    3.790479][    T1] mvneta f1070000.ethernet eth0: Using hardware mac address 1a:de:3c:37:5e:cd
[    3.800720][    T1] mvneta f1074000.ethernet eth1: Using hardware mac address e2:39:75:0a:35:41
[    3.809780][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.817063][    T1] ehci-pci: EHCI PCI platform driver
[    3.822271][    T1] ehci-orion: EHCI orion driver
[    3.827145][    T1] orion-ehci f1050000.usb: EHCI Host Controller
[    3.833275][    T1] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    3.841676][    T1] orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
[    3.875968][    T1] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    3.882816][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.891833][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.899806][    T1] usb usb1: Product: EHCI Host Controller
[    3.905397][    T1] usb usb1: Manufacturer: Linux 5.2.9-mvebu-tld-1 ehci_hcd
[    3.912480][    T1] usb usb1: SerialNumber: f1050000.usb
[    3.918281][    T1] hub 1-0:1.0: USB hub found
[    3.922773][    T1] hub 1-0:1.0: 1 port detected
[    3.928043][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    3.933995][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    3.942237][    T1] xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490
[    3.952584][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    3.961599][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.969558][    T1] usb usb2: Product: xHCI Host Controller
[    3.975148][    T1] usb usb2: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    3.982231][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    3.987982][    T1] hub 2-0:1.0: USB hub found
[    3.992477][    T1] hub 2-0:1.0: 2 ports detected
[    3.997646][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    4.003594][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    4.011744][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    4.018810][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.027764][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    4.036856][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.044799][    T1] usb usb3: Product: xHCI Host Controller
[    4.050411][    T1] usb usb3: Manufacturer: Linux 5.2.9-mvebu-tld-1 xhci-hcd
[    4.057496][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    4.063214][    T1] hub 3-0:1.0: USB hub found
[    4.067425][ T1221] ata1: SATA link down (SStatus 0 SControl 300)
[    4.067738][    T1] hub 3-0:1.0: 2 ports detected
[    4.079752][    T1] usbcore: registered new interface driver usblp
[    4.086138][    T1] usbcore: registered new interface driver usb-storage
[    4.093314][    T1] mousedev: PS/2 mouse device common for all mice
[    4.100639][    T1] i2c /dev entries driver
[    4.108709][    T1] rtc-s35390a 0-0030: registered as rtc0
[    4.216943][    T1] watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
[    4.225932][    T1] watchdog: f1020300.watchdog: falling back to default timeout (171)
[    4.234326][    T1] orion_wdt: Initial timeout 171 sec
[    4.240156][    T1] device-mapper: uevent: version 1.0.3
[    4.245715][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    4.255189][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    4.262458][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    4.269807][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    4.277181][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    4.283990][    T1] device-mapper: raid: Loading target version 1.14.0
[    4.295835][    T1] marvell-cesa f1090000.crypto: CESA device successfully registered
[    4.304145][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    4.310308][   T23] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    4.317984][    T1] usbcore: registered new interface driver usbhid
[    4.324387][    T1] usbhid: USB HID core driver
[    4.329394][    T1] drop_monitor: Initializing network drop monitor service
[    4.336828][    T1] NET: Registered protocol family 10
[    4.342933][    T1] Segment Routing with IPv6
[    4.347420][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.355430][    T1] NET: Registered protocol family 17
[    4.370847][    T1] 8021q: 802.1Q VLAN Support v1.8
[    4.375775][    T1] Key type dns_resolver registered
[    4.381028][    T1] ThumbEE CPU extension supported.
[    4.386088][    T1] Registering SWP/SWPB emulation handler
[    4.392542][    T1] registered taskstats version 1
[    4.397399][    T1] Loading compiled-in X.509 certificates
[    4.402984][    T1] zswap: loaded using pool lzo/zbud
[    4.408116][ T1225] ata2: SATA link down (SStatus 0 SControl 300)
[    4.416719][    T1] Key type big_key registered
[    4.421940][    T1] Key type encrypted registered
[    4.518210][   T23] usb 1-1: New USB device found, idVendor=18a5, idProduct=0240, bcdDevice= 1.00
[    4.527160][   T23] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.535018][   T23] usb 1-1: Product: STORE N GO
[    4.539672][   T23] usb 1-1: Manufacturer: Verbatim
[    4.544578][   T23] usb 1-1: SerialNumber: 07B21107CD4F328B
[    4.551023][   T23] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.558317][   T23] scsi host4: usb-storage 1-1:1.0
[    4.737847][ T1229] ata3: SATA link down (SStatus 0 SControl 300)
[    5.068700][ T1233] ata4: SATA link down (SStatus 0 SControl 300)
[    5.637497][ T1237] scsi 4:0:0:0: Direct-Access     Verbatim STORE N GO       PMAP PQ: 0 ANSI: 0 CCS
[    5.649983][   T20] sd 4:0:0:0: [sda] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
[    5.659225][   T20] sd 4:0:0:0: [sda] Write Protect is off
[    5.665371][   T20] sd 4:0:0:0: [sda] No Caching mode page found
[    5.671532][   T20] sd 4:0:0:0: [sda] Assuming drive cache: write through
[    5.683179][   T20]  sda: sda1
[    5.689622][   T20] sd 4:0:0:0: [sda] Attached SCSI removable disk
[   25.477795][    T1] rtc-s35390a 0-0030: setting system clock to 2020-04-13T18:22:43 UTC (1586802163)
[   25.487735][    T1] Waiting 20 sec before mounting root device...
[   45.956130][    T1] md: Waiting for all devices to be available before autodetect
[   45.963646][    T1] md: If you don't use raid, use raid=noautodetect
[   45.970994][    T1] md: Autodetecting RAID arrays.
[   45.975819][    T1] md: autorun ...
[   45.979391][    T1] md: ... autorun DONE.
[   46.010628][    T1] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   46.018604][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   46.033028][    C0] random: fast init done
[   46.052436][    T1] devtmpfs: mounted
[   46.058068][    T1] Freeing unused kernel memory: 1024K
[   46.064939][    T1] Checked W+X mappings: passed, no W+X pages found
[   46.071414][    T1] 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
[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...[   49.495101][ T1710] systemd-udevd[1710]: Using default interface naming scheme 'v240'.
[   49.507606][ T1727] systemd-udevd[1727]: Using default interface naming scheme 'v240'.
[   49.583675][ T1713] systemd-udevd[1713]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.584678][ T1715] systemd-udevd[1715]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.618376][ T1709] systemd-udevd[1709]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.638815][ T1715] systemd-udevd[1715]: Could not generate persistent MAC address for ip6tnl0: No such file or directory
[   49.666294][ T1727] systemd-udevd[1727]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.697098][ T1710] systemd-udevd[1710]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   49.848001][ T1712] usbcore: registered new interface driver uas
[   49.985257][ T1712] sd 4:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   60.825368][ T1921] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
[   61.495735][ T1921] 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.
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[   62.625009][    C0] random: crng init done
[ 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.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...[   64.577748][ T2447] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   64.587519][ T2447] mvneta f1070000.ethernet eth0: configuring for phy/rgmii-id link mode
[   68.756884][ T1416] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   68.765466][ T1416] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2670 (syslogd)
. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2697 (klogd)
. ok 
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Running local boot scripts (/etc/rc.local)Warning: Bad CRC, using default environment
Warning: Bad CRC, using default environment
[   77.838438][ T2904] Setting Persistent MAC address to 00:00:11:22:33:44
<13>Apr 13 11:23:35 root[2911]: Setting Persistent MAC address to 00:00:11:22:33:44
[   77.937960][   T49] mvneta f1070000.ethernet eth0: Link is Down
[   78.093305][ T2944] mvneta f1070000.ethernet eth0: PHY [f1072004.mdio-mii:01] driver [Marvell 88E1510]
[   78.103083][ T2944] mvneta f1070000.ethernet eth0: configuring for phy/rgmii-id link mode
[   82.280415][ T1416] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   82.288999][ T1416] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
. ok 

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password: 
Last login: Mon Apr 13 08:49:03 PDT 2020 on ttyS0
Linux debian 5.2.9-mvebu-tld-1 #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019 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
192.168.0.37 
Synology DS414
Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
Debian 10.0
Mon Apr 13 11:23:45 PDT 2020 up 1 minute
root@debian:~# 
root@debian:~# 
root@debian:~# ca /proc/mtd
-bash: ca: command not found
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "u-boot"
mtd1: 00730000 00001000 "data"
root@debian:~# ls /tmp/
.  ..
root@debian:~# ls /tmp/
.  ..
root@debian:~# ls
.   .bash_history  .config   .nano     .ssh      set_persistent_mac_address
..  .bashrc        .lesshst  .profile  myip.get  uboot_DS414r1.bin
root@debian:~# flash_unlock /dev/mtd0
root@debian:~# flashcp -v uboot_DS414r1.bin /dev/mtd0
Erasing blocks: 203/203 (100%)
Writing data: 808k/808k (100%)
Verifying data: 808k/808k (100%)
root@debian:~# 
root@debian:~# 
Re: Restore uboot for Synology DS414
April 13, 2020 01:34PM
Do the settings live on another partition as its not changed. Still hangs at the same point with the stock uboot.

E.g. do i need to erase mtd4?

root@debian:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000d0000 00001000 "RedBoot"
mtd1: 002d0000 00001000 "zImage"
mtd2: 00430000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "RedBoot config"
mtd5: 00010000 00001000 "FIS directory"



pi@raspberrypi:~ $ sudo minicom --device /dev/ttyUSB0

Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Apr 22 2017, 09:14:19.
Port /dev/ttyUSB0, 19:29:17

Press CTRL-A Z for help on special keys


BootROM 1.20
Booting from SPI flash
High speed PHY - Version: 2.1.2 (COM-PHY-V20) 
Update PEX Device ID 0x78230
High speed PHY - Ended Successfully
                                   DDR3 Training Sequence - Ver 4.5.0 
DDR3 Training Sequence - Ended Successfully 
Status = MV_OK
BootROM: Image checksum verification PASSED

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


U-Boot 2011.12-SYNO-d7bdf8d-2013-12-11 (Dec 11 2013 - 17:58:54) Marvell version: v2011.12 2013_Q1.2

Board: Synology AXP 78230 4-bay/2-bay
SoC:   MV78230 B0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU 0
       CPU    @ 1333 [MHz]
       L2     @ 667 [MHz]
       TClock @ 250 [MHz]
       DDR    @ 667 [MHz]
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
DRAM:  1 GiB

Map:   Code:            0x3fefb000:0x3ff9f630
       BSS:             0x3ffef33c
       Stack:           0x3f9eaef8
       Heap:            0x3f9eb000:0x3fefb000

MMC:   MRVL_MMC: 0
SF: Detected M25P64 with page size 64 KiB, total 8 MiB
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1.1(2): Detected No Link.
PEX 1.2(3): Detected No Link.
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:

Synology Model: DS414r1
Fan Status: Not Good
Fan 1: Good
Fan 2: Not Good


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


U-Boot 2011.12-SYNO-d7bdf8d-2013-12-11 (Dec 11 2013 - 17:58:54) Marvell version: v2011.12 2013_Q1.2

Board: Synology AXP 78230 4-bay/2-bay
SoC:   MV78230 B0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU 0
       CPU    @ 1333 [MHz]
       L2     @ 667 [MHz]
       TClock @ 250 [MHz]
       DDR    @ 667 [MHz]
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
DRAM:  1 GiB

Map:   Code:            0x3fefb000:0x3ff9f630
       BSS:             0x3ffef33c
       Stack:           0x3f9eaef8
       Heap:            0x3f9eb000:0x3fefb000

MMC:   MRVL_MMC: 0
SF: Detected M25P64 with page size 64 KiB, total 8 MiB
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1.1(2): Detected No Link.
PEX 1.2(3): Detected No Link.
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:



Edited 1 time(s). Last edit at 04/13/2020 01:38PM by bignellrp.
Re: Restore uboot for Synology DS414
April 13, 2020 05:47PM
bignellrp,


1. The bootarg mtdparts cannot prevent the kernel booting. If it is bad, the kernel will print error messages like you have above (out of boundary,...). And then ignore it. In this case, you cannot use it later. So that was a red herring. The booting error is most likely becasue of the rootfs.

This was excellent:

=> setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:851968(u-boot),-(data) earlyprintk=serial'

[    3.745131][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.750501][    T1] 2 cmdlinepart partitions found on MTD device spi0.0
[    3.757150][    T1] Creating 2 MTD partitions on "spi0.0":
[    3.762659][    T1] 0x000000000000-0x0000000d0000 : "u-boot"
[    3.769378][    T1] 0x0000000d0000-0x000000800000 : "data"


root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "u-boot"
mtd1: 00730000 00001000 "data"


2. In previous booting, it showed your rootfs has errors and was fixed automatically during mount. This could have prevented the booting cleanly into Debian. So you want to bring it to the rPi and fix errors with e2fsck. And bring it back.

===========


And then post the entire serial console log here, if you'd like, before you follow the flashing step in my post above (I've edited to add more info).

https://forum.doozan.com/read.php?3,99414,99774#msg-99774

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 14, 2020 05:50AM
bodhi Wrote:
-------------------------------------------------------
> Restore stock u-boot.
>
> Prerequisite:
>
> Make sure the uboot_DS414r1.bin size is less than
> or equal to 832K. If it is larger, then it will
> not work.
>
> Flashing Steps:
>
> Repeat the kwboot booting. Interrupt serial
> console and
>
>
> setenv bootargs 'console=ttyS0,115200
> root=/dev/sda1 rootdelay=10
> mtdparts=spi0.0:832K(u-boot),-(data)
> earlyprintk=serial'
>
>
> And then load and boot
>
>
> ext2load usb 0:1 2000000 boot/uImage
>
>
> Let it boot all the way into Debian. Login, and
> verify the mtds. We want to see 2 partition. And
> the 1st looks like:
>
> cat /proc/mtd
>
> dev:    size   erasesize  name
> mtd0: 000d0000 00001000 "u-boot"
>
>
> If the mtd0 looks like above, go ahead and flash
>
>
> flash_unlock /dev/mtd0
> flashcp -v uboot_DS414r1.bin   /dev/mtd0
>
>
> Note that if flash_unlock give you error, you can
> ignore it. If there is error after flashcp here
> then stop and post the entire serial console
> log until this point.

>
>
> Now if kwboot is still running, it is OK. It runs
> as a normal serial comm terminal too. Or you can
> start picocom/minicom to run a regular serial
> console.
>
> Reboot and let it boot automatically, watch the
> serial console to observe progress. See if stock
> u-boot can run. Interrupt serial console. And see
> if the envs are normal.
>
> Done.

I managed to follow all the steps successfully from your post here: https://forum.doozan.com/read.php?3,99414,99774#msg-99774


root@debian:~# flash_unlock /dev/mtd0
root@debian:~# flashcp -v uboot_DS414r1.bin /dev/mtd0
Erasing blocks: 203/203 (100%)
Writing data: 808k/808k (100%)
Verifying data: 808k/808k (100%)
root@debian:~#

So the uboot should be back to stock. But using minicom my Synology still hangs on boot here:

FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:

It used to boot the marvell uboot successfully until i changed some of the setenvs and did a save. This was the reason for my original post here on doozan "Re: Restore uboot for Synology DS414" as i thought restoring uboot to stock would erase these settings and i could get back to the stock Marvel uboot prompt and load the stock firmware image.

It seems the uboot settings are stored on a different part of the flash, maybe here : mtd4: 00010000 00001000 "RedBoot config"

You have successfully helped me boot into debian which proves the hardware is ok and have helped me flash mtd0 proving the uboot partition is ok but i still need some help restoring these uboot settings/envs back to default as the stock uboot is hanging before i can interrupt and get to a prompt.

My current thought is that erasing mtd4 would removing these settings and help me back to this prompt although it could make the boot situation worse?

E.g setting the mtdparts to match the default /proc/mtd

mtd0: 000d0000 00001000 "RedBoot" = 0:851968 (000d0000 = 851968)
mtd1: 002d0000 00001000 "zImage" = 851968:3801088 (002d0000 = 2949120) 2949120+851968=3801088
mtd2: 00430000 00001000 "rd.gz" = 3801088:8192000‬ (00430000 = 4390912) 3801088+4390912=8192000‬
mtd3: 00010000 00001000 "vendor" = 8192000‬:8257536 (00010000 = 65536) 8192000‬+65536=8257536
mtd4: 00010000 00001000 "RedBoot config" = 8257536:8323072 (00010000 = 65536) 8257536+65536=8323072
mtd5: 00010000 00001000 "FIS directory" = 8323072:8388608 (00010000 = 65536) 8323072+65536=8388608

setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:0:851968(u-boot),851968:3801088(zimage),3801088:8192000‬(rd),8192000‬:8257536(vendor),8257536:8323072(uconfig),8323072:8388608(fis) earlyprintk=serial'


If this boots then run something along the lines of:

nanddump -f /root/usettings -n -l 65536 /dev/mtd4
flash_unlock /dev/mtd4
flash_erase /dev/mtd4

Please correct me if any of this is crazy talk as i completely understand a little bit of knowledge can be dangerous as all of these guesses are just compiled from lots of google searches.
Re: Restore uboot for Synology DS414
April 14, 2020 06:15AM
It seems nanddump is not supported but dd works. Im not sure it liked my custom mtdparts as none of my labels are shown

[    3.718159][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    3.723530][    T1] mtd: partition has size 0
[    3.727942][    T1] 6 fixed-partitions partitions found on MTD device spi0.0
[    3.735025][    T1] Creating 6 MTD partitions on "spi0.0":
[    3.740530][    T1] 0x000000000000-0x0000000d0000 : "RedBoot"
[    3.747383][    T1] 0x0000000d0000-0x0000003a0000 : "zImage"
[    3.754105][    T1] 0x0000003a0000-0x0000007d0000 : "rd.gz"
[    3.760679][    T1] 0x0000007d0000-0x0000007e0000 : "vendor"
[    3.767397][    T1] 0x0000007e0000-0x0000007f0000 : "RedBoot config"
[    3.774802][    T1] 0x0000007f0000-0x000000800000 : "FIS directory"


root@debian:~# nanddump -f mtd4 -n -l 65536 /dev/mtd4
MTDFILEMODE: Operation not supported

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "RedBoot"
mtd1: 002d0000 00001000 "zImage"
mtd2: 00430000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "RedBoot config"
mtd5: 00010000 00001000 "FIS directory"


root@debian:~# dd if=/dev/mtd0 of=mtd0 bs=1 count=851968
851968+0 records in
851968+0 records out
851968 bytes (852 kB, 832 KiB) copied, 67.4513 s, 12.6 kB/s
root@debian:~# dd if=/dev/mtd4 of=mtd4 bs=1 count=65536
65536+0 records in
65536+0 records out
65536 bytes (66 kB, 64 KiB) copied, 7.10088 s, 9.2 kB/s
Re: Restore uboot for Synology DS414
April 14, 2020 05:48PM
bignellrp,

Quote

I managed to follow all the steps successfully from your post here: https://forum.doozan.com/read.php?3,99414,99774#msg-99774

root@debian:~# flash_unlock /dev/mtd0
root@debian:~# flashcp -v uboot_DS414r1.bin /dev/mtd0
Erasing blocks: 203/203 (100%)
Writing data: 808k/808k (100%)
Verifying data: 808k/808k (100%)
root@debian:~#

Excellent!

Quote

It seems the uboot settings are stored on a different part of the flash, maybe here : mtd4: 00010000 00001000 "RedBoot config"

Yes. It is more likely some envs there were messed up.

Quote

It seems nanddump is not supported but dd works. Im not sure it liked my custom mtdparts as none of my labels are shown

nanddump is a tool for NAND flash. This box has SPI flash.

And the flashing for SPI flash must be done with flashcp command. dd is not recommended. dd should only be used to dump a good mtd to a file for backup.

==========

The best way forward:

Don't erase mtd4. Define mtdparts correctly in u-boot, and then in Debian, adjust the envs using a good set of envs from stock. This hopefully could be found by googling the "DS414 boot log". Or from Synology website. If you can find the mtd4 backup file, or a log that shows the stock envs, then it is easy.

Let me look in the new u-boot source code to see if I can find where the envs reside (if it is the same as stock). This is to doublecheck if the mainline u-boot can be used to restore the envs, too.

I will write a few steps later tonight (my timezone is PST), so you will have something to try when you come back here. They are:

- Define the full stock mtdparts env in u-boot bootargs.
- Define the correct envs location in /etc/fw_env.config

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



Edited 1 time(s). Last edit at 04/14/2020 06:39PM by bodhi.
Re: Restore uboot for Synology DS414
April 14, 2020 09:13PM
1. Define mtdparts in u-boot

There is no need to use decimal notation. We'll just copy the hex value from cat /proc/mtd. And no need to specify offset to run with the new kernel either. Size should be enough.

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "RedBoot"
mtd1: 002d0000 00001000 "zImage"
mtd2: 00430000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "RedBoot config"
mtd5: 00010000 00001000 "FIS directory"

Therefore,
setenv bootargs 'console=ttyS0,115200 root=/dev/sda1 rootdelay=20 mtdparts=spi0.0:0x000d0000(u-boot),0x002d0000(zimage),0x00430000(rd),0x00010000(vendor),0x00010000(u-boot-envs),0x00010000(fis) earlyprintk=serial'

Boot with this new bootargs.

2. Define fw_env.config

Boot into Debian. And modify fw_env.config.

cat /etc/fw_env.config
/dev/mtd4 0x00000 0x10000 0x10000

And then list the envs

fw_printenv

If the envs look sane, then we have defined the mtds correctly, especially mtd4.

Now look at the stock envs listing, and adjust the envs back to stock with fw_setenv. Or,

If the mtd4 stock envs image is available, we can flash it back. Assuming this image is named uboot_DS414_envs.bin,

flash_unlock /dev/mtd4
flashcp -v uboot_DS414_envs.bin   /dev/mtd4
And then list it to check

fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 15, 2020 03:07AM
Thanks. I'll try that in a bit.

Would it help if i get the envs from a working DS214? There is an ebay listing live at the moment. I assume the 214 would be almost identical to the DS414 as they are the same model just 2 disk instead of 4.

I contacted the guy and he is happy to run commands for us. What should i ask him to run?

https://www.ebay.co.uk/itm/274335005779

PS I cant find a file named uboot_DS414_envs.bin in the DS pat package from the synology website but i have a copy of the envs i had before my DS stopped booting.
Re: Restore uboot for Synology DS414
April 15, 2020 03:23AM
bignellrp,

> Would it help if i get the envs from a working
> DS214? There is an ebay listing live at the
> moment. I assume the 214 would be almost
> identical to the DS414 as they are the same model
> just 2 disk instead of 4.
>
> I contacted the guy and he is happy to run
> commands for us. What should i ask him to run?
>
> https://www.ebay.co.uk/itm/274335005779

If he can log into stock OS, then

fw_printenv


> PS I cant find a file named uboot_DS414_envs.bin
> in the DS pat package from the synology website

That was just an assumed name for that image. Whatever Synology named it, I think they would have that file.


> but i have a copy of the envs i had before my DS
> stopped booting.

That's exactly what we need.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 15, 2020 05:19AM
They certainly dont look right.

Here is the output but it says its on mtd1??

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000d0000 00001000 "u-boot"
mtd1: 002d0000 00001000 "zimage"
mtd2: 00430000 00001000 "rd"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "u-boot-envs"
mtd5: 00010000 00001000 "fis"
root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1               0x0000          0x80000         0x20000                 4
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000


Compared to what it looked like without setting the mtdparts:

root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000

I dont think this is correctly printing from mtd4.


Here is the original fw_config i have when it was still booting:

Marvell>> printenv                    
CASset=min
MALLOC_len=5
MPmode=smp
amp_enable=no
autoload=no
baudrate=115200
boot_order=hd_scr hd_img pxe net_img net_scr
bootargs=console=ttyS0,115200 ip=off initrd=0x8000040,8M root=/dev/md0 rw syno_hw_version=DS414r1 ihd_num=4 netif_num=2 flash_size=8 SataLedSpecial=1 HddHotplug=1
bootargs_dflt=$console $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
bootargs_end=:10.4.50.254:255.255.255.0:DSMP:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=bootm 0xf40d0000 0xf43a0000
bootcmd_auto=stage_boot $boot_order
bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000; 
bootdelay=3
cacheShare=no
console=console=ttyS0,115200
device_partition=0:1
disL2Cache=yes
disL2Prefetch=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=no
enaCpuStream=no
enaDCPref=yes
enaFPU=yes
enaICPref=yes
enaLPAE=no
enaWrAllo=no
eth1addr=00:50:43:02:00:00
eth1mtu=1500
eth2addr=00:50:43:00:00:02
eth2mtu=1500
eth3addr=00:50:43:00:02:02
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:02:02:00
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=192.168.0.205
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
loadaddr=0x02000000
loads_echo=0
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:00:00:02
netbsd_en=no
netmask=255.255.255.0
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
rcvrip=169.254.100.100
rootpath=/srv/nfs/
sata_delay_reset=0
sata_dma_mode=yes
script_addr_r=3000000
script_name=boot.scr
serverip=192.168.0.18
setL2CacheWT=no
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 2276/65532 bytes
Re: Restore uboot for Synology DS414
April 15, 2020 05:40AM
bignellrp,

> Here is the output but it says its on mtd1??

mtd1 is the kernel image. So it has nothting to do with u-boot envs.

See my post above:

https://forum.doozan.com/read.php?3,99414,99959#msg-99959

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 15, 2020 05:56AM
Yes, but why doesnt it say /dev/mtd4 when i "cat /etc/fw_env.config"


root@debian:~# cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors

/dev/mtd1 0x0000 0x80000 0x20000 4

Maybe i didnt understand your instruction here:

Quote

Boot into Debian. And modify fw_env.config.

cat /etc/fw_env.config
/dev/mtd4 0x00000 0x10000 0x10000

And then list the envs

fw_printenv

Do you mean vi the config and write it to mtd4? Im confused.
Re: Restore uboot for Synology DS414
April 15, 2020 06:21AM
bignellrp,

> Do you mean vi the config and write it to mtd4? Im
> confused.

Yes, sorry I was not clear. Should say "edit the content of the file /etc/fw_env.config" to have

/dev/mtd4 0x00000 0x10000 0x10000

or

echo "/dev/mtd4 0x00000 0x10000 0x10000" >  /etc/fw_env.config

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 15, 2020 07:28AM
Looks the same. Did i do something wrong?



Synology DS414
Linux version 5.2.9-mvebu-tld-1 (root@tldDebianVM) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #1 SMP PREEMPT Mon Aug 19 12:47:39 PDT 2019
Debian 10.0
Wed Apr 15 05:22:02 PDT 2020 up 1 minute
root@debian:~# echo "/dev/mtd4 0x00000 0x10000 0x10000"
/dev/mtd4 0x00000 0x10000 0x10000
root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1               0x0000          0x80000         0x20000                 4
root@debian:~# echo "/dev/mtd4 0x00000 0x10000 0x10000" >  /etc/fw_env.config
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
root@debian:~# cat /etc/fw_env.config                                        
/dev/mtd4 0x00000 0x10000 0x10000
Re: Restore uboot for Synology DS414
April 15, 2020 12:47PM
I've made some progress this evening. I backed up all the mtd parts using dd so thought i would try and reload the stock zImage back to mtd1

root@debian:~# flash_unlock /dev/mtd1
root@debian:~# flashcp -v zImage /dev/mtd1
Erasing blocks: 519/519 (100%)
Writing data: 2074k/2074k (100%)
Verifying data: 2050k/2074k (98%)File does not seem to match flash data. First mismatch at 0x001fe000-0x00200800

The verify gave an error but now the stock uboot boots again and has all the same values.

I can now successfully boot back into the syno software by loading it manually from usb:

usb start
ext2load usb 0:1 8000000 root/rd.bin
ext2load usb 0:1 2000000 root/zImage
bootm 0x2000000 0x8000000


So the last remaining task is to work out what to set in the bootenvs to get it to auto boot again?

Here are the current printenvs:

Modules Detected:

Synology Model: DS414r1
Fan Status: Not Good
Fan 1: Good
Fan 2: Not Good

Net:   egiga0 [PRIME], egiga1
Press Ctrl+C to abort autoboot in 3 second
## Booting kernel from Legacy Image at f40d0000 ...
   Image Name:   Linux-3.2.40
   Created:      2019-05-09  18:48:48 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2123888 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!                                                                                                               
Marvell>>                                                                                                                                    
Marvell>>                                                                                                                                    
Marvell>>                                                                                                                                    
Marvell>> 
Marvell>> 
Marvell>> printenv
CASset=min
MALLOC_len=5
MPmode=smp
amp_enable=no
autoload=no
baudrate=115200
boot_order=hd_scr hd_img pxe net_img net_scr
bootargs=console=ttyS0,115200 ip=off initrd=0x8000040,8M root=/dev/md0 rw syno_hw_version=DS414r1 ihd_num=4 netif_num=2 flash_size=8 SataLedSpecial=1 HddHotplug=1
bootargs_dflt=$console $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
bootargs_end=:10.4.50.254:255.255.255.0:DSMP:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=bootm 0xf40d0000 0xf43a0000
bootcmd_auto=stage_boot $boot_order
bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000; 
bootdelay=3
cacheShare=no
console=console=ttyS0,115200
device_partition=0:1
disL2Cache=yes
disL2Prefetch=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=no
enaCpuStream=no
enaDCPref=yes
enaFPU=yes
enaICPref=yes
enaLPAE=no
enaWrAllo=no
eth1addr=00:50:43:02:00:00
eth1mtu=1500
eth2addr=00:50:43:00:00:02
eth2mtu=1500
eth3addr=00:50:43:00:02:02
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:02:02:00
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=10.4.50.165
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
loadaddr=0x02000000
loads_echo=0
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:00:00:02
netbsd_en=no
netmask=255.255.255.0
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
rcvrip=169.254.100.100
rootpath=/srv/nfs/
sata_delay_reset=0
sata_dma_mode=yes
script_addr_r=3000000
script_name=boot.scr
serverip=10.4.50.5
setL2CacheWT=no
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 2271/65532 bytes
Marvell>>  
Re: Restore uboot for Synology DS414
April 15, 2020 04:06PM
Fixed!!

I booted into DSM manually and did a manual update. It rewrote the image itself and now it’s booting again.

Thank you again for all your help. I’ve actually found this fun especially during Corona lockdown. Waking up each morning with a new thing to try to fix my issue and learning lots in the process.

I have started writing a guide showing all the steps I went through which may be useful for others on here. Currently it’s a google doc but happy to add as a forum post if you want it as one of your guides?
Re: Restore uboot for Synology DS414
April 15, 2020 04:52PM
bignellrp,

> I booted into DSM manually and did a manual
> update. It rewrote the image itself and now it’s
> booting again.

Awesome!

FYI, after you defined the mtd4 and still see the CRC error, it means that the mtd4 was corrupted. So you cannot list the env without reflashing it, or force it to save so the CRC can be calculated and stored properly.
root@debian:~# echo "/dev/mtd4 0x00000 0x10000 0x10000" >  /etc/fw_env.config
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment


> I have started writing a guide showing all the
> steps I went through which may be useful for
> others on here. Currently it’s a google doc but
> happy to add as a forum post if you want it as one
> of your guides?

Please do! either in this thread, or create a new thread with title "Debian on Synology DS414" in Debian subforum.

By the way, you are the pioneer for this box, thanks to your testing I can now add this box to the support list for the kernel :)

If your guide will be in this thread, please change the Subject of this thread to "Debian on Synology DS414", so it will be easier for others to find later.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Restore uboot for Synology DS414
April 16, 2020 01:47PM
Documented as more of a guide here:

https://forum.doozan.com/read.php?3,100059
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: