Merge Official Source

This commit is contained in:
CN_SZTL 2019-11-13 23:57:59 +08:00
commit c956d382bc
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
14 changed files with 37 additions and 33 deletions

View File

@ -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/

View File

@ -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)"

View File

@ -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"')

View File

@ -1,5 +1,3 @@
#!/bin/sh
. /lib/functions.sh
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do

View File

@ -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)

View File

@ -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();

View File

@ -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)"))

View File

@ -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>;
};
};

View File

@ -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

View File

@ -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|\

View File

@ -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

View File

@ -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

View File

@ -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|\

View File

@ -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)