Welcome! Log In Create A New Profile

Advanced

Booting a NSA 325 v2 from USB

Posted by ckuetbach 
Booting a NSA 325 v2 from USB
September 03, 2022 03:28AM
Hello,

I tried to give an old NSA 325v2 a new life as, don't know what I want to do with it, ut it should be useful again ;)

As a beginner / immediate I tried this tutorial first, because no UART was needed and it should be more or less harmless.

Unfortunately, the original kernel and rootfs weren't available anymore, so I used the version from this forum here. Also after pulling the USB-stick out, the device won't boot anymore. In germany we would say it is "Verschlimmbessert", (made worse while trying to fix something).

Fortunatly I managed to get the UART connection up and running, and after some fixes to the boot parameter, the device now detects the USB stick and stock uboot tries to boot the new kernel. But that kernel is stuck with a kernel panic.

Bootscreen:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB-88F6282A-BP LE 

U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 7 tRP = 8 tRAS = 24 tRCD=8
DRAM CS[0] base 0x00000000   size 512MB 
DRAM Total size 512MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled 
Write allocate disabled


USB 0: host mode


Environment
printenv

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=5C:F4:AB:51:66:12
arcNumber=4495
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
to_linux="setenv mainlineLinux yes
bootcmd='run bootcmd_linux'
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no

Environment size: 2638/131068 bytes


Boot log:
boot

(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.....................................................................................................................

5449902 bytes read
.
...
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
....................................................................................................................................................................................................................................................................................................................................................................................................................
....
........................................................................................................................

9671091 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2022-09-02  22:35:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5449838 Bytes =  5.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes =  9.2 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] INITRD: 0x01100000+0x0093a000 overlaps in-use memory region - disabling initrd
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] On node 0 totalpages: 131072
[    0.000000][    T0]   Normal zone: 1024 pages used for memmap
[    0.000000][    T0]   Normal zone: 0 pages reserved
[    0.000000][    T0]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000][    T0] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000][    T0] pcpu-alloc: [0] 0 
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 500392K/524288K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 23896K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000046][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000732][    T0] Console: colour dummy device 80x30
[    0.000791][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000823][    T0] pid_max: default: 32768 minimum: 301
[    0.001149][    T0] LSM: Security Framework initializing
[    0.001292][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001327][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002470][    T0] CPU: Testing write buffer coherency: ok
[    0.004362][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.004614][    T1] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.004883][    T1] rcu: Hierarchical SRCU implementation.
[    0.005960][    T1] devtmpfs: initialized
[    0.011662][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011705][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.039673][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.039706][    T1] prandom: seed boundary self test passed
[    0.042875][    T1] prandom: 100 self tests passed
[    0.042898][    T1] pinctrl core: initialized pinctrl subsystem
[    0.044220][    T1] NET: Registered protocol family 16
[    0.044817][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.045573][    T1] audit: initializing netlink subsys (disabled)
[    0.046692][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.046989][   T16] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.047136][    T1] cpuidle: using governor ladder
[    0.047213][    T1] cpuidle: using governor menu
[    0.047611][    T1] Feroceon L2: Enabling L2
[    0.047651][    T1] Feroceon L2: Cache support initialised.
[    0.056288][    T1] No ATAGs?
[    2.560052][    C0] random: fast init done
[    3.683636][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.703073][   T59] wait_for_initramfs() called before rootfs_initcalls
[    3.890127][    T1] raid6: int32x8  gen()   151 MB/s
[    4.060155][    T1] raid6: int32x8  xor()    92 MB/s
[    4.230179][    T1] raid6: int32x4  gen()   146 MB/s
[    4.400070][    T1] raid6: int32x4  xor()    96 MB/s
[    4.570161][    T1] raid6: int32x2  gen()   190 MB/s
[    4.740135][    T1] raid6: int32x2  xor()   114 MB/s
[    4.910062][    T1] raid6: int32x1  gen()   132 MB/s
[    5.080194][    T1] raid6: int32x1  xor()    79 MB/s
[    5.080208][    T1] raid6: using algorithm int32x2 gen() 190 MB/s
[    5.080218][    T1] raid6: .... xor() 114 MB/s, rmw enabled
[    5.080228][    T1] raid6: using intx1 recovery algorithm
[    5.080442][    T1] vgaarb: loaded
[    5.080907][    T1] SCSI subsystem initialized
[    5.081109][    T1] libata version 3.00 loaded.
[    5.081340][    T1] usbcore: registered new interface driver usbfs
[    5.081398][    T1] usbcore: registered new interface driver hub
[    5.081443][    T1] usbcore: registered new device driver usb
[    5.081616][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.081629][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.081657][    T1] PTP clock support registered
[    5.083118][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.163672][    T1] VFS: Disk quotas dquot_6.6.0
[    5.163766][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.176829][    T1] NET: Registered protocol family 2
[    5.176996][    T1] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    5.178039][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.178089][    T1] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178159][    T1] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178218][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    5.178413][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.178477][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178511][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178711][    T1] NET: Registered protocol family 1
[    5.183628][    T1] RPC: Registered named UNIX socket transport module.
[    5.183647][    T1] RPC: Registered udp transport module.
[    5.183658][    T1] RPC: Registered tcp transport module.
[    5.183667][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.183681][    T1] PCI: CLS 0 bytes, default 32
[    5.183821][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.289493][    T1] Initialise system trusted keyrings
[    6.289552][    T1] Key type blacklist registered
[    6.289780][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    6.289891][    T1] zbud: loaded
[    6.291072][    T1] NFS: Registering the id_resolver key type
[    6.291113][    T1] Key type id_resolver registered
[    6.291125][    T1] Key type id_legacy registered
[    6.291163][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.291184][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    6.291196][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.291437][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    6.291812][    T1] fuse: init (API version 7.34)
[    6.292151][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.292315][    T1] orangefs_init: module version upstream loaded
[    6.292331][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    6.368388][    T1] xor: measuring software checksum speed
[    6.375068][    T1]    arm4regs        :  1493 MB/sec
[    6.386124][    T1]    8regs           :   895 MB/sec
[    6.393742][    T1]    32regs          :  1302 MB/sec
[    6.393758][    T1] xor: using function: arm4regs (1493 MB/sec)
[    6.393776][    T1] async_tx: api initialized (async)
[    6.393799][    T1] Key type asymmetric registered
[    6.393810][    T1] Asymmetric key parser 'x509' registered
[    6.393862][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    6.393924][    T1] io scheduler bfq registered
[    6.542733][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.544317][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    6.544358][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: Parsing ranges property...
[    6.544392][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    6.544427][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[    6.544462][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[    6.544495][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    6.544527][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    6.544559][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    6.544584][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    6.544838][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    6.544858][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.544877][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    6.544896][    T1] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[    6.544913][    T1] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[    6.544929][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.544944][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    6.544960][    T1] pci_bus 0000:00: scanning bus
[    6.545057][    T1] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    6.545089][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    6.546266][    T1] pci_bus 0000:00: fixups for bus
[    6.546288][    T1] PCI: bus0: Fast back to back transfers disabled
[    6.546304][    T1] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    6.546319][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.546338][    T1] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    6.546458][    T1] pci_bus 0000:01: scanning bus
[    6.546512][    T1] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    6.546553][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x90001fff 64bit]
[    6.546716][    T1] pci 0000:01:00.0: PME# supported from D0 D3hot
[    6.546736][    T1] pci 0000:01:00.0: PME# disabled
[    6.546797][    T1] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    6.574149][    T1] pci_bus 0000:01: fixups for bus
[    6.574172][    T1] PCI: bus1: Fast back to back transfers disabled
[    6.574186][    T1] pci_bus 0000:01: bus scan returning with max=01
[    6.574200][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    6.574221][    T1] pci_bus 0000:00: bus scan returning with max=01
[    6.574371][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    6.574396][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    6.574418][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    6.574446][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.574463][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    6.574543][    T1] pcieport 0000:00:01.0: assign IRQ: got 0
[    6.574566][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    6.574591][    T1] pcieport 0000:00:01.0: enabling bus mastering
[    6.574634][    T1] pci 0000:00:01.0: enabling bus mastering
[    6.575122][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.633955][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.636004][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.693949][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.696208][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.697386][    T1] printk: console [ttyS0] disabled
[    6.697467][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.935546][    T1] printk: console [ttyS0] enabled
[    7.947389][    T1] loop: module loaded
[    7.951524][    T1] sata_mv f1080000.sata: version 1.28
[    7.957229][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    7.965942][    T1] scsi host0: sata_mv
[    7.970338][    T1] scsi host1: sata_mv
[    7.974442][    T1] ata1: SATA max UDMA/133 irq 32
[    7.979262][    T1] ata2: SATA max UDMA/133 irq 32
[    7.984896][    T1] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    7.992026][    T1] nand: Eon NAND 128MiB 3,3V 8-bit
[    7.997035][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.005579][    T1] Scanning device for bad blocks
[    8.015978][    T1] Bad eraseblock 100 at 0x000000c80000
[    8.026840][    T1] Bad eraseblock 200 at 0x000001900000
[    8.077737][    T1] 9 fixed-partitions partitions found on MTD device orion_nand
[    8.085190][    T1] Creating 9 MTD partitions on "orion_nand":
[    8.091054][    T1] 0x000000000000-0x000000100000 : "uboot"
[    8.097919][    T1] 0x000000100000-0x000000180000 : "uboot_env"
[    8.105097][    T1] 0x000000180000-0x000000200000 : "key_store"
[    8.112199][    T1] 0x000000200000-0x000000280000 : "info"
[    8.118893][    T1] 0x000000280000-0x000000c80000 : "etc"
[    8.125544][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.132603][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    8.139729][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    8.146817][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[    8.154370][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    8.162939][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.174232][    T1] libphy: Fixed MDIO Bus: probed
[    8.180215][    T1] libphy: orion_mdio_bus: probed
[    8.186488][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.195343][    T1] mv643xx_eth: Set the PHY to fix link down
[    8.195893][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 5c:f4:ab:51:66:12
[    8.211322][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.218680][    T1] ehci-pci: EHCI PCI platform driver
[    8.223952][    T1] ehci-orion: EHCI orion driver
[    8.228837][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.235139][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.243731][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.273135][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.280139][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.289182][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.297172][    T1] usb usb1: Product: EHCI Host Controller
[    8.302794][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    8.310259][    T1] usb usb1: SerialNumber: f1050000.ehci
[    8.315726][   T94] ata1: SATA link down (SStatus 0 SControl F300)
[    8.322551][    T1] hub 1-0:1.0: USB hub found
[    8.327118][    T1] hub 1-0:1.0: 1 port detected
[    8.332501][    T1] xhci_hcd 0000:01:00.0: assign IRQ: got 36
[    8.338409][    T1] xhci_hcd 0000:01:00.0: enabling bus mastering
[    8.344566][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.350534][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    8.359084][    T1] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    8.368909][    T1] xhci_hcd 0000:01:00.0: enabling Mem-Wr-Inval
[    8.375413][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.384444][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.392406][    T1] usb usb2: Product: xHCI Host Controller
[    8.398019][    T1] usb usb2: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    8.405466][    T1] usb usb2: SerialNumber: 0000:01:00.0
[    8.411344][    T1] hub 2-0:1.0: USB hub found
[    8.415918][    T1] hub 2-0:1.0: 2 ports detected
[    8.421200][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.427218][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    8.435388][    T1] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    8.442470][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.451593][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
[    8.460626][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.468704][    T1] usb usb3: Product: xHCI Host Controller
[    8.474328][    T1] usb usb3: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    8.481759][    T1] usb usb3: SerialNumber: 0000:01:00.0
[    8.487618][    T1] hub 3-0:1.0: USB hub found
[    8.492126][    T1] hub 3-0:1.0: 2 ports detected
[    8.497660][    T1] usbcore: registered new interface driver usb-storage
[    8.504827][    T1] mousedev: PS/2 mouse device common for all mice
[    8.511366][    T1] i2c /dev entries driver
[    8.516235][    T1] i2c i2c-0: Not using recovery: no suitable method provided
[    8.529744][    T1] rtc-pcf8563 0-0051: registered as rtc0
[    8.536531][    T1] rtc-pcf8563 0-0051: setting system clock to 2022-09-03T00:09:22 UTC (1662163762)
[    8.547375][    T1] device-mapper: uevent: version 1.0.3
[    8.552953][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[    8.562526][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    8.569855][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    8.577240][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    8.584666][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    8.591517][    T1] device-mapper: raid: Loading target version 1.15.1
[    8.600212][    T1] hid: raw HID events driver (C) Jiri Kosina
[    8.606413][    T1] drop_monitor: Initializing network drop monitor service
[    8.613480][   T17] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.621319][    T1] NET: Registered protocol family 10
[    8.627758][    T1] Segment Routing with IPv6
[    8.632214][    T1] RPL Segment Routing with IPv6
[    8.637048][    T1] NET: Registered protocol family 17
[    8.642429][    T1] Key type dns_resolver registered
[    8.647919][    T1] registered taskstats version 1
[    8.652782][    T1] Loading compiled-in X.509 certificates
[    8.658669][    T1] zswap: loaded using pool lzo/zbud
[    8.663795][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[    8.670362][    T1] Key type ._fscrypt registered
[    8.675162][    T1] Key type .fscrypt registered
[    8.679808][    T1] Key type fscrypt-provisioning registered
[    8.687140][    T1] Key type big_key registered
[    8.694852][    T1] Key type encrypted registered
[    8.702786][    T1] md: Waiting for all devices to be available before autodetect
[    8.710500][    T1] md: If you don't use raid, use raid=noautodetect
[    8.716997][    T1] md: Autodetecting RAID arrays.
[    8.721813][    T1] md: autorun ...
[    8.725357][    T1] md: ... autorun DONE.
[    8.729971][    T1] VFS: Cannot open root device "LABEL=rootfs" or unknown-block(0,0): error -6
[    8.738788][    T1] Please append a correct "root=" boot option; here are the available partitions:
[    8.747947][    T1] 1f00            1024 mtdblock0 
[    8.747955][    T1]  (driver?)
[    8.755964][    T1] 1f01             512 mtdblock1 
[    8.755972][    T1]  (driver?)
[    8.763963][    T1] 1f02             512 mtdblock2 
[    8.763971][    T1]  (driver?)
[    8.771930][    T1] 1f03             512 mtdblock3 
[    8.771936][    T1]  (driver?)
[    8.779978][    T1] 1f04           10240 mtdblock4 
[    8.779986][    T1]  (driver?)
[    8.788045][    T1] 1f05           10240 mtdblock5 
[    8.788054][    T1]  (driver?)
[    8.796045][    T1] 1f06           48896 mtdblock6 
[    8.796053][    T1]  (driver?)
[    8.804069][    T1] 1f07           10240 mtdblock7 
[    8.804077][    T1]  (driver?)
[    8.812042][    T1] 1f08           48896 mtdblock8 
[    8.812048][    T1]  (driver?)
[    8.820029][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    8.829026][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.6-kirkwood-tld-1 #1.0
[    8.836985][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[    8.843987][    T1] [<8010e0a4>] (unwind_backtrace) from [<8010a8ac>] (show_stack+0x10/0x14)
[    8.852483][    T1] [<8010a8ac>] (show_stack) from [<80afddf4>] (panic+0xfc/0x328)
[    8.860104][    T1] [<80afddf4>] (panic) from [<81101ad0>] (mount_block_root+0x1e0/0x26c)
[    8.868336][    T1] [<81101ad0>] (mount_block_root) from [<81101c4c>] (mount_root+0xf0/0x120)
[    8.876907][    T1] [<81101c4c>] (mount_root) from [<81101dc0>] (prepare_namespace+0x144/0x180)
[    8.885652][    T1] [<81101dc0>] (prepare_namespace) from [<811015e4>] (kernel_init_freeable+0x1d0/0x234)
[    8.895271][    T1] [<811015e4>] (kernel_init_freeable) from [<80b091cc>] (kernel_init+0x8/0x118)
[    8.904192][    T1] [<80b091cc>] (kernel_init) from [<80100148>] (ret_from_fork+0x14/0x2c)
[    8.912501][    T1] Exception stack(0x814affb0 to 0x814afff8)
[    8.918275][    T1] ffa0:                                     00000000 00000000 00000000 00000000
[    8.927189][    T1] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    8.936100][    T1] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    8.943451][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---


I think I "just" messed upp the environment variables, but I have no idea whats wrong.




Thanks,

Christian



Edited 2 time(s). Last edit at 09/03/2022 04:41AM by ckuetbach.
Re: Booting a NSA 325 v2 from USB
September 03, 2022 04:07AM
ckuetbach,

> I think I "just" messed upp the environment
> variables, but I have no idea whats wrong.

Your u-boot envs look fine. You must have missed this:

Quote

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4. But be aware that Ext4 file system format needs to be "finalized" before it can be used for booting.

Pull out the USB drive and mount it on another Linux box. Assuming it is detected as /dev/sdb1.

e2label /dev/sdb1

If it does not show rootfs then set it.
e2label /dev/sdb1 rootfs
sync

And umount. Take it back to the NSA325 and boot it.

Sometime when you use Ubuntu or another distro to prepare the rootfs, and use the GUI to format it, the label was not set correctly. So running command line e2label usually helps to make sure that the partition label is set for sure.

And another very important thing is when you prepare the USB rootfs, you must be root user (sudo won't work correctly).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting a NSA 325 v2 from USB
September 03, 2022 04:40AM
Hi,

thanks for your fast reply.

meanwhile I got some steps further. I added a rootdelay=10 and rootwait to the bootarg options. Now the /dev/sda1 is showing.

The label is present, but I created an etx2 partition.
My second USB stick was ext3, but wth the same result.

I added the current output.


Regarding the beeing "root"

I always get root with "sudo su", am I "root enough" for creatng the stick?


Thanks in advance,
Christian


PS:
Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] INITRD: 0x01100000+0x0093a000 overlaps in-use memory region - disabling initrd
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] On node 0 totalpages: 131072
[    0.000000][    T0]   Normal zone: 1024 pages used for memmap
[    0.000000][    T0]   Normal zone: 0 pages reserved
[    0.000000][    T0]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000][    T0] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000][    T0] pcpu-alloc: [0] 0 
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs rootdelay=10 rootwait loglevel=8
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 500392K/524288K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 23896K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000047][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000734][    T0] Console: colour dummy device 80x30
[    0.000794][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000825][    T0] pid_max: default: 32768 minimum: 301
[    0.001146][    T0] LSM: Security Framework initializing
[    0.001287][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001324][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002465][    T0] CPU: Testing write buffer coherency: ok
[    0.004356][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.004607][    T1] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.004864][    T1] rcu: Hierarchical SRCU implementation.
[    0.005937][    T1] devtmpfs: initialized
[    0.011739][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011783][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.039750][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.039784][    T1] prandom: seed boundary self test passed
[    0.042951][    T1] prandom: 100 self tests passed
[    0.042974][    T1] pinctrl core: initialized pinctrl subsystem
[    0.044304][    T1] NET: Registered protocol family 16
[    0.044952][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.045710][    T1] audit: initializing netlink subsys (disabled)
[    0.046818][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.047119][   T16] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.047264][    T1] cpuidle: using governor ladder
[    0.047342][    T1] cpuidle: using governor menu
[    0.047789][    T1] Feroceon L2: Enabling L2
[    0.047830][    T1] Feroceon L2: Cache support initialised.
[    0.056475][    T1] No ATAGs?
[    2.560052][    C0] random: fast init done
[    3.683679][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.703024][   T59] wait_for_initramfs() called before rootfs_initcalls
[    3.890212][    T1] raid6: int32x8  gen()   151 MB/s
[    4.060135][    T1] raid6: int32x8  xor()    92 MB/s
[    4.230161][    T1] raid6: int32x4  gen()   146 MB/s
[    4.400170][    T1] raid6: int32x4  xor()    96 MB/s
[    4.570122][    T1] raid6: int32x2  gen()   189 MB/s
[    4.740131][    T1] raid6: int32x2  xor()   114 MB/s
[    4.910182][    T1] raid6: int32x1  gen()   132 MB/s
[    5.080075][    T1] raid6: int32x1  xor()    79 MB/s
[    5.080089][    T1] raid6: using algorithm int32x2 gen() 189 MB/s
[    5.080099][    T1] raid6: .... xor() 114 MB/s, rmw enabled
[    5.080109][    T1] raid6: using intx1 recovery algorithm
[    5.080323][    T1] vgaarb: loaded
[    5.080776][    T1] SCSI subsystem initialized
[    5.080978][    T1] libata version 3.00 loaded.
[    5.081209][    T1] usbcore: registered new interface driver usbfs
[    5.081267][    T1] usbcore: registered new interface driver hub
[    5.081313][    T1] usbcore: registered new device driver usb
[    5.081486][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.081499][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.081527][    T1] PTP clock support registered
[    5.083040][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.163599][    T1] VFS: Disk quotas dquot_6.6.0
[    5.163691][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.176775][    T1] NET: Registered protocol family 2
[    5.176941][    T1] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    5.177989][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.178040][    T1] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178110][    T1] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178169][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    5.178363][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.178427][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178461][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178658][    T1] NET: Registered protocol family 1
[    5.183553][    T1] RPC: Registered named UNIX socket transport module.
[    5.183571][    T1] RPC: Registered udp transport module.
[    5.183581][    T1] RPC: Registered tcp transport module.
[    5.183590][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.183604][    T1] PCI: CLS 0 bytes, default 32
[    5.183790][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.289500][    T1] Initialise system trusted keyrings
[    6.289555][    T1] Key type blacklist registered
[    6.289779][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    6.289889][    T1] zbud: loaded
[    6.291074][    T1] NFS: Registering the id_resolver key type
[    6.291109][    T1] Key type id_resolver registered
[    6.291121][    T1] Key type id_legacy registered
[    6.291157][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.291177][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    6.291190][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.291427][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    6.291800][    T1] fuse: init (API version 7.34)
[    6.292140][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.292304][    T1] orangefs_init: module version upstream loaded
[    6.292319][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    6.369201][    T1] xor: measuring software checksum speed
[    6.375881][    T1]    arm4regs        :  1493 MB/sec
[    6.386936][    T1]    8regs           :   895 MB/sec
[    6.394572][    T1]    32regs          :  1302 MB/sec
[    6.394587][    T1] xor: using function: arm4regs (1493 MB/sec)
[    6.394605][    T1] async_tx: api initialized (async)
[    6.394621][    T1] Key type asymmetric registered
[    6.394632][    T1] Asymmetric key parser 'x509' registered
[    6.394683][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    6.394744][    T1] io scheduler bfq registered
[    6.543588][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.545131][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    6.545172][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: Parsing ranges property...
[    6.545205][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    6.545241][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[    6.545275][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[    6.545309][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    6.545341][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    6.545372][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    6.545397][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    6.545654][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    6.545673][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.545692][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    6.545710][    T1] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[    6.545728][    T1] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[    6.545744][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.545759][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    6.545775][    T1] pci_bus 0000:00: scanning bus
[    6.545873][    T1] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    6.545905][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    6.547083][    T1] pci_bus 0000:00: fixups for bus
[    6.547104][    T1] PCI: bus0: Fast back to back transfers disabled
[    6.547120][    T1] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    6.547135][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.547154][    T1] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    6.547272][    T1] pci_bus 0000:01: scanning bus
[    6.547325][    T1] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    6.547367][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x90001fff 64bit]
[    6.547530][    T1] pci 0000:01:00.0: PME# supported from D0 D3hot
[    6.547551][    T1] pci 0000:01:00.0: PME# disabled
[    6.547611][    T1] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    6.574075][    T1] pci_bus 0000:01: fixups for bus
[    6.574098][    T1] PCI: bus1: Fast back to back transfers disabled
[    6.574112][    T1] pci_bus 0000:01: bus scan returning with max=01
[    6.574126][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    6.574146][    T1] pci_bus 0000:00: bus scan returning with max=01
[    6.574295][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    6.574320][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    6.574341][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    6.574369][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.574387][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    6.574467][    T1] pcieport 0000:00:01.0: assign IRQ: got 0
[    6.574490][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    6.574515][    T1] pcieport 0000:00:01.0: enabling bus mastering
[    6.574560][    T1] pci 0000:00:01.0: enabling bus mastering
[    6.575047][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.633869][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.635905][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.693871][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.696123][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.697301][    T1] printk: console [ttyS0] disabled
[    6.697383][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.937368][    T1] printk: console [ttyS0] enabled
[    7.949228][    T1] loop: module loaded
[    7.953405][    T1] sata_mv f1080000.sata: version 1.28
[    7.959069][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    7.967791][    T1] scsi host0: sata_mv
[    7.972181][    T1] scsi host1: sata_mv
[    7.976286][    T1] ata1: SATA max UDMA/133 irq 32
[    7.981109][    T1] ata2: SATA max UDMA/133 irq 32
[    7.986749][    T1] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    7.993898][    T1] nand: Eon NAND 128MiB 3,3V 8-bit
[    7.998888][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.007428][    T1] Scanning device for bad blocks
[    8.017826][    T1] Bad eraseblock 100 at 0x000000c80000
[    8.028700][    T1] Bad eraseblock 200 at 0x000001900000
[    8.079586][    T1] 9 fixed-partitions partitions found on MTD device orion_nand
[    8.087038][    T1] Creating 9 MTD partitions on "orion_nand":
[    8.092901][    T1] 0x000000000000-0x000000100000 : "uboot"
[    8.099769][    T1] 0x000000100000-0x000000180000 : "uboot_env"
[    8.106933][    T1] 0x000000180000-0x000000200000 : "key_store"
[    8.114081][    T1] 0x000000200000-0x000000280000 : "info"
[    8.120726][    T1] 0x000000280000-0x000000c80000 : "etc"
[    8.127367][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.134469][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    8.141539][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    8.148642][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[    8.156217][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    8.164822][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.176095][    T1] libphy: Fixed MDIO Bus: probed
[    8.182074][    T1] libphy: orion_mdio_bus: probed
[    8.188322][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.197177][    T1] mv643xx_eth: Set the PHY to fix link down
[    8.197727][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 5c:f4:ab:51:66:12
[    8.213227][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.220540][    T1] ehci-pci: EHCI PCI platform driver
[    8.225809][    T1] ehci-orion: EHCI orion driver
[    8.230694][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.236995][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.245625][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.273058][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.280061][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.289112][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.297100][    T1] usb usb1: Product: EHCI Host Controller
[    8.302724][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    8.310188][    T1] usb usb1: SerialNumber: f1050000.ehci
[    8.316229][    T1] hub 1-0:1.0: USB hub found
[    8.320764][    T1] hub 1-0:1.0: 1 port detected
[    8.325810][   T94] ata1: SATA link down (SStatus 0 SControl F300)
[    8.332360][    T1] xhci_hcd 0000:01:00.0: assign IRQ: got 36
[    8.338260][    T1] xhci_hcd 0000:01:00.0: enabling bus mastering
[    8.344527][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.350524][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    8.359084][    T1] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    8.368908][    T1] xhci_hcd 0000:01:00.0: enabling Mem-Wr-Inval
[    8.375407][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.384440][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.392396][    T1] usb usb2: Product: xHCI Host Controller
[    8.398010][    T1] usb usb2: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    8.405456][    T1] usb usb2: SerialNumber: 0000:01:00.0
[    8.411320][    T1] hub 2-0:1.0: USB hub found
[    8.415892][    T1] hub 2-0:1.0: 2 ports detected
[    8.421172][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.427190][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    8.435359][    T1] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    8.442435][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.451557][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
[    8.460592][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.468667][    T1] usb usb3: Product: xHCI Host Controller
[    8.474292][    T1] usb usb3: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    8.481724][    T1] usb usb3: SerialNumber: 0000:01:00.0
[    8.487590][    T1] hub 3-0:1.0: USB hub found
[    8.492090][    T1] hub 3-0:1.0: 2 ports detected
[    8.497613][    T1] usbcore: registered new interface driver usb-storage
[    8.504778][    T1] mousedev: PS/2 mouse device common for all mice
[    8.511310][    T1] i2c /dev entries driver
[    8.516181][    T1] i2c i2c-0: Not using recovery: no suitable method provided
[    8.529559][    T1] rtc-pcf8563 0-0051: registered as rtc0
[    8.536343][    T1] rtc-pcf8563 0-0051: setting system clock to 2022-09-03T09:19:29 UTC (1662196769)
[    8.547212][    T1] device-mapper: uevent: version 1.0.3
[    8.552784][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[    8.562333][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    8.569666][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    8.577057][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    8.584483][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    8.591333][    T1] device-mapper: raid: Loading target version 1.15.1
[    8.600064][    T1] hid: raw HID events driver (C) Jiri Kosina
[    8.606482][    T1] drop_monitor: Initializing network drop monitor service
[    8.613553][   T17] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.621381][    T1] NET: Registered protocol family 10
[    8.627812][    T1] Segment Routing with IPv6
[    8.632266][    T1] RPL Segment Routing with IPv6
[    8.637101][    T1] NET: Registered protocol family 17
[    8.642496][    T1] Key type dns_resolver registered
[    8.648026][    T1] registered taskstats version 1
[    8.652885][    T1] Loading compiled-in X.509 certificates
[    8.658769][    T1] zswap: loaded using pool lzo/zbud
[    8.664192][    T1] Key type ._fscrypt registered
[    8.668925][    T1] Key type .fscrypt registered
[    8.673621][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[    8.679900][    T1] Key type fscrypt-provisioning registered
[    8.687218][    T1] Key type big_key registered
[    8.694978][    T1] Key type encrypted registered
[    8.702919][    T1] Waiting 10 sec before mounting root device...
[    8.824760][   T17] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.32
[    8.833713][   T17] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.841598][   T17] usb 1-1: Product: USB2.0 Hub
[    8.847058][   T17] hub 1-1:1.0: USB hub found
[    8.851887][   T17] hub 1-1:1.0: 4 ports detected
[    9.173071][   T17] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    9.324260][   T17] usb 1-1.2: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[    9.333405][   T17] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.341468][   T17] usb 1-1.2: Product:  SanDisk 3.2Gen1
[    9.346825][   T17] usb 1-1.2: Manufacturer:  USB
[    9.351553][   T17] usb 1-1.2: SerialNumber: 0501c1029566a1dddfce34688a36fe760dc7c82e982b3aca68f3d3c7203185317d2900000000000000000000b4e99ab0ff101a1083558107b7ab470e
[    9.367029][   T17] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    9.374554][   T17] scsi host2: usb-storage 1-1.2:1.0
[   10.404218][   T81] scsi 2:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[   10.414547][    T7] sd 2:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8 GB/28.7 GiB)
[   10.423536][    T7] sd 2:0:0:0: [sda] Write Protect is off
[   10.429061][    T7] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[   10.435534][    T7] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.452377][    T7]  sda: sda1
[   10.458411][    T7] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   19.043065][    T1] md: Waiting for all devices to be available before autodetect
[   19.050591][    T1] md: If you don't use raid, use raid=noautodetect
[   19.056993][    T1] md: Autodetecting RAID arrays.
[   19.061804][    T1] md: autorun ...
[   19.065322][    T1] md: ... autorun DONE.
[   19.069421][    T1] Waiting for root device LABEL=rootfs...



Edited 1 time(s). Last edit at 09/03/2022 04:47AM by ckuetbach.
Re: Booting a NSA 325 v2 from USB
September 03, 2022 04:48AM
Hi Christian,

> The label is present, but I created an etx2
> partition. Should I start over with ext3?

That should not be a factor, but I would use Ext3 so it can be recovered from power outage. And see this post for further enhancement:

http://forum.doozan.com/read.php?2,13702,13704#msg-13704

> I always get root with "sudo su", am I "root
> enough" for creatng the stick?

Do this to make sure you are root.

su -
whoami

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting a NSA 325 v2 from USB
September 03, 2022 06:59AM
Hi,

I recreated he USB-Stick, but it still waits for the rootfs to become available.


With "root=LABEL=rootfs" it didn't boot. (waited for rootfs)

With "root=/dev/sda1" it worked, but as I attached a harddrive, the USB-Stick became /dev/sdb and the box didn't boot.


The label is set, I don't know why.



Christian



Edited 1 time(s). Last edit at 09/03/2022 07:49AM by ckuetbach.
Re: Booting a NSA 325 v2 from USB
September 03, 2022 02:52PM
Christian,

It's a combination of stock u-boot limitation and the envs set up now need to be adjusted accomodate larger kernel than before.

Power up, interrupt serial console and,

setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm $(loadaddr) 0x02100000'

And then
boot

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting a NSA 325 v2 from USB
September 03, 2022 05:52PM
Hi Bodhi,

after changing the envvar, a BAD CRC of the kernel happened.

If I understand the change correctly, it was to change some regions in the RAM. May that caused some trouble loading the kernel?

Also sometimes some strange things happened, like the command setenv was suddenly not present, or help said help command not find, open help. May be something was wrong with my serial connection.

Christian
Re: Booting a NSA 325 v2 from USB
September 03, 2022 06:32PM
Ah! I forgot this stock u-boot.

loadaddr=0x02000000

So that env must be

setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x03000000 /boot/uInitrd; bootm $(loadaddr) 0x03000000'

After you can boot into Debian, you can install new u-boot, and then those addresses are not relevant. New u-boot uses a different location.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Booting a NSA 325 v2 from USB
September 03, 2022 07:14PM
Looks really good.

I was able to boot with an attached harddrive.

Next step may be to update uboot.

Christian
Re: Booting a NSA 325 v2 from USB
September 03, 2022 09:43PM
Christian ,

> Looks really good.
>
> I was able to boot with an attached harddrive.

Fantastic!

>
> Next step may be to update uboot.
>

Make sure you do kwboot to run the new u-boot image over UART first. That's the rescue path when things go wrong..

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

Your Email:


Subject:


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