Welcome! Log In Create A New Profile

Advanced

Debian Installation on Thecus N2350 (Marvell Armada 385)

Posted by lordzahl 
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 12, 2018 04:13PM
Manuel,

I'll think of some other way for you to try.

If I have a chance to open my box this weekend (doubt it :). I will play with it some more.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 17, 2018 11:45AM
Hi bodhi,

I would like to use this box in production soon. Therefore i gave it another try and i think i got the initrd working.
After reading in the sunxi-wiki, i added
setenv initrd_high 0xffffffff
to the uboot commands. So overall they now look like this:

setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x3000000
setenv load_image_addr 0x02000000
setenv initrd_high 0xffffffff
setenv dtbfilename armada-385-thecus-n2350.dtb
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/$dtbfilename; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
usb start
run usb_bootcmd

The system boots, and the log includes the line
[    0.596013] Unpacking initramfs...

Success, i guess?

Complete log:

BootROM - 1.73
Booting from SPI flash


General initialization - Version: 1.0.0
AVS selection from EFUSE disabled (Skip reading EFUSE values)
Overriding default AVS value to: 0x23
Detected Device ID 6820
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  0   |  SGMII0     |
 |   1    |  3   |  SATA0      |
 |   2    |  3   |  SATA1      |
 |   4    |  5   |  USB3 HOST0 |
 |   5    |  5   |  USB3 HOST1 |
 -------------------------------
High speed PHY - Ended Successfully
DDR4 Training Sequence - Ver TIP-0.23.(Sublib 0.8)0
DDR4 Training Sequence - Switching XBAR Window to FastPath Window 
DDR4 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Aug 09 2017 - 16:51:03) Marvell version: 2015_T1.0p18

Board: A38x-Customer0-Thecus-N2350
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR4    @ 800 [MHz]
       DDR4 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
NAND:  512 MiB
MMC:   mv_sdh: 0
SF: Detected MX25L3205D with page size 64 KiB, total 4 MiB
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:0x3fed0000:0x3ff959e4
       BSS:0x3ffef104
       Stack:0x3f9bff20
       Heap:0x3f9c0000:0x3fed0000
       U-Boot Environment:0x00100000:0x00110000 (SPI)

Board configuration detected:
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   SGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  3  0 
Marvell>> setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x3000000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv initrd_high 0xffffffff
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"'
Marvell>> setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/$dtbfilename; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Marvell>> run usb_bootcmd
Booting from USB ...
4141288 bytes read in 457 ms (8.6 MiB/s)
18679 bytes read in 660 ms (27.3 KiB/s)
7070236 bytes read in 711 ms (9.5 MiB/s)
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-4.12.4-mvebu-tld-1
   Created:      2017-08-22  11:10:43 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7070172 Bytes = 6.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff8f6 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.1-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Sat Nov 25 00:32:53 PST 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 17 pages/cpu @ef7c6000 s40716 r8192 d20724 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env) earlyprintk=serial
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1019036K/1048576K available (8192K kernel code, 722K rwdata, 2180K rodata, 1024K init, 337K bss, 29540K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db4848   ( 723 kB)
[    0.000000]        .bss : 0xc0dbbf1c - 0xc0e103c4   ( 338 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000009] sched_clock: 64 bits at 533MHz, resolution 1ns, wraps every 2199023255551ns
[    0.008074] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7aed16d152, max_idle_ns: 440795225656 ns
[    0.019167] Switching to timer-based delay loop, resolution 1ns
[    0.025380] Ignoring duplicate/late registration of read_current_timer delay
[    0.032489] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043960] Console: colour dummy device 80x30
[    0.048493] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.059155] pid_max: default: 32768 minimum: 301
[    0.063946] Security Framework initialized
[    0.068176] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074851] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.082475] CPU: Testing write buffer coherency: ok
[    0.087604] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.125246] Setting up static identity map for 0x100000 - 0x100060
[    0.131593] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.136941] mvebu-pmsu: Initializing Power Management Service Unit
[    0.143273] Hierarchical SRCU implementation.
[    0.185217] smp: Bringing up secondary CPUs ...
[    0.235287] Booting CPU 1
[    0.238192] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.238277] smp: Brought up 1 node, 2 CPUs
[    0.248190] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.254602] CPU: All CPU(s) started in SVC mode.
[    0.260039] devtmpfs: initialized
[    0.266290] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.274295] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.284193] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.290557] prandom: seed boundary self test passed
[    0.298033] prandom: 100 self tests passed
[    0.302198] pinctrl core: initialized pinctrl subsystem
[    0.308334] NET: Registered protocol family 16
[    0.313583] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.321855] cpuidle: using governor ladder
[    0.326083] cpuidle: using governor menu
[    0.330240] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.338311] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.344370] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.352533] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.416850] vgaarb: loaded
[    0.419830] SCSI subsystem initialized
[    0.424378] usbcore: registered new interface driver usbfs
[    0.430093] usbcore: registered new interface driver hub
[    0.435604] usbcore: registered new device driver usb
[    0.441071] media: Linux media interface: v0.10
[    0.445734] Linux video capture interface: v2.00
[    0.455425] clocksource: Switched to clocksource arm_global_timer
[    0.514404] VFS: Disk quotas dquot_6.6.0
[    0.518492] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.531285] NET: Registered protocol family 2
[    0.536197] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.543354] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.549964] TCP: Hash tables configured (established 8192 bind 8192)
[    0.556452] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.562461] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.569077] NET: Registered protocol family 1
[    0.573801] RPC: Registered named UNIX socket transport module.
[    0.579814] RPC: Registered udp transport module.
[    0.584583] RPC: Registered tcp transport module.
[    0.589368] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.596013] Unpacking initramfs...
[    0.944773] Freeing initrd memory: 6908K
[    0.948993] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.955849] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.964974] audit: initializing netlink subsys (disabled)
[    0.970573] audit: type=2000 audit(0.939:1): state=initialized audit_enabled=0 res=1
[    0.970844] Initialise system trusted keyrings
[    0.970869] Key type blacklist registered
[    0.970972] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.978409] zbud: loaded
[    0.989211] NFS: Registering the id_resolver key type
[    0.989222] Key type id_resolver registered
[    0.989225] Key type id_legacy registered
[    0.989235] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.989238] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.989396] jffs2: version 2.2. (NAND) (SUMMARY)   2001-2006 Red Hat, Inc.
[    0.989727] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.989833] orangefs_init: module version upstream loaded
[    0.993497] Key type asymmetric registered
[    0.993501] Asymmetric key parser 'x509' registered
[    0.993540] bounce: pool size: 64 pages
[    0.993579] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.993584] io scheduler noop registered
[    0.993587] io scheduler deadline registered
[    0.993653] io scheduler cfq registered (default)
[    0.995257] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.997590] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.997598] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.997604] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.997609] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.997989] PCI: bus0: Fast back to back transfers disabled
[    0.998000] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.998014] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.998099] PCI: bus1: Fast back to back transfers enabled
[    0.998202] PCI: bus2: Fast back to back transfers enabled
[    0.998233] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.998243] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.998788] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.056027] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.056204] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.115998] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.159175] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.160481] console [ttyS0] disabled
[    1.230475] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.239591] console [ttyS0] enabled
[    1.239591] console [ttyS0] enabled
[    1.246714] bootconsole [earlycon0] disabled
[    1.246714] bootconsole [earlycon0] disabled
[    1.256830] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.265951] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.285723] scsi host0: ahci-mvebu
[    1.289481] scsi host1: ahci-mvebu
[    1.293110] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.301087] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.310192] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.318186] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.324574] nand: Hynix H27U4G8F2DTR-BC
[    1.328449] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.336076] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.344048] Bad block table found at page 261824, version 0x01
[    1.351008] Bad block table found at page 261760, version 0x01
[    1.357075] nand_read_bbt: bad block at 0x0000061e0000
[    1.362248] nand_read_bbt: bad block at 0x00000e1c0000
[    1.367425] nand_read_bbt: bad block at 0x00000e1e0000
[    1.372608] nand_read_bbt: bad block at 0x00001ff80000
[    1.377781] nand_read_bbt: bad block at 0x00001ffa0000
[    1.382944] nand_read_bbt: bad block at 0x00001ffc0000
[    1.388118] nand_read_bbt: bad block at 0x00001ffe0000
[    1.393307] 1 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.399441] Creating 1 MTD partitions on "pxa3xx_nand-0":
[    1.404870] 0x000000000000-0x000020000000 : "ubifs"
[    1.414703] m25p80 spi1.0: mx25l3205d (4096 Kbytes)
[    1.419633] 2 cmdlinepart partitions found on MTD device spi1.0
[    1.425597] Creating 2 MTD partitions on "spi1.0":
[    1.430420] 0x000000000000-0x000000100000 : "uboot"
[    1.436144] 0x000000100000-0x000000110000 : "uboot_env"
[    1.443566] libphy: Fixed MDIO Bus: probed
[    1.448697] libphy: orion_mdio_bus: probed
[    1.457607] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.467898] mvneta f1070000.ethernet eth0: Using random mac address c2:ef:6f:0f:da:16
[    1.476249] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.482825] ehci-pci: EHCI PCI platform driver
[    1.487394] ehci-orion: EHCI orion driver
[    1.491582] orion-ehci f1058000.usb: EHCI Host Controller
[    1.497056] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.504743] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.545438] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.551552] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.558393] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.565665] usb usb1: Product: EHCI Host Controller
[    1.570569] usb usb1: Manufacturer: Linux 4.14.1-mvebu-tld-1 ehci_hcd
[    1.577052] usb usb1: SerialNumber: f1058000.usb
[    1.582159] hub 1-0:1.0: USB hub found
[    1.585971] hub 1-0:1.0: 1 port detected
[    1.590771] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.596143] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.603757] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.612374] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000
[    1.618298] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.625124] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.632399] usb usb2: Product: xHCI Host Controller
[    1.636788] ata1: SATA link down (SStatus 0 SControl 300)
[    1.636823] ata2: SATA link down (SStatus 0 SControl 300)
[    1.648189] usb usb2: Manufacturer: Linux 4.14.1-mvebu-tld-1 xhci-hcd
[    1.654663] usb usb2: SerialNumber: f10f0000.usb3
[    1.659748] hub 2-0:1.0: USB hub found
[    1.663543] hub 2-0:1.0: 1 port detected
[    1.667751] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.673100] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    1.680713] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.688946] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    1.696740] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.704001] usb usb3: Product: xHCI Host Controller
[    1.708919] usb usb3: Manufacturer: Linux 4.14.1-mvebu-tld-1 xhci-hcd
[    1.715393] usb usb3: SerialNumber: f10f0000.usb3
[    1.720457] hub 3-0:1.0: USB hub found
[    1.724250] hub 3-0:1.0: 1 port detected
[    1.728559] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.733912] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.741533] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.750150] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000
[    1.756047] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    1.762873] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.770146] usb usb4: Product: xHCI Host Controller
[    1.775051] usb usb4: Manufacturer: Linux 4.14.1-mvebu-tld-1 xhci-hcd
[    1.781590] usb usb4: SerialNumber: f10f8000.usb3
[    1.786656] hub 4-0:1.0: USB hub found
[    1.790449] hub 4-0:1.0: 1 port detected
[    1.794618] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.799982] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    1.807582] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.815817] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    1.822643] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.829916] usb usb5: Product: xHCI Host Controller
[    1.834820] usb usb5: Manufacturer: Linux 4.14.1-mvebu-tld-1 xhci-hcd
[    1.841390] usb usb5: SerialNumber: f10f8000.usb3
[    1.846465] hub 5-0:1.0: USB hub found
[    1.850257] hub 5-0:1.0: 1 port detected
[    1.854602] usbcore: registered new interface driver usblp
[    1.860230] usbcore: registered new interface driver usb-storage
[    1.866466] mousedev: PS/2 mouse device common for all mice
[    1.872922] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    1.880955] i2c /dev entries driver
[    1.896624] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    1.909543] orion_wdt: Initial timeout 171 sec
[    1.916832] marvell-cesa f1090000.crypto: CESA device successfully registered
[    1.924333] hidraw: raw HID events driver (C) Jiri Kosina
[    1.930156] usbcore: registered new interface driver usbhid
[    1.935778] usbhid: USB HID core driver
[    1.940074] drop_monitor: Initializing network drop monitor service
[    1.946447] Netfilter messages via NETLINK v0.30.
[    1.951187] ip_set: protocol 6
[    1.954517] NET: Registered protocol family 10
[    1.959787] Segment Routing with IPv6
[    1.963519] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.970622] NET: Registered protocol family 17
[    1.975132] 8021q: 802.1Q VLAN Support v1.8
[    1.979385] Key type dns_resolver registered
[    1.983799] ThumbEE CPU extension supported.
[    1.988111] Registering SWP/SWPB emulation handler
[    1.993459] registered taskstats version 1
[    1.997595] Loading compiled-in X.509 certificates
[    2.002458] zswap: loaded using pool lzo/zbud
[    2.016483] Key type big_key registered
[    2.024560] Key type encrypted registered
[    2.030535] v5.0-sata0: supplied by pwr_en_sata0
[    2.035216] v12.0-sata0: supplied by pwr_en_sata0
[    2.039996] usb 2-1: new high-speed USB device number 2 using xhci-hcd
[    2.047760] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    2.054883] armada38x-rtc f10a3800.rtc: setting system clock to 2018-04-17 17:39:20 UTC (1523986760)
[    2.064320] v5.0-sata1: supplied by pwr_en_sata1
[    2.069044] v12.0-sata1: supplied by pwr_en_sata1
[    2.073810] v5.0-sata0: disabling
[    2.077161] v12.0-sata0: disabling
[    2.080580] v5.0-sata1: disabling
[    2.083910] v12.0-sata1: disabling
[    2.088626] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    2.225985] usb 2-1: New USB device found, idVendor=0781, idProduct=5567
[    2.232731] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.239954] usb 2-1: Product: Cruzer Blade
[    2.244075] usb 2-1: Manufacturer: SanDisk
[    2.248227] usb 2-1: SerialNumber: 4C530103371128105004
[    2.258862] usb-storage 2-1:1.0: USB Mass Storage device detected
[    2.276352] scsi host2: usb-storage 2-1:1.0
Begin: Loading essential drivers ... done.
[    3.296048] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.26 PQ: 0 ANSI: 6
[    3.305048] sd 2:0:0:0: [sda] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    3.314256] sd 2:0:0:0: [sda] Write Protect is off
[    3.319401] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    3.330595]  sda: sda1
[    3.334276] sd 2:0:0:0: [sda] Attached SCSI disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so skipping root file[   12.861541] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
 system
[   12.871733] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[   12.878664] EXT4-fs (sda1): write access will be enabled during recovery
[   12.950331] EXT4-fs (sda1): recovery complete
[   12.960110] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'debian'...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Synthesizing the initial hotplug events...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Waiting for /dev to be fully populated...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Activating swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   16.034403] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sda1 
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 22040/977280 files, 384402/3907840 blocks
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   16.223147] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[....] Will now activate lvm and md swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[[36minfo[39;49m] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[....] Cleaning /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
 /tmp[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Will now mount local filesystems:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Will now activate swapfile swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Checking minimum space in /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Setting kernel variables...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Initializing random number generator...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[   17.946305] m88e1318_get_wol: phy_id = 0x1410dd1 OK
[   17.951386] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/c2:ef:6f:0f:da:16
Sending on   LPF/eth0/c2:ef:6f:0f:da:16
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting RPC port mapper daemon: rpcbind[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NFS common utili[   79.563744] random: crng init done
ties: statd idmapd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
INIT: Entering runlevel: 2
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2589 (syslogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Not starting NFS kernel daemon: no exports. ...[?25l[?1c7[1G[[33mwarn[39;49m8[?25h[?0c [33m(warning).[39;49m
[....] Starting periodic command scheduler: cron[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NTP server: ntpd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting system message bus: dbus[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2588 (klogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Running local boot scripts (/etc/rc.local)[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.

Debian GNU/Linux 9 debian ttyS0

debian login: root
Password: 
Last login: Wed Apr 11 23:23:21 PDT 2018 on ttyS0
Linux debian 4.14.1-mvebu-tld-1 #1 SMP PREEMPT Sat Nov 25 00:32:53 PST 2017 armv7l

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian
Thecus N2350
Linux version 4.14.1-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Sat Nov 25 00:32:53 PST 2017
Debian 9.1
Tue Apr 17 10:41:09 PDT 2018 up 1 minute
root@debian:~# 
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 17, 2018 01:41PM
moving on..:
I have added a disk to the system and updated the kernel to your 4.15 version.
Adding the disk mixes up the /dev/sd*, so i changed the definition back to be label based. The boot commands are now:
setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x3000000
setenv load_image_addr 0x02000000
setenv initrd_high 0xffffffff
setenv dtbfilename armada-385-thecus-n2350.dtb
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/$dtbfilename; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
usb start
run usb_bootcmd

I think i would like to "saveenv" now. What do i need to do for that - i don't want to do anything wrong, even if we have the backup method available.
Thanks!
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 17, 2018 04:00PM
Manuel,

> I think i would like to "saveenv" now. What do i
> need to do for that - i don't want to do anything
> wrong, even if we have the backup method
> available.

Excellent works!

Scanning it, it looks like everything working. Let me study the serial bootlog a little bit more and get back to you.

I would like you to keep this running for a few hours. And then we'll get to the GPIO, ...the rest of the peripherals checking.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 17, 2018 10:08PM
Manuel,

It looks great! we have brought up this box successfully!

Let’s move on to other minor topics:

Saving envs
GPIO
I2C

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 17, 2018 11:30PM
Hi bodhi,

> I would like you to keep this running for a few
> hours. And then we'll get to the GPIO, ...the rest
> of the peripherals checking.
I had the box running over night just fine:
mjung@debian:~$ uptime
 22:19:29 up  8:54,  1 user,  load average: 1.93, 1.57, 1.39

It is copying data over network onto a new zstd compressed btrfs volume.
What GPIOs are available? We already use some for the USB power. The LEDs already seem to be lit - even an additional one with the HDD attached. Are there more? Ok, i see the datasheet of the SOC shows 60 GPIOs.
I guess the GPIO for the fan would be nice. But it already spins down automatically, when the system boots up (or when uboot comes up? Not sure).
- Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 18, 2018 12:58AM
Manuel,

GPIO LEDS

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_sata1_white_led 
				&pmx_sata1_red_led
				&pmx_sata2_white_led				
				&pmx_sata2_red_led
				&pmx_sys_white_led
				&pmx_sys_red_led>;

		pinctrl-names = "default";

		white_sata1 {
			label = "n2350:white:sata1";
			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "ide-disk1";
		};

		red_sata1 {
			label = "n2350:red:sata1";
			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};

		white-sata2 {
			label = "n2350:white:sata2";
			gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
		};

		red-sata2 {                       
			label = "n2350:red:sata2";
			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
		};

		white-sys {
			label = "n2350:white:sys";
			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

                red-sys {
                        label = "n2350:red:sys";
                        gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
                };

	};


So we'll check the LEDs:

Execute and observe the LED behavior. See if we can toggle it back and forth.
echo defaul-on > /sys/class/leds/n2350:white:sys/trigger
echo none > /sys/class/leds/n2350:white:sys/trigger
And test the rest the same way.


For SATA 1 and SATA 2, the triggers are different (we don't do it manually like the system LED).

echo ide-disk1 > /sys/class/leds/n2350:white:sata1/trigger
And then do something like listing some HDD 1 folder to trigger the LED flashing while it is being accessed.

I'll post more on gpio-keys in a separate post.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 18, 2018 08:22AM
Hi bodhi,

Okay, i have tested the LEDs.
First by activating them manually. I have used a short script for that (attached to this post):
root@debian:~# ./led.sh 
Checking n2350:white:sys
Checking n2350:red:sys
Checking n2350:white:sata1
Checking n2350:red:sata1
Checking n2350:white:sata2
Checking n2350:red:sata2
This blinks the LEDs LED3, LED5, LED6 in this order as labelled on the PCB.
I have also tested the sata1 LED with "ide-disk1" and listed a directory: That also worked fine.

Two additional notes:
1. There are actually 6 LEDs: LED2 LED1 and LED4 were missing in this test.
At the moment LED2 is blinking - this seems to be the power LED, and LED1 is constantly on and blue.
2. The LED are actually not white, but either blue or red (or off).

- Manuel
Attachments:
open | download - led.sh (271 bytes)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 18, 2018 04:58PM
Manuel,

> 1. There are actually 6 LEDs: LED2 LED1 and LED4
> were missing in this test.

Do you have the board inside the case? I think it is more helpful if we confirm that the LEDs on the outside are what we think they are. For example,

Quote

n2350:white:sys is indeed the system LED and it turns on when we do "echo default-on"

> At the moment LED2 is blinking - this seems to
> be the power LED, and LED1 is constantly on and
> blue.

Probably the Power LED button is on all the time. It is usually set up to be hard wired. What is LED1?

> 2. The LED are actually not white, but either blue
> or red (or off).
>

That's interesting! we'll modify the name once everything checked out.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 18, 2018 06:45PM
Manuel,

GPIO keys testing.

apt-get install esekeyd

And set it up in the conf file. Here is my test version, where the button push will print out to syslog. Once a button works, replace it with your own action or scripts to do certain things such as shutdown, backup,....

cat /etc/esekeyd.conf
POWER:/usr/bin/logger -s -i "POWER button pushed"
RESTART:/usr/bin/logger -s -i "RESTART button pushed"
COPY:/usr/bin/logger -s -i "COPY Button pushed"

There are 3 buttons: POWER, RESTART, and COPY. I'm not sure where outside the box that you can access these... yet :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 18, 2018 11:47PM
Hi bodhi,
> Do you have the board inside the case? I think it
> is more helpful if we confirm that the LEDs on the
> outside are what we think they are. For example,
>
>
Quote

n2350:white:sys is indeed the system
> LED and it turns on when we do "echo
> default-on"
Okay, you are right. I have it not assembled at the moment, but can still make out, which one is which. Probably i should finally solder the UART and assemble the case..
So from top to bottom the LED are labelled:

label on box, label on PCB, function
power, LED2
'i', LED3, n2350:white:sys/n2350:red:sys
disk 1, LED5, n2350:white:sata1/n2350:red:sata1
disk 2, LED6, n2350:white:sata2/n2350:red:sata2
LAN, LED1
SS USB, LED4

> Probably the Power LED button is on all the time.
> It is usually set up to be hard wired. What is
> LED1?
Okay, you are probably right. The other LED might directly be coupled in hardware.

-Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 12:01AM
> GPIO keys testing.

> cat /etc/esekeyd.conf
>
> POWER:/usr/bin/logger -s -i "POWER button pushed"
> RESTART:/usr/bin/logger -s -i "RESTART button
> pushed"
> COPY:/usr/bin/logger -s -i "COPY Button pushed"
>
Okay, The Key codes are not quite correct for our box/our config.
keytest shows the right keys:

KEY_116:/usr/bin/logger -s -i "POWER button pushed"
KEY_408:/usr/bin/logger -s -i "RESTART button pushed"
KEY_133:/usr/bin/logger -s -i "COPY button pushed"
This config works. Power and Copy are on the front, Reset on the back - push it with a pen. All are well labelled.

> There are 3 buttons: POWER, RESTART, and COPY. I'm
> not sure where outside the box that you can access
> these... yet :)
Haha, oh no - still no time to take it out of the box?
Cheers, Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 12:42AM
> Haha, oh no - still no time to take it out of the
> box?

:) I'm afraid to burn the whole weekend on the new toy :)) I did open it to check it over, but have not disassembled the case yet.

But you are doing a really great job as collaborator, I have not even thought I need to get to it hands on!


KEY_116:/usr/bin/logger -s -i "POWER button pushed"
KEY_408:/usr/bin/logger -s -i "RESTART button pushed"
KEY_133:/usr/bin/logger -s -i "COPY button pushed"

It's good to know these keys values. However, when you said "The Key codes are not quite correct for our box/our config", then it means the GPIOs number in the DTS are worng ones! Note the key numeric values are not correlated to the GPIO numbers.

I guess I need to look at the GPL again.

In the mean time, let's move on to the saving u-boot envs in next posts.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 01:33AM
> It's good to know these keys values. However, when
> you said "The Key codes are not quite correct for
> our box/our config", then it means the GPIOs
> number in the DTS are worng ones! Note the key
> numeric values are not correlated to the GPIO
> numbers.
Ok, sure. I am confused by our dts:
I can see the "gpio-keys" section, which is not working as we want at the moment. It also specifies some pins.
But why does it also reference this section:
			pinctrl@18000 {
				pinctrl-names = "default";

				pmx_power_button: pmx_power-button {
					marvell,pins = "mpp49";
					marvell,function = "gpio";
				};

				pmx_copy_button: pmx_copy-button {
					marvell,pins = "mpp52";
					marvell,function = "gpio";
				};
[...]
This also seems to specify pins?

I don't understand it. I will try to gain some knowledge how this works this evening..

Yeah, setting the envs would be nice. I am setting up the box at the same time, copying data etc. It would be nice, if i could reboot it without UART.

Cheers, Manuel

edit:

The original uboot always tries to boot the rescue_fw image from usb:
bootcmd=usb start;if fatload usb 0:1 0x2000000 rescue_fw/rescue_fw.img;then imi 0x2000000;source 0x2000000;fi;ubi part ubifs;ubifsmount boot;ubifsload 0x2000000 boot/bzImage;ubifsload 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000;

I think i will try to hook up a custom rescue_fw image/script in a small fat partition on the usb disk, which then runs our uboot cmds. This way one could boot custom firmware on this box without touching anything from the original software.
That would be nice :)



Edited 2 time(s). Last edit at 04/19/2018 01:51AM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 02:36AM
> I can see the "gpio-keys" section, which is not
> working as we want at the moment. It also
> specifies some pins.


> But why does it also reference this section:
>
> 			pinctrl@18000 {
> 				pinctrl-names = "default";
> 
> 				pmx_power_button: pmx_power-button {
> 					marvell,pins = "mpp49";
> 					marvell,function = "gpio";
> 				};
> 
> 				pmx_copy_button: pmx_copy-button {
> 					marvell,pins = "mpp52";
> 					marvell,function = "gpio";
> 				};
> [...]			
>
> This also seems to specify pins?

It is for the pincrtl driver. In the old days, GPIOs are just specified by themselves. In later kernel, pinmux is a driver that control the GPIOs which are multiplexed (ie. each GPIO could be used for a different purpose by the manufactorer). Not easy to describe in a short sentence!

> Yeah, setting the envs would be nice. I am setting
> up the box at the same time, copying data etc. It
> would be nice, if i could reboot it without UART.

This would take some scripting works to make it resilient. We have now is a really basic sequence good enought for testing.

>
> The original uboot always tries to boot the
> rescue_fw image from usb:
>
> bootcmd=usb start;if fatload usb 0:1 0x2000000
> rescue_fw/rescue_fw.img;then imi 0x2000000;source
> 0x2000000;fi;ubi part ubifs;ubifsmount
> boot;ubifsload 0x2000000 boot/bzImage;ubifsload
> 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000;
>
>
> I think i will try to hook up a custom rescue_fw
> image/script in a small fat partition on the usb
> disk, which then runs our uboot cmds. This way one
> could boot custom firmware on this box without
> touching anything from the original software.
> That would be nice :)

That's the right idea! however, what we really need is to script this things using a robust sequence that fallbackto rescue and stock. I'll post that later.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 11:07AM
Hi,

I realized booting with the rescue_fw method. This was actually pretty easy. It means everybody can boot custom debian without opening the NAS. It works like this:

Instead of the normal USB stick with a single ext3 partition called "rootfs", create a usb stick with the following partition layout:

1. 100MB fat32 (name does not matter, i named it "rescue_fw"
2. Rest of space ext3 and call it "rootfs"

The first partition can also be smaller than this. We actually need less than 1kB.
The rootfs is actually the normal rootfs filesystem as described by bodhi (You can also resize a working rootfs usb stick with gparted).
In the first partition do this:
cd /my/flash/drive/partition1
mkdir rescue_fw
cp ~/rescue_fw.img rescue_fw/rescue_fw.img

I'll attach the rescue_fw.img to this post. It is actually only the following translated script:
setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x3000000
setenv load_image_addr 0x02000000
setenv initrd_high 0xffffffff
setenv boot_device 0:2
setenv dtbfilename armada-385-thecus-n2350.dtb
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; ext2load usb $boot_device $load_image_addr /boot/zImage; ext2load usb $boot_device $load_dtb_addr /boot/dts/$dtbfilename; ext2load usb $boot_device $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
usb start
run usb_bootcmd

Which can be translated with (see also here):
mkimage -T script -C none -A arm -n 'Load Debian from rootfs' -d bootcmd rescue_fw.img

The bootcmds are nearly the ones from before. The only change is that we load the kernel etc from the second partition of the boot device now. I introduced for this a new variable called "boot_device".

@bodhi:
I think this is already fail proof? I never save the envs. The stock bootcmd in uboot tries to launch the rescue_fw.img script from usb. If this fails (e.g. there is no rescue_fw or the rescue_fw.img script fails somewhere), it automatically boots the stock kernel from nand (happend for me first, because the boot_device was still 0:1).
Of course we could still improve the our bootcmds to activate netconsole/etc to make it easier to debug uboot stuff, without an actual UART connection. But for now i automatically boots from the usb stick to our mainline kernel system.

And now the log!

BootROM - 1.73
Booting from SPI flash


General initialization - Version: 1.0.0
AVS selection from EFUSE disabled (Skip reading EFUSE values)
Overriding default AVS value to: 0x23
Detected Device ID 6820
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  0   |  SGMII0     |
 |   1    |  3   |  SATA0      |
 |   2    |  3   |  SATA1      |
 |   4    |  5   |  USB3 HOST0 |
 |   5    |  5   |  USB3 HOST1 |
 -------------------------------
High speed PHY - Ended Successfully
DDR4 Training Sequence - Ver TIP-0.23.(Sublib 0.8)0
DDR4 Training Sequence - Switching XBAR Window to FastPath Window 
DDR4 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Aug 09 2017 - 16:51:03) Marvell version: 2015_T1.0p18

Board: A38x-Customer0-Thecus-N2350
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR4    @ 800 [MHz]
       DDR4 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
NAND:  512 MiB
MMC:   mv_sdh: 0
SF: Detected MX25L3205D with page size 64 KiB, total 4 MiB
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:0x3fed0000:0x3ff959e4
       BSS:0x3ffef104
       Stack:0x3f9bff20
       Heap:0x3f9c0000:0x3fed0000
       U-Boot Environment:0x00100000:0x00110000 (SPI)

Board configuration detected:
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   SGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  3  2  1  0 
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
reading rescue_fw/rescue_fw.img
863 bytes read in 33 ms (25.4 KiB/s)

## Checking Image at 02000000 ...
   Legacy image found
   Image Name:   Load Debian from rootfs
   Created:      2018-04-19  16:38:01 UTC
   Image Type:   ARM Linux Script (uncompressed)
   Data Size:    799 Bytes = 799 Bytes
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
      Image 0: 791 Bytes = 791 Bytes
   Verifying Checksum ... OK
## Executing script at 02000000
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Booting from USB ...
4183560 bytes read in 181 ms (22 MiB/s)
18679 bytes read in 660 ms (27.3 KiB/s)
7690086 bytes read in 223 ms (32.9 MiB/s)
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-4.15.4-mvebu-tld-1
   Created:      2018-04-17  20:19:31 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7690022 Bytes = 7.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff8f6 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Sun Feb 18 13:37:19 PST 2018
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40716 r8192 d20724 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1018452K/1048576K available (8192K kernel code, 757K rwdata, 2208K rodata, 1024K init, 335K bss, 30124K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 758 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 336 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000009] sched_clock: 64 bits at 533MHz, resolution 1ns, wraps every 2199023255551ns
[    0.007987] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7aed16d152, max_idle_ns: 440795225656 ns
[    0.018994] Switching to timer-based delay loop, resolution 1ns
[    0.025123] Ignoring duplicate/late registration of read_current_timer delay
[    0.032146] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043527] Console: colour dummy device 80x30
[    0.047974] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.058550] pid_max: default: 32768 minimum: 301
[    0.063251] Security Framework initialized
[    0.067393] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.073983] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.081517] CPU: Testing write buffer coherency: ok
[    0.086567] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.124989] Setting up static identity map for 0x100000 - 0x100060
[    0.131250] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.136514] mvebu-pmsu: Initializing Power Management Service Unit
[    0.142765] Hierarchical SRCU implementation.
[    0.184959] smp: Bringing up secondary CPUs ...
[    0.235032] Booting CPU 1
[    0.237850] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.237940] smp: Brought up 1 node, 2 CPUs
[    0.247683] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.254010] CPU: All CPU(s) started in SVC mode.
[    0.259366] devtmpfs: initialized
[    0.265503] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.273462] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.283274] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.289550] prandom: seed boundary self test passed
[    0.296943] prandom: 100 self tests passed
[    0.301023] pinctrl core: initialized pinctrl subsystem
[    0.307097] NET: Registered protocol family 16
[    0.312280] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.319582] audit: initializing netlink subsys (disabled)
[    0.325071] audit: type=2000 audit(0.300:1): state=initialized audit_enabled=0 res=1
[    0.334999] cpuidle: using governor ladder
[    0.339098] cpuidle: using governor menu
[    0.343167] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.351157] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.357141] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.365219] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.406895] vgaarb: loaded
[    0.409939] SCSI subsystem initialized
[    0.414262] usbcore: registered new interface driver usbfs
[    0.419839] usbcore: registered new interface driver hub
[    0.425231] usbcore: registered new device driver usb
[    0.430787] media: Linux media interface: v0.10
[    0.435404] Linux video capture interface: v2.00
[    0.441194] clocksource: Switched to clocksource arm_global_timer
[    0.498446] VFS: Disk quotas dquot_6.6.0
[    0.502467] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.518557] NET: Registered protocol family 2
[    0.523367] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.530438] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.536955] TCP: Hash tables configured (established 8192 bind 8192)
[    0.543357] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.549279] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.555795] NET: Registered protocol family 1
[    0.560434] RPC: Registered named UNIX socket transport module.
[    0.566349] RPC: Registered udp transport module.
[    0.571032] RPC: Registered tcp transport module.
[    0.575724] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.582283] Unpacking initramfs...
[    0.958814] Freeing initrd memory: 7512K
[    0.962948] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.969710] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.979735] Initialise system trusted keyrings
[    0.984414] Key type blacklist registered
[    0.988510] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.995026] zbud: loaded
[    0.998222] NFS: Registering the id_resolver key type
[    1.003290] Key type id_resolver registered
[    1.007454] Key type id_legacy registered
[    1.011471] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.018144] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.024654] jffs2: version 2.2. (NAND) (SUMMARY)   2001-2006 Red Hat, Inc.
[    1.032084] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.038601] orangefs_init: module version upstream loaded
[    1.046899] Key type asymmetric registered
[    1.050980] Asymmetric key parser 'x509' registered
[    1.055892] bounce: pool size: 64 pages
[    1.059796] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.067175] io scheduler noop registered
[    1.071080] io scheduler deadline registered
[    1.075406] io scheduler cfq registered (default)
[    1.082239] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    1.092110] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    1.098012] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.104271] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    1.111119] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.117071] PCI: bus0: Fast back to back transfers disabled
[    1.122653] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.130634] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.138758] PCI: bus1: Fast back to back transfers enabled
[    1.144383] PCI: bus2: Fast back to back transfers enabled
[    1.149877] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.154876] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.160587] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.221782] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.229419] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.291778] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.355166] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.364619] console [ttyS0] disabled
[    1.388288] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.397272] console [ttyS0] enabled
[    1.397272] console [ttyS0] enabled
[    1.404295] bootconsole [earlycon0] disabled
[    1.404295] bootconsole [earlycon0] disabled
[    1.414318] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.423444] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.433203] scsi host0: ahci-mvebu
[    1.446981] scsi host1: ahci-mvebu
[    1.450619] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.458598] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.467333] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.475348] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.481784] nand: Hynix H27U4G8F2DTR-BC
[    1.485659] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.493283] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.501275] Bad block table found at page 261824, version 0x01
[    1.508222] Bad block table found at page 261760, version 0x01
[    1.514290] nand_read_bbt: bad block at 0x0000061e0000
[    1.519463] nand_read_bbt: bad block at 0x00000e1c0000
[    1.524643] nand_read_bbt: bad block at 0x00000e1e0000
[    1.529827] nand_read_bbt: bad block at 0x00001ff80000
[    1.534999] nand_read_bbt: bad block at 0x00001ffa0000
[    1.540163] nand_read_bbt: bad block at 0x00001ffc0000
[    1.545336] nand_read_bbt: bad block at 0x00001ffe0000
[    1.550535] 1 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.556674] Creating 1 MTD partitions on "pxa3xx_nand-0":
[    1.562115] 0x000000000000-0x000020000000 : "ubifs"
[    1.571610] m25p80 spi1.0: mx25l3205d (4096 Kbytes)
[    1.576519] 2 cmdlinepart partitions found on MTD device spi1.0
[    1.582491] Creating 2 MTD partitions on "spi1.0":
[    1.587312] 0x000000000000-0x000000100000 : "uboot"
[    1.592898] 0x000000100000-0x000000110000 : "uboot_env"
[    1.599535] libphy: Fixed MDIO Bus: probed
[    1.604252] libphy: orion_mdio_bus: probed
[    1.613250] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.622779] mvneta f1070000.ethernet eth0: Using random mac address 5a:33:64:c5:84:2b
[    1.630972] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.637631] ehci-pci: EHCI PCI platform driver
[    1.642168] ehci-orion: EHCI orion driver
[    1.646362] orion-ehci f1058000.usb: EHCI Host Controller
[    1.651823] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.659510] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.691209] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.697320] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.704181] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.711469] usb usb1: Product: EHCI Host Controller
[    1.716373] usb usb1: Manufacturer: Linux 4.15.4-mvebu-tld-1 ehci_hcd
[    1.722870] usb usb1: SerialNumber: f1058000.usb
[    1.727889] hub 1-0:1.0: USB hub found
[    1.731716] hub 1-0:1.0: 1 port detected
[    1.736350] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.741738] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.749370] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.758004] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000
[    1.763994] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.770836] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.778120] usb usb2: Product: xHCI Host Controller
[    1.783056] usb usb2: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    1.789544] usb usb2: SerialNumber: f10f0000.usb3
[    1.794652] hub 2-0:1.0: USB hub found
[    1.798451] hub 2-0:1.0: 1 port detected
[    1.802661] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.808030] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    1.815581] ata2: SATA link down (SStatus 0 SControl 300)
[    1.821096] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.829332] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    1.836171] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.843522] usb usb3: Product: xHCI Host Controller
[    1.848427] usb usb3: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    1.854916] usb usb3: SerialNumber: f10f0000.usb3
[    1.859978] hub 3-0:1.0: USB hub found
[    1.863786] hub 3-0:1.0: 1 port detected
[    1.868083] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.873456] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.881079] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.889693] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000
[    1.895681] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    1.902521] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.909782] usb usb4: Product: xHCI Host Controller
[    1.914770] usb usb4: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    1.921258] usb usb4: SerialNumber: f10f8000.usb3
[    1.926328] hub 4-0:1.0: USB hub found
[    1.930121] hub 4-0:1.0: 1 port detected
[    1.934316] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.939665] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    1.947262] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.955501] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    1.961224] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    1.962368] ata1.00: ATA-10: WDC WD40NPZZ-82PDPT0, 01.01A01, max UDMA/133
[    1.962374] ata1.00: 7814037168 sectors, multi 0: LBA48 
[    1.975420] ata1.00: configured for UDMA/133
[    1.975839] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40NPZZ-82P 1A01 PQ: 0 ANSI: 5
[    1.981966] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    1.981972] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    1.982014] sd 0:0:0:0: [sda] Write Protect is off
[    1.982088] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.022488] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.029750] usb usb5: Product: xHCI Host Controller
[    2.034668] usb usb5: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.041142] usb usb5: SerialNumber: f10f8000.usb3
[    2.046245] hub 5-0:1.0: USB hub found
[    2.050040] hub 5-0:1.0: 1 port detected
[    2.054537] usbcore: registered new interface driver usblp
[    2.060150] usbcore: registered new interface driver usb-storage
[    2.066394] mousedev: PS/2 mouse device common for all mice
[    2.072903] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.080938] i2c /dev entries driver
[    2.096501] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    2.109442] orion_wdt: Initial timeout 171 sec
[    2.116868] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.124401] hidraw: raw HID events driver (C) Jiri Kosina
[    2.130201] usbcore: registered new interface driver usbhid
[    2.135820] usbhid: USB HID core driver
[    2.140147] drop_monitor: Initializing network drop monitor service
[    2.146510] Netfilter messages via NETLINK v0.30.
[    2.151268] ip_set: protocol 6
[    2.154597] NET: Registered protocol family 10
[    2.159759] Segment Routing with IPv6
[    2.163632] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.170666] NET: Registered protocol family 17
[    2.175195] 8021q: 802.1Q VLAN Support v1.8
[    2.179430] Key type dns_resolver registered
[    2.183865] ThumbEE CPU extension supported.
[    2.188162] Registering SWP/SWPB emulation handler
[    2.193538] registered taskstats version 1
[    2.197657] Loading compiled-in X.509 certificates
[    2.202541] zswap: loaded using pool lzo/zbud
[    2.217182] Key type big_key registered
[    2.221893] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    2.232322] Key type encrypted registered
[    2.238272] v5.0-sata0: supplied by pwr_en_sata0
[    2.241308] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.249547] v12.0-sata0: supplied by pwr_en_sata0
[    2.255468] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    2.262884] armada38x-rtc f10a3800.rtc: setting system clock to 2018-04-19 16:47:48 UTC (1524156468)
[    2.272521] v5.0-sata1: supplied by pwr_en_sata1
[    2.277243] v12.0-sata1: supplied by pwr_en_sata1
[    2.282066] v5.0-sata0: disabling
[    2.285426] v12.0-sata0: disabling
[    2.288866] usb 3-1: New USB device found, idVendor=0bc2, idProduct=2322
[    2.288872] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    2.288876] usb 3-1: Product: Expansion
[    2.288880] usb 3-1: Manufacturer: Seagate
[    2.288884] usb 3-1: SerialNumber: NA82MWVJ
[    2.303357] usb 3-1: USB controller f10f0000.usb3 does not support streams, which are required by the UAS driver.
[    2.303363] usb 3-1: Please try an other USB controller if you wish to use UAS.
[    2.303369] usb-storage 3-1:1.0: USB Mass Storage device detected
[    2.315732] scsi host2: usb-storage 3-1:1.0
[    2.315763] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4050000 action 0xe frozen
[    2.315767] ata2: irq_stat 0x80400040, connection status changed
[    2.315772] ata2: SError: { PHYRdyChg CommWake DevExch }
[    2.315794] ata2: hard resetting link
[    2.366572] v5.0-sata1: disabling
[    2.369904] v12.0-sata1: disabling
[    2.374640] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    2.790333] usbcore: registered new interface driver uas
[    3.391753] scsi 2:0:0:0: Direct-Access     Seagate  Expansion        9300 PQ: 0 ANSI: 6
[    3.401557] sd 2:0:0:0: [sdb] 250069679 512-byte logical blocks: (128 GB/119 GiB)
[    3.409456] sd 2:0:0:0: [sdb] Write Protect is off
[    3.415281] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.427404]  sdb: sdb1 sdb2
[    3.434575] sd 2:0:0:0: [sdb] Attached SCSI disk
Begin: Loading essential drivers ... done.
[    6.221300] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    6.234086] ata2.00: ATA-8: ST2000LM003 HN-M201RAD, 2BE10001, max UDMA/133
[    6.241000] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    6.254437] ata2.00: configured for UDMA/133
[    6.258742] ata2: EH complete
[    6.262112] scsi 1:0:0:0: Direct-Access     ATA      ST2000LM003 HN-M 0001 PQ: 0 ANSI: 5
[    6.270948] sd 1:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    6.280961] sd 1:0:0:0: [sdc] 4096-byte physical blocks
[    6.287329] sd 1:0:0:0: [sdc] Write Protect is off
[    6.292833] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.317711] sd 1:0:0:0: [sdc] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /dev/sdb2] fsck.ext3 -a -C0 /dev/sdb2 
rootfs: recovering journal
rootfs: clean, 29122/7815168 files, 1015915/31232768 blocks
done.
[   14.673443] EXT4-fs (sdb2): mounting ext3 file system using the ext4 subsystem
[   14.688130] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'vega'...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Synthesizing the initial hotplug events...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Waiting for /dev to be fully populated...[   15.911608] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   15.955726] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   15.990836] sd 1:0:0:0: Attached scsi generic sg2 type 0
[   16.181706] raid6: int32x1  gen()   170 MB/s
[   16.187647] random: crng init done
[   16.351732] raid6: int32x1  xor()   202 MB/s
[   16.521604] raid6: int32x2  gen()   170 MB/s
[   16.691446] raid6: int32x2  xor()   166 MB/s
[   16.861467] raid6: int32x4  gen()   188 MB/s
[   17.031441] raid6: int32x4  xor()   151 MB/s
[   17.201302] raid6: int32x8  gen()   198 MB/s
[   17.371287] raid6: int32x8  xor()   152 MB/s
[   17.375585] raid6: using algorithm int32x8 gen() 198 MB/s
[   17.381011] raid6: .... xor() 152 MB/s, rmw enabled
[   17.385930] raid6: using intx1 recovery algorithm
[   17.391690] xor: measuring software checksum speed
[   17.491461]    arm4regs  :  1673.200 MB/sec
[   17.591194]    8regs     :  1265.600 MB/sec
[   17.691193]    32regs    :  1338.400 MB/sec
[   17.695399] xor: using function: arm4regs (1673.200 MB/sec)
[   17.780654] Btrfs loaded, crc32c=crc32c-generic
[   17.785993] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 2 transid 10738 /dev/sdc
[   17.795225] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 1 transid 10738 /dev/sda
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Activating swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   18.233544] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro
[....] Will now activate lvm and md swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[[36minfo[39;49m] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
/dev/sda is not mounted
[/bin/fsck.btrfs (1) -- /media/disk] fsck.btrfs -y /dev/sda 
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[....] Cleaning /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
 /tmp[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   19.059106] BTRFS info (device sda): use zstd compression, level 0
[   19.065402] BTRFS info (device sda): disk space caching is enabled
[   19.071644] BTRFS info (device sda): has skinny extents
[....] Will now mount local filesystems:[   89.937510] BTRFS info (device sda): checking UUID tree
[   89.937514] BTRFS info (device sda): continuing balance
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Will now activate swapfile swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Checking minimum space in /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[   90.526292] BTRFS info (device sda): relocating block group 1873708843008 flags metadata|raid1
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Setting kernel variables...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Initializing random number generator...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[   90.982080] m88e1318_get_wol: phy_id = 0x1410dd1 OK
[   90.987544] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/5a:33:64:c5:84:2b
Sending on   LPF/eth0/5a:33:64:c5:84:2b
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
[   94.191628] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   94.199543] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
DHCPREQUEST of 192.168.178.51 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.178.51 from 192.168.178.1
DHCPACK of 192.168.178.51 from 192.168.178.1
invoke-rc.d: could not determine current runlevel
bound to 192.168.178.51 -- renewal in 421913 seconds.
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting RPC port mapper daemon: rpcbind[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NFS common utilities: statd idmapd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
INIT: Entering runlevel: 2
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel 2.
[....] Not starting NFS kernel daemon: no exports. ...[?25l[?1c7[1G[[33mwarn[39;49m8[?25h[?0c [33m(warning).[39;49m
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2720 (syslogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting: esekeyd[....]  not yet configured:[....]  Enable ESE Key Daemon first by editing /etc/default/esekeyd:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting periodic command scheduler: cron[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting system message bus: dbus[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2718 (klogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NTP server: ntpd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Running local boot scripts (/etc/rc.local)[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.

Debian GNU/Linux 9 vega ttyS0

vega login:



Edited 1 time(s). Last edit at 04/19/2018 11:11AM by lordzahl.
Attachments:
open | download - rescue_fw.img (863 bytes)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 01:25PM
I have an other small but important update.
My MAC address was changing with every boot. This is of course annoying for a small server box in an dhcp environment..
Some googling brought this (similar) snippet from a clearfog config up:
	aliases {
		/* So that mvebu u-boot can update the MAC addresses */
		ethernet1 = &eth0;
	};

This fixes the problem and the MAC address saved in the uboot envs is used. Up2date dts & dtb are attached.



Edited 1 time(s). Last edit at 04/19/2018 01:34PM by lordzahl.
Attachments:
open | download - armada-385-thecus-n2350.dtb (18.3 KB)
open | download - armada-385-thecus-n2350.dts (10.3 KB)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 05:35PM
Manuel,

> I realized booting with the rescue_fw method. This
> was actually pretty easy. It means everybody can
> boot custom debian without opening the NAS.

Cool! This rescue USB is a good rescue mechanism.

> I think this is already fail proof?

No. It is not fail proof. While it is a good rescue system, it is not meant to be permanent. For that we need to save envs.

In the furture, when we have new u-boot, this rescue system will no be longer usable. While we're still booting with stock u-boot, it does serve as a good rescue.

EDIT: typo.

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



Edited 1 time(s). Last edit at 04/19/2018 10:41PM by bodhi.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 19, 2018 05:39PM
Manuel,

>
> 	aliases {
> 		/* So that mvebu u-boot can update the MAC
> addresses */
> 		ethernet1 = &eth0;
> 	};
>

Yup. This is what I know I need to come back to.

Without that, you can also put the MAC address in /etc/network/interfaces to make it persistent.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 20, 2018 12:03AM
Manuel,

In serial console, with USB rootfs and HDD data drive.

setenv devices 'usb ide'
setenv bootdev usb
setenv device '0:1'
setenv disks '0 1 2 3 4 5 6 7'
setenv scan_disk 'echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 $load_image_addr /boot/zImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done'
setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x3000000
setenv load_image_addr 0x02000000
setenv dtb_file /boot/dts/armada-385-thecus-n2350.dtb
setenv load_image 'echo loading zImage ...; ext2load $bootdev $device $load_image_addr /boot/zImage'
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"
setenv bootcmd_exec 'echo Booting from $bootdev $device …; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; if run load_image; then; if run load_initrd; then if run load_dtb; then bootz $load_image_addr $load_initrd_addr $load_dtb_addr; else bootz $load_image_addr $load_initrd_addr; fi; else if run load_dtb; then bootz $load_image_addr - $load_dtb_addr; else bootz $load_image_addr; fi; fi; fi'
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; usb reset; if fatload usb 0:1 0x2000000 rescue_fw/rescue_fw.img;then imi 0x2000000;source 0x2000000; fi; ubi part ubifs;ubifsmount boot;ubifsload 0x2000000 boot/bzImage;ubifsload 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000'

and then boot

boot

Please post serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 20, 2018 08:19PM
Manuel,

The correct specification for ethernet is

aliases {
		ethernet0 = &eth0;
	};

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 22, 2018 06:05AM
Hi,

> The correct specification for ethernet is
>
>
> aliases {
> 		ethernet0 = &eth0;
> 	};
>
Thanks - corrected.

And now the serial bootlog(s).
There was a " ' " missing in a line. This is the correct one:
setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'

I have two logs. The first one is on a ssd with two partitions: 1. FAT with rescue_fw image 2. with rootfs. All boot tries fail, until i gets back to the rescue_fw booting methods, which then works.


BootROM - 1.73
Booting from SPI flash


General initialization - Version: 1.0.0
AVS selection from EFUSE disabled (Skip reading EFUSE values)
Overriding default AVS value to: 0x23
Detected Device ID 6820
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  0   |  SGMII0     |
 |   1    |  3   |  SATA0      |
 |   2    |  3   |  SATA1      |
 |   4    |  5   |  USB3 HOST0 |
 |   5    |  5   |  USB3 HOST1 |
 -------------------------------
High speed PHY - Ended Successfully
DDR4 Training Sequence - Ver TIP-0.23.(Sublib 0.8)0
DDR4 Training Sequence - Switching XBAR Window to FastPath Window 
DDR4 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Aug 09 2017 - 16:51:03) Marvell version: 2015_T1.0p18

Board: A38x-Customer0-Thecus-N2350
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR4    @ 800 [MHz]
       DDR4 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
NAND:  512 MiB
MMC:   mv_sdh: 0
SF: Detected MX25L3205D with page size 64 KiB, total 4 MiB
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:0x3fed0000:0x3ff959e4
       BSS:0x3ffef104
       Stack:0x3f9bff20
       Heap:0x3f9c0000:0x3fed0000
       U-Boot Environment:0x00100000:0x00110000 (SPI)

Board configuration detected:
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   SGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  3  0 
Marvell>> setenv devices 'usb ide'
Marvell>> setenv bootdev usb
Marvell>> setenv device '0:1'
Marvell>> setenv disks '0 1 2 3 4 5 6 7'
Marvell>> setenv scan_disk 'echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 $load_image_addr /boot/zImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done'
Marvell>> setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x3000000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtb_file /boot/dts/armada-385-thecus-n2350.dtb
Marvell>> setenv load_image 'echo loading zImage ...; ext2load $bootdev $device $load_image_addr /boot/zImage'
Marvell>> setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
Marvell>> setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting from $bootdev $device ; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; if run load_image; then; if run load_initrd; then if run load_dtb; then bootz $load_image_addr $load_initrd_addr $load_dtb_addr; else bootz $load_image_addr $load_initrd_addr; fi; else if run load_dtb; then bootz $load_image_addr - $load_dtb_addr; else bootz $load_image_addr; fi; fi; fi'
Marvell>> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; usb reset; if fatload usb 0:1 0x2000000 rescue_fw/rescue_fw.img;then imi 0x2000000;source 0x2000000; fi; ubi part ubifs;ubifsmount boot;ubifsload 0x2000000 boot/bzImage;ubifsload 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000'
Marvell>> boot
running scan_disk ...
Scan device usb
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
device usb 0:1
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
device usb 4:1
** Bad device usb 4 **
device usb 5:1
** Bad device usb 5 **
device usb 6:1
** Bad device usb 6 **
device usb 7:1
** Bad device usb 7 **
Scan device ide

Reset IDE: 
Marvell Serial ATA Adapter
no device found 

device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
device ide 4:1
** Bad device ide 4 **
device ide 5:1
** Bad device ide 5 **
device ide 6:1
** Bad device ide 6 **
device ide 7:1
** Bad device ide 7 **
Unknown command 'spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)' - try 'help'
Booting from usb 0:1 
loading zImage ...
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
reading rescue_fw/rescue_fw.img
863 bytes read in 33 ms (25.4 KiB/s)

## Checking Image at 02000000 ...
   Legacy image found
   Image Name:   Load Debian from rootfs
   Created:      2018-04-19  16:38:01 UTC
   Image Type:   ARM Linux Script (uncompressed)
   Data Size:    799 Bytes = 799 Bytes
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
      Image 0: 791 Bytes = 791 Bytes
   Verifying Checksum ... OK
## Executing script at 02000000
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Booting from USB ...
4183560 bytes read in 181 ms (22 MiB/s)
18737 bytes read in 660 ms (27.3 KiB/s)
7690086 bytes read in 223 ms (32.9 MiB/s)
Unknown command 'spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)' - try 'help'
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-4.15.4-mvebu-tld-1
   Created:      2018-04-17  20:19:31 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7690022 Bytes = 7.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff930 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Sun Feb 18 13:37:19 PST 2018
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40716 r8192 d20724 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:-(ubifs)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1018452K/1048576K available (8192K kernel code, 757K rwdata, 2208K rodata, 1024K init, 335K bss, 30124K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 758 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 336 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000009] sched_clock: 64 bits at 533MHz, resolution 1ns, wraps every 2199023255551ns
[    0.000024] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7aed16d152, max_idle_ns: 440795225656 ns
[    0.000044] Switching to timer-based delay loop, resolution 1ns
[    0.000285] Ignoring duplicate/late registration of read_current_timer delay
[    0.000296] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000833] Console: colour dummy device 80x30
[    0.000852] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.000864] pid_max: default: 32768 minimum: 301
[    0.000972] Security Framework initialized
[    0.001032] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001042] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001558] CPU: Testing write buffer coherency: ok
[    0.001745] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.040152] Setting up static identity map for 0x100000 - 0x100060
[    0.040266] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.040383] mvebu-pmsu: Initializing Power Management Service Unit
[    0.060124] Hierarchical SRCU implementation.
[    0.100122] smp: Bringing up secondary CPUs ...
[    0.170196] Booting CPU 1
[    0.170412] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.170499] smp: Brought up 1 node, 2 CPUs
[    0.170510] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.170515] CPU: All CPU(s) started in SVC mode.
[    0.171204] devtmpfs: initialized
[    0.173964] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.174310] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.174324] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.174535] prandom: seed boundary self test passed
[    0.177062] prandom: 100 self tests passed
[    0.177069] pinctrl core: initialized pinctrl subsystem
[    0.177927] NET: Registered protocol family 16
[    0.178705] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.179154] audit: initializing netlink subsys (disabled)
[    0.179258] audit: type=2000 audit(0.170:1): state=initialized audit_enabled=0 res=1
[    0.190150] cpuidle: using governor ladder
[    0.190176] cpuidle: using governor menu
[    0.190323] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.190330] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.190500] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.190514] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.222098] vgaarb: loaded
[    0.222431] SCSI subsystem initialized
[    0.223013] usbcore: registered new interface driver usbfs
[    0.223089] usbcore: registered new interface driver hub
[    0.223171] usbcore: registered new device driver usb
[    0.223633] media: Linux media interface: v0.10
[    0.223704] Linux video capture interface: v2.00
[    0.224846] clocksource: Switched to clocksource arm_global_timer
[    0.276087] VFS: Disk quotas dquot_6.6.0
[    0.276155] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.284715] NET: Registered protocol family 2
[    0.285214] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.285273] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.285365] TCP: Hash tables configured (established 8192 bind 8192)
[    0.285436] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.285471] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.285644] NET: Registered protocol family 1
[    0.285947] RPC: Registered named UNIX socket transport module.
[    0.285955] RPC: Registered udp transport module.
[    0.285961] RPC: Registered tcp transport module.
[    0.285966] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.286106] Unpacking initramfs...
[    0.659612] Freeing initrd memory: 7512K
[    0.659751] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.660046] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.661974] Initialise system trusted keyrings
[    0.662006] Key type blacklist registered
[    0.662114] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.662198] zbud: loaded
[    0.662880] NFS: Registering the id_resolver key type
[    0.662901] Key type id_resolver registered
[    0.662908] Key type id_legacy registered
[    0.662921] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.662927] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.663099] jffs2: version 2.2. (NAND) (SUMMARY)   2001-2006 Red Hat, Inc.
[    0.663488] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.663595] orangefs_init: module version upstream loaded
[    0.666522] Key type asymmetric registered
[    0.666530] Asymmetric key parser 'x509' registered
[    0.666572] bounce: pool size: 64 pages
[    0.666658] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.666666] io scheduler noop registered
[    0.666672] io scheduler deadline registered
[    0.666743] io scheduler cfq registered (default)
[    0.668876] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.671866] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.671880] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.671889] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.671898] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.672379] PCI: bus0: Fast back to back transfers disabled
[    0.672397] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.672415] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.672553] PCI: bus1: Fast back to back transfers enabled
[    0.672700] PCI: bus2: Fast back to back transfers enabled
[    0.672739] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.672753] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.673516] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.735448] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.735750] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.795427] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.847875] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.849632] console [ttyS0] disabled
[    0.869779] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.688904] console [ttyS0] enabled
[    1.693850] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.702971] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.712736] scsi host0: ahci-mvebu
[    1.726541] scsi host1: ahci-mvebu
[    1.730184] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.738161] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.746898] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.754909] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.761326] nand: Hynix H27U4G8F2DTR-BC
[    1.765214] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.772826] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.780810] Bad block table found at page 261824, version 0x01
[    1.787777] Bad block table found at page 261760, version 0x01
[    1.793831] nand_read_bbt: bad block at 0x0000061e0000
[    1.799018] nand_read_bbt: bad block at 0x00000e1c0000
[    1.804181] nand_read_bbt: bad block at 0x00000e1e0000
[    1.809378] nand_read_bbt: bad block at 0x00001ff80000
[    1.814541] nand_read_bbt: bad block at 0x00001ffa0000
[    1.819714] nand_read_bbt: bad block at 0x00001ffc0000
[    1.824889] nand_read_bbt: bad block at 0x00001ffe0000
[    1.830085] 1 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.836224] Creating 1 MTD partitions on "pxa3xx_nand-0":
[    1.841657] 0x000000000000-0x000020000000 : "ubifs"
[    1.851091] m25p80 spi1.0: mx25l3205d (4096 Kbytes)
[    1.856032] spi1.0: error parsing ofpart partition /soc/spi@10680/spi-flash@0/partition@00000000 (/soc/spi@10680/spi-flash@0)
[    1.867409] mtd: failed to find partitions; one or more parsers reports errors (-22)
[    1.876589] libphy: Fixed MDIO Bus: probed
[    1.881185] libphy: orion_mdio_bus: probed
[    1.890125] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.899655] mvneta f1070000.ethernet eth0: Using device tree mac address 00:14:fd:19:c3:9d
[    1.908301] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.914897] ehci-pci: EHCI PCI platform driver
[    1.919414] ehci-orion: EHCI orion driver
[    1.923599] orion-ehci f1058000.usb: EHCI Host Controller
[    1.929062] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.936764] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.964869] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.970972] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.977818] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.985106] usb usb1: Product: EHCI Host Controller
[    1.990010] usb usb1: Manufacturer: Linux 4.15.4-mvebu-tld-1 ehci_hcd
[    1.996512] usb usb1: SerialNumber: f1058000.usb
[    2.001538] hub 1-0:1.0: USB hub found
[    2.005363] hub 1-0:1.0: 1 port detected
[    2.009998] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    2.015391] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    2.023018] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    2.031648] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000
[    2.037653] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    2.044496] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.051782] usb usb2: Product: xHCI Host Controller
[    2.056699] usb usb2: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.063187] usb usb2: SerialNumber: f10f0000.usb3
[    2.068289] hub 2-0:1.0: USB hub found
[    2.072083] hub 2-0:1.0: 1 port detected
[    2.076308] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    2.081676] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    2.089333] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.097502] ata2: SATA link down (SStatus 0 SControl 300)
[    2.103043] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    2.109882] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.117751] usb usb3: Product: xHCI Host Controller
[    2.122657] usb usb3: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.129144] usb usb3: SerialNumber: f10f0000.usb3
[    2.134207] hub 3-0:1.0: USB hub found
[    2.138020] hub 3-0:1.0: 1 port detected
[    2.142326] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    2.147697] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    2.155327] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    2.163929] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000
[    2.169911] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    2.176754] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.184015] usb usb4: Product: xHCI Host Controller
[    2.189000] usb usb4: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.195490] usb usb4: SerialNumber: f10f8000.usb3
[    2.200552] hub 4-0:1.0: USB hub found
[    2.204344] hub 4-0:1.0: 1 port detected
[    2.208534] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    2.213882] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    2.221480] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.229711] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    2.236552] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.243812] usb usb5: Product: xHCI Host Controller
[    2.248794] usb usb5: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.255281] usb usb5: SerialNumber: f10f8000.usb3
[    2.260341] hub 5-0:1.0: USB hub found
[    2.264133] hub 5-0:1.0: 1 port detected
[    2.268493] usbcore: registered new interface driver usblp
[    2.274106] usbcore: registered new interface driver usb-storage
[    2.280356] mousedev: PS/2 mouse device common for all mice
[    2.286743] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.294520] i2c /dev entries driver
[    2.309480] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    2.322298] orion_wdt: Initial timeout 171 sec
[    2.329107] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.336502] hidraw: raw HID events driver (C) Jiri Kosina
[    2.342156] usbcore: registered new interface driver usbhid
[    2.347774] usbhid: USB HID core driver
[    2.351940] drop_monitor: Initializing network drop monitor service
[    2.358511] Netfilter messages via NETLINK v0.30.
[    2.363255] ip_set: protocol 6
[    2.366601] NET: Registered protocol family 10
[    2.371831] Segment Routing with IPv6
[    2.375680] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.382472] NET: Registered protocol family 17
[    2.387001] 8021q: 802.1Q VLAN Support v1.8
[    2.391248] Key type dns_resolver registered
[    2.395658] ThumbEE CPU extension supported.
[    2.399956] Registering SWP/SWPB emulation handler
[    2.405189] registered taskstats version 1
[    2.409307] Loading compiled-in X.509 certificates
[    2.414169] zswap: loaded using pool lzo/zbud
[    2.429070] Key type big_key registered
[    2.437776] Key type encrypted registered
[    2.443756] v5.0-sata0: supplied by pwr_en_sata0
[    2.448548] v12.0-sata0: supplied by pwr_en_sata0
[    2.454509] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    2.461673] armada38x-rtc f10a3800.rtc: setting system clock to 2018-04-22 11:49:18 UTC (1524397758)
[    2.471131] v5.0-sata1: supplied by pwr_en_sata1
[    2.475891] v12.0-sata1: supplied by pwr_en_sata1
[    2.480648] v5.0-sata0: disabling
[    2.483982] v12.0-sata0: disabling
[    2.487419] v5.0-sata1: disabling
[    2.490750] v12.0-sata1: disabling
[    2.504911] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.520825] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4050000 action 0xe frozen
[    2.528282] ata2: irq_stat 0x80000040, connection status changed
[    2.534321] ata2: SError: { PHYRdyChg CommWake DevExch }
[    2.539721] ata2: hard resetting link
[    2.543974] usb 3-1: New USB device found, idVendor=0bc2, idProduct=2322
[    2.550744] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    2.557930] usb 3-1: Product: Expansion
[    2.561786] usb 3-1: Manufacturer: Seagate
[    2.565917] usb 3-1: SerialNumber: NA82MWVJ
[    2.570629] usb 3-1: USB controller f10f0000.usb3 does not support streams, which are required by the UAS driver.
[    2.580964] usb 3-1: Please try an other USB controller if you wish to use UAS.
[    2.588329] usb-storage 3-1:1.0: USB Mass Storage device detected
[    2.594633] scsi host2: usb-storage 3-1:1.0
[    2.814865] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.821557] ata1.00: ATA-10: WDC WD40NPZZ-82PDPT0, 01.01A01, max UDMA/133
[    2.828399] ata1.00: 7814037168 sectors, multi 0: LBA48 
[    2.834251] ata1.00: configured for UDMA/133
[    2.838963] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40NPZZ-82P 1A01 PQ: 0 ANSI: 5
[    2.847825] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    2.855631] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.860926] sd 0:0:0:0: [sda] Write Protect is off
[    2.865828] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.970013] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    2.976463] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    3.383937] usbcore: registered new interface driver uas
[    3.605520] scsi 2:0:0:0: Direct-Access     Seagate  Expansion        9300 PQ: 0 ANSI: 6
[    3.617775] sd 2:0:0:0: [sdb] 250069679 512-byte logical blocks: (128 GB/119 GiB)
[    3.627944] sd 2:0:0:0: [sdb] Write Protect is off
[    3.635961] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.653128]  sdb: sdb1 sdb2
[    3.657297] sd 2:0:0:0: [sdb] Attached SCSI disk
Begin: Loading essential drivers ... done.
[    6.494868] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    6.507652] ata2.00: ATA-8: ST2000LM003 HN-M201RAD, 2BE10001, max UDMA/133
[    6.514564] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    6.527985] ata2.00: configured for UDMA/133
[    6.532288] ata2: EH complete
[    6.535685] scsi 1:0:0:0: Direct-Access     ATA      ST2000LM003 HN-M 0001 PQ: 0 ANSI: 5
[    6.544459] sd 1:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    6.554483] sd 1:0:0:0: [sdc] 4096-byte physical blocks
[    6.559996] sd 1:0:0:0: [sdc] Write Protect is off
[    6.565513] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.591347] sd 1:0:0:0: [sdc] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /dev/sdb2] fsck.ext3 -a -C0 /dev/sdb2 
rootfs: recovering journal
rootfs: clean, 78242/7815168 files, 2218716/31232768 blocks
done.
[   14.123961] EXT4-fs (sdb2): mounting ext3 file system using the ext4 subsystem
[   14.138717] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[   14.331269] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.349397] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   14.367902] systemd[1]: Detected architecture arm.

Welcome to [1mDebian GNU/Linux 9 (stretch)[0m!

[   14.405362] systemd[1]: Set hostname to <vega>.
[   14.633382] systemd[1]: [/etc/systemd/system/jdownloader.service:6] Invalid environment assignment, ignoring: /home/mjung/jd2
[   14.644908] systemd[1]: [/etc/systemd/system/jdownloader.service:10] Invalid user/group name or numeric ID, ignoring: mjung # Should be owner of /opt/jdownloader
[   14.659484] systemd[1]: [/etc/systemd/system/jdownloader.service:11] Invalid user/group name or numeric ID, ignoring: mjung # Should be owner of /opt/jdownloader
[   14.678626] systemd[1]: [/lib/systemd/system/redis-server.service:14] Unknown lvalue 'RunTimeDirectory' in section 'Service'
[   14.695117] systemd[1]: apparmor.service: Cannot add dependency job, ignoring: Unit apparmor.service is masked.
[   14.705741] systemd[1]: snapd.refresh.timer: Cannot add dependency job, ignoring: Unit snapd.refresh.timer is masked.
[   14.716496] systemd[1]: snapd.socket: Cannot add dependency job, ignoring: Unit snapd.socket is masked.
[[0;32m  OK  [0m] Set up automount Arbitrary Executabrmats File System Automount Point.
[[0;32m  OK  [0m] Listening on udev Kernel Socket.
[[0;32m  OK  [0m] Listening on /dev/initctl Compatibility Named Pipe.
[[0;32m  OK  [0m] Started Dispatch Password Requests to Console Directory Watch.
[[0;32m  OK  [0m] Created slice System Slice.
         Mounting NFSD configuration filesystem...
[[0;32m  OK  [0m] Created slice system-getty.slice.
         Mounting RPC Pipe File System...
[[0;32m  OK  [0m] Listening on fsck to fsckd communication Socket.
[[0;32m  OK  [0m] Listening on udev Control Socket.
         Mounting POSIX Message Queue File System...
[[0;32m  OK  [0m] Created slice User and Session Slice.
[[0;32m  OK  [0m] Reached target Slices.
[[0;32m  OK  [0m] Listening on Journal Socket.
         Starting Remount Root and Kernel File Systems...
[   15.180765] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro
[[0;32m  OK  [0m] Listening on Journal Audit Socket.
[[0;32m  OK  [0m] Created slice system-systemd\x2dfsck.slice.
         Starting Load Kernel Modules...
[[0;32m  OK  [0m] Started Forward Password Requests to Wall Directory Watch.
[[0;32m  OK  [0m] Reached target Encrypted Volumes.
[[0;32m  OK  [0m] Reached target Paths.
[[0;32m  OK  [0m] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
         Starting Create list of required stce nodes for the current kernel...
[[0;32m  OK  [0m] Listening on RPCbind Server Activation Socket.
         Mounting Debug File System...
[[0;32m  OK  [0m] Created slice system-serial\x2dgetty.slice.
[[0;32m  OK  [0m] Mounted NFSD configuration filesystem.
[[0;32m  OK  [0m] Mounted RPC Pipe File System.
[[0;32m  OK  [0m] Mounted Debug File System.
[[0;32m  OK  [0m] Mounted POSIX Message Queue File System.
[[0;32m  OK  [0m] Started Journal Service.
[[0;32m  OK  [0m] Started Remount Root and Kernel File Systems.
[[0;32m  OK  [0m] Started Load Kernel Modules.
[[0;32m  OK  [0m] Started Create list of required stavice nodes for the current kernel.
         Starting Create Static Device Nodes in /dev...
         Starting Apply Kernel Variables...
         Starting udev Coldplug all Devices...
         Activating swap /var/cache/swap/swap0...
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
         Starting pNFS block layout mapping daemon...
[[0;32m  OK  [0m] Started Create Static Device Nodes in /dev.
[[0;32m  OK  [0m] Started Apply Kernel Variables.
[[0;32m  OK  [0m] Started Load/Save Random Seed.
[[0;32m  OK  [0m] Started pNFS block layout mapping daemon.
         Starting udev Kernel Device Manager...
[[0;32m  OK  [0m] Reached target Local File Systems (Pre).
         Mounting /tmp...
[[0;32m  OK  [0m] Mounted /tmp.
[[0;32m  OK  [0m] Started udev Kernel Device Manager.
[[0;32m  OK  [0m] Started udev Coldplug all Devices.
[   16.477743] systemd-journald[1497]: Received request to flush runtime journal from PID 1
[[0;32m  OK  [0m] Started Flush Journal to Persistent Storage.
[[0;32m  OK  [0m] Found device /dev/ttyS0.
[   16.999386] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   17.008031] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   17.016153] sd 1:0:0:0: Attached scsi generic sg2 type 0
[   17.072905] random: crng init done
[   17.325579] raid6: int32x1  gen()   170 MB/s
[   17.497911] raid6: int32x1  xor()   205 MB/s
[   17.668289] raid6: int32x2  gen()   169 MB/s
[   17.835124] raid6: int32x2  xor()   177 MB/s
[   18.005030] raid6: int32x4  gen()   189 MB/s
[   18.178238] raid6: int32x4  xor()   153 MB/s
[   18.344933] raid6: int32x8  gen()   199 MB/s
[   18.405236] Adding 2097148k swap on /var/cache/swap/swap0.  Priority:-2 extents:25 across:77906052k FS
[[0;32m  OK  [0m] Activated swap /var/cache/swap/swap0.
[   18.515058] raid6: int32x8  xor()   152 MB/s
[   18.519365] raid6: using algorithm int32x8 gen() 199 MB/s
[   18.524792] raid6: .... xor() 152 MB/s, rmw enabled
[   18.529810] raid6: using intx1 recovery algorithm
[   18.535752] xor: measuring software checksum speed
[   18.642788]    arm4regs  :  1673.200 MB/sec
[   18.751388]    8regs     :  1265.200 MB/sec
[[0;32m  OK  [0m] Reached target Swap.
[   18.854869]    32regs    :  1334.000 MB/sec
[   18.859084] xor: using function: arm4regs (1673.200 MB/sec)
[   18.922305] Btrfs loaded, crc32c=crc32c-generic
[   18.927614] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 1 transid 13924 /dev/sda
[   18.936856] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 2 transid 13924 /dev/sdc
[[0;32m  OK  [0m] Found device WDC_WD40NPZZ-82PDPT0.
         Starting File System Check on /dev/sda...
[[0;32m  OK  [0m] Started File System Check Daemon to report status.
[[0;32m  OK  [0m] Started File System Check on /dev/sda.
         Mounting /media/disk...
[   19.183016] BTRFS info (device sdc): use zstd compression, level 0
[   19.193589] BTRFS info (device sdc): disk space caching is enabled
[   19.201186] BTRFS info (device sdc): has skinny extents
[[0;32m  OK  [0m] Mounted /media/disk.
[[0;32m  OK  [0m] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting Raise network interfaces...
         Starting Preprocess NFS configuration...
[[0;32m  OK  [0m] Started Create Volatile Files and Directories.
[[0;32m  OK  [0m] Started Preprocess NFS configuration.
         Starting NFSv4 ID-name mapping service...
[[0;32m  OK  [0m] Reached target NFS client services.
         Starting Update UTMP about System Boot/Shutdown...
[[0;32m  OK  [0m] Reached target System Time Synchronized.
         Starting RPC bind portmap service...
[[0;32m  OK  [0m] Started NFSv4 ID-name mapping service.
[[0;32m  OK  [0m] Started RPC bind portmap service.
[[0;32m  OK  [0m] Started Update UTMP about System Boot/Shutdown.
[[0;32m  OK  [0m] Reached target System Initialization.
[[0;32m  OK  [0m] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[[0;32m  OK  [0m] Started Run Nextcloud cron.php every 15 minutes.
[[0;32m  OK  [0m] Started Daily apt download activities.
[[0;32m  OK  [0m] Started Daily Cleanup of Temporary Directories.
[[0;32m  OK  [0m] Listening on D-Bus System Message Bus Socket.
[   28.055738] m88e1318_get_wol: phy_id = 0x1410dd1 OK
[   28.060824] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[[0;32m  OK  [0m] Reached target Sockets.
[[0;32m  OK  [0m] Started Clean PHP session files every 30 mins.
[[0;32m  OK  [0m] Reached target Basic System.
[[0;32m  OK  [0m] Started Regular background program processing daemon.
         Starting Avahi mDNS/DNS-SD Stack...
[[0;32m  OK  [0m] Started D-Bus System Message Bus.
[[0;32m  OK  [0m] Started Avahi mDNS/DNS-SD Stack.
         Starting Login Service...
[[0;32m  OK  [0m] Started Run certbot twice daily.
[[0;32m  OK  [0m] Started Daily apt upgrade and clean activities.
[[0;32m  OK  [0m] Reached target Timers.
[[0;32m  OK  [0m] Reached target RPC Port Mapper.
         Starting Clean php session files...
[[0;32m  OK  [0m] Started Login Service.
[[0;32m  OK  [0m] Started Clean php session files.
[   32.325302] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   32.333198] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[[0;32m  OK  [0m] Started Raise network interfaces.
[[0;32m  OK  [0m] Reached target Network.
         Starting Advanced key-value store...
         Starting OpenBSD Secure Shell server...
         Starting MariaDB database server...
         Starting NFS Mount Daemon...
         Starting JDownloader Service...
[[0;32m  OK  [0m] Reached target Network is Online.
         Starting /etc/rc.local Compatibility...
[[0;32m  OK  [0m] Started NFS Mount Daemon.
[[0;32m  OK  [0m] Started JDownloader Service.
[[0;32m  OK  [0m] Started /etc/rc.local Compatibility.
         Starting NFS server and services...
[[0;32m  OK  [0m] Started OpenBSD Secure Shell server.
[   40.510174] NFSD: starting 90-second grace period (net f000003a)
[[0;32m  OK  [0m] Started NFS server and services.
[[0;32m  OK  [0m] Reached target Remote File Systems (Pre).
[[0;32m  OK  [0m] Reached target Remote File Systems.
         Starting Permit User Sessions...
         Starting LSB: Start NTP daemon...
         Starting LSB: Starts syslogd...
         Starting LSB: ESE Key Daemon...
         Starting The Apache HTTP Server...
         Starting LSB: minidlna server...
[[0;32m  OK  [0m] Started Advanced key-value store.
[[0;32m  OK  [0m] Started Permit User Sessions.
[[0;32m  OK  [0m] Started LSB: ESE Key Daemon.
[[0;32m  OK  [0m] Started Getty on tty1.
[[0;32m  OK  [0m] Started Serial Getty on ttyS0.
[[0;32m  OK  [0m] Reached target Login Prompts.
[[0;32m  OK  [0m] Started LSB: Starts syslogd.
[[0;32m  OK  [0m] Started The Apache HTTP Server.
         Starting LSB: Starts klogd...
[[0;32m  OK  [0m] Started LSB: Starts klogd.
[[0;32m  OK  [0m] Started LSB: minidlna server.
[[0;32m  OK  [0m] Started MariaDB database server.
[[0;32m  OK  [0m] Started LSB: Start NTP daemon.
[[0;32m  OK  [0m] Reached target Multi-User System.
[[0;32m  OK  [0m] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...

Debian GNU/Linux 9 vega ttyS0

vega login: 
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 22, 2018 06:05AM
And now the second log, which is with my old USB stick, which only has a single partition with the rootfs:

BootROM - 1.73
Booting from SPI flash


General initialization - Version: 1.0.0
AVS selection from EFUSE disabled (Skip reading EFUSE values)
Overriding default AVS value to: 0x23
Detected Device ID 6820
High speed PHY - Version: 2.0

Init Customer board board SerDes lanes topology details:
 | Lane # | Speed|    Type     |
 ------------------------------|
 |   0    |  0   |  SGMII0     |
 |   1    |  3   |  SATA0      |
 |   2    |  3   |  SATA1      |
 |   4    |  5   |  USB3 HOST0 |
 |   5    |  5   |  USB3 HOST1 |
 -------------------------------
High speed PHY - Ended Successfully
DDR4 Training Sequence - Ver TIP-0.23.(Sublib 0.8)0
DDR4 Training Sequence - Switching XBAR Window to FastPath Window 
DDR4 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01 (Aug 09 2017 - 16:51:03) Marvell version: 2015_T1.0p18

Board: A38x-Customer0-Thecus-N2350
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1066 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR4    @ 800 [MHz]
       DDR4 32 Bit Width,FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  1 GiB
NAND:  512 MiB
MMC:   mv_sdh: 0
SF: Detected MX25L3205D with page size 64 KiB, total 4 MiB
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode

Map:   Code:0x3fed0000:0x3ff959e4
       BSS:0x3ffef104
       Stack:0x3f9bff20
       Heap:0x3f9c0000:0x3fed0000
       U-Boot Environment:0x00100000:0x00110000 (SPI)

Board configuration detected:
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   SGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  3  0 
Marvell>> b setenv devices 'usb ide'
Marvell>> setenv bootdev usb
Marvell>> setenv device '0:1'
Marvell>> setenv disks '0 1 2 3 4 5 6 7'
Marvell>> setenv scan_disk 'echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 $load_image_addr /boot/zImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done'
Marvell>> setenv mtdparts 'mtdparts=armada-nand:-(ubifs);spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x3000000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtb_file /boot/dts/armada-385-thecus-n2350.dtb
Marvell>> setenv load_image 'echo loading zImage ...; ext2load $bootdev $device $load_image_addr /boot/zImage'
Marvell>> setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
Marvell>> setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
Marvell>> setenv set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
Marvell>> setenv bootcmd_exec 'echo Booting from $bootdev $device ; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; if run load_image; then; if run load_initrd; then if run load_dtb; then bootz $load_image_addr $load_initrd_addr $load_dtb_addr; else bootz $load_image_addr $load_initrd_addr; fi; else if run load_dtb; then bootz $load_image_addr - $load_dtb_addr; else bootz $load_image_addr; fi; fi; fi'
Marvell>> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec; usb reset; if fatload usb 0:1 0x2000000 rescue_fw/rescue_fw.img;then imi 0x2000000;source 0x2000000; fi; ubi part ubifs;ubifsmount boot;ubifsload 0x2000000 boot/bzImage;ubifsload 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000'
Marvell>> boot
running scan_disk ...
Scan device usb
(Re)start USB...
USB0:   Port (usbActive) : 0Interface (usbType = 3) : Anson:xhci_usb_lowlevel_init--1--index=0
Anson:xhci_usb_lowlevel_init--2
Anson:Register 2000120 NbrPorts 2
USB XHCI 1.00
Anson:xhci_usb_lowlevel_init--3
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
device usb 0:1
1 bytes read in 121 ms (0 Bytes/s)
Found bootable drive on usb 0
Unknown command 'spi1.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)' - try 'help'
Booting from usb 0:1 
loading zImage ...
4183560 bytes read in 464 ms (8.6 MiB/s)
loading uInitrd ...
7690086 bytes read in 753 ms (9.7 MiB/s)
loading DTB /boot/dts/armada-385-thecus-n2350.dtb ...
18679 bytes read in 660 ms (27.3 KiB/s)
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-4.15.4-mvebu-tld-1
   Created:      2018-04-17  20:19:31 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7690022 Bytes = 7.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff8f6 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #1 SMP PREEMPT Sun Feb 18 13:37:19 PST 2018
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40716 r8192 d20724 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:-(ubifs)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1018452K/1048576K available (8192K kernel code, 757K rwdata, 2208K rodata, 1024K init, 335K bss, 30124K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 758 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 336 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000010] sched_clock: 64 bits at 533MHz, resolution 1ns, wraps every 2199023255551ns
[    0.000024] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7aed16d152, max_idle_ns: 440795225656 ns
[    0.000044] Switching to timer-based delay loop, resolution 1ns
[    0.000283] Ignoring duplicate/late registration of read_current_timer delay
[    0.000296] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000833] Console: colour dummy device 80x30
[    0.000853] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.000864] pid_max: default: 32768 minimum: 301
[    0.000972] Security Framework initialized
[    0.001034] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001044] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001558] CPU: Testing write buffer coherency: ok
[    0.001748] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.040149] Setting up static identity map for 0x100000 - 0x100060
[    0.040263] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.040381] mvebu-pmsu: Initializing Power Management Service Unit
[    0.060121] Hierarchical SRCU implementation.
[    0.100120] smp: Bringing up secondary CPUs ...
[    0.170193] Booting CPU 1
[    0.170409] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.170499] smp: Brought up 1 node, 2 CPUs
[    0.170509] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.170514] CPU: All CPU(s) started in SVC mode.
[    0.171201] devtmpfs: initialized
[    0.173951] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.174295] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.174309] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.174521] prandom: seed boundary self test passed
[    0.177047] prandom: 100 self tests passed
[    0.177054] pinctrl core: initialized pinctrl subsystem
[    0.177915] NET: Registered protocol family 16
[    0.178657] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.179095] audit: initializing netlink subsys (disabled)
[    0.179199] audit: type=2000 audit(0.170:1): state=initialized audit_enabled=0 res=1
[    0.190144] cpuidle: using governor ladder
[    0.190170] cpuidle: using governor menu
[    0.190318] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.190326] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.190498] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.190511] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.222087] vgaarb: loaded
[    0.222419] SCSI subsystem initialized
[    0.223004] usbcore: registered new interface driver usbfs
[    0.223081] usbcore: registered new interface driver hub
[    0.223164] usbcore: registered new device driver usb
[    0.223626] media: Linux media interface: v0.10
[    0.223691] Linux video capture interface: v2.00
[    0.224837] clocksource: Switched to clocksource arm_global_timer
[    0.276165] VFS: Disk quotas dquot_6.6.0
[    0.276231] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.284805] NET: Registered protocol family 2
[    0.285309] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.285368] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.285460] TCP: Hash tables configured (established 8192 bind 8192)
[    0.285535] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.285571] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.285747] NET: Registered protocol family 1
[    0.286051] RPC: Registered named UNIX socket transport module.
[    0.286059] RPC: Registered udp transport module.
[    0.286064] RPC: Registered tcp transport module.
[    0.286070] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.286210] Unpacking initramfs...
[    0.660216] Freeing initrd memory: 7512K
[    0.660352] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.660631] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.662561] Initialise system trusted keyrings
[    0.662593] Key type blacklist registered
[    0.662700] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.662785] zbud: loaded
[    0.663468] NFS: Registering the id_resolver key type
[    0.663484] Key type id_resolver registered
[    0.663490] Key type id_legacy registered
[    0.663503] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.663509] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.663677] jffs2: version 2.2. (NAND) (SUMMARY)   2001-2006 Red Hat, Inc.
[    0.664068] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.664176] orangefs_init: module version upstream loaded
[    0.667070] Key type asymmetric registered
[    0.667079] Asymmetric key parser 'x509' registered
[    0.667122] bounce: pool size: 64 pages
[    0.667210] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.667219] io scheduler noop registered
[    0.667224] io scheduler deadline registered
[    0.667293] io scheduler cfq registered (default)
[    0.669427] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.672428] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.672441] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.672451] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.672459] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.672935] PCI: bus0: Fast back to back transfers disabled
[    0.672953] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.672971] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.673108] PCI: bus1: Fast back to back transfers enabled
[    0.673257] PCI: bus2: Fast back to back transfers enabled
[    0.673296] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.673309] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.674080] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.735449] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.735686] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.795419] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.848146] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.849919] console [ttyS0] disabled
[    0.870064] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.689173] console [ttyS0] enabled
[    1.694065] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.703188] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.712955] scsi host0: ahci-mvebu
[    1.726758] scsi host1: ahci-mvebu
[    1.730399] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.738376] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.747514] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.755530] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.761918] nand: Hynix H27U4G8F2DTR-BC
[    1.765793] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.773405] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.781388] Bad block table found at page 261824, version 0x01
[    1.788351] Bad block table found at page 261760, version 0x01
[    1.794405] nand_read_bbt: bad block at 0x0000061e0000
[    1.799592] nand_read_bbt: bad block at 0x00000e1c0000
[    1.804756] nand_read_bbt: bad block at 0x00000e1e0000
[    1.809952] nand_read_bbt: bad block at 0x00001ff80000
[    1.815126] nand_read_bbt: bad block at 0x00001ffa0000
[    1.820289] nand_read_bbt: bad block at 0x00001ffc0000
[    1.825463] nand_read_bbt: bad block at 0x00001ffe0000
[    1.830658] 1 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.836798] Creating 1 MTD partitions on "pxa3xx_nand-0":
[    1.842227] 0x000000000000-0x000020000000 : "ubifs"
[    1.852031] m25p80 spi1.0: mx25l3205d (4096 Kbytes)
[    1.856974] spi1.0: error parsing ofpart partition /soc/spi@10680/spi-flash@0/partition@00000000 (/soc/spi@10680/spi-flash@0)
[    1.868352] mtd: failed to find partitions; one or more parsers reports errors (-22)
[    1.878467] libphy: Fixed MDIO Bus: probed
[    1.883620] libphy: orion_mdio_bus: probed
[    1.893000] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.903241] mvneta f1070000.ethernet eth0: Using random mac address 12:88:e2:0d:78:e6
[    1.911610] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.918204] ehci-pci: EHCI PCI platform driver
[    1.922768] ehci-orion: EHCI orion driver
[    1.926979] orion-ehci f1058000.usb: EHCI Host Controller
[    1.932422] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.940137] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.974852] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.980954] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.987798] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.995069] usb usb1: Product: EHCI Host Controller
[    1.999973] usb usb1: Manufacturer: Linux 4.15.4-mvebu-tld-1 ehci_hcd
[    2.006459] usb usb1: SerialNumber: f1058000.usb
[    2.011573] hub 1-0:1.0: USB hub found
[    2.015388] hub 1-0:1.0: 1 port detected
[    2.020231] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    2.025611] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    2.033220] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    2.041840] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000
[    2.047842] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    2.054668] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.061968] usb usb2: Product: xHCI Host Controller
[    2.066888] usb usb2: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.073362] usb usb2: SerialNumber: f10f0000.usb3
[    2.078532] hub 2-0:1.0: USB hub found
[    2.081289] ata2: SATA link down (SStatus 0 SControl 300)
[    2.087827] hub 2-0:1.0: 1 port detected
[    2.092095] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    2.097465] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    2.105086] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.113304] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    2.120146] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.128129] usb usb3: Product: xHCI Host Controller
[    2.133034] usb usb3: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.139523] usb usb3: SerialNumber: f10f0000.usb3
[    2.144667] hub 3-0:1.0: USB hub found
[    2.148481] hub 3-0:1.0: 1 port detected
[    2.152903] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    2.158278] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    2.165905] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    2.174507] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000
[    2.180499] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    2.187344] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.194604] usb usb4: Product: xHCI Host Controller
[    2.199579] usb usb4: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.206069] usb usb4: SerialNumber: f10f8000.usb3
[    2.211220] hub 4-0:1.0: USB hub found
[    2.215032] hub 4-0:1.0: 1 port detected
[    2.219288] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    2.224638] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    2.232244] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.240480] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    2.247322] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.254582] usb usb5: Product: xHCI Host Controller
[    2.259591] usb usb5: Manufacturer: Linux 4.15.4-mvebu-tld-1 xhci-hcd
[    2.266083] usb usb5: SerialNumber: f10f8000.usb3
[    2.271225] hub 5-0:1.0: USB hub found
[    2.275035] hub 5-0:1.0: 1 port detected
[    2.279577] usbcore: registered new interface driver usblp
[    2.285259] usbcore: registered new interface driver usb-storage
[    2.291562] mousedev: PS/2 mouse device common for all mice
[    2.298080] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.306346] i2c /dev entries driver
[    2.314885] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.321571] ata1.00: ATA-10: WDC WD40NPZZ-82PDPT0, 01.01A01, max UDMA/133
[    2.321855] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    2.322520] orion_wdt: Initial timeout 171 sec
[    2.326259] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.326454] hidraw: raw HID events driver (C) Jiri Kosina
[    2.326772] usbcore: registered new interface driver usbhid
[    2.326774] usbhid: USB HID core driver
[    2.327054] drop_monitor: Initializing network drop monitor service
[    2.327100] Netfilter messages via NETLINK v0.30.
[    2.327114] ip_set: protocol 6
[    2.327376] NET: Registered protocol family 10
[    2.338350] Segment Routing with IPv6
[    2.338410] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.339239] NET: Registered protocol family 17
[    2.339283] 8021q: 802.1Q VLAN Support v1.8
[    2.339313] Key type dns_resolver registered
[    2.339418] ThumbEE CPU extension supported.
[    2.339426] Registering SWP/SWPB emulation handler
[    2.339854] registered taskstats version 1
[    2.339857] Loading compiled-in X.509 certificates
[    2.339906] zswap: loaded using pool lzo/zbud
[    2.375104] Key type big_key registered
[    2.391016] Key type encrypted registered
[    2.392940] v5.0-sata0: supplied by pwr_en_sata0
[    2.392978] v12.0-sata0: supplied by pwr_en_sata0
[    2.393958] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    2.397100] armada38x-rtc f10a3800.rtc: setting system clock to 2018-04-22 11:57:45 UTC (1524398265)
[    2.397328] v5.0-sata1: supplied by pwr_en_sata1
[    2.397377] v12.0-sata1: supplied by pwr_en_sata1
[    2.397418] v5.0-sata0: disabling
[    2.397422] v12.0-sata0: disabling
[    2.397425] v5.0-sata1: disabling
[    2.397427] v12.0-sata1: disabling
[    2.454858] usb 2-1: new high-speed USB device number 2 using xhci-hcd
[    2.495217] ata1.00: 7814037168 sectors, multi 0: LBA48 
[    2.495260] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4050000 action 0xe frozen
[    2.495263] ata2: irq_stat 0x80000040, connection status changed
[    2.495268] ata2: SError: { PHYRdyChg CommWake DevExch }
[    2.495284] ata2: hard resetting link
[    2.508054] ata1.00: configured for UDMA/133
[    2.514478] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40NPZZ-82P 1A01 PQ: 0 ANSI: 5
[    2.515373] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    2.515380] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.515422] sd 0:0:0:0: [sda] Write Protect is off
[    2.515496] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.612776] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    2.619223] Freeing unused kernel memory: 1024K
[    2.635473] usb 2-1: New USB device found, idVendor=0781, idProduct=5567
[    2.642217] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.650866] usb 2-1: Product: Cruzer Blade
[    2.655239] usb 2-1: Manufacturer: SanDisk
[    2.659638] usb 2-1: SerialNumber: 4C530103371128105004
Loading, please [    2.666095] usb-storage 2-1:1.0: USB Mass Storage device detected
wait...
[    2.686513] scsi host2: usb-storage 2-1:1.0
starting version 232
[    3.078346] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[    3.765497] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.26 PQ: 0 ANSI: 6
[    3.776764] sd 2:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    3.787345] sd 2:0:0:0: [sdb] Write Protect is off
[    3.793114] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    3.806098]  sdb: sdb1
[    3.811538] sd 2:0:0:0: [sdb] Attached SCSI disk
[    6.444857] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    6.457637] ata2.00: ATA-8: ST2000LM003 HN-M201RAD, 2BE10001, max UDMA/133
[    6.464550] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    6.477972] ata2.00: configured for UDMA/133
[    6.482277] ata2: EH complete
[    6.485663] scsi 1:0:0:0: Direct-Access     ATA      ST2000LM003 HN-M 0001 PQ: 0 ANSI: 5
[    6.495127] sd 1:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    6.503024] sd 1:0:0:0: [sdc] 4096-byte physical blocks
[    6.508406] sd 1:0:0:0: [sdc] Write Protect is off
[    6.513295] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.540713] sd 1:0:0:0: [sdc] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /dev/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: clean, 29122/977280 files, 466342/3907840 blocks
done.
[   13.629246] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   13.652354] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'vega'...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Synthesizing the initial hotplug events...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Waiting for /dev to be fully populated...[   16.211250] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   16.217674] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   16.224029] sd 1:0:0:0: Attached scsi generic sg2 type 0
[   16.584921] raid6: int32x1  gen()   164 MB/s
[   16.754958] raid6: int32x1  xor()   204 MB/s
[   16.926151] raid6: int32x2  gen()   168 MB/s
[   17.094900] raid6: int32x2  xor()   175 MB/s
[   17.265123] raid6: int32x4  gen()   188 MB/s
[   17.434952] raid6: int32x4  xor()   152 MB/s
[   17.605023] raid6: int32x8  gen()   202 MB/s
[   17.774884] raid6: int32x8  xor()   154 MB/s
[   17.779177] raid6: using algorithm int32x8 gen() 202 MB/s
[   17.784601] raid6: .... xor() 154 MB/s, rmw enabled
[   17.789515] raid6: using intx1 recovery algorithm
[   17.805196] xor: measuring software checksum speed
[   17.904835]    arm4regs  :  1674.000 MB/sec
[   18.004831]    8regs     :  1266.000 MB/sec
[   18.104854]    32regs    :  1338.400 MB/sec
[   18.109060] xor: using function: arm4regs (1674.000 MB/sec)
[   18.395416] Btrfs loaded, crc32c=crc32c-generic
[   18.400751] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 2 transid 13925 /dev/sdc
[   18.409957] BTRFS: device fsid 6220491c-4db2-499d-b3fa-57e27b53ddea devid 1 transid 13925 /dev/sda
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Activating swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   18.978029] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[   19.224497] random: crng init done
[....] Will now activate lvm and md swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[[36minfo[39;49m] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
/dev/sda is not mounted
[/bin/fsck.btrfs (1) -- /media/disk] fsck.btrfs -y /dev/sda 
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[....] Cleaning /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
 /tmp[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[   19.901575] BTRFS info (device sda): use zstd compression, level 0
[   19.907845] BTRFS info (device sda): disk space caching is enabled
[   19.914068] BTRFS info (device sda): has skinny extents
[....] Will now mount local filesystems:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Will now activate swapfile swap:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Checking minimum space in /tmp...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Setting kernel variables...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Initializing random number generator...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[   31.265733] m88e1318_get_wol: phy_id = 0x1410dd1 OK
[   31.270826] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/12:88:e2:0d:78:e6
Sending on   LPF/eth0/12:88:e2:0d:78:e6
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   36.565259] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   36.573153] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST of 192.168.178.57 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.178.57 from 192.168.178.1
DHCPACK of 192.168.178.57 from 192.168.178.1
invoke-rc.d: could not determine current runlevel
bound to 192.168.178.57 -- renewal in 391044 seconds.
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone.
[....] Starting RPC port mapper daemon: rpcbind[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NFS common utilities: statd idmapd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
INIT: Entering runlevel: 2
[[36minfo[39;49m] Using makefile-style concurrent boot in runlevel 2.
[....] Not starting NFS kernel daemon: no exports. ...[?25l[?1c7[1G[[33mwarn[39;49m8[?25h[?0c [33m(warning).[39;49m
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2730 (syslogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting: esekeyd[....]  not yet configured:[....]  Enable ESE Key Daemon first by editing /etc/default/esekeyd:[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting periodic command scheduler: cron[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting system message bus: dbus[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2729 (klogd)
[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Starting NTP server: ntpd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
[....] Running local boot scripts (/etc/rc.local)[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.

Debian GNU/Linux 9 vega ttyS0

vega login: 
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 22, 2018 09:41PM
Manuel,

The 2nd is correct configuration.

The 1st has wrong confguration. The rootfs must be the 1st partition on the disk. Ie. the kernel file uImage must be on that 1st partition.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 22, 2018 10:46PM
bodhi Wrote:
-------------------------------------------------------
> Manuel,
>
> The 2nd is correct configuration.
>
> The 1st has wrong confguration. The rootfs must be
> the 1st partition on the disk. Ie. the kernel file
> uImage must be on that 1st partition.

So boot into single USB rootfs config. Plug in the SSD, and

fdisk -l

And then mount all partitions on the SSD. And list the mount

mount

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 23, 2018 09:52AM
Hi bodhi,

Sure, i know my 1. configuration had to fail with your boot commands.
Maybe i don't get it, but why is the partition table of my ssd needed? Or what are you planing to do?

You were talking about updating u-boot. But what would be the gain?
Actually i am quite happy about the boot process like it is:
I don't have to change anything from the original system: I keep the u-boot, the u-boot env and the old linux system on NAND.
But i can still boot my custom linux system from an attached USB device, without using UART or similar.
Cheers,
Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 23, 2018 05:38PM
Manuel,


To explain the booting issue with multiple drives/partitions:

Quote

why is the partition table of my ssd needed? Or what are you planing to do?

See: https://forum.doozan.com/read.php?3,19093

And

Quote

Actually i am quite happy about the boot process like it is:
I don't have to change anything from the original system: I keep the u-boot, the u-boot env and the old linux system on NAND.
But i can still boot my custom linux system from an attached USB device, without using UART or similar.

True. Each has own goal. So if you are happy with what you have right now then that will be good enough for you :) For me I'd prefer the system booting with u-boot (stock is OK) and a Debian rootfs, with no other moving parts that could fail.

I will check out all the loose ends before I release the new kernel with Thecus N2350 supports.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 24, 2018 12:50AM
Hi bodhi,

Thanks for the explanations. I can also see the advantages of your more general approach - especially if one answers a lot of questions to a lot of people on a forum ;).
Maybe i will switch to that method later on, but than i will simply change my ssd back, so the rootfs partition with /boot is the first partition on the drive again.
Let me know, if there is anything i can do/test (anything i can do with my old setup on the usb stick, just not anything with the ssd, since it is basically production ready and i don't want to mess it up in testing..).

Maybe i can look into the issue with the button labels. If the are already useable with the more generic labels, can't we just give the an alias in the dts?
Cheers - Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 24, 2018 03:13AM
Manuel ,


> Maybe i can look into the issue with the button
> labels. If the are already useable with the more
> generic labels, can't we just give the an alias in
> the dts?

Sure, the buttons should work the way they are defined in the DTS. They are standard Linux buttons. You could check & compare with my kirkwood-nsa325.dts in the linux-4.16.1-kirkwood-tld-1.patch file in the Kirkwood release thread:

https://forum.doozan.com/read.php?2,12096


Quote

Updated 14 Apr 2018:

Kernel linux-4.16.1-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- Add GENERIC_CPU_VULNERABILITIES config to track mainline future security reports.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.16.1-kirkwood-tld-1-bodhi.tar.bz2

md5:
ac1aff7c9848ff949dfa081cf5ac094c
sha256:
8779493bf8319b712b2f8ed3519305e61abee9e2bcc9630fc28d7c6d1d420bb8


This tarball contains 6 files:

Quote

linux-image-4.16.1-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.16.1-kirkwood-tld-1_1.0_armel.deb
config-4.16.1-kirkwood-tld-1
zImage-4.16.1-kirkwood-tld-1
linux-dtb-4.16.1-kirkwood-tld-1.tar
linux-4.16.1-kirkwood-tld-1.patch

I know that the NSA325 buttons work fine before. Perhaps just some syntax problems that I have overlooked for the Thecus.

Too bad I had a disk crash on NSA325v2 (damn crummy Seagate 2.5" Momentus disk running for 5 years now finally crapped out :) Still running the rsync restore from backup and do not want to disturb it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
April 24, 2018 03:39AM
Quote
bodhi
I know that the NSA325 buttons work fine before. Perhaps just some syntax problems that I have overlooked for the Thecus.


Perhaps something like ACTIVE_HIGH, ACTIVE_LOW.

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

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: