Support for QNAP TS NAS on kirkwood platform

I was recently breathing some new life in a ZyXEL NSA325 NAS I got and was pleasantly surprised by the decent support on OpenWRT. I am somewhat surprised to see that another NAS I have has no support in OpenWRT while it is pretty well documented.

The model I have for testing is a QNAP TS-212, I used to run it with Debian but that doesn’t have great performance and support also seems to be dropping. As there still is well documented support for Linux I don’t think it should be hard for OpenWRT to add support.

If anyone is interested in making these work I would appreciate it, thanks

Kirkwood seems well-supported in OpenWrt git master, with a bunch of supported NAS devices from various vendors.

Do you have serial boot-loader access? If so, then you post boot-up messages from power-on?

If you have root on the currently installed firmware, finding used GPIOs, and their function might be easy.

If you are comfortable TFTP-RAM-Booting InitRamFS images, then maybe we can help you build (or build for you) testing images.

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

U-Boot 1.1.4 (Oct 27 2010 - 16:49:36) Marvell version: 3.4.4

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690DCC

Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 6 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
[16384kB@f8000000] Flash: 16 MB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done

CPU : Marvell Feroceon (Rev 1)


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  1  0 
Unknown command 'uart1' - try 'help'
## Booting image at 00800000 ...
   Image Name:   Linux-3.4.6
   Created:      2020-10-06   0:59:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1619448 Bytes =  1.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.6 (root@U16BuildServer105) (gcc version 4.2.1) #1 Tue Oct 6 08:59:33 CST 2020
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Feroceon-KW ARM
[    0.000000] Ignoring unrecognised tag 0x41000403
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 246148k/246148k available, 15996k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03cc000   (3856 kB)
[    0.000000]       .init : 0xc03cc000 - 0xc03f6000   ( 168 kB)
[    0.000000]       .data : 0xc03f6000 - 0xc0427f80   ( 200 kB)
[    0.000000]        .bss : 0xc0427fa4 - 0xc04628cc   ( 235 kB)
[    0.000000] NR_IRQS:114
[    0.000000] gpiochip_add: registered GPIOs 0 to 31 on device: orion_gpio0
[    0.000000] gpiochip_add: registered GPIOs 32 to 49 on device: orion_gpio1
[    0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
[    0.000000] Console: colour dummy device 80x30
[    7.619165] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
[    7.709054] pid_max: default: 32768 minimum: 301
[    7.709247] Mount-cache hash table entries: 512
[    7.709742] CPU: Testing write buffer coherency: ok
[    7.709986] Setting up static identity map for 0x2f7928 - 0x2f7964
[    7.711807] NET: Registered protocol family 16
[    7.714312] Kirkwood: MV88F6281-A1, TCLK=200000000.
[    7.714328] Feroceon L2: Enabling L2
[    7.714362] Feroceon L2: Cache support initialised.
[    7.716959] Kirkwood PCIe port 0: 
[    7.716967] link down, ignoring
[    7.716976] MV Buttons Device Load
[    7.728084] bio: create slab <bio-0> at 0
[    7.728523] vgaarb: loaded
[    7.729151] SCSI subsystem initialized
[    7.730130] usbcore: registered new interface driver usbfs
[    7.730282] usbcore: registered new interface driver hub
[    7.730471] usbcore: registered new interface driver ethub
[    7.730635] usbcore: registered new device driver usb
[    7.731733] Switching to clocksource orion_clocksource
[    7.742629] NET: Registered protocol family 2
[    7.742833] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    7.743268] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    7.743453] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    7.743549] TCP: Hash tables configured (established 8192 bind 8192)
[    7.743558] TCP: reno registered
[    7.743573] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    7.743595] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    7.743761] NET: Registered protocol family 1
[    7.743950] Trying to unpack rootfs image as initramfs...
[    7.744714] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    7.816141] Freeing initrd memory: 9216K
[    7.816239] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.816664] MV Buttons Driver Load
[    7.817549] audit: initializing netlink socket (disabled)
[    7.817591] type=2000 audit(0.180:1): initialized
[    7.818065] VFS: Disk quotas dquot_6.5.2
[    7.818129] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.818308] fuse init (API version 7.18)
[    7.818584] msgmni has been set to 498
[    7.820286] alg: No test for stdrng (krng)
[    7.820522] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    7.820537] io scheduler noop registered
[    7.820545] io scheduler deadline registered
[    7.820599] io scheduler cfq registered (default)
[    7.821136] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[    7.821166] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[    7.859050] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[    7.899051] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[    7.939050] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
[    7.979048] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
[    7.983698] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    8.004634] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    8.446013] console [ttyS0] enabled
[    8.469846] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
[    8.478810] brd: module loaded
[    8.485367] loop: module loaded
[    8.488527] qnap_pic_init: succeed to register misc device
[    8.494084] tsinfo: create proc ata_time successfully
[    8.499162] tsinfo: create proc ata_retry successfully
[    8.504317] tsinfo: create proc systemp successfully
[    8.509302] tsinfo: create proc systemp successfully
[    8.514283] tsinfo: create proc systemp successfully
[    8.519269] tsinfo: create proc systemp successfully
[    8.524267] serial8250_PIC_init..uartclk = 200000000,baudDivisor = 651,irq = 34
[    8.533011] sata_mv sata_mv.0: slots 32 ports 2
[    8.539334] scsi0 : sata_mv
[    8.542582] scsi1 : sata_mv
[    8.545714] ata1: SATA max UDMA/133 irq 21
[    8.549848] ata2: SATA max UDMA/133 irq 21
[    8.555150] orion_spi orion_spi.0: master is unqueued, this is deprecated
[    8.562187] m25p80 spi0.0: m25p128 (16384 Kbytes)
[    8.567173] Creating 6 MTD partitions on "spi_flash":
[    8.572270] 0x000000000000-0x000000080000 : "U-Boot"
[    8.577972] 0x000000200000-0x000000400000 : "Kernel"
[    8.583648] 0x000000400000-0x000000d00000 : "RootFS1"
[    8.589419] 0x000000d00000-0x000001000000 : "RootFS2"
[    8.595181] 0x000000080000-0x0000000c0000 : "U-Boot Config"
[    8.601493] 0x0000000c0000-0x000000200000 : "NAS Config"
[    8.607680] sky2: driver version 1.30
[    8.611527] Initializing USB Mass Storage driver...
[    8.616587] usbcore: registered new interface driver usb-storage
[    8.622635] USB Mass Storage support registered.
[    8.627289] usb: create proc systemp successfully
[    8.632020] usb: create proc systemp successfully
[    8.636895] mousedev: PS/2 mouse device common for all mice
[    8.695993] RTC Get alarm w:[05] [H:M][14:50]
[    8.701118] rtc-s35390a 0-0030: rtc core: registered rtc-s35390a as rtc0
[    8.708162] orion_wdt: Initial timeout 21 sec
[    8.712678] md: raid1 personality registered for level 1
[    8.718269] TCP: cubic registered
[    8.721610] NET: Registered protocol family 17
[    8.726084] Registering the dns_resolver key type
[    8.731311] Loading Marvell Ethernet Driver:
[    8.735600]   o Cached descriptors in DRAM
[    8.739727]   o DRAM SW cache-coherency
[    8.743577]   o 1 Giga ports supported
[    8.747334]   o Single RX Queue support - ETH_DEF_RXQ=0
[    8.752583]   o Single TX Queue support - ETH_DEF_TXQ=0
[    8.757824]   o TCP segmentation offload (TSO) supported
[    8.763158]   o Large Receive offload (LRO) supported
[    8.768227]   o Receive checksum offload supported
[    8.773037]   o Transmit checksum offload supported
[    8.777932]   o Proc tool API enabled
[    8.781612]   o SKB Reuse supported - (Disabled)
[    8.786244]   o SKB Recycle supported - (Disabled)
[    8.791063]   o Rx descripors: q0=128
[    8.794753]   o Tx descripors: q0=532
[    8.798442]   o Loading network interface(s):
[    8.805265]     o  register under mv88fx_eth platform
[    8.811013]     o eth0, ifindex = 2, GbE port = 0
[    8.815748] 
[    8.818438] rtc-s35390a 0-0030: setting system clock to 2025-10-15 15:58:29 UTC (1760543909)
[    9.249038] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F330)
[    9.599031] ata2: SATA link down (SStatus 0 SControl F330)
[    9.604597] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
[    9.612372] RAMDISK: gzip image found at block 0
[   10.724685] EXT2-fs (ram0): warning: checktime reached, running e2fsck is recommended
[   10.732655] VFS: Mounted root (ext2 filesystem) on device 1:0.
[   10.739040] Freeing init memory: 168K
[   10.949100] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.955720] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   10.961054] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   10.989078] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   11.009026] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   11.019380] hub 1-0:1.0: USB hub found
[   11.023169] hub 1-0:1.0: 1 port detected
[   11.339091] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.509365] hub 1-1:1.0: USB hub found
[   11.519079] hub 1-1:1.0: 4 ports detected
[   23.808254] md: linear personality registered for level -1
[   23.828874] md: raid0 personality registered for level 0
[   23.849313] xor: measuring software checksum speed
[   23.899022]    arm4regs  :  1090.800 MB/sec
[   23.949020]    8regs     :   759.200 MB/sec
[   23.999019]    32regs    :   905.200 MB/sec
[   24.003222] xor: using function: arm4regs (1090.800 MB/sec)
[   24.189089] raid6: int32x1     87 MB/s
[   24.359110] raid6: int32x2    120 MB/s
[   24.529098] raid6: int32x4    132 MB/s
[   24.699137] raid6: int32x8    119 MB/s
[   24.702905] raid6: using algorithm int32x4 (132 MB/s)
[   24.707979] raid6: using intx1 recovery algorithm
[   24.731779] async_tx: api initialized (async)
[   24.822189] md: raid6 personality registered for level 6
[   24.827531] md: raid5 personality registered for level 5
[   24.832890] md: raid4 personality registered for level 4
[   24.856851] device-mapper: ioctl: 4.22.1-ioctl (2012-06-01) initialised: dm-devel@redhat.com
[   24.982351] MV-CESA:Fallback driver 'hmac(sha1)' could not be loaded!
[   24.988829] alg: hash: Failed to load transform for mv-hmac-sha1: -2
[   25.019529] cryptodev: driver 0.9 loaded.
[   25.087612] usbcore: registered new interface driver usbhid
[   25.093238] usbhid: USB HID core driver
[   25.119365] usbcore: registered new interface driver usblp
[   25.149129] sysinfo: Module loaded.
[   25.262962] fnotify: module license 'non-GPL' taints kernel.
[   25.268649] Disabling lock debugging due to kernel taint
[   25.274318] fnotify: Unknown symbol pfn_nfs_file_notify (err 0)
[   25.280319] fnotify: Unknown symbol pfn_nfs_files_notify (err 0)
[   25.286430] fnotify: Unknown symbol svc_export_cache (err 0)
[   27.673088] eth0: mac address changed
[   27.703556] eth0: started

[   69.175912] eth0: stopped
[   69.201979] eth0: started
[   91.506039] eth0: link up, full duplex, speed 1 Gbps
[   94.893367] eth0: stopped
[   95.322359] warning: process `pic_raw' used the deprecated sysctl system call with 8.1.2.
[   95.978812] eth0: link down
[   95.981640] eth0: started
[   99.095753] eth0: link up, full duplex, speed 1 Gbps

upnpd[3114]: UPnP SDK Successfully Initialized.

upnpd[3114]: Succesfully set the Web Server Root Directory.

upnpd[3114]: IGD root device successfully registered.

upnpd[3114]: Advertisements Sent.  Listening for requests ... 

daemon_mgr PID 3255/3254



Welcome to TS-212(172.16.0.121), QNAP Systems, Inc.


NASD55DBD login: 
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=192.168.0.50
serverip=192.168.0.1
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=cfi_flash:0xf40000(root),0xc0000(uboot)ro
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs=console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816
bootcmd=uart1 0x68;cp.l 0xf8200000 0x800000 0x80000;cp.l 0xf8400000 0xa00000 0x240000;bootm 0x800000
ethaddr=00:08:9B:D5:5D:BD
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1: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
ethact=egiga0
bootp_vendor_class=F_TS-212
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
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
bootdelay=1
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 972/4092 bytes
1 Like

Hi, thanks for your reply. I have now soldered a UART to the unit which makes this a whole lot easier. Although I remember having run Debian on it, this seems to be the manufacturer’s firmware running. I am comfortable running TFTP from u-boot so that shouldn’t be a problem, on the NSA325 I also did this in order to upgrade the u-boot running on there.

1 Like

I can confirm this works with debian 10

root@debian:~# flash-kernel
kirkwood-qnap: machine: QNAP TS219 family
Using DTB: kirkwood-ts219-6281.dtb
Installing /usr/lib/linux-image-4.19.0-21-marvell/kirkwood-ts219-6281.dtb into /boot/dtbs/4.19.0-21-marvell
/./kirkwood-ts219-6281.dtb
Taking backup of kirkwood-ts219-6281.dtb.
Installing new kirkwood-ts219-6281.dtb.
flash-kernel: installing version 4.19.0-21-marvell
flash-kernel: appending /usr/lib/linux-image-4.19.0-21-marvell/kirkwood-ts219-6281.dtb to kernel
Generating kernel u-boot image... done.
Flashing kernel (using 2066910/3145728 bytes)... done.
Flashing initramfs (using 5792841/12582912 bytes)... done.
root@debian:~#