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)
March 19, 2018 04:13AM
I'd doubt that a wrong flash definition would cause the hang.

However, on the subject of SPI flash.

1. You're correct. That should be MX25L3205D according to your boot log. The current compatible name is from the mainline DTS version. I was not worry about it.

SF: Detected MX25L3205D with page size 64 KiB, total 4 MiB

2. I suspect this would be wrong in mtdparts. But again, I don't think it is too important right now. We could remove the flash definition from DTS and it would not hurt anything.

spi_flash:0x00100000(uboot),0x00010000@0x00100000(uboot_env)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 04:29AM
But that's a good point, though. Here is the boot log for NAS326.

[    1.269893] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.279299] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    1.299041] scsi host0: ahci-mvebu
[    1.312901] scsi host1: ahci-mvebu
[    1.316504] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.324585] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42

[    1.333204] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.341157] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda
[    1.347577] nand: Macronix MX30LF2G18AC
[    1.351507] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.359194] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.366412] Bad block table found at page 131008, version 0x01
[    1.372789] Bad block table found at page 130944, version 0x01
[    1.378940] nand_read_bbt: bad block at 0x000003340000

[    1.384202] 7 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.390329] Creating 7 MTD partitions on "pxa3xx_nand-0":
[    1.395784] 0x000000000000-0x000000200000 : "U-Boot"
[    1.401470] 0x000000200000-0x000000400000 : "U-Boot env"
[    1.407649] 0x000000400000-0x000000e00000 : "Config"
[    1.413452] 0x000000e00000-0x000001d00000 : "Kernel-1"
[    1.419430] 0x000001d00000-0x000008700000 : "RootFS-1"
[    1.425848] 0x000008700000-0x000009600000 : "Kernel-2"
[    1.431810] 0x000009600000-0x000010000000 : "RootFS-2"

Let's take out the nand flash.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/19/2018 04:29AM by bodhi.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 04:58AM
Here is a modified DTB version 3 for testing. This time we have the correct SPI flash type, and the SPI driver (in mtdparts).

Copy the attached DTB to your USB rootfs /boot/dts/ folder.

Power up, interrupt serial console and set the envs (note that we are not loading uInitrd). We want to ignore that for now and see if the USB drive is powered up OK first.

setenv mtdparts 'mtdparts=spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
usb start
run usb_bootcmd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-385-thecus-n2350.dtb (17 KB)
open | download - armada-385-thecus-n2350.dts (8.5 KB)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 12:25PM
Hi bodhi,

> Here is a modified DTB version 3 for testing. This
> time we have the correct SPI flash type, and the
> SPI driver (in mtdparts).

Still fails at the same point, see log. Next i will try kwboot again.

edit:
Still no luck with kwboot. Maybe it is because of my teensy as USB/Serial Converter. Maybe @nailman23 can try again. I had a little more luck with at least getting a "XModem error", if i start the kwboot command without -q... first and than inserting the power barrel connector as quick as possible.


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=spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs 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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0	Interface (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 501 ms (7.9 MiB/s)
17380 bytes read in 660 ms (25.4 KiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff3e3 ... 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 @ef7c7000 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=spi0.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: 1025948K/1048576K available (8192K kernel code, 722K rwdata, 2180K rodata, 1024K init, 337K bss, 22628K 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.019168] Switching to timer-based delay loop, resolution 1ns
[    0.025382] Ignoring duplicate/late registration of read_current_timer delay
[    0.032492] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043936] Console: colour dummy device 80x30
[    0.048469] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.059130] pid_max: default: 32768 minimum: 301
[    0.063922] Security Framework initialized
[    0.068152] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074827] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.082449] CPU: Testing write buffer coherency: ok
[    0.087577] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.125248] Setting up static identity map for 0x100000 - 0x100060
[    0.131596] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.136944] mvebu-pmsu: Initializing Power Management Service Unit
[    0.143275] Hierarchical SRCU implementation.
[    0.185218] smp: Bringing up secondary CPUs ...
[    0.235289] Booting CPU 1
[    0.238193] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.238278] smp: Brought up 1 node, 2 CPUs
[    0.248191] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.254603] CPU: All CPU(s) started in SVC mode.
[    0.260034] devtmpfs: initialized
[    0.266102] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.274109] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.284007] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.290365] prandom: seed boundary self test passed
[    0.297842] prandom: 100 self tests passed
[    0.302007] pinctrl core: initialized pinctrl subsystem
[    0.308149] NET: Registered protocol family 16
[    0.313402] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.321674] cpuidle: using governor ladder
[    0.325903] cpuidle: using governor menu
[    0.330060] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.338131] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.344189] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.352352] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.405851] vgaarb: loaded
[    0.408835] SCSI subsystem initialized
[    0.412956] usbcore: registered new interface driver usbfs
[    0.418619] usbcore: registered new interface driver hub
[    0.424090] usbcore: registered new device driver usb
[    0.429526] media: Linux media interface: v0.10
[    0.434145] Linux video capture interface: v2.00
[    0.439677] clocksource: Switched to clocksource arm_global_timer
[    0.498653] VFS: Disk quotas dquot_6.6.0
[    0.502747] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.515572] NET: Registered protocol family 2
[    0.520478] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.527634] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.534245] TCP: Hash tables configured (established 8192 bind 8192)
[    0.540738] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.546747] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.553364] NET: Registered protocol family 1
[    0.558084] RPC: Registered named UNIX socket transport module.
[    0.564090] RPC: Registered udp transport module.
[    0.568860] RPC: Registered tcp transport module.
[    0.573645] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.580403] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.587199] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.596252] audit: initializing netlink subsys (disabled)
[    0.601843] audit: type=2000 audit(0.569:1): state=initialized audit_enabled=0 res=1
[    0.602096] Initialise system trusted keyrings
[    0.602123] Key type blacklist registered
[    0.602210] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.609663] zbud: loaded
[    0.620530] NFS: Registering the id_resolver key type
[    0.620547] Key type id_resolver registered
[    0.620550] Key type id_legacy registered
[    0.620560] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.620564] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.620718] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.621040] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.621145] orangefs_init: module version upstream loaded
[    0.624784] Key type asymmetric registered
[    0.624787] Asymmetric key parser 'x509' registered
[    0.624826] bounce: pool size: 64 pages
[    0.624864] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.624869] io scheduler noop registered
[    0.624872] io scheduler deadline registered
[    0.624942] io scheduler cfq registered (default)
[    0.626477] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.628663] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.628671] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.628677] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.628682] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.629069] PCI: bus0: Fast back to back transfers disabled
[    0.629081] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.629094] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.629180] PCI: bus1: Fast back to back transfers enabled
[    0.629278] PCI: bus2: Fast back to back transfers enabled
[    0.629310] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.629320] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.629922] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.690265] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.690441] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.750252] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.811329] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.813055] console [ttyS0] disabled
[    0.850878] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    0.859942] console [ttyS0] enabled
[    0.859942] console [ttyS0] enabled
[    0.867036] bootconsole [earlycon0] disabled
[    0.867036] bootconsole [earlycon0] disabled
[    0.877052] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    0.886181] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    0.895896] scsi host0: ahci-mvebu
[    0.899646] scsi host1: ahci-mvebu
[    0.903305] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 43
[    0.911325] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 43



Edited 1 time(s). Last edit at 03/19/2018 01:36PM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 03:04PM
Hello,

Quote
@nailman, Did you solder the wires or just temporaily connect them like lordzahl did?

No, I did not solder it as I don't have tools for that.
I tried several times and was not able to get the kwboot working. I tried to hold wires but with no success. I always get "xmodem error" or "Bad meesage". I have also Zyxel NSA320 and kwboot works perfectly with it.

I tried to run the Debian with 4.12.4 kernel and it stops on the same step

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 (Jun 20 2017 - 14:02:04) 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:  0
Marvell>> setenv mtdparts 'mtdparts=spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs 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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (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 ...
4021296 bytes read in 291 ms (13.2 MiB/s)
17380 bytes read in 623 ms (26.4 KiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff3e3 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 17 pages/cpu @ef7c7000 s40460 r8192 d20980 u69632
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0: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: 1025968K/1048576K available (8192K kernel code, 712K rwdata, 2080K rodata, 1024K init, 331K bss, 22608K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db2308   ( 713 kB)
[    0.000000]        .bss : 0xc0db9a84 - 0xc0e0ca58   ( 332 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000004] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.007886] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.019227] Console: colour dummy device 80x30
[    0.023747] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.034145] pid_max: default: 32768 minimum: 301
[    0.038929] Security Framework initialized
[    0.043141] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049819] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057432] CPU: Testing write buffer coherency: ok
[    0.062546] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.103768] Setting up static identity map for 0x100000 - 0x100060
[    0.110110] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.115451] mvebu-pmsu: Initializing Power Management Service Unit
[    0.173695] smp: Bringing up secondary CPUs ...
[    0.233731] Booting CPU 1
[    0.236629] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.236698] smp: Brought up 1 node, 2 CPUs
[    0.246586] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.252908] CPU: All CPU(s) started in SVC mode.
[    0.258279] devtmpfs: initialized
[    0.264304] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.272291] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.282195] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.288525] prandom: seed boundary self test passed
[    0.296014] prandom: 100 self tests passed
[    0.300177] pinctrl core: initialized pinctrl subsystem
[    0.306302] NET: Registered protocol family 16
[    0.311608] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.319963] cpuidle: using governor ladder
[    0.324179] cpuidle: using governor menu
[    0.328316] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.336381] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.342448] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.350603] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.394149] vgaarb: loaded
[    0.397138] SCSI subsystem initialized
[    0.404096] usbcore: registered new interface driver usbfs
[    0.409707] usbcore: registered new interface driver hub
[    0.415145] usbcore: registered new device driver usb
[    0.420515] media: Linux media interface: v0.10
[    0.425180] Linux video capture interface: v2.00
[    0.430661] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.488077] VFS: Disk quotas dquot_6.6.0
[    0.492203] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.506044] NET: Registered protocol family 2
[    0.511011] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.518164] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.524766] TCP: Hash tables configured (established 8192 bind 8192)
[    0.531265] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.537270] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.544024] NET: Registered protocol family 1
[    0.548746] RPC: Registered named UNIX socket transport module.
[    0.554767] RPC: Registered udp transport module.
[    0.559533] RPC: Registered tcp transport module.
[    0.564312] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.571081] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.577856] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.586952] audit: initializing netlink subsys (disabled)
[    0.592552] audit: type=2000 audit(0.571:1): state=initialized audit_enabled=0 res=1
[    0.592877] Initialise system trusted keyrings
[    0.592910] Key type blacklist registered
[    0.600509] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.605068] zbud: loaded
[    0.625803] NFS: Registering the id_resolver key type
[    0.630962] Key type id_resolver registered
[    0.635211] Key type id_legacy registered
[    0.639294] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.646103] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.652693] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.660131] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.666799] orangefs_init: module version upstream loaded
[    0.675475] Key type asymmetric registered
[    0.679640] Asymmetric key parser 'x509' registered
[    0.684662] bounce: pool size: 64 pages
[    0.688592] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.696072] io scheduler noop registered
[    0.700062] io scheduler deadline registered
[    0.704446] io scheduler cfq registered (default)
[    0.710235] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.719039] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.725240] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.731602] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.738533] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.744483] PCI: bus0: Fast back to back transfers disabled
[    0.750124] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.758227] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.766417] PCI: bus1: Fast back to back transfers enabled
[    0.772108] PCI: bus2: Fast back to back transfers enabled
[    0.777709] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.782758] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.788293] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.851247] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )
[    0.859098] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.921225] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )
[    0.970146] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.978047] console [ttyS0] disabled
[    1.003148] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.012220] console [ttyS0] enabled
[    1.012220] console [ttyS0] enabled
[    1.019311] bootconsole [earlycon0] disabled
[    1.019311] bootconsole [earlycon0] disabled
[    1.029056] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.038314] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.047912] scsi host0: ahci-mvebu
[    1.051652] scsi host1: ahci-mvebu
[    1.055253] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 43
[    1.063243] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 43

I compared that with working 3.10 kernel and the next step is configuring NAND device

[    3.530952] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 58
[    3.538935] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 58
[    3.550713] armada-nand f10d0000.nand: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
[    3.565269] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit), 512MiB, page size: 2048, OOB size: 64

Maybe that part missing in DTB/DTS files?
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 04:12PM
I think you both were most likely right! perhaps this box hang when we don't try initialize the NAND partitions. Will do a version 4 to add the correct NAND mtds back in.

Overall, the kernel log looks very good.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 04:47PM
Hi!

I think i made progress with kwboot! After reading this post
I downloaded from the solid-run page
the download-serial.sh script.
This scripts is similar to kwboot, interrupts the startup and then uploads a binary with the standard tool sx for the xmodem protocoll.
I have nearly a 100% success rate with this script to get the NAK package of an interrupted startup sequence. But the upload afterwards still fails.
The kwboot script has the -p flag to patch the image. I thought, maybe our image is wrong, and it gets rejected by the N2350 box. So i downloaded the uart image from this page, which was also mentioned in the other post.
Then i get this result:

[kwboot]$ ./download-serial.sh /dev/ttyUSB0 newkwboot/armada-38x-bootloader-recovery-files/u-boot-a38x-spi-uart.bin 
send-stop-pattern.c: In Funktion »main«:
send-stop-pattern.c:24:2: Warnung: Implizite Deklaration der Funktion »sleep«; meinten Sie »beep«? [-Wimplicit-function-declaration]
  sleep(2);
  ^~~~~
  beep
Now reset or power cycle your Armada 38x board and then press enter

Sleeping
Out of sleep
Got something 21
Got NACK (0x15) character
The board should be in serial downloader now. Sending the binary file 
Sending newkwboot/armada-38x-bootloader-recovery-files/u-boot-a38x-spi-uart.bin, 7499 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 200/25kRetry 0: Got 00 for sector ACK

It does actually upload! The sectors/kbytes numbers quickly increased and i interrupted the process, since i was not sure if it was safe to upload a random image from the internet..

But i guess the conclusion is clear:
Either the download-serial.sh script is better, and we just have to modify our mtd_uboot image in the same way kwboot does with the "-p" flag or our mtd_uboot image is somehow not suited for this.

edit: Looking at the sources: download-serial.sh spams the magic character sequence 6000 times. The mainline kwboot sources show, that it only spams them 16 times in a row. As far as i understand this can only be changed by editing the kwboot sources. But i don't really know how to build it (simply gcc needs more includes, and with the Makefile i don't get which target i have to choose..). Doesn't really matter though, the script is also fine, i guess.



Edited 1 time(s). Last edit at 03/19/2018 05:04PM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 19, 2018 06:05PM
Manuel,

Good works :) I'm aware about this script too.

> download-serial.sh
> script.

This is the one we should use: u-boot-a38x-spi-uart.bin. I also have one similar I built last year.

> edit: Looking at the sources: download-serial.sh
> spams the magic character sequence 6000 times.

Yup. Because they don't know the timing either :)

> The
> mainline kwboot sources show, that it only spams
> them 16 times in a row. As far as i understand
> this can only be changed by editing the kwboot
> sources. But i don't really know how to build it
> (simply gcc needs more includes, and with the
> Makefile i don't get which target i have to
> choose..). Doesn't really matter though, the
> script is also fine, i guess.

I'll see if I can rebuild kwboot to do that.


Please try normal kwboot with u-boot-a38x-spi-uart.bin (without -p option).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 12:54AM
bodhi Wrote:
-------------------------------------------------------
> Here is a modified DTB version 3 for testing. This
> time we have the correct SPI flash type, and the
> SPI driver (in mtdparts).

Sorry, looks like I upload a wrong version. This was the same, no change from before.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 01:49AM
bodhi Wrote:

> Please try normal kwboot with
> u-boot-a38x-spi-uart.bin (without -p option).

Sure, can do. After several tries:
[kwboot]$ ../kwboot-x86_64 -f -t -B 115200 /dev/ttyUSB0 -b u-boot-a38x-spi-uart.bin 
Sending boot message. Please reboot the target.../
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 14 % [......................................................................]
 15 % [..........................................................^C

I had to interrupt, because i need to get to work. Will try to go the complete way this evening.
The kwboot is from here: I am not sure if the extra "-f" flag for the 38x chips is absolutely needed, but it makes the timing easier. And i still think the script does this better, so we should adapt that.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 02:14AM
lordzahl Wrote:
-------------------------------------------------------
> bodhi Wrote:
>
> > Please try normal kwboot with
> > u-boot-a38x-spi-uart.bin (without -p option).
>
> Sure, can do. After several tries:
>
> [kwboot]$ ../kwboot-x86_64 -f -t -B 115200
> /dev/ttyUSB0 -b u-boot-a38x-spi-uart.bin 
> Sending boot message. Please reboot the
> target.../
> Sending boot image...
>   0 %
> [......................................................................]
>   0 %
> [......................................................................]
>   1 %
> [......................................................................]
>   2 %
> [......................................................................]
>   3 %
> [......................................................................]
>   4 %
> [......................................................................]
>   5 %
> [......................................................................]
>   6 %
> [......................................................................]
>   7 %
> [......................................................................]
>   8 %
> [......................................................................]
>   9 %
> [......................................................................]
>  10 %
> [......................................................................]
>  11 %
> [......................................................................]
>  12 %
> [......................................................................]
>  13 %
> [......................................................................]
>  14 %
> [......................................................................]
>  14 %
> [......................................................................]
>  15 %
> [..........................................................^C
>
>
> I had to interrupt, because i need to get to work.
> Will try to go the complete way this evening.

Excellent! that is working.

> The kwboot is from
> here:
> I am not sure if the extra "-f" flag for the 38x
> chips is absolutely needed, but it makes the
> timing easier.

That's the fallback option (from Kevin Smith). hmartin used that for the WD EX2100 here.

> And i still think the script does
> this better, so we should adapt that.

I think kwboot is better. If the idea is to spam the box many times, we can rebuild kwboot to do that. I like Kevin Smith's approach. I knew he has been playing with this for a long time and always try to mainline his patch.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 02:18AM
@Manuel,

Could you ask for u-boot GPL from Thecus? if it is available I'm thinking I will acquire this box to build new u-boot for Armada.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 02:20AM
> Could you ask for u-boot GPL from Thecus? if it is
> available I'm thinking I will acquire this box to
> build new u-boot for Armada.

Yes, i already did that last week as a reply to the GPL sources.
Maybe i will open a new ticket as well.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 05:25AM
removed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 03/21/2018 03:11AM by bodhi.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 06:59AM
Hello,

I've tried the DTB version 4 and it stops on exactly the same step.Also tried with disks attached but it did not bring any improvement.


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 (Jun 20 2017 - 14:02:04) 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:  0
Marvell>> setenv mtdparts 'mtdparts=spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs 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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (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 ...
4021296 bytes read in 291 ms (13.2 MiB/s)
18767 bytes read in 622 ms (29.3 KiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff94e ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)

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

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.4-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP PREEMPT Sat Jul 29 21:56:37 PDT 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Thecus N2350
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 17 pages/cpu @ef7c6000 s40460 r8192 d20980 u69632
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0: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: 1025964K/1048576K available (8192K kernel code, 712K rwdata, 2080K rodata, 1024K init, 331K bss, 22612K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db2308   ( 713 kB)
[    0.000000]        .bss : 0xc0db9a84 - 0xc0e0ca58   ( 332 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000004] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.007886] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.019246] Console: colour dummy device 80x30
[    0.023766] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.034163] pid_max: default: 32768 minimum: 301
[    0.038946] Security Framework initialized
[    0.043158] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049837] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057455] CPU: Testing write buffer coherency: ok
[    0.062572] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.103769] Setting up static identity map for 0x100000 - 0x100060
[    0.110112] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.115451] mvebu-pmsu: Initializing Power Management Service Unit
[    0.173696] smp: Bringing up secondary CPUs ...
[    0.233732] Booting CPU 1
[    0.236630] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.236699] smp: Brought up 1 node, 2 CPUs
[    0.246587] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.252909] CPU: All CPU(s) started in SVC mode.
[    0.258283] devtmpfs: initialized
[    0.264530] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.272524] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.282428] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.288754] prandom: seed boundary self test passed
[    0.296243] prandom: 100 self tests passed
[    0.300406] pinctrl core: initialized pinctrl subsystem
[    0.306541] NET: Registered protocol family 16
[    0.311858] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.320241] cpuidle: using governor ladder
[    0.324459] cpuidle: using governor menu
[    0.328598] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.336677] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.342729] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.350884] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.405072] vgaarb: loaded
[    0.408055] SCSI subsystem initialized
[    0.412657] usbcore: registered new interface driver usbfs
[    0.418370] usbcore: registered new interface driver hub
[    0.423880] usbcore: registered new device driver usb
[    0.429312] media: Linux media interface: v0.10
[    0.433981] Linux video capture interface: v2.00
[    0.439448] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.497079] VFS: Disk quotas dquot_6.6.0
[    0.501204] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.515086] NET: Registered protocol family 2
[    0.520034] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.527186] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.533786] TCP: Hash tables configured (established 8192 bind 8192)
[    0.540293] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.546298] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.553083] NET: Registered protocol family 1
[    0.557801] RPC: Registered named UNIX socket transport module.
[    0.563820] RPC: Registered udp transport module.
[    0.568587] RPC: Registered tcp transport module.
[    0.573366] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.580140] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.586916] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.596091] audit: initializing netlink subsys (disabled)
[    0.601809] audit: type=2000 audit(0.582:1): state=initialized audit_enabled=0 res=1
[    0.601984] Initialise system trusted keyrings
[    0.602009] Key type blacklist registered
[    0.609522] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.609640] zbud: loaded
[    0.630427] NFS: Registering the id_resolver key type
[    0.635554] Key type id_resolver registered
[    0.639844] Key type id_legacy registered
[    0.643928] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.650718] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.657278] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.664733] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.671374] orangefs_init: module version upstream loaded
[    0.680102] Key type asymmetric registered
[    0.684267] Asymmetric key parser 'x509' registered
[    0.689241] bounce: pool size: 64 pages
[    0.693215] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.700697] io scheduler noop registered
[    0.704687] io scheduler deadline registered
[    0.709059] io scheduler cfq registered (default)
[    0.714957] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.723745] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.729877] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.736203] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.743170] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.749110] PCI: bus0: Fast back to back transfers disabled
[    0.754785] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.762879] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.771065] PCI: bus1: Fast back to back transfers enabled
[    0.776722] PCI: bus2: Fast back to back transfers enabled
[    0.782355] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.787388] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.792974] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.860031] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )
[    0.867882] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.930011] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy sg intr )
[    0.975958] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.984186] console [ttyS0] disabled
[    1.008131] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    1.017228] console [ttyS0] enabled
[    1.017228] console [ttyS0] enabled
[    1.024349] bootconsole [earlycon0] disabled
[    1.024349] bootconsole [earlycon0] disabled
[    1.034202] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.043418] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.053062] scsi host0: ahci-mvebu
[    1.056780] scsi host1: ahci-mvebu
[    1.060487] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 43
[    1.068443] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 43

Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 11:58AM
nailman23 Wrote:
-------------------------------------------------------
> I've tried the DTB version 4 and it stops on
> exactly the same step.Also tried with disks
> attached but it did not bring any improvement.

I can confirm that.

edit: kwboot is running now. 30% upload after 30min. This takes forever. Btw i now use a cheap CP2012 USB to Serial Adapter.



Edited 1 time(s). Last edit at 03/20/2018 12:32PM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 01:41PM
There was something about the NFC NAND but I forgot where the information is. The NAS326 box has a similar stock DTS as this box, but I ended up using

+			flash@d0000 {
+                                status = "okay";
+                                num-cs = <1>;
+                                marvell,nand-keep-config;
+                                marvell,nand-enable-arbiter;
+                                nand-on-flash-bbt;
+
+				partition@00000000 {
+					label = "U-Boot";
+					reg = <0x00000000 0x00200000>;	/*   2 MB */
+				};
+
+				partition@00200000 {
+					label = "U-Boot env";
+					reg = <0x00200000 0x00200000>;	/*   2 MB */
+				};
+
+				partition@00400000 {
+					label = "Config";
+					reg = <0x00400000 0x00A00000>;	/*  10 MB */
+				};
+
+				partition@00600000 {
+					label = "Kernel-1";
+					reg = <0x00E00000 0x00F00000>;	/*  15 MB */
+				};
+
+				partition@01500000 {
+					label = "RootFS-1";
+					reg = <0x01D00000 0x06A00000>;	/* 106 MB */
+				};
+
+				partition@08300000 {
+					label = "Kernel-2";
+					reg = <0x08700000 0x00F00000>;	/*  15 MB */
+				};
+
+				partition@09200000 {
+					label = "RootFS-2";
+					reg = <0x09600000 0x06A00000>;	/* 106 MB */
+				};
+			};

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 02:08PM
Ok,
went the kwboot way again. This took 2h (thats not really normal, is it? 4MB at 115200 baud should be faster?! Notice the "-q 0 -s 1". This makes the timing easier in my experience.
[kwboot]$ ../kwboot-x86_64 -f -t -B 115200 /dev/ttyUSB0 -b u-boot-a38x-spi-uart.bin -q 0 -s 1
Sending boot message. Please reboot the target.../
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 98 % [......................................................................]
 99 % [..........]
[Type Ctrl-\ + c to quit]

Then nothing happened and i pressed the combination to quit. I opened a new serial console, but there was nothing as well. So i rebooted and it booted up normally.

I compared with the download-serial.sh script:
[mjung@pollux kwboot]$ ./download-serial.sh /dev/ttyUSB0 u-boot-a38x-spi-uart.bin 
send-stop-pattern.c: In Funktion »main«:
send-stop-pattern.c:24:2: Warnung: Implizite Deklaration der Funktion »sleep«; meinten Sie »beep«? [-Wimplicit-function-declaration]
  sleep(2);
  ^~~~~
  beep
Now reset or power cycle your Armada 38x board and then press enter
Sleeping
Out of sleep
Got something 21
Got NACK (0x15) character
The board should be in serial downloader now. Sending the binary file 
Sending u-boot-a38x-spi-uart.bin, 7499 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 680/85kRetry 0: Timeout on sector ACK
Retry 0: Timeout on sector ACK

This hangs after copying quickly 85k and only gives timeouts after that.
Cheers,
Manuel
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 20, 2018 02:37PM
bodhi Wrote:
-------------------------------------------------------
> There was something about the NFC NAND but I
> forgot where the information is. The NAS326 box
> has a similar stock DTS as this box, but I ended
> up using

You mean information in GPL source? You may be right that the stock dts nand configuration is actually not valid. In a commentary it states:
92       /*
 93        * 1GB Flash via NFC NAND controller
 94        * should be disabled when the board boots
 95        * from SPI flash, since NFC shares the same
 96        * pins with SPI0 and requires SLM-1358 jumper.
 97        * However the u-boot DTB parser will
 98        * handle this situation and disable/remove
 99        * unnessesary devices according to board
100        * boot-up configuration.
101        */

So this sounds for me like the nand configuration of the stock dts is never actually used, because the board boots from spi a u-boot disables this device.
I have one additional information: We have the rescue firmware image, which is booted from usb by default. I analysed this image before and recovered a dtb file from it. I decoded this back to dts. There the nand section is the following:


      nand@d0000 {
        compatible = "marvell,armada-nand";
        interrupts = <0x0 0x54 0x4>;
        reg = <0xd0000 0x400>;
        clocks = <0xa 0x0>;
        clock-names = "ecc_clk";
        status = "okay";
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        nfc,nfc-mode = "normal";
        nfc,nfc-dma = <0x0>;
        nfc,nfc-width = <0x8>;
        nfc,ecc-type = <0x1>;
        nfc,num-cs = <0x0>;

        mtd0@00000000 {
          label = "ubifs";
          reg = <0x0 0x20000000>;
        };
      };

Not sure if this is of any help.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 12:05AM
lordzahl,

> You mean information in GPL source? You may be
> right that the stock dts nand configuration is
> actually not valid.

Right, now that I looked in my NSA326 notes. The NFC NAND is actually supported in mainline as armada-nand. So the NSA326 had a simple NAND flash defintion. We just have to specify that in the bootargs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 12:29AM
Quote

Ok,
went the kwboot way again. This took 2h (thats not really normal, is it? 4MB at 115200 baud should be faster?! Notice the "-q 0 -s 1". This makes the timing easier in my experience.
[kwboot]$ ../kwboot-x86_64 -f -t -B 115200 /dev/ttyUSB0 -b u-boot-a38x-spi-uart.bin -q 0 -s 1
Sending boot message. Please reboot the target.../
Sending boot image...
0 % [......................................................................]
0 % [......................................................................]
1 % [......................................................................]

<snip>

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

Then nothing happened and i pressed the combination to quit. I opened a new serial console, but there was nothing as well. So i rebooted and it booted up normally.

That is not so good. Perhaps we need to build our own UART u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 03:12AM
Here is DTB version 5 tarball for testing.

I've modified the NAND definition to use armada-nand, similar to the NAS326 and WD MyCloud boxes. And modified bootargs.


Copy the attached DTB to your USB rootfs /boot/dts/ folder.

Power up, interrupt serial console and set the envs (note that we are not loading uInitrd). We want to ignore that for now and see if the USB drive is powered up OK first.

setenv mtdparts 'mtdparts= armada-nand:-(ubifs);spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
usb start
run usb_bootcmd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-385-thecus-n2350.v5.tar (40 KB)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 03:02PM
Hi bodhi,
Thanks for the update.

bodhi Wrote:
-------------------------------------------------------
> Here is DTB version 5 tarball for testing.
Here is the result, still no change.
Are you sure "num-cs = <1>;" is correct?
The dts from the gpl source states "0". This is the chip select number, right?
I tried to change it myself, but i am missing the "dt-bindings" stuff.

edit: Fixed 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  0
Marvell>> setenv mtdparts 'mtdparts= armada-nand:-(ubifs);spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs 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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0	Interface (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 503 ms (7.9 MiB/s)
18686 bytes read in 662 ms (27.3 KiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff8fd ... 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=LABEL=rootfs rootdelay=10 mtdparts= armada-nand:-(ubifs);spi0.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: 1025944K/1048576K available (8192K kernel code, 722K rwdata, 2180K rodata, 1024K init, 337K bss, 22632K 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.008073] 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.043959] Console: colour dummy device 80x30
[    0.048492] Calibrating delay loop (skipped), value calculated using timer frequency.. 1066.00 BogoMIPS (lpj=5330000)
[    0.059154] pid_max: default: 32768 minimum: 301
[    0.063945] Security Framework initialized
[    0.068175] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074850] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.082473] CPU: Testing write buffer coherency: ok
[    0.087602] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.125247] Setting up static identity map for 0x100000 - 0x100060
[    0.131594] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.136943] mvebu-pmsu: Initializing Power Management Service Unit
[    0.143274] Hierarchical SRCU implementation.
[    0.185217] smp: Bringing up secondary CPUs ...
[    0.235288] 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.260032] devtmpfs: initialized
[    0.266522] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.274531] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.284429] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.290794] prandom: seed boundary self test passed
[    0.298270] prandom: 100 self tests passed
[    0.302436] pinctrl core: initialized pinctrl subsystem
[    0.308572] NET: Registered protocol family 16
[    0.313934] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.322211] cpuidle: using governor ladder
[    0.326442] cpuidle: using governor menu
[    0.330711] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.338782] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.344841] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.353005] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.416829] vgaarb: loaded
[    0.419814] SCSI subsystem initialized
[    0.424364] usbcore: registered new interface driver usbfs
[    0.430083] usbcore: registered new interface driver hub
[    0.435596] usbcore: registered new device driver usb
[    0.441072] media: Linux media interface: v0.10
[    0.445735] Linux video capture interface: v2.00
[    0.455537] clocksource: Switched to clocksource arm_global_timer
[    0.514472] VFS: Disk quotas dquot_6.6.0
[    0.518564] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.531812] NET: Registered protocol family 2
[    0.536734] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.543891] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.550504] TCP: Hash tables configured (established 8192 bind 8192)
[    0.556993] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.563002] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.569622] NET: Registered protocol family 1
[    0.574339] RPC: Registered named UNIX socket transport module.
[    0.580558] RPC: Registered udp transport module.
[    0.585329] RPC: Registered tcp transport module.
[    0.590115] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.596996] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.603793] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.612866] audit: initializing netlink subsys (disabled)
[    0.618457] audit: type=2000 audit(0.589:1): state=initialized audit_enabled=0 res=1
[    0.618710] Initialise system trusted keyrings
[    0.618734] Key type blacklist registered
[    0.618834] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.626291] zbud: loaded
[    0.637122] NFS: Registering the id_resolver key type
[    0.637135] Key type id_resolver registered
[    0.637137] Key type id_legacy registered
[    0.637147] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.637151] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.637305] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.641673] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.641780] orangefs_init: module version upstream loaded
[    0.645443] Key type asymmetric registered
[    0.645447] Asymmetric key parser 'x509' registered
[    0.645485] bounce: pool size: 64 pages
[    0.645524] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.645558] io scheduler noop registered
[    0.645561] io scheduler deadline registered
[    0.645627] io scheduler cfq registered (default)
[    0.650956] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.659247] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.659255] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.659260] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.659265] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.659641] PCI: bus0: Fast back to back transfers disabled
[    0.659653] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.659666] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.659750] PCI: bus1: Fast back to back transfers enabled
[    0.659846] PCI: bus2: Fast back to back transfers enabled
[    0.659879] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.659889] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.660433] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.716126] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.716300] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.776108] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.869651] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.877810] console [ttyS0] disabled
[    0.901753] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    0.910835] console [ttyS0] enabled
[    0.910835] console [ttyS0] enabled
[    0.917999] bootconsole [earlycon0] disabled
[    0.917999] bootconsole [earlycon0] disabled
[    0.927780] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    0.936961] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    0.956465] scsi host0: ahci-mvebu
[    0.970179] scsi host1: ahci-mvebu
[    0.973743] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 43
[    0.981735] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 43



Edited 1 time(s). Last edit at 03/21/2018 03:58PM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 03:55PM
All,

Have you tried with the HDD inserted in the slot?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 03:58PM
Manuel,

Quote

Are you sure "num-cs = <1>;" is correct?

Not sure.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 03:59PM
bodhi Wrote:
-------------------------------------------------------
> All,
>
> Have you tried with the HDD inserted in the slot?
No without HDD in the slot. I don't have a HDD to insert for the next few days.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 04:11PM
Here is DTB version 6 tarball for testing.

I've modified the NAND definition to use armada-nand, similar to the NAS326 and WD MyCloud boxes. And modified bootargs.


Copy the attached DTB to your USB rootfs /boot/dts/ folder.

Power up, interrupt serial console and set the envs (note that we are not loading uInitrd). We want to ignore that for now and see if the USB drive is powered up OK first.

setenv mtdparts 'mtdparts= armada-nand:-(ubifs);spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
usb start
run usb_bootcmd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-385-thecus-n2350.v6.tar (40 KB)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 04:14PM
lordzahl Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > All,
> >
> > Have you tried with the HDD inserted in the
> slot?
> No without HDD in the slot. I don't have a HDD to
> insert for the next few days.

It would be good to see if the HDD was powered up at that point.

I've uploaded version 6 above (I've chaged that cs to 0).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 04:20PM
Hi, thanks.
Version 6 result:

edit: Ok, maybe nailman23 can test with HDD, i will not be home before monday and i have only taken the box with me, but no drives.

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);spi0.0:0x00100000(uboot),0x00010000@0x00100000(uboot_env)'
Marvell>> setenv load_dtb_addr 0x1000000
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv dtbfilename armada-385-thecus-n2350.dtb
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs 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; run usb_set_bootargs; bootz $load_image_addr - $load_dtb_addr'
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0	Interface (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 503 ms (7.9 MiB/s)
18686 bytes read in 664 ms (27.3 KiB/s)
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Device Tree to 00ff8000, end 00fff8fd ... 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=LABEL=rootfs rootdelay=10 mtdparts= armada-nand:-(ubifs);spi0.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: 1025944K/1048576K available (8192K kernel code, 722K rwdata, 2180K rodata, 1024K init, 337K bss, 22632K 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.008073] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7aed16d152, max_idle_ns: 440795225656 ns
[    0.019168] Switching to timer-based delay loop, resolution 1ns
[    0.025381] Ignoring duplicate/late registration of read_current_timer delay
[    0.032492] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.043961] 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.068175] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.074850] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.082472] CPU: Testing write buffer coherency: ok
[    0.087600] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.125248] Setting up static identity map for 0x100000 - 0x100060
[    0.131595] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.136943] mvebu-pmsu: Initializing Power Management Service Unit
[    0.143274] Hierarchical SRCU implementation.
[    0.185218] smp: Bringing up secondary CPUs ...
[    0.235289] Booting CPU 1
[    0.238194] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.238279] smp: Brought up 1 node, 2 CPUs
[    0.248194] SMP: Total of 2 processors activated (2132.00 BogoMIPS).
[    0.254606] CPU: All CPU(s) started in SVC mode.
[    0.260039] devtmpfs: initialized
[    0.266537] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.274541] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.284439] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.290801] prandom: seed boundary self test passed
[    0.298278] prandom: 100 self tests passed
[    0.302443] pinctrl core: initialized pinctrl subsystem
[    0.308578] NET: Registered protocol family 16
[    0.313940] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.322217] cpuidle: using governor ladder
[    0.326447] cpuidle: using governor menu
[    0.330718] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.338788] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.344845] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.353008] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.416811] vgaarb: loaded
[    0.419798] SCSI subsystem initialized
[    0.424357] usbcore: registered new interface driver usbfs
[    0.430074] usbcore: registered new interface driver hub
[    0.435586] usbcore: registered new device driver usb
[    0.441065] media: Linux media interface: v0.10
[    0.445728] Linux video capture interface: v2.00
[    0.455539] clocksource: Switched to clocksource arm_global_timer
[    0.514529] VFS: Disk quotas dquot_6.6.0
[    0.518620] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.531856] NET: Registered protocol family 2
[    0.536780] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.543937] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.550547] TCP: Hash tables configured (established 8192 bind 8192)
[    0.557037] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.563046] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.569664] NET: Registered protocol family 1
[    0.574385] RPC: Registered named UNIX socket transport module.
[    0.580601] RPC: Registered udp transport module.
[    0.585371] RPC: Registered tcp transport module.
[    0.590157] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.597037] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.603830] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.612907] audit: initializing netlink subsys (disabled)
[    0.618496] audit: type=2000 audit(0.589:1): state=initialized audit_enabled=0 res=1
[    0.618744] Initialise system trusted keyrings
[    0.618768] Key type blacklist registered
[    0.618860] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.626330] zbud: loaded
[    0.637159] NFS: Registering the id_resolver key type
[    0.637170] Key type id_resolver registered
[    0.637172] Key type id_legacy registered
[    0.637182] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.637186] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.637339] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.641707] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.641814] orangefs_init: module version upstream loaded
[    0.645460] Key type asymmetric registered
[    0.645463] Asymmetric key parser 'x509' registered
[    0.645501] bounce: pool size: 64 pages
[    0.645571] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.645575] io scheduler noop registered
[    0.645578] io scheduler deadline registered
[    0.645649] io scheduler cfq registered (default)
[    0.650970] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.659285] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[    0.659293] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.659299] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    0.659304] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.659679] PCI: bus0: Fast back to back transfers disabled
[    0.659691] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.659704] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.659787] PCI: bus1: Fast back to back transfers enabled
[    0.659884] PCI: bus2: Fast back to back transfers enabled
[    0.659915] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.659925] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.660463] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.716129] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.716302] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.776112] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    0.868153] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.876606] console [ttyS0] disabled
[    0.900478] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    0.909734] console [ttyS0] enabled
[    0.909734] console [ttyS0] enabled
[    0.916972] bootconsole [earlycon0] disabled
[    0.916972] bootconsole [earlycon0] disabled
[    0.927063] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    0.936259] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    0.956034] scsi host0: ahci-mvebu
[    0.969806] scsi host1: ahci-mvebu
[    0.973441] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 43
[    0.981442] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 43



Edited 1 time(s). Last edit at 03/21/2018 04:23PM by lordzahl.
Re: Debian Installation on Thecus N2350 (Marvell Armada 385)
March 21, 2018 04:26PM
> Manuel,
>
>
Quote

Are you sure "num-cs = <1>;" is
> correct?
>
> Not sure.

You're right! this box mus have a different NAND type from the NAS326 and WD MyCloud.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

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: