aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
authorWeiDong Jia <jwdsccd@gmail.com>2019-11-05 14:36:25 +0800
committerChuanhong Guo <gch981213@gmail.com>2020-03-07 11:02:13 +0800
commit643cab4f315d2733a6694e4afd232fc13ad3a7c8 (patch)
tree2818b94e3f89c4fadb994449016e043a5000e8e3 /target/linux/ath79/nand
parent5ea1b1ecd14793c547cb141d149e43aa954e99fb (diff)
downloadupstream-643cab4f315d2733a6694e4afd232fc13ad3a7c8.tar.gz
upstream-643cab4f315d2733a6694e4afd232fc13ad3a7c8.tar.bz2
upstream-643cab4f315d2733a6694e4afd232fc13ad3a7c8.zip
ath79: add support for DomyWifi DW33D
This commit ports the device from ar71xx to the ath79 target and modifies the partition layout. 1. Firmware is installed to nand flash. 2. Modify the uboot-env parameter to boot from the nand flash. 3. The kernel size is extended to 5M. 4.nor flash retains the oem firmware. oem partition layout dev: size erasesize name mtd0: 00040000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00e30000 00010000 "rootfs" mtd3: 00170000 00010000 "kernel" mtd4: 00010000 00010000 "art" mtd5: 00f90000 00010000 "firmware" mtd6: 06000000 00020000 "rootfs_data" mtd7: 02000000 00020000 "backup" new partition layout dev: size erasesize name mtd0: 00040000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00fa0000 00010000 "oem-firmware" mtd3: 00010000 00010000 "art" mtd4: 00500000 00020000 "kernel" mtd5: 05b00000 00020000 "ubi" mtd6: 02000000 00020000 "oem-backup" MAC address overview: All mac addresses are stored in the art partition. eth0: 0x0 eth1: 0x6 ath9k: 0xc ath10k: 0x12 No valid addresses in 0x1002 and 0x5006. All addresses match the OEM firmware. Install from oem firmware. Enable ssh service: Connect to the router web, click professional, click system-startup, and add dropbear in the local startup input box. Click system-administration, delete ssh-key, and replace your ssh pub key. Restart the router. 1.Upload openwrt firmware to the device scp openwrt-snapshot-r11365-df60a0852c-ath79-nand-domywifi_dw33d-\ squashfs-factory.bin root@192.168.10.1:/tmp 2.modify uboot-env. ssh login to the device: fw_setenv bootcmd 'nboot 0x8050000 0;bootm || bootm 0x9fe80000' Run the fw_printenv command to check if the settings are correct. 3.Write openwrt firmware. ssh login to the device: mtd -r write /tmp/openwrt-snapshot-r11365-df60a0852c-ath79-nand-\ domywifi_dw33d-squashfs-factory.bin /dev/mtd6 The device will restart automatically and the openwrt firmware installation is complete. Restore oem firmware.just erase the kernel partition and the ubi partition. ssh login to the device: mtd erase /dev/mtd4 mtd -r erase /dev/mtd5 Reboot the device Signed-off-by: WeiDong Jia <jwdsccd@gmail.com> [alter flash instruction in commit message] Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ath79/nand')
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata4
2 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index f42b1ea9c2..06a2aec471 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -12,6 +12,10 @@ ath79_setup_interfaces()
mikrotik,routerboard-922uags-5hpacd)
ucidef_set_interface_lan "eth0"
;;
+ domywifi,dw33d)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1"
+ ;;
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand)
ucidef_add_switch "switch0" \
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 1989332f81..8a1bed58c1 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -10,6 +10,10 @@ board=$(board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
+ domywifi,dw33d)
+ caldata_extract "art" 0x5000 0x844
+ ath10k_patch_mac $(mtd_get_mac_binary art 0x12)
+ ;;
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand)
caldata_extract "art" 0x5000 0x844