diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5c121ace24..b35d00cf94 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=207 +PKG_RELEASE:=208 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/etc/uci-defaults/10_migrate-shadow b/package/base-files/files/etc/uci-defaults/10_migrate-shadow index a354844fe4..481444f35e 100644 --- a/package/base-files/files/etc/uci-defaults/10_migrate-shadow +++ b/package/base-files/files/etc/uci-defaults/10_migrate-shadow @@ -1,5 +1,3 @@ -#!/bin/sh - ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)" spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)" diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula b/package/base-files/files/etc/uci-defaults/12_network-generate-ula index 8871427c60..19d7ed7f2e 100644 --- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula +++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula @@ -1,5 +1,3 @@ -#!/bin/sh - [ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0 r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"') diff --git a/package/base-files/files/etc/uci-defaults/13_fix_group_user b/package/base-files/files/etc/uci-defaults/13_fix-group-user similarity index 94% rename from package/base-files/files/etc/uci-defaults/13_fix_group_user rename to package/base-files/files/etc/uci-defaults/13_fix-group-user index e6dae2419f..bf9febdfe4 100644 --- a/package/base-files/files/etc/uci-defaults/13_fix_group_user +++ b/package/base-files/files/etc/uci-defaults/13_fix-group-user @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 2ba8de4783..5170fa518f 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -143,7 +143,7 @@ case "$FIRMWARE" in archer-c5|\ archer-c7) ath10kcal_extract "art" 0x5000 0x844 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2) + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) ;; nbg6616|\ nbg6716) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c index 287252780d..923ed28b4a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c @@ -212,8 +212,7 @@ static void __init common_setup(bool pcie_slot) ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), archer_c7_leds_gpio); - ath79_init_mac(tmpmac, mac, -1); - ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, tmpmac); + ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, mac); if (pcie_slot) { ath79_register_pci(); 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 34f6e31047..3a896b55b0 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 @@ -292,11 +292,11 @@ ath79_setup_macs() ubnt,nanostation-m|\ ubnt,rocket-m|\ ubnt,unifi) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary art 0x1002) ;; avm,fritz300e) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)")) ;; avm,fritz4020) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) diff --git a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts index a25d9d02c1..0d98a43e0b 100644 --- a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts +++ b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts @@ -10,8 +10,10 @@ model = "Samsung CY-SWR1100"; aliases { - led-boot = &led_wps; - led-failsafe = &led_wps; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; nor-flash@1c000000 { @@ -49,8 +51,9 @@ }; partition@40000 { - label = "devdata"; + label = "devconf"; reg = <0x40000 0x10000>; + read-only; }; partition@50000 { @@ -69,8 +72,7 @@ }; keys { - compatible = "gpio-keys-polled"; - poll-interval = <100>; + compatible = "gpio-keys"; reset { label = "reset"; @@ -88,7 +90,7 @@ leds { compatible = "gpio-leds"; - led_wps: wps { + wps { label = "cy-swr1100:blue:wps"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; @@ -99,6 +101,11 @@ trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; + + led_power: power { + label = "cy-swr1100:blue:power"; + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + }; }; }; @@ -130,9 +137,8 @@ status = "okay"; wifi@0,0 { - compatible = "pci0,0"; + compatible = "pci1814,3091"; reg = <0x10000 0 0 0 0>; - ralink,5ghz = <0>; ralink,mtd-eeprom = <&factory 0x2000>; }; }; diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index 8fc778c864..0279bcd2d3 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -89,7 +89,7 @@ define Device/samsung_cy-swr1100 SEAMA_SIGNATURE := wrgnd10_samsung_ss815 DEVICE_VENDOR := Samsung DEVICE_MODEL := CY-SWR1100 - DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 swconfig + DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport swconfig SUPPORTED_DEVICES += cy-swr1100 endef TARGET_DEVICES += samsung_cy-swr1100 diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index dfca48e123..1b51f17485 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -288,7 +288,7 @@ ramips_setup_macs() glinet,gl-mt300n|\ glinet,gl-mt750) wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; hiwifi,hc5661|\ hiwifi,hc5761|\ @@ -312,11 +312,11 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR) ;; zbtlink,zbt-we1026-5g-16m) - label_mac=$(cat /sys/class/ieee80211/phy1/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; zbtlink,zbt-we1026-h-32m) wan_mac=$(mtd_get_mac_binary factory 0x2e) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; zyxel,keenetic-omni|\ zyxel,keenetic-omni-ii|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index ae03dc71b1..0de3804cdb 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -188,7 +188,7 @@ ramips_setup_macs() asus,rt-ac65p|\ asus,rt-ac85p) wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; buffalo,wsr-1166dhp) local index="$(find_mtd_index "board_data")" @@ -198,7 +198,7 @@ ramips_setup_macs() dlink,dir-860l-b1) lan_mac=$(mtd_get_mac_ascii factory lanmac) wan_mac=$(mtd_get_mac_ascii factory wanmac) - label_mac=$(cat /sys/class/ieee80211/phy1/macaddress) + label_mac=$(mtd_get_mac_binary radio 0x4) ;; edimax,rg21s) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) @@ -241,12 +241,12 @@ ramips_setup_macs() ;; zbtlink,zbt-we1326) wan_mac=$(mtd_get_mac_binary factory 0xe006) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; zbtlink,zbt-wg3526-16m|\ zbtlink,zbt-wg3526-32m) wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; esac diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 63861c2089..87ce447612 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -134,7 +134,7 @@ ramips_setup_macs() ;; cudy,wr1000) wan_mac=$(mtd_get_mac_binary factory 0x2e) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x8) ;; duzun,dm06|\ mediatek,mt7628an-eval-board|\ @@ -192,7 +192,7 @@ ramips_setup_macs() ;; vocore,vocore2|\ vocore,vocore2-lite) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x8) ;; esac diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network index 5c110b375e..de71dd6202 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network @@ -242,10 +242,13 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") wan_mac=$(macaddr_add "$lan_mac" 1) ;; - dlink,dir-615-d|\ + dlink,dir-615-d) + wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) + label_mac=$(mtd_get_mac_binary devdata 0x4004) + ;; dlink,dir-615-h1) wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; poray,m3|\ poray,m4-4m|\ diff --git a/target/linux/ramips/rt3883/base-files/etc/board.d/02_network b/target/linux/ramips/rt3883/base-files/etc/board.d/02_network index 27c15eecac..873c72cea3 100755 --- a/target/linux/ramips/rt3883/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt3883/base-files/etc/board.d/02_network @@ -70,7 +70,9 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary devdata 0x7) ;; samsung,cy-swr1100) - lan_mac=$(mtd_get_mac_ascii factory lanmac) + lan_mac=$(mtd_get_mac_ascii nvram lanmac) + wan_mac=$(mtd_get_mac_ascii nvram wanmac) + label_mac=$wan_mac ;; sitecom,wlr-6000) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x8004)" 2)