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_leds5
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/board.d/02_network5
-rw-r--r--target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata2
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh4
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh19
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh18
6 files changed, 53 insertions, 0 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 fcba2aea54..475a8623f7 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -34,6 +34,11 @@ netgear,ex6150v2)
meraki,mr33)
ucidef_set_interface_lan "eth0"
;;
+zyxel,nbg6617)
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2G" "phy0tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5G" "phy1tpt"
+ ucidef_set_led_usbport "usb" "USB" "${board}:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
+ ;;
zyxel,wre6606)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green: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 03e0c0e16c..5c90ef136f 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -48,6 +48,11 @@ netgear,ex6150v2 |\
zyxel,wre6606)
ucidef_set_interface_lan "eth0"
;;
+zyxel,nbg6617)
+ ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_add_switch "switch0" \
+ "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
+ ;;
*)
echo "Unsupported hardware. Network interfaces not intialized"
;;
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 d89ddf6e57..1d4fd9cd8f 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
@@ -146,6 +146,7 @@ case "$FIRMWARE" in
openmesh,a62)
ath10kcal_extract "0:ART" 4096 12064
;;
+ zyxel,nbg6617 |\
zyxel,wre6606)
ath10kcal_extract "ART" 4096 12064
ath10kcal_patch_mac_crc $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
@@ -181,6 +182,7 @@ case "$FIRMWARE" in
openmesh,a62)
ath10kcal_extract "0:ART" 20480 12064
;;
+ zyxel,nbg6617 |\
zyxel,wre6606)
ath10kcal_extract "ART" 20480 12064
ath10kcal_patch_mac_crc $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index 1acd7366c8..44e81ca366 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -8,6 +8,10 @@ preinit_set_mac_address() {
mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 102)
[ -n "$mac_lan" ] && ip link set dev eth0 address "$mac_lan"
;;
+ zyxel,nbg6617)
+ base_mac=$(cat /sys/class/net/eth0/address)
+ ip link set dev eth0 address $(macaddr_add "$base_mac" +2)
+ ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
esac
}
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
new file mode 100644
index 0000000000..578ddbe4c4
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set_preinit_iface() {
+ . /lib/functions.sh
+
+ case $(board_name) in
+ asus,rt-ac58u| \
+ avm,fritzbox-4040| \
+ glinet,gl-b1300| \
+ meraki,mr33| \
+ zyxel,nbg6617)
+ ifname=eth0
+ ;;
+ *)
+ ;;
+ esac
+}
+
+boot_hook_add preinit_main set_preinit_iface
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 4096e127ea..0e29302465 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -29,6 +29,21 @@ EOF
return 0;
}
+zyxel_do_upgrade() {
+ local tar_file="$1"
+
+ local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
+ board_dir=${board_dir%/}
+
+ tar Oxf $tar_file ${board_dir}/kernel | mtd write - kernel
+
+ if [ "$SAVE_CONFIG" -eq 1 ]; then
+ tar Oxf $tar_file ${board_dir}/root | mtd -j "$CONF_TAR" write - rootfs
+ else
+ tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs
+ fi
+}
+
platform_do_upgrade() {
case "$(board_name)" in
8dev,jalapeno)
@@ -48,6 +63,9 @@ platform_do_upgrade() {
CI_KERNPART="part.safe"
nand_do_upgrade "$1"
;;
+ zyxel,nbg6617)
+ zyxel_do_upgrade "$1"
+ ;;
*)
default_do_upgrade "$ARGV"
;;