From a66eee63368eb5625b359244bfffc9b9eb921875 Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Fri, 28 Feb 2020 16:01:02 +0100 Subject: [PATCH] ath79: add mikrotik subtarget This commit creates the ath79/mikrotik subtarget in order to support MikroTik devices based on Qualcomm Atheros MIPS SoCs. MikroTik devices need a couple of specific features: the split MiNOR firmware MTD format, which is not used by other devices, and the 4k sector erase size on SPI NOR storage, which can not be added to the ath79/generic and ath79/nand subtargets now. Additionally, the commit moves the two MikroTik devices already in the generic and nand subtargets to this new one. Tested on the RB922 board and the wAP AC router. Signed-off-by: Roger Pueyo Centelles --- target/linux/ath79/Makefile | 2 +- .../generic/base-files/etc/board.d/02_network | 1 - .../etc/hotplug.d/firmware/10-ath9k-eeprom | 5 --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 -- target/linux/ath79/generic/config-default | 1 - target/linux/ath79/generic/target.mk | 2 +- target/linux/ath79/image/Makefile | 3 ++ target/linux/ath79/image/generic.mk | 14 ------- target/linux/ath79/image/mikrotik.mk | 27 +++++++++++++ target/linux/ath79/image/nand.mk | 14 ------- .../base-files/etc/board.d/02_network | 39 +++++++++++++++++++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 22 +++++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 28 +++++++++++++ .../etc/uci-defaults/04_led_migration | 0 .../lib/functions/mikrotik-caldata.sh | 0 .../base-files/lib/upgrade/platform.sh | 35 +++++++++++++++++ target/linux/ath79/mikrotik/config-default | 33 ++++++++++++++++ .../ath79/mikrotik/profiles/00-default.mk | 18 +++++++++ target/linux/ath79/mikrotik/target.mk | 9 +++++ .../nand/base-files/etc/board.d/02_network | 3 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 8 ---- .../nand/base-files/lib/upgrade/platform.sh | 14 ------- target/linux/ath79/nand/config-default | 1 - target/linux/ath79/nand/target.mk | 2 +- 24 files changed, 218 insertions(+), 67 deletions(-) create mode 100644 target/linux/ath79/image/mikrotik.mk create mode 100644 target/linux/ath79/mikrotik/base-files/etc/board.d/02_network create mode 100644 target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom create mode 100644 target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata rename target/linux/ath79/{nand => mikrotik}/base-files/etc/uci-defaults/04_led_migration (100%) rename target/linux/ath79/{ => mikrotik}/base-files/lib/functions/mikrotik-caldata.sh (100%) create mode 100644 target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/ath79/mikrotik/config-default create mode 100644 target/linux/ath79/mikrotik/profiles/00-default.mk create mode 100644 target/linux/ath79/mikrotik/target.mk diff --git a/target/linux/ath79/Makefile b/target/linux/ath79/Makefile index e50ad2297b01..9b203cf48e4f 100644 --- a/target/linux/ath79/Makefile +++ b/target/linux/ath79/Makefile @@ -4,7 +4,7 @@ ARCH:=mips BOARD:=ath79 BOARDNAME:=Atheros ATH79 (DTS) CPU_TYPE:=24kc -SUBTARGETS:=generic nand tiny +SUBTARGETS:=generic mikrotik nand tiny FEATURES:=ramdisk diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 168399d56698..6f9aed8bf575 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -21,7 +21,6 @@ ath79_setup_interfaces() dlink,dir-505|\ engenius,ecb1750|\ glinet,gl-ar300m-lite|\ - mikrotik,routerboard-wap-g-5hact2hnd|\ netgear,ex6400|\ netgear,ex7300|\ ocedo,koala|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index b06a481c940e..52a1502af445 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -3,7 +3,6 @@ [ -e /lib/firmware/$FIRMWARE ] && exit 0 . /lib/functions/caldata.sh -. /lib/functions/mikrotik-caldata.sh board=$(board_name) @@ -42,10 +41,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr) ;; - mikrotik,routerboard-wap-g-5hact2hnd) - mikrotik_caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x10) +2) - ;; nec,wg800hp) caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_text board_data 0x680) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 2cab8c97545d..ce8531d5ce00 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -4,7 +4,6 @@ . /lib/functions/caldata.sh . /lib/functions/k2t.sh -. /lib/functions/mikrotik-caldata.sh board=$(board_name) @@ -66,9 +65,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +2) ;; - mikrotik,routerboard-wap-g-5hact2hnd) - mikrotik_caldata_extract "art" 0x5000 0x844 - ;; nec,wg800hp) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(mtd_get_mac_text board_data 0x880) diff --git a/target/linux/ath79/generic/config-default b/target/linux/ath79/generic/config-default index a15a1d897281..5459bafd7d5e 100644 --- a/target/linux/ath79/generic/config-default +++ b/target/linux/ath79/generic/config-default @@ -11,7 +11,6 @@ CONFIG_MICREL_PHY=y CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3 CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_SPLIT_EVA_FW=y -CONFIG_MTD_SPLIT_MINOR_FW=y CONFIG_PHY_AR7100_USB=y CONFIG_PHY_AR7200_USB=y CONFIG_REGULATOR=y diff --git a/target/linux/ath79/generic/target.mk b/target/linux/ath79/generic/target.mk index 488aa6df1655..88346efd2b09 100644 --- a/target/linux/ath79/generic/target.mk +++ b/target/linux/ath79/generic/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=Generic -FEATURES += minor squashfs +FEATURES += squashfs DEFAULT_PACKAGES += wpad-basic diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index c27db93947fe..c568c7238cfa 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -73,6 +73,9 @@ include ./generic.mk include ./generic-tp-link.mk include ./generic-ubnt.mk endif +ifeq ($(SUBTARGET),mikrotik) +include ./mikrotik.mk +endif ifeq ($(SUBTARGET),nand) include ./nand.mk endif diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 5a0b0ab67e11..3ce51cc0d6e9 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1,5 +1,4 @@ include ./common-buffalo.mk -include ./common-mikrotik.mk include ./common-netgear.mk include ./common-tp-link.mk include ./common-yuncore.mk @@ -765,19 +764,6 @@ define Device/librerouter_librerouter-v1 endef TARGET_DEVICES += librerouter_librerouter-v1 -define Device/mikrotik_routerboard-wap-g-5hact2hnd - $(Device/mikrotik) - SOC := qca9556 - DEVICE_MODEL := RouterBOARD wAP G-5HacT2HnD (wAP AC) - IMAGE_SIZE := 16256k - IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) - DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct - SUPPORTED_DEVICES += rb-wapg-5hact2hnd -endef -TARGET_DEVICES += mikrotik_routerboard-wap-g-5hact2hnd - define Device/nec_wg1200cr SOC := qca9563 DEVICE_VENDOR := NEC diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk new file mode 100644 index 000000000000..a6863dc13096 --- /dev/null +++ b/target/linux/ath79/image/mikrotik.mk @@ -0,0 +1,27 @@ +include ./common-mikrotik.mk + +define Device/mikrotik_routerboard-922uags-5hpacd + $(Device/mikrotik) + SOC := qca9558 + DEVICE_MODEL := RouterBOARD 922UAGS-5HPacD + BOARD_NAME := routerboard + IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \ + sysupgrade-tar kernel=$$$$@ | append-metadata + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct \ + kmod-usb2 nand-utils + SUPPORTED_DEVICES += rb-922uags-5hpacd +endef +TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd + +define Device/mikrotik_routerboard-wap-g-5hact2hnd + $(Device/mikrotik) + SOC := qca9556 + DEVICE_MODEL := RouterBOARD wAP G-5HacT2HnD (wAP AC) + IMAGE_SIZE := 16256k + IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ + pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ + append-metadata | check-size $$$$(IMAGE_SIZE) + DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct + SUPPORTED_DEVICES += rb-wapg-5hact2hnd +endef +TARGET_DEVICES += mikrotik_routerboard-wap-g-5hact2hnd diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 4cb6ea295738..8f28af46555c 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,4 +1,3 @@ -include ./common-mikrotik.mk include ./common-netgear.mk # for netgear-uImage # attention: only zlib compression is allowed for the boot fs @@ -129,19 +128,6 @@ define Device/glinet_gl-ar750s-nor endef TARGET_DEVICES += glinet_gl-ar750s-nor -define Device/mikrotik_routerboard-922uags-5hpacd - $(Device/mikrotik) - SOC := qca9558 - DEVICE_MODEL := RouterBOARD 922UAGS-5HPacD - BOARD_NAME := routerboard - IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \ - sysupgrade-tar kernel=$$$$@ | append-metadata - DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct \ - kmod-usb2 nand-utils - SUPPORTED_DEVICES += rb-922uags-5hpacd -endef -TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd - # fake rootfs is mandatory, pad-offset 129 equals (2 * uimage_header + 0xff) define Device/netgear_ath79_nand DEVICE_VENDOR := NETGEAR diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network new file mode 100644 index 000000000000..ee795c7496ff --- /dev/null +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network @@ -0,0 +1,39 @@ +#!/bin/sh + +. /lib/functions/system.sh +. /lib/functions/uci-defaults.sh + +ath79_setup_interfaces() +{ + local board="$1" + + case "$board" in + mikrotik,routerboard-922uags-5hpacd|\ + mikrotik,routerboard-wap-g-5hact2hnd) + ucidef_set_interface_lan "eth0" + ;; + *) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; + esac +} + +ath79_setup_macs() +{ + local board="$1" + + case "$board" in + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac +} + +board_config_update +board=$(board_name) +ath79_setup_interfaces $board +ath79_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom new file mode 100644 index 000000000000..f5f88484b5d7 --- /dev/null +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -0,0 +1,22 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh +. /lib/functions/mikrotik-caldata.sh + +board=$(board_name) + +case "$FIRMWARE" in +"ath9k-eeprom-ahb-18100000.wmac.bin") + case $board in + mikrotik,routerboard-wap-g-5hact2hnd) + mikrotik_caldata_extract "art" 0x1000 0x440 + ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x10) +2) + ;; + *) + caldata_die "board $board is not supported yet" + ;; + esac + ;; +esac diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata new file mode 100644 index 000000000000..6eb9a93b75e1 --- /dev/null +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -0,0 +1,28 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh +. /lib/functions/mikrotik-caldata.sh + +board=$(board_name) + +case "$FIRMWARE" in +"ath10k/cal-pci-0000:00:00.0.bin") + case $board in + mikrotik,routerboard-wap-g-5hact2hnd) + mikrotik_caldata_extract "art" 0x5000 0x844 + ;; + esac + ;; +"ath10k/cal-pci-0000:01:00.0.bin") + case $board in + mikrotik,routerboard-922uags-5hpacd) + mikrotik_caldata_extract "art" 0x5000 0x844 + ;; + esac + ;; +*) + exit 1 + ;; +esac diff --git a/target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration similarity index 100% rename from target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration rename to target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration diff --git a/target/linux/ath79/base-files/lib/functions/mikrotik-caldata.sh b/target/linux/ath79/mikrotik/base-files/lib/functions/mikrotik-caldata.sh similarity index 100% rename from target/linux/ath79/base-files/lib/functions/mikrotik-caldata.sh rename to target/linux/ath79/mikrotik/base-files/lib/functions/mikrotik-caldata.sh diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh new file mode 100644 index 000000000000..a56868953652 --- /dev/null +++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh @@ -0,0 +1,35 @@ +# Copyright (C) 2011 OpenWrt.org + +PART_NAME=firmware + +REQUIRE_IMAGE_METADATA=1 +platform_check_image() { + return 0 +} + +RAMFS_COPY_BIN='fw_printenv fw_setenv nandwrite' +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' + +platform_do_upgrade_mikrotik_nand() { + CI_KERNPART=none + local fw_mtd=$(find_mtd_part kernel) + fw_mtd="${fw_mtd/block/}" + [ -n "$fw_mtd" ] || return + mtd erase kernel + tar xf "$1" sysupgrade-routerboard/kernel -O | nandwrite -o "$fw_mtd" - + + nand_do_upgrade "$1" +} + +platform_do_upgrade() { + local board=$(board_name) + + case "$board" in + mikrotik,routerboard-922uags-5hpacd) + platform_do_upgrade_mikrotik_nand "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default new file mode 100644 index 000000000000..a95d13406adb --- /dev/null +++ b/target/linux/ath79/mikrotik/config-default @@ -0,0 +1,33 @@ +CONFIG_AT803X_PHY=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_GPIO_LATCH=y +CONFIG_GPIO_WATCHDOG=y +CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y +CONFIG_LEDS_RESET=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_AR934X=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_SPI_NAND=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +CONFIG_MTD_SPLIT_MINOR_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_NET_SWITCHDEV=y +CONFIG_PHY_AR7100_USB=y +CONFIG_PHY_AR7200_USB=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +CONFIG_WATCHDOG_CORE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/ath79/mikrotik/profiles/00-default.mk b/target/linux/ath79/mikrotik/profiles/00-default.mk new file mode 100644 index 000000000000..14712da59338 --- /dev/null +++ b/target/linux/ath79/mikrotik/profiles/00-default.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2020 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Default + NAME:=Default Profile (all drivers) + PACKAGES:= \ + kmod-usb-ohci kmod-usb2 nand-utils + PRIORITY := 1 +endef + +define Profile/Default/Description + Default package set compatible with most boards. +endef +$(eval $(call Profile,Default)) diff --git a/target/linux/ath79/mikrotik/target.mk b/target/linux/ath79/mikrotik/target.mk new file mode 100644 index 000000000000..face016a51f2 --- /dev/null +++ b/target/linux/ath79/mikrotik/target.mk @@ -0,0 +1,9 @@ +BOARDNAME := MikroTik devices +FEATURES += minor nand squashfs + +DEFAULT_PACKAGES += wpad-basic + +define Target/Description + Build firmware images for MikroTik devices based on Qualcomm Atheros + MIPS SoCs (AR71xx, AR72xx, AR91xx, AR93xx, QCA95xx). +endef 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 06a2aec47189..1626ec31cacb 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 @@ -8,8 +8,7 @@ ath79_setup_interfaces() local board="$1" case "$board" in - aerohive,hiveap-121|\ - mikrotik,routerboard-922uags-5hpacd) + aerohive,hiveap-121) ucidef_set_interface_lan "eth0" ;; domywifi,dw33d) 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 8a1bed58c1bf..d5fd3db24d6d 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 @@ -3,7 +3,6 @@ [ -e /lib/firmware/$FIRMWARE ] && exit 0 . /lib/functions/caldata.sh -. /lib/functions/mikrotik-caldata.sh board=$(board_name) @@ -25,13 +24,6 @@ case "$FIRMWARE" in ;; esac ;; -"ath10k/cal-pci-0000:01:00.0.bin") - case $board in - mikrotik,routerboard-922uags-5hpacd) - mikrotik_caldata_extract "art" 0x5000 0x844 - ;; - esac - ;; *) exit 1 ;; diff --git a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh index 8d6b639b4081..ea77345b061d 100644 --- a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh @@ -10,24 +10,10 @@ platform_check_image() { RAMFS_COPY_BIN='fw_printenv fw_setenv nandwrite' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' -platform_do_upgrade_mikrotik_nand() { - CI_KERNPART=none - local fw_mtd=$(find_mtd_part kernel) - fw_mtd="${fw_mtd/block/}" - [ -n "$fw_mtd" ] || return - mtd erase kernel - tar xf "$1" sysupgrade-routerboard/kernel -O | nandwrite -o "$fw_mtd" - - - nand_do_upgrade "$1" -} - platform_do_upgrade() { local board=$(board_name) case "$board" in - mikrotik,routerboard-922uags-5hpacd) - platform_do_upgrade_mikrotik_nand "$1" - ;; glinet,gl-ar300m-nand|\ glinet,gl-ar300m-nor) glinet_nand_nor_do_upgrade "$1" diff --git a/target/linux/ath79/nand/config-default b/target/linux/ath79/nand/config-default index 52e12fa28124..738f2f0a5ea6 100644 --- a/target/linux/ath79/nand/config-default +++ b/target/linux/ath79/nand/config-default @@ -10,7 +10,6 @@ CONFIG_MTD_NAND_AR934X=y CONFIG_MTD_NAND_CORE=y CONFIG_MTD_RAW_NAND=y CONFIG_MTD_SPI_NAND=y -CONFIG_MTD_SPLIT_MINOR_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y diff --git a/target/linux/ath79/nand/target.mk b/target/linux/ath79/nand/target.mk index fd5216b0ebf6..c565c9b2b8c4 100644 --- a/target/linux/ath79/nand/target.mk +++ b/target/linux/ath79/nand/target.mk @@ -1,6 +1,6 @@ BOARDNAME := Generic devices with NAND flash -FEATURES += squashfs nand minor +FEATURES += squashfs nand DEFAULT_PACKAGES += wpad-basic -- 2.30.2