aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq40xx/base-files')
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata2
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/init.d/bootcount14
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh13
5 files changed, 33 insertions, 2 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index 9105bf2452..2fca1cbc9f 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -11,6 +11,9 @@ board=$(board_name)
boardname="${board##*,}"
case "$board" in
+alfa-network,ap120c-ac)
+ ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1"
+ ;;
asus,rt-ac58u)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 43be592071..b28f5ef12c 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -12,7 +12,8 @@ ipq40xx_setup_interfaces()
local board="$1"
case "$board" in
- 8dev,jalapeno)
+ 8dev,jalapeno|\
+ alfa-network,ap120c-ac)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
asus,map-ac2200|\
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 21d9063fd4..718224f1e0 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -119,6 +119,7 @@ case "$FIRMWARE" in
"ath10k/pre-cal-ahb-a000000.wifi.bin")
case "$board" in
8dev,jalapeno |\
+ alfa-network,ap120c-ac |\
glinet,gl-b1300 |\
linksys,ea6350v3 |\
qcom,ap-dk01.1-c1)
@@ -160,6 +161,7 @@ case "$FIRMWARE" in
"ath10k/pre-cal-ahb-a800000.wifi.bin")
case "$board" in
8dev,jalapeno |\
+ alfa-network,ap120c-ac |\
glinet,gl-b1300 |\
linksys,ea6350v3 |\
qcom,ap-dk01.1-c1)
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
new file mode 100755
index 0000000000..604f88c396
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+start() {
+ . /lib/functions.sh
+
+ case $(board_name) in
+ alfa-network,ap120c-ac)
+ [ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
+ echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
+ ;;
+ esac
+}
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index f6bc173a76..b92a2bfe9f 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -46,7 +46,8 @@ zyxel_do_upgrade() {
platform_do_upgrade() {
case "$(board_name)" in
- 8dev,jalapeno)
+ 8dev,jalapeno |\
+ alfa-network,ap120c-ac)
nand_do_upgrade "$ARGV"
;;
asus,map-ac2200)
@@ -81,6 +82,16 @@ platform_do_upgrade() {
platform_nand_pre_upgrade() {
case "$(board_name)" in
+ alfa-network,ap120c-ac)
+ part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
+ if [ "$part" = "rootfs1" ]; then
+ fw_setenv active 2 || exit 1
+ CI_UBIPART="rootfs2"
+ else
+ fw_setenv active 1 || exit 1
+ CI_UBIPART="rootfs1"
+ fi
+ ;;
asus,rt-ac58u)
CI_UBIPART="UBI_DEV"
CI_KERNPART="linux"