aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>2020-02-28 16:01:02 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-03-17 11:50:47 +0100
commita66eee63368eb5625b359244bfffc9b9eb921875 (patch)
tree6a76e6a9d54527f8a41b41fa80fbc40d30a240ee /target/linux/ath79/nand
parentb78f61c336542a3658c3b1c595b3bb2810f93500 (diff)
downloadupstream-a66eee63368eb5625b359244bfffc9b9eb921875.tar.gz
upstream-a66eee63368eb5625b359244bfffc9b9eb921875.tar.bz2
upstream-a66eee63368eb5625b359244bfffc9b9eb921875.zip
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 <roger.pueyo@guifi.net>
Diffstat (limited to 'target/linux/ath79/nand')
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata8
-rw-r--r--target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration17
-rw-r--r--target/linux/ath79/nand/base-files/lib/upgrade/platform.sh14
-rw-r--r--target/linux/ath79/nand/config-default1
-rw-r--r--target/linux/ath79/nand/target.mk2
6 files changed, 2 insertions, 43 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 06a2aec471..1626ec31ca 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 8a1bed58c1..d5fd3db24d 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/etc/uci-defaults/04_led_migration b/target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration
deleted file mode 100644
index 1a7b371a99..0000000000
--- a/target/linux/ath79/nand/base-files/etc/uci-defaults/04_led_migration
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-. /lib/functions.sh
-. /lib/functions/migrations.sh
-
-board=$(board_name)
-boardonly="${board##*,}"
-
-case "$board" in
-mikrotik,*)
- migrate_leds "^rb:=mikrotik:"
- ;;
-esac
-
-migrations_apply system
-
-exit 0
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 8d6b639b40..ea77345b06 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 52e12fa281..738f2f0a5e 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 fd5216b0eb..c565c9b2b8 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