Adding OpenWrt support for QNAP QHora-301W

Successful installed without UART.

Do on your own risk! If something went wrong you might need UART to recover.

Download openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin and AQR_ethphyfw.mbn

Extract kernel and root from openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin

With booted QuRouter OS hold WPS button until second beep to enable ssh, login with:

ssh admin@192.168.100.1 -p 22200

Set boot partition to "1"

sudo fw_setenv current_entry 1
sudo reboot

Check boot partition (if it's not "1" repeat previous steps):

sudo fw_printenv -n current_entry

Copy files to /tmp/

scp -P 22200 kernel admin@192.168.100.1:/tmp/
scp -P 22200 root admin@192.168.100.1:/tmp/

Flash firmware and set boot patition to "0":

sudo dd if=/tmp/kernel of=/dev/mmcblk0p1
sudo dd if=/tmp/root of=/dev/mmcblk0p4
sudo fw_setenv current_entry 0
sudo fw_setenv boot_0 good
sudo reboot

It should boot to openwrt, now install firmware for 10G phys.
Check if partition mtd10 and backup:

cat /proc/mtd|grep "0:ethphyfw"
dd if=/dev/mtd10 of=/tmp/ethphyfw.backup

Copy backup to pc and firmware to qnap:

scp root@192.168.1.1:/tmp/ethphyfw.backup ./
scp AQR_ethphyfw.mbn root@192.168.1.1:/tmp/

Install firmware:

mtd erase /dev/mtd10
mtd -n write /tmp/AQR_ethphyfw.mbn /dev/mtd10

Set bootcmd and check before reboot:

fw_setenv bootcmd "aq_load_fw 0; aq_load_fw 8; bootipq"
fw_printenv -n bootcmd
reboot

Settings don't stick, so I installed sysupgrade in openwrt.
Copy file:

scp openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/

Sysupgrade:

sysupgrade -n /tmp/openwrt-ipq807x-generic-qnap_301w-squashfs-sysupgrade.bin

Thanks to robimarko, kirdes and all contributors!

Source:
https://github.com/robimarko/openwrt/commit/a0e0140b09f6924be4ca8de6019109c64433e60c
https://pfschina.org/wp/?p=9263

8 Likes