Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU reset when loading bootloader/kernel on BA110 #7

Closed
wellsouz opened this issue Aug 28, 2019 · 18 comments
Closed

CPU reset when loading bootloader/kernel on BA110 #7

wellsouz opened this issue Aug 28, 2019 · 18 comments

Comments

@wellsouz
Copy link

Hello

I'm facing a problem with BA110. When I try to load de bootloader/kernel I get a data abort and a CPU reset:


Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatls usb 0:1
553356 u-boot.kwb
65536 u-boot-env.bin
2053978 uimage-dtb
12457575 uinitrd

4 file(s), 0 dir(s)

Marvell>> fatload usb 0:1 0x40000 uImage-dtb
reading uImage-dtb
data abort
pc : [<006488b4>] lr : [<0063ee88>]
sp : 005fdb04 ip : 005fda24 fp : 005fdb20
r10: 0000009b r9 : 00040000 r8 : 005fffcc
r7 : 005fdb70 r6 : 0000009b r5 : 005fdb70 r4 : 00000000
r3 : 005fdddc r2 : 00000c00 r1 : 00000000 r0 : 00000006
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...


Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatls usb 0:1
553356 u-boot.kwb
65536 u-boot-env.bin
2053978 uimage-dtb
12457575 uinitr*
d

4 file(s), 0 dir(s)

Marvell>> fatload usb 0:1 0x800000 uInitrd
reading uInitrd
data abort
pc : [<006488b4>] lr : [<0063ee88>]
sp : 005fdb04 ip : 005fda24 fp : 005fdb20
r10: 00000291 r9 : 00800000 r8 : 005fffcc
r7 : 005fdb70 r6 : 00000291 r5 : 005fdb70 r4 : 00000000
r3 : 005fe5b4 r2 : 00000c00 r1 : 00000000 r0 : 00000006
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...


Could you help me?

Bests.

@hn
Copy link
Owner

hn commented Aug 28, 2019

In #6 @luctrev reported success in installing the system on a BA110. I do not know what's wrong/different with your device.

Please try to use a different USB stick (old/new one, small/big size, ...) to exclude trivial faults.

@wellsouz
Copy link
Author

Yes, was following that issue too and I have no clue on what's wrong with my box. I tried two different USB sticks with the same result. Is your kernel/bootloader suppose to work on TFTP?

@hn
Copy link
Owner

hn commented Aug 28, 2019

fatload just reads a binary file into memory and does not execute any code. You can even try to fatload some random JPEG-file into memory just to see if loading data works in principle. Try small/big files.

Please post the full U-Boot bootlog with SoC, DRAM, NAND information and compare it to #6

@wellsouz
Copy link
Author

I have verified that files bigger than 4096 bytes are not loadable at address 0x40000, as follows:


Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatls usb 0:1
553356 u-boot.kwb
65536 u-boot-env.bin
2053978 uimage-dtb
12457575 uinitrd
63350 blackarmor-nas220-debian-serialport.jpg
12976 readme.md
4 test.txt
512 dummy512
1024 dummy1k
2048 dummy2k
5120 dummy5k
4096 dummy4096
4097 dummy4097

30 file(s), 0 dir(s)

Marvell>> fatload usb 0:1 0x40000 dummy4096
reading dummy4096

4096 bytes read
Marvell>> fatload usb 0:1 0x40000 dummy4097
reading dummy4097
data abort
pc : [<006488b4>] lr : [<0063ee88>]
sp : 005fdb04 ip : 005fda24 fp : 005fdb20
r10: 00000ea1 r9 : 00040000 r8 : 005fffcc
r7 : 005fdb70 r6 : 000002a1 r5 : 005fdb70 r4 : 00000004
r3 : 005fe5f4 r2 : 00000c00 r1 : 00000000 r0 : 00000006
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...


Below is the full U-Boot bootlog:


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

| | | | | __ ) ___ ___ | |_
| | | || _ \ / _ \ / _ | __|
| |
| |
| |) | () | () | |_
_/ |____/ _/ ___/ __| ** uboot_ver:v0.0.5 **

** MARVELL BOARD: MONO LE

U-Boot 1.1.4 (Nov 6 2009 - 11:15:26) Marvell version: 3.4.18

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

Soc: 88F6192 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

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

Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 0:
Model: ST500DM002-1BD142 Firm: KC45 Ser#: W2A6BPHX
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

CPU : Marvell Feroceon (Rev 1)
Scanning partition header:
Found sign PrEr at c0000
Found sign KrNl at 2c0000
Found sign RoOt at 540000

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
Marvell>>


@hn
Copy link
Owner

hn commented Aug 29, 2019

You're using the original (very very old) U-Boot bootloader. There might be all kind of problems with that, maybe fatload is broken ... I don't know.

You can try to load kernel/initrd via TFTP (just to do a test boot or even to flash U-Boot, kernel and initrd to NAND flash). Load kernel to 0x40000, initrd to 0x800000 and then "bootm 0x40000 0x80000"

@wellsouz
Copy link
Author

wellsouz commented Aug 29, 2019

Definitely this is a bug with fatload. Formatting USB stick with ext2 and loading with ext2load works with no issues:


Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> ext2load usb 0:1 0x40000 /uImage-dtb
....
.
......
............
.........................
...................................................
..................................................................................................

2053978 bytes read
Marvell>>
Marvell>> ext2load usb 0:1 0x800000 /uInitrd
....
.
......
............
.........................
...................................................
......................................................................................................
..............................................................................................................................................................................................
..............................................................................................................................................................................................
....
..............................................................................................................................................................................................

12457575 bytes read


However, bootm fails:


Marvell>> bootm 0x40000 0x800000
## Booting image at 00040000 ...
Image Name: Linux-4.19.0-5 + nas220.dtb
Created: 2019-08-27 16:42:50 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2053914 Bytes = 2 MB
Load Address: 00040000
Entry Point: 00040000
Verifying Checksum ... OK
XIP Kernel Image ... OK
## Loading Ramdisk Image at 00800000 ...
Image Name: Debian buster netboot initrd
Created: 2019-08-27 16:42:51 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 12457511 Bytes = 11.9 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK

Starting kernel ...

data abort
pc : [<0004000c>] lr : [<00647d48>]
sp : 005ff184 ip : 005ff184 fp : 005ff1d8
r10: 00000000 r9 : 005ffe70 r8 : 005fffcc
r7 : 013e1667 r6 : 00000001 r5 : 00000002 r4 : 00000000
r3 : 00040000 r2 : 00000100 r1 : 0000020f r0 : 00000000
Flags: Nzcv IRQs off FIQs off Mode SVC_32
Resetting CPU ...

@hn
Copy link
Owner

hn commented Aug 29, 2019

Your (very very old, I'm repeating ;-) ) U-Boot might not be able to start an up to date kernel (I think kernel+dtb combined files aren't supported by those early U-Boot versions at all, but I might be wrong with that).

I think it's time to take a deep breath and update U-Boot + U-Boot Environment ...

@wellsouz
Copy link
Author

Is there a way to backup u-boot? I was able to do a nand read, but I'm not able to find a command to save the content to a file.


nand read 0x800000 0x0 0x87200

NAND read: device 0 offset 0x0, size 0x87200
553472 bytes read: OK

@hn
Copy link
Owner

hn commented Aug 29, 2019

I think that U-Boot does not support writing files (especially those old versions). But I don't know for sure.

If you boot into the original Seagate Linux System, you can "dd" the mtd partitions to a file (see #5 (comment))

@wellsouz
Copy link
Author

wellsouz commented Aug 29, 2019

It worked like a charm! Thanks @hn.

Some hints:

  • Format USB stick using ext2
  • Use ext2load instead of fatload
  • You MUST upgrade U-Boot

Full log:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.5 **

 ** MARVELL BOARD: MONO LE 

U-Boot 1.1.4 (Nov  6 2009 - 11:15:26) Marvell version: 3.4.18

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

Soc: 88F6192 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz 

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

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:
Found sign PrEr at c0000
Found sign KrNl at 2c0000
Found sign RoOt at 540000

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

Marvell>> ext2load usb 0:1 0x800000 /u-boot.kwb
....
.
......
............
.........................
..

553356 bytes read
Marvell>> nand erase 0x0 0x87200

NAND erase: device 0 offset 0x0, size 0x87200
Erasing at 0x84000 -- 100% Marvell>> ext2load usb 0:1 0x800000 /u-boot.kwb
....
.
......
............
.........................
..

553356 bytes read
Marvell>> nand erase 0x0 0x87200

NAND erase: device 0 offset 0x0, size 0x87200
Erasing at 0x84000 -- 100% complete.
OK
Marvell>> nand write 0x800000 0x0 0x87200

NAND write: device 0 offset 0x0, size 0x87200
 553472 bytes written: OK
Marvell>> ext2load usb 0:1 0x800000 /u-boot-env.bin
....
.

65536 bytes read
Marvell>> nand erase 0xA0000 0x10000

NAND erase: device 0 offset 0xa0000, size 0x10000
Erasing at 0xac000 -- 100% complete.
OK
Marvell>> nand write 0x800000 0xA0000 0x10000

NAND write: device 0 offset 0xa0000, size 0x10000
 65536 bytes written: OK
Marvell>> reset 


U-Boot 2017.11 (Dec 18 2018 - 09:52:13 +0100)
NAS 220

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  32 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
IDE:   ide_preinit failed
nas220> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
nas220> ext2load usb 0:1 0x40000 /uImage-dtb
2053978 bytes read in 243 ms (8.1 MiB/s)
nas220> ext2load usb 0:1 0x800000 /uInitrd
12457575 bytes read in 756 ms (15.7 MiB/s)
nas220> bootm 0x40000 0x800000
## Booting kernel from Legacy Image at 00040000 ...
   Image Name:   Linux-4.19.0-5 + nas220.dtb
   Created:      2019-08-27  16:42:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2053914 Bytes = 2 MiB
   Load Address: 00040000
   Entry Point:  00040000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00800000 ...
   Image Name:   Debian buster netboot initrd
   Created:      2019-08-27  16:42:51 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    12457511 Bytes = 11.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 06f51000, end 07b32627 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-5-marvell (debian-kernel@lists.debian.org) (gcc version 8.3.0)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Seagate Blackarmor NAS220
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4b4 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 111660K/131072K available (3955K kernel code, 342K rwdata, 1032K rodata, 3)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (3956 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 312 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 343 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 219 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 18886 entries in 37 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_s
[    0.000014] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000066] Switching to timer-based delay loop, resolution 6ns
[    0.000219] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 )
[    0.000256] pid_max: default: 32768 minimum: 301
[    0.000679] Security Framework initialized
[    0.000710] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.000880] AppArmor: AppArmor initialized
[    0.001084] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001120] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002753] CPU: Testing write buffer coherency: ok
[    0.004448] Setting up static identity map for 0x8200 - 0x823c
[    0.004826] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.007500] devtmpfs: initialized
[    0.012788] VFP support v0.3: not present
[    0.013034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 764504s
[    0.013078] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.013601] pinctrl core: initialized pinctrl subsystem
[    0.015364] NET: Registered protocol family 16
[    0.015962] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016989] audit: initializing netlink subsys (disabled)
[    0.018192] cpuidle: using governor ladder
[    0.018219] cpuidle: using governor menu
[    0.018724] Feroceon L2: Enabling L2
[    0.018786] Feroceon L2: Cache support initialised.
[    0.019153] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mt
[    0.020160] audit: type=2000 audit(0.016:1): state=initialized audit_enabled=0 res=1
[    0.024774] No ATAGs?
[    0.031302] clocksource: Switched to clocksource orion_clocksource
[    0.063867] VFS: Disk quotas dquot_6.6.0
[    0.063988] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.064656] AppArmor: AppArmor Filesystem Enabled
[    0.066271] NET: Registered protocol family 2
[    0.067370] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.067413] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.067451] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.067480] TCP: Hash tables configured (established 1024 bind 1024)
[    0.067624] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.067660] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.067947] NET: Registered protocol family 1
[    0.068337] Unpacking initramfs...
[    1.023336] random: fast init done
[    1.616967] Freeing initrd memory: 12168K
[    1.618094] Initialise system trusted keyrings
[    1.618177] Key type blacklist registered
[    1.618419] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.625409] zbud: loaded
[    1.627851] Key type asymmetric registered
[    1.627870] Asymmetric key parser 'x509' registered
[    1.627946] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.628174] io scheduler noop registered
[    1.628543] io scheduler cfq registered (default)
[    1.630533] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    1.633141] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.664626] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.664895] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.696631] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.697151] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.698575] console [ttyS0] disabled
[    1.698662] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16A
[    2.204032] console [ttyS0] enabled
[    2.208565] libphy: Fixed MDIO Bus: probed
[    2.212687] i2c /dev entries driver
[    2.218162] ledtrig-cpu: registered to indicate activity on CPUs
[    2.225474] registered taskstats version 1
[    2.229598] Loading compiled-in X.509 certificates
[    2.265379] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[    2.274401] Loaded X.509 cert 'Debian Secure Boot Signer: 00a7468def'
[    2.280940] AppArmor: AppArmor sha1 policy hashing enabled
[    2.289135] hctosys: unable to open rtc device (rtc0)
[    2.298230] Freeing unused kernel memory: 312K
[    2.302695] This architecture does not have kernel memory protection.

[            (1*installer)  2 shell  3 shell  4- log           ][ Jan 01  0:02 ]
Linux debian 4.19.0-5-marvell #1 Debian 4.19.37-5 (2019-06-19) armv5tel GNU/Linuxcomplete.
OK
Marvell>> nand write 0x800000 0x0 0x87200

NAND write: device 0 offset 0x0, size 0x87200
 553472 bytes written: OK
Marvell>> ext2load usb 0:1 0x800000 /u-boot-env.bin
....
.

65536 bytes read
Marvell>> nand erase 0xA0000 0x10000

NAND erase: device 0 offset 0xa0000, size 0x10000
Erasing at 0xac000 -- 100% complete.
OK
Marvell>> nand write 0x800000 0xA0000 0x10000

NAND write: device 0 offset 0xa0000, size 0x10000
 65536 bytes written: OK
Marvell>> reset 


U-Boot 2017.11 (Dec 18 2018 - 09:52:13 +0100)
NAS 220

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  32 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
IDE:   ide_preinit failed
nas220> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
nas220> ext2load usb 0:1 0x40000 /uImage-dtb
2053978 bytes read in 243 ms (8.1 MiB/s)
nas220> ext2load usb 0:1 0x800000 /uInitrd
12457575 bytes read in 756 ms (15.7 MiB/s)
nas220> bootm 0x40000 0x800000
## Booting kernel from Legacy Image at 00040000 ...
   Image Name:   Linux-4.19.0-5 + nas220.dtb
   Created:      2019-08-27  16:42:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2053914 Bytes = 2 MiB
   Load Address: 00040000
   Entry Point:  00040000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00800000 ...
   Image Name:   Debian buster netboot initrd
   Created:      2019-08-27  16:42:51 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    12457511 Bytes = 11.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 06f51000, end 07b32627 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-5-marvell (debian-kernel@lists.debian.org) (gcc version 8.3.0)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Seagate Blackarmor NAS220
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4b4 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 111660K/131072K available (3955K kernel code, 342K rwdata, 1032K rodata, 3)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (3956 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 312 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 343 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 219 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 18886 entries in 37 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_s
[    0.000014] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000066] Switching to timer-based delay loop, resolution 6ns
[    0.000219] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 )
[    0.000256] pid_max: default: 32768 minimum: 301
[    0.000679] Security Framework initialized
[    0.000710] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.000880] AppArmor: AppArmor initialized
[    0.001084] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001120] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002753] CPU: Testing write buffer coherency: ok
[    0.004448] Setting up static identity map for 0x8200 - 0x823c
[    0.004826] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.007500] devtmpfs: initialized
[    0.012788] VFP support v0.3: not present
[    0.013034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 764504s
[    0.013078] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.013601] pinctrl core: initialized pinctrl subsystem
[    0.015364] NET: Registered protocol family 16
[    0.015962] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016989] audit: initializing netlink subsys (disabled)
[    0.018192] cpuidle: using governor ladder
[    0.018219] cpuidle: using governor menu
[    0.018724] Feroceon L2: Enabling L2
[    0.018786] Feroceon L2: Cache support initialised.
[    0.019153] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mt
[    0.020160] audit: type=2000 audit(0.016:1): state=initialized audit_enabled=0 res=1
[    0.024774] No ATAGs?
[    0.031302] clocksource: Switched to clocksource orion_clocksource
[    0.063867] VFS: Disk quotas dquot_6.6.0
[    0.063988] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.064656] AppArmor: AppArmor Filesystem Enabled
[    0.066271] NET: Registered protocol family 2
[    0.067370] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.067413] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.067451] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.067480] TCP: Hash tables configured (established 1024 bind 1024)
[    0.067624] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.067660] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.067947] NET: Registered protocol family 1
[    0.068337] Unpacking initramfs...
[    1.023336] random: fast init done
[    1.616967] Freeing initrd memory: 12168K
[    1.618094] Initialise system trusted keyrings
[    1.618177] Key type blacklist registered
[    1.618419] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.625409] zbud: loaded
[    1.627851] Key type asymmetric registered
[    1.627870] Asymmetric key parser 'x509' registered
[    1.627946] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.628174] io scheduler noop registered
[    1.628543] io scheduler cfq registered (default)
[    1.630533] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    1.633141] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.664626] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.664895] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.696631] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.697151] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.698575] console [ttyS0] disabled
[    1.698662] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16A
[    2.204032] console [ttyS0] enabled
[    2.208565] libphy: Fixed MDIO Bus: probed
[    2.212687] i2c /dev entries driver
[    2.218162] ledtrig-cpu: registered to indicate activity on CPUs
[    2.225474] registered taskstats version 1
[    2.229598] Loading compiled-in X.509 certificates
[    2.265379] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[    2.274401] Loaded X.509 cert 'Debian Secure Boot Signer: 00a7468def'
[    2.280940] AppArmor: AppArmor sha1 policy hashing enabled
[    2.289135] hctosys: unable to open rtc device (rtc0)
[    2.298230] Freeing unused kernel memory: 312K
[    2.302695] This architecture does not have kernel memory protection.

[            (1*installer)  2 shell  3 shell  4- log           ][ Jan 01  0:02 ]
Linux debian 4.19.0-5-marvell #1 Debian 4.19.37-5 (2019-06-19) armv5tel GNU/Linux

@hn
Copy link
Owner

hn commented Aug 29, 2019

Thanks for sharing!

For installation/production use, do not start the kernel without setting the "mtdparts" variable before "bootm". Otherwise the NAND partitions aren't initialized (see "bootcmd_usb" and "bootcmd_nand")

@wellsouz
Copy link
Author

Just finished the whole process. I was able to install Debian 10 directly on the USB stick. It's amazing seeing this old piece of hardware jump 10 years in future and be usable again with a very updated kernel and OS. Thanks @hn for sharing your work.

I'm closing the issue.

@hvdkamer
Copy link

The version of U-Boot on my refurbished NAS220 was even a few months older. The fatload didn't work, but ext2load worked like a charm. After the reset I now have a far more recent U-Boot working. Thanks for providing the procedure!

@suppenkasper0815
Copy link

suppenkasper0815 commented May 17, 2023

Hi,

I don't know what's wrong with my device. I tried already 6 diffrent sticks and an HDD-Drive, tried fat32 and ext2, but the device seems to not mounting the USB-drives.

`| | | | | __ ) ___ ___ | |_
| | | || _ \ / _ \ / _ | __|
| |
| |
| |) | () | () | |_
_/ |____/ _/ ___/ __| ** uboot_ver:v0.0.6 **

** MARVELL BOARD: MONO LE

U-Boot 1.1.4 (Sep 9 2010 - 16:02:07) Marvell version: 3.4.18

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

Soc: 88F6192 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

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

Marvell Serial ATA Adapter
Integrated Sata device found

CPU : Marvell Feroceon (Rev 1)
Scanning partition header:
Found sign PrEr at c0000
Found sign KrNl at 2c0000
Found sign RoOt at 540000

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
Marvell>> usb start
(Re)start USB...
USB: scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
Marvell>>
`

Is there any chance for TFTP-Rescuing or changing to Debian Bullseye? - I was so frustrated that I updated the OEM now... but no diffrence. I installed BA_NAS_110_sg1000-1000.1321

@suppenkasper0815
Copy link

Here is the log with hdd

| \/ | __ _ _ ____ _____| | | | |\/| |/ _ | '\ \ / / _ \ | |
| | | | (| | | \ V / __/ | |
|
| ||_,|| _/ _
|||


| | | | | __ ) ___ ___ | |_
| | | || _ \ / _ \ / _ | __|
| |
| |
| |) | () | () | |_
_/ |____/ _/ ___/ __| ** uboot_ver:v0.0.6 **

** MARVELL BOARD: MONO LE

U-Boot 1.1.4 (Sep 9 2010 - 16:02:07) Marvell version: 3.4.18

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

Soc: 88F6192 A1 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

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

Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 0:
Model: ST32000542AS Firm: CC95 Ser#: 5XW2QDR3
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

CPU : Marvell Feroceon (Rev 1)
Scanning partition header:
Scanning partition header:
Found sign PrEr at c0000
Found sign KrNl at 2c0000
Found sign RoOt at 540000

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0xc4000, size 0x195200

Reading data from 0x259000 -- 100% complete.
1659392 bytes read: OK
Calculate CRC32:
crc32 checksum Pass

NAND read: device 0 offset 0x2c4000, size 0x21be00

Reading data from 0x4dfc00 -- 100% complete.
2211328 bytes read: OK
Calculate CRC32:
crc32 checksum Pass

Booting image at 00040000 ...

Image Name: Linux-2.6.22.18
Created: 2011-08-19 8:23:06 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2211260 Bytes = 2.1 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.......................................................................................................................................... done, ing the kernel.
Linux version 2.6.22.18 (arsene@localhost.localdomain) (gcc version 4.2.1) #1 Fri Aug 19 16:22:56 CST 2011 v0.0.8
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 32512
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00010000@0x000a0000(param),0x00200000@0x000c0000(preroot),0x00280000@0x002c0000(uimage),0x01a00000@0x00540000(rootfs),0x000c0000@0x01f40000(misc),32m@0x0(flash) root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 109056KB available (4048K code, 289K data, 128K init)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface

SDRAM_CS0 ....base 00000000, size 128MB
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size 1MB
INTER_REGS ....base f1000000, size 1MB
NFLASH_CS ....base fa000000, size 2MB
SPI_CS ....base f4000000, size 16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size 2MB

Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21_with_rx_desc_tuned)-- MONO Soc: 88F6192 A1 LE

Detected Tclk 166666667 and SysClk 200000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c05b4600
PEX0 interface detected no Link.

PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 16384K
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
o RAID 5 Xor calculation
o kernel memcpy
o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c00116c4)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.8)
SGI XFS with large block numbers, no debug enabled
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 2 RAM disks of 16384K size 1024 blocksize
loop: module loaded
Loading Marvell Ethernet Driver:
o Cached descriptors in DRAM
o DRAM SW cache-coherency
o Single RX Queue support - ETH_DEF_RXQ=0
o Single TX Queue support - ETH_DEF_TXQ=0
o TCP segmentation offload enabled
o Receive checksum offload enabled
o Transmit checksum offload enabled
o Network Fast Processing (Routing) supported
o Driver ERROR statistics enabled
o Driver INFO statistics enabled
o Proc tool API enabled
o Rx descripors: q0=256
o Tx descripors: q0=532
o Loading network interface(s):
o egiga0, ifindex = 1, GbE port = 0

Warning: Giga 1 is Powered Off

mvFpRuleDb (c73af000): 1024 entries, 4096 bytes
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
Integrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scsi 0:0:0:0: Direct-Access Seagate ST32000542AS CC95 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 3907029168 512-byte hardware sectors (2000399 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 0:0:0:0: [sda] 3907029168 512-byte hardware sectors (2000399 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
Scanning device for bad blocks
7 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 7 MTD partitions on "nand_mtd":
0x00000000-0x000a0000 : "uboot"
0x000a0000-0x000b0000 : "param"
0x000c0000-0x002c0000 : "preroot"
0x002c0000-0x00540000 : "uimage"
0x00540000-0x01f40000 : "rootfs"
0x01f40000-0x02000000 : "misc"
0x00000000-0x02000000 : "flash"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
attach_adapter....
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
raid6: int32x1 73 MB/s
raid6: int32x2 80 MB/s
raid6: int32x4 83 MB/s
raid6: int32x8 74 MB/s
raid6: using algorithm int32x4 (83 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
arm4regs : 722.800 MB/sec
8regs : 503.200 MB/sec
32regs : 600.000 MB/sec
raid5: using function: arm4regs (722.800 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
wix gpio_init
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: invalid raid superblock magic on sda4
md: sda4 has invalid sb, not importing!
md: autorun ...
md: considering sda3 ...
md: adding sda3 ...
md: sda2 has different UUID to sda3
md: sda1 has different UUID to sda3
md: created md2
md: bind
md: running:
raid1: raid set md2 active with 1 out of 2 mirrors
md: considering sda2 ...
md: adding sda2 ...
md: sda1 has different UUID to sda2
md: created md1
md: bind
md: running:
raid1: raid set md1 active with 1 out of 2 mirrors
md: considering sda1 ...
md: adding sda1 ...
md: created md0
md: bind
md: running:
raid1: raid set md0 active with 1 out of 2 mirrors
md: ... autorun DONE.
RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 1620KiB [1 disk] into ram disk... done.
VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 128K
Enter Pre-Root FileSystem:
FW_UPDATE_FLAG_RES:1
BOARDTEST_FALG:0
1 100MB 1169MB 1069MB ext3 raid
2 1169MB 2239MB 1070MB linux-swap raid
3 2239MB 2773MB 534MB ext3 raid
4 2773MB 2000GB 1998GB primary raid
DSK1_RES:0
DSK2_RES:1
DSK3_RES:1
DSK4_RES:1
DSK1_S_RES:1
DSK2_S_RES:0
DSK3_S_RES:0
DSK4_S_RES:0
CHK_RES:1
MD0CHK_RES:0
CHK_RES:1
/dev/md0: recovering journal
/dev/md0: clean, 5810/130560 files, 37895/260960 blocks
kjournald starting. Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
init started: BusyBox v1.1.1 (2008.10.08-08:58+0000) multi-call binary
Adding 1044792k swap on /dev/md1. Priority:-1 extents:1 across:1044792k
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on md2, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
Starting pid 430, console /dev/ttyS0: '/etc/init.d/rcS'

==> Assembling MD arrays ................................... md: md3 stopped.
md: bind
raid1: raid set md3 active with 1 out of 2 mirrors
[ OK ]
==> Updating disk information ............................. [ OK ]
==> Disabling HDD standby for /dev/sda .................... [ OK ]
==> Disabling HDD standby for /dev/sdb .................... [ OK ]
==> Disabling HDD standby for /dev/sdc .................... [ OK ]
==> Disabling HDD standby for /dev/sdd .................... [ OK ]
==> Disabling HDD standby for /dev/sde .................... [ OK ]
==> Disabling HDD standby for /dev/sdf .................... [ OK ]
==> Disabling HDD standby for /dev/sdg .................... [ OK ]
==> Disabling HDD standby for /dev/sdh .................... [ OK ]
==> Inserting NTFS (ufsd) module ....................... ufsd: module license 'Commercial product' taints kernel.
ufsd: driver loaded at bf000000 built on Jun 5 2009 15:42:37
UFSD version 7.04 (Jun 5 2009, 15:37:57)
NTFS read/write support included
$Id: ufsdvfs.c,v 1.207.4.1 2009/05/14 14:37:07 shura Exp $ (LBD=ON)
[ OK ]
==> Removing all usb storage setting ...................... [ OK ]
==> Checking signature in /etc/netatalk/afpd.conf ......... [ OK ]
==> Denying to export shares through AFP .................. [ OK ]

==> Mounting /dev/md3 to /DataVolume ...
kjournald starting. Commit interval 5 seconds
EXT3 FS on md3, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
==> Starting quota check .................................. [ OK ]
==> Mounting all shares with bind property ................ [ OK ] 
==> Updating the file "raclient_volume" ................... [ OK ]
==> Starting portmap ...................................... [ OK ]
==> Inserting bonding module .............................. [ NO ]
==> Starting network ......................................
udhcpc[717]: udhcpc (v0.9.9-pre) started
egiga0: link down
egiga0: started
udhcpc[717]: Sending discover...
udhcpc[717]: Sending discover...
egiga0: link up, full duplex, speed 1 Gbps
udhcpc[717]: Sending discover...
udhcpc[717]: Sending select for 192.168.1.125...
udhcpc[750]: udhcpc (v0.9.9-pre) started
udhcpc[750]: SIOCGIFINDEX failed!: No such device
egiga0 Link encap:Ethernet HWaddr 00:10:75:23:80:5F
inet addr:192.168.1.125 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:4203 (4.1 KiB) TX bytes:1180 (1.1 KiB)
Interrupt:11

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

SIOCSIFADDR: No such device
==> Updateing /etc/hosts ..................................
Trying interface egiga0
IP resolved to 192.168.1.125
Host name is BA-23805F
==> Starting mini_httpd ................................... [ OK ]
==> Starting m_mini_httpdd .................................. [ OK ]
==> Starting inetd ........................................ [ OK ]
==> Printer's spooler is GOOD .............................
==> Starting cupsd ........................................ [ OK ]

==> Reexporting list of NFS exported file systems ......... [ OK ]
==> Starting NFS .......................................... [ OK ]
==> Starting NFS mountd ................................... [ OK ]
==> Starting TappIn Agent ........................
==> Starting NTP client ................................... [ OK ]
==> Starting recyclebind .................................. [ OK ]
==> Starting smbd ......................................... [ OK ]
==> Starting nmbd ......................................... [ OK ]
==> Starting alias recheck............................. ==> Starting backup scheduled.............................. [ OK ]
Starting AppleTalk services:
Starting afpd: OK

==> Starting backup getIPd................................. [ OK ]
==> Starting logrotate .................................... [ OK ]
==> Starting network interface plugging daemon ............ [ OK ]
==> Initializing LCD H/W .................................. [ OK ]
==> Showing "System Ready" in LCD ......................... [ OK ]
==> Starting LCD button monitor ........................... [ OK ]
==> Starting udevd ........................................ [ OK ]
==> Starting udevadm trigger ..............................
Doing MONO udev initial
sda should be harddisk
Checking USB printer
ifplugd_action completed
==> Starting aronis license server ........................
Start SharesManaged.
==> Starting crond ........................................
crond[1161]: crond 2.3.2 dillon, started, log level 0

==> Starting WiAutoConfig ................................. [ OK ]
==> Starting lltd ......................................... [ OK ]
==> Starting mDNSResponder ................................ [ OK ]
==> Set readahead 2048 for /dev/md3 ....................... [ OK ]
==> Set readahead 2048 for /dev/md4 ....................... [ OK ]
==> Set readahead 2048 for /dev/md5 ....................... [ OK ]
==> Set readahead 2048 for /dev/md6 ....................... [ OK ]
==> Set readahead 2048 for /dev/mapper/encmd3 ............. [FAIL]
==> Set readahead 2048 for /dev/mapper/encmd4 ............. [FAIL]
==> Set readahead 2048 for /dev/mapper/encmd5 ............. [FAIL]
==> Set readahead 2048 for /dev/mapper/encmd6 ............. [FAIL]
==> Starting syslogd ...................................... [ OK ]
==> Setting trustees ...................................... [ OK ]
==> Syncing time from system clock to H/W clock ........... [ OK ]
==> Deleting the critical event(s) ........................ [ OK ]
==> Setting UPnP for both of HTTP(S) and FTP ports ........ [ OK ]
==> Checking preferred language in system_var ............. [ en ]
==> Starting alarmd ....................................... [ OK ]
==> Starting hwmonitord ................................... [ OK ]
==> Disabling wiki Server ................................. [ OK ]
Start SharesManaged.
==> Starting IP monitor for DDNS .......................... [ OK ]
==> Mounting encrypted volume(s) in background ............ [ OK ]

==> Generating Factory Default Restore page ............... 

FDR already existed. (VlFSRFhHS2xcVVMnRVxFb0VQQUdXQlA=)

==> Set parmaters for lan ports ...........................
GbE port 0: TxEnable WA - Enabled, deep=1, tx_en_bk=1

==> Starting I/O Monitor for HDD standby ..................
==> Forcedly set passwd for username "licenser" .........
iomonitor[1425]: terminate iomonitor becasue HDD standby was disabled
==> Checking whether system get abnormal shutdown ......... [ AB ]
==> Socket connection for raclientd .......................
==> Starting backup server service ........................

Starting pid 1466, console /dev/ttyS0: '/sbin/insmod'
Starting pid 1470, console /dev/ttyS0: '/sbin/getty'

BA-23805F login:

BA-23805F login: alex
Password:
__ ___ _ _____ _____
/ |/ /___ ____ ____ / | / / | / /
/ /|
/ / __ / __ / __ \ / |/ / /| | _

/ / / / /
/ / / / / // / / /| / ___ |/ /
/
/ /
/_// //_/ // |// |/____/

                                            v1000.1321

~ $ cat /proc/partitions
major minor #blocks name

8 0 1953514584 sda
8 1 1043946 sda1
8 2 1044921 sda2
8 3 521484 sda3
8 4 1950708008 sda4
31 0 640 mtdblock0
31 1 64 mtdblock1
31 2 2048 mtdblock2
31 3 2560 mtdblock3
31 4 26624 mtdblock4
31 5 768 mtdblock5
31 6 32768 mtdblock6
9 0 1043840 md0
9 2 521408 md2
9 1 1044800 md1
9 3 1950707872 md3
~ $

`

@hn
Copy link
Owner

hn commented May 18, 2023

If you insert an USB stick, does it get detected within Linux (dmesg, lsusb, ...)? Are you able to mount the stick within Linux? If not, your USB port hardware might be broken.

You can always try to upload the new U-Boot via kwboot. And then transfer (and flash) all the other necessary files (u-boot-env, uImage, uInitrd ...) via TFTP.

Alternatively you can flash all files from within the Linux system (with nandwrite). I've copied this from an old test script, please double-check before using:

nanddump -o -b -f $NASHW-vendor-mtd0-uboot.bin  /dev/mtd0
nanddump -o -b -f $NASHW-vendor-mtd1-param.bin  /dev/mtd1
nanddump -o -b -f $NASHW-vendor-mtd2-preroot.bin        /dev/mtd2
nanddump -o -b -f $NASHW-vendor-mtd3-uimage.bin /dev/mtd3
nanddump -o -b -f $NASHW-vendor-mtd4-rootfs.bin /dev/mtd4
nanddump -o -b -f $NASHW-vendor-mtd5-misc.bin           /dev/mtd5
nanddump -o -b -f $NASHW-vendor-mtd6-flash-full.bin     /dev/mtd6

# backup above files to a safe place

nandtest -e /dev/mtd6
nandwrite -p -s 0x000000 /dev/mtd6 u-boot-$NASFW.kwb
nandwrite -p -s 0x0a0000 /dev/mtd6 u-boot-env.bin
nandwrite -p -s 0x0c0000 /dev/mtd6 uImage-dtb
nandwrite -p -s 0x5c0000 /dev/mtd6 uInitrd

@suppenkasper0815
Copy link

suppenkasper0815 commented Jun 6, 2023 via email

@hn
Copy link
Owner

hn commented Jul 12, 2023

You'll find various tutorials on how to set up an TFTP server on the web, please have a look.

It's probably easier to dump and write (as shown above) from within the running Linux system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants