Skip to content

Commit

Permalink
fix DW33D kernel part too big in 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Oct 19, 2017
1 parent ed5da5e commit 521ca2d
Show file tree
Hide file tree
Showing 21 changed files with 649 additions and 10 deletions.
16 changes: 15 additions & 1 deletion target/linux/ar71xx/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,21 @@ sc1750|\
sc450)
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
;;
archer-c25-v1)
archer-c25-v1|\
archer-c7-v4)
ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
ucidef_set_led_switch "lan1" "LAN1" "$board:green:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08"
ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02"
case "$board" in
archer-c7-v4)
ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1"
;;
esac
;;
archer-c58-v1|\
archer-c59-v1|\
Expand Down Expand Up @@ -267,6 +274,7 @@ rb-750)
ucidef_set_led_switch "port5" "port5" "rb750:green:port5" "switch0" "0x02"
;;
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2)
ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000"
ucidef_set_led_netdev "port1" "port1" "rb:green:port1" "eth0"
Expand Down Expand Up @@ -823,6 +831,12 @@ r6100)
ucidef_set_led_usbdev "usb" "USB" "netgear:blue:usb" "1-1"
ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy1tpt"
;;
wi2a-ac200i)
ucidef_set_led_default "power" "Power (green)" "nokia:green:power" "1"
ucidef_set_led_default "wan" "Ethernet LED (green)" "nokia:green:wan" "1"
ucidef_set_led_wlan "wlan5g" "WLAN" "nokia:green:wlan-5g" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN" "nokia:green:wlan-2g" "phy1tpt"
;;
wndr3700v4|\
wndr4300)
ucidef_set_led_switch "wan-green" "WAN (green)" "netgear:green:wan" "switch0" "0x20" "0x08"
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ar71xx/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ ar71xx_setup_interfaces()
tl-wr902ac-v1|\
tube2h|\
unifiac-lite|\
wi2a-ac200i|\
wndap360|\
wp543)
ucidef_set_interface_lan "eth0"
Expand Down Expand Up @@ -160,6 +161,7 @@ ar71xx_setup_interfaces()
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
ucidef_add_switch "switch0" \
Expand Down Expand Up @@ -426,6 +428,7 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
archer-c7-v4|\
tl-wdr4300|\
tl-wr1041n-v2)
ucidef_add_switch "switch0" \
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ rb-952ui-5ac2nd)
ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "45" "1"
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
;;
rb-750p-pbr2)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
;;
esac

board_config_flush
Expand Down
8 changes: 8 additions & 0 deletions target/linux/ar71xx/base-files/etc/diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ get_status_led() {
archer-c58-v1|\
archer-c59-v1|\
archer-c60-v1|\
archer-c7-v4|\
fritz300e|\
gl-usb150|\
mr12|\
Expand Down Expand Up @@ -316,6 +317,7 @@ get_status_led() {
status_led="rb750:green:act"
;;
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2|\
rb-911g-2hpnd|\
rb-911g-5hpacd|\
Expand Down Expand Up @@ -458,6 +460,9 @@ get_status_led() {
airgatewaypro)
status_led="ubnt:white:status"
;;
wi2a-ac200i)
status_led="nokia:green:ctrl"
;;
whr-g301n|\
whr-hp-g300n|\
whr-hp-gn|\
Expand Down Expand Up @@ -528,6 +533,9 @@ set_state() {
local n=$(fw_printenv activeregion | cut -d = -f 2)
fw_setenv "image${n}trynum" 0
;;
wi2a-ac200i)
fw_setenv PKRstCnt 0
;;
esac
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
;;
archer-c7-v4|\
archer-c25-v1|\
archer-c59-v1|\
archer-c60-v1|\
Expand Down Expand Up @@ -111,6 +112,9 @@ case "$FIRMWARE" in
unifiac-pro)
ath10kcal_extract "EEPROM" 20480 2116
;;
wi2a-ac200i)
ath10kcal_extract "ART" 20480 2116
;;
esac
;;
"ath10k/cal-pci-0000:01:00.0.bin")
Expand Down
9 changes: 9 additions & 0 deletions target/linux/ar71xx/base-files/lib/ar71xx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ ar71xx_board_detect() {
*"Archer C5")
name="archer-c5"
;;
*"Archer C7 v4")
name="archer-c7-v4"
;;
*"Archer C58 v1")
name="archer-c58-v1"
;;
Expand Down Expand Up @@ -911,6 +914,9 @@ ar71xx_board_detect() {
*"RouterBOARD 750GL")
name="rb-750gl"
;;
*"RouterBOARD 750P r2")
name="rb-750p-pbr2"
;;
*"RouterBOARD 750UP r2")
name="rb-750up-r2"
;;
Expand Down Expand Up @@ -1228,6 +1234,9 @@ ar71xx_board_detect() {
"WeIO"*)
name="weio"
;;
*"WI2A-AC200i")
name="wi2a-ac200i"
;;
*"WHR-G301N")
name="whr-g301n"
;;
Expand Down
22 changes: 22 additions & 0 deletions target/linux/ar71xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ platform_check_image() {
archer-c58-v1|\
archer-c59-v1|\
archer-c60-v1|\
archer-c7-v4|\
bullet-m|\
c-55|\
carambola2|\
Expand Down Expand Up @@ -534,6 +535,7 @@ platform_check_image() {
nbg6716|\
r6100|\
rambutan|\
wi2a-ac200i|\
wndr3700v4|\
wndr4300)
nand_do_platform_check $board $1
Expand Down Expand Up @@ -655,6 +657,7 @@ platform_check_image() {
# these boards use metadata images
fritz300e|\
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2|\
rb-941-2nd|\
rb-951ui-2nd|\
Expand Down Expand Up @@ -707,11 +710,13 @@ platform_pre_upgrade() {
rb-2011uias-2hnd|\
rb-sxt2n|\
rb-sxt5n|\
wi2a-ac200i|\
wndr3700v4|\
wndr4300)
nand_do_upgrade "$1"
;;
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2|\
rb-941-2nd|\
rb-951ui-2nd|\
Expand Down Expand Up @@ -741,6 +746,23 @@ platform_nand_pre_upgrade() {
mtd erase kernel
tar xf "$1" sysupgrade-routerboard/kernel -O | nandwrite -o "$fw_mtd" -
;;
wi2a-ac200i)
case "$(fw_printenv -n dualPartition)" in
imgA)
fw_setenv dualPartition imgB
fw_setenv ActImg NokiaImageB
;;
imgB)
fw_setenv dualPartition imgA
fw_setenv ActImg NokiaImageA
;;
esac
ubiblock -r /dev/ubiblock0_0 2>/dev/null >/dev/null
rm -f /dev/ubiblock0_0
ubidetach -d 0 2>/dev/null >/dev/null
CI_UBIPART=ubi_alt
CI_KERNPART=kernel_alt
;;
esac
}

Expand Down
1 change: 1 addition & 0 deletions target/linux/ar71xx/config-4.4
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ CONFIG_ATH79_MACH_UBNT=y
CONFIG_ATH79_MACH_UBNT_UNIFIAC=y
CONFIG_ATH79_MACH_UBNT_XM=y
CONFIG_ATH79_MACH_WEIO=y
# CONFIG_ATH79_MACH_WI2A_AC200I is not set
CONFIG_ATH79_MACH_WHR_HP_G300N=y
CONFIG_ATH79_MACH_WLAE_AG300N=y
CONFIG_ATH79_MACH_WLR8100=y
Expand Down
2 changes: 1 addition & 1 deletion target/linux/ar71xx/config-4.9
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ CONFIG_ATH79_MACH_UBNT=y
CONFIG_ATH79_MACH_UBNT_UNIFIAC=y
CONFIG_ATH79_MACH_UBNT_XM=y
CONFIG_ATH79_MACH_WEIO=y
# CONFIG_ATH79_MACH_WI2A_AC200I is not set
CONFIG_ATH79_MACH_WHR_HP_G300N=y
CONFIG_ATH79_MACH_WLAE_AG300N=y
CONFIG_ATH79_MACH_WLR8100=y
Expand Down Expand Up @@ -378,7 +379,6 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_MIPS_CMDLINE_FROM_DTB is not set
# CONFIG_MIPS_ELF_APPENDED_DTB is not set
CONFIG_MIPS_FPU_EMULATOR=y
# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
CONFIG_MIPS_MACHINE=y
Expand Down
13 changes: 13 additions & 0 deletions target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ config ATH79_MACH_A60
select ATH79_DEV_WMAC
select ATH79_DEV_USB

config ATH79_MACH_WI2A_AC200I
bool "Nokia WI2A-AC200i support"
select SOC_QCA955X
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_NFC
select ATH79_DEV_WMAC
select ATH79_DEV_USB

config ATH79_MACH_ALFA_AP120C
bool "ALFA Network AP120C board support"
select ATH79_DEV_AP9X_PCI if PCI
Expand Down Expand Up @@ -1008,6 +1019,7 @@ config ATH79_MACH_RBSPI
MikroTik RouterBOARD hAP ac lite
MikroTik RouterBOARD hEX PoE lite
MikroTik RouterBOARD hEX lite
MikroTik RouterBOARD Powerbox
MikroTik RouterBOARD LHG 5
MikroTik RouterBOARD cAP (EXPERIMENTAL)
MikroTik RouterBOARD mAP (EXPERIMENTAL)
Expand Down Expand Up @@ -1381,6 +1393,7 @@ config ATH79_MACH_ARCHER_C60_V1
config ATH79_MACH_ARCHER_C7
bool "TP-LINK Archer C5/C7/TL-WDR4900 v2 board support"
select SOC_QCA955X
select SOC_QCA956X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ar71xx/files/arch/mips/ath79/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += routerboot.o
# Machines
#
obj-$(CONFIG_ATH79_MACH_A60) += mach-a60.o
obj-$(CONFIG_ATH79_MACH_WI2A_AC200I) += mach-wi2a-ac200i.o
obj-$(CONFIG_ATH79_MACH_ALFA_AP120C) += mach-alfa-ap120c.o
obj-$(CONFIG_ATH79_MACH_ALFA_AP96) += mach-alfa-ap96.o
obj-$(CONFIG_ATH79_MACH_ALFA_NX) += mach-alfa-nx.o
Expand All @@ -62,6 +63,7 @@ obj-$(CONFIG_ATH79_MACH_ARCHER_C58_V1) += mach-archer-c59-v1.o
obj-$(CONFIG_ATH79_MACH_ARCHER_C59_V1) += mach-archer-c59-v1.o
obj-$(CONFIG_ATH79_MACH_ARCHER_C60_V1) += mach-archer-c60-v1.o
obj-$(CONFIG_ATH79_MACH_ARCHER_C7) += mach-archer-c7.o
obj-$(CONFIG_ATH79_MACH_ARCHER_C7) += mach-archer-c7-v4.o
obj-$(CONFIG_ATH79_MACH_ARDUINO_YUN) += mach-arduino-yun.o
obj-$(CONFIG_ATH79_MACH_AW_NR580) += mach-aw-nr580.o
obj-$(CONFIG_ATH79_MACH_BHR_4GRV2) += mach-bhr-4grv2.o
Expand Down
Loading

0 comments on commit 521ca2d

Please sign in to comment.