Skip to content

Instantly share code, notes, and snippets.

@donbowman
Created February 8, 2018 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donbowman/746d7a2f3bd8d4f07523830e04c4c9f9 to your computer and use it in GitHub Desktop.
Save donbowman/746d7a2f3bd8d4f07523830e04c4c9f9 to your computer and use it in GitHub Desktop.
TerraMaster F2-NAS2 boot from factory reimage
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: DB-88F6282A-BP LE
U-Boot 1.1.4 (Apr 9 2014 - 20:42:53) Marvell version: 3.5.9
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFD80
Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz
DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000 size 512MB
DRAM CS[1] base 0x20000000 size 512MB
DRAM Total size 1GB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Generate Random Mac:[00:50:43:20:14:1b][00:50:43:92:14:1b]
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net: egiga0 [PRIME]
Sys reset key pressed: 349 ms at last time
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> bootm
## Booting image at 02000000 ...
Bad Magic Number
Marvell>> boot
NAND read: device 0 offset 0x7900000, size 0x400000
Reading data from 0x7cff800 -- 100% complete.
4194304 bytes read: OK
## Booting image at 02000000 ...
Image Name: Linux-2.6.31.8
Created: 2014-03-16 8:51:43 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2516416 Bytes = 2.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux........................................................................................................................................................... done, booting the kernel.
Linux version 2.6.31.8 (root@rds-02) (gcc version 4.3.2 (sdk3.2rc1-ct-ng-1.4.1) ) #8 PREEMPT Sun Mar 16 16:51:41 CST 2014
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 259840
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x00100000@0x00000000(bootloader),0x00400000@0x00100000(data),0x01000000@0x00500000(backup-kernel),0x06400000@0x01500000(backup-system),0x01000000@0x07900000(kernel),0x17700000@0x08900000(rootfs); rootfstype=jffs2 root=/dev/mtdblock5 init=/linuxrc mem=1024m
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB 512MB = 1024MB total
Memory: 1033092KB available (4532K code, 274K data, 128K init, 524288K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:128
Console: colour dummy device 80x30
Calibrating delay loop... 1599.07 BogoMIPS (lpj=7995392)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
xor: measuring software checksum speed
arm4regs : 1454.000 MB/sec
8regs : 1102.000 MB/sec
32regs : 1076.800 MB/sec
xor: using function: arm4regs (1454.000 MB/sec)
NET: Registered protocol family 16
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised, in WT override mode.
CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 512MB
SDRAM_CS1 ....base 20000000, size 512MB
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB
PEX0_IO ....base f2000000, size 1MB
PEX1_MEM ....base e8000000, size 128MB
PEX1_IO ....base f2100000, 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_5.1.3_patch29)-- DB-88F6282A-BP Soc: 88F6282 A1 LE
Detected Tclk 200000000 and SysClk 533333333
MV Buttons Device Load
Marvell USB EHCI Host controller #0: 9000d540
PEX0 interface detected no Link.
PEX1 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
raid6: int32x1 147 MB/s
raid6: int32x2 174 MB/s
raid6: int32x4 156 MB/s
raid6: int32x8 135 MB/s
raid6: using algorithm int32x2 (174 MB/s)
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
NET: Registered protocol family 1
rtc mv_rtc: rtc core: registered kw-rtc as rtc0
RTC registered
Kirkwood hwmon thermal sensor initialized.
XOR registered 2 channels
XOR 2nd invalidate WA enabled
cesadev_init(8000df1c)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 995
alg: No test for cipher_null (cipher_null-generic)
alg: No test for ecb(cipher_null) (ecb-cipher_null)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
alg: No test for stdrng (krng)
alg: No test for hmac(digest_null) (hmac(digest_null-generic))
async_tx: api initialized (sync-only)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
brd: module loaded
loop: module loaded
Integrated Sata device found
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scst: User interface thread started, PID 171
scst: Processing thread scstd0 (PID 172) started
scst: Init thread started, PID 173
scst: Task management thread started, PID 174
scst: SCST version 3.0.0-pre2 loaded successfully (max mem for commands 124MB, per device 49MB)
scst: Device handler "dev_disk" for type 0 registered successfully
scst: Device handler "dev_disk_perf" for type 0 registered successfully
scst: Device handler "dev_raid" for type 12 registered successfully
scst: Virtual device handler vdisk_fileio for type 0 registered successfully
scst: Virtual device handler vdisk_blockio for type 0 registered successfully
scst: Virtual device handler vdisk_nullio for type 0 registered successfully
scst: Virtual device handler vcdrom for type 5 registered successfully
scst: Virtual device handler "scst_user" registered successfully
scst: Management thread started, PID 175
iscsi-scst: iSCSI SCST Target - version 3.0.0-pre2
scst: Target template iscsi registered successfully
scst_user: Cleanup thread started, PID 176
iscsi-scst: Read thread for pool 903f8640 started, PID 177
iscsi-scst: Read thread for pool 903f8640 started, PID 178
iscsi-scst: Write thread for pool 903f8640 started, PID 179
scst: Target template scst_local registered successfully
iscsi-scst: Write thread for pool 903f8640 started, PID 180
scst: Target scst_local_tgt for template scst_local registered successfully
scst: Using security group "scst_local_tgt" for initiator "scst_local_host" (target scst_local_tgt)
scsi2 : scst_local
Loading Marvell Ethernet Driver:
o Cached descriptors in DRAM
o DRAM SW cache-coherency
o 2 Giga ports supported
o Single RX Queue support - ETH_DEF_RXQ=0
o Single TX Queue support - ETH_DEF_TXQ=0
o TCP segmentation offload (TSO) supported
o UDP fragmentation offload (UFO) supported
o Large Receive offload (LRO) supported
o Receive checksum offload supported
o Transmit checksum offload supported
o Network Fast Processing (Routing) supported - (Disabled)
o Proc tool API enabled
o SKB Reuse supported - (Disabled)
o SKB Recycle supported - (Disabled)
o Rx descripors: q0=128
o Tx descripors: q0=512
o Loading network interface(s):
o register under mv88fx_eth platform
eth0: mixed HW and IP checksum settings.
o eth0, ifindex = 2, GbE port = 0
Warning: Giga 1 is Powered Off
mvFpRuleDb (90780000): 16384 entries, 65536 bytes
Using Hamming 1-bit ECC for NAND device
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 789 at 0x0000062a0000
mtd: no mtd-id
6 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 6 MTD partitions on "nand_mtd":
0x000000000000-0x000000100000 : "bootloader"
0x000000100000-0x000000500000 : "data"
0x000000500000-0x000001500000 : "backup-kernel"
0x000001500000-0x000007900000 : "backup-system"
0x000007900000-0x000008900000 : "kernel"
0x000008900000-0x000020000000 : "rootfs"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
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
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Marvell Orion EHCI
usb usb1: Manufacturer: Linux 2.6.31.8 ehci_hcd
usb usb1: SerialNumber: ehci_marvell.70059
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
usbcore: registered new interface driver usblp
usbcore: registered new interface driver cdc_wdm
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
i2c /dev entries driver
Orion Watchdog Timer: Initial timeout 21 sec
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
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
cpuidle: using governor ladder
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Marvell Kirkwood Power Management Initializing
rtc mv_rtc: setting system clock to 2033-10-07 20:28:16 UTC (2012329696)
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
VFS: Mounted root (jffs2 filesystem) on device 31:5.
Freeing init memory: 128K
mount etc as tmpfs
can't create lock file /etc/mtab~187: No such file or directory (use -n flag to override)
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
Loading iSCSI transport class v2.0-870.
iscsi: registered transport (tcp)
usbcore: registered new interface driver r871x_usb_drv
NTFS driver 2.1.29 [Flags: R/W MODULE].
eth0: link up, full duplex, speed 100 Mbps
eth0: started
Password for 'root' changed
utelnetd starting
mdadm: cannot open device /dev/btns: Invalid argument
mdadm: /dev/btns has no superblock - assembly aborted
*****************************************************************************************************************
480
service avahi start
service cupsd start
service dbus start
service iscsi start
service lprng start
service nfs start
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NET: Registered protocol family 10
svc: failed to register lockdv1 RPC service (errno 97).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
service nginx start
service regcloud start
service samba start
service smbftpd start
service sshd start
service syslog start
service upnp start
service upnpportmap start
service utelnetd start
<30>udev[1235]: starting version 167
64
Processing /etc/profile... (nas)#
(nas)#
(nas)#cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "bootloader"
mtd1: 00400000 00020000 "data"
mtd2: 01000000 00020000 "backup-kernel"
mtd3: 06400000 00020000 "backup-system"
mtd4: 01000000 00020000 "kernel"
mtd5: 17700000 00020000 "rootfs"
(nas)#hexdump -C -n 64 /dev/mtd0
00000000 8b 00 00 08 98 3d 07 00 00 00 00 00 00 02 00 00 |.....=..........|
00000010 00 00 60 00 00 00 67 00 00 00 00 00 00 00 01 39 |..`...g........9|
00000020 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |@...............|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040
(nas)#
--- on desktop (no sha1sum etc on target image) ---
$ hexdump -C -n 64 uboot-nand.bin
00000000 8b 00 00 08 98 3d 07 00 00 00 00 00 00 02 00 00 |.....=..........|
00000010 00 00 60 00 00 00 67 00 00 00 00 00 00 00 01 39 |..`...g........9|
00000020 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |@...............|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040
### Add busybox w/ sha256
(nas)#./busybox-armv5l head -c 512k /dev/mtd0 > mtd0.img
(nas)#./busybox-armv5l sha256sum mtd0.img
4a1513d294ee16ed18534e3e5f85f7462a08d451e0cc18ae77e3e16a21da4247 mtd0.img
$ sha256sum uboot-nand.bin
4a1513d294ee16ed18534e3e5f85f7462a08d451e0cc18ae77e3e16a21da4247 uboot-nand.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment