From 6269f10ea4c4c126a00789e5e0e224422a2b1317 Mon Sep 17 00:00:00 2001 From: Nelson Cai Date: Mon, 20 Jul 2020 13:02:27 +0800 Subject: [PATCH 1/8] ramips: fix network setup for Ubiquiti ER-X/ER-X-SFP The function name ucidef_set_interface_lan_wan does not exist, use the proper name by adding an "s" and thereby fix network setup on these devices. Fixes: 22468cc40c8b (ramips: erx and erx-sfp: fix missing WAN interface) Signed-off-by: Nelson Cai [commit message/title facelift] Signed-off-by: Adrian Schmutzler --- target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9c32f59ab8..2d3db99b3d 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 @@ -48,10 +48,10 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan" ;; ubnt,edgerouter-x) - ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4" "eth0" + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0" ;; ubnt,edgerouter-x-sfp) - ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0" ;; zyxel,wap6805) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" From 683193cfb7a62095aae88428fd38c997ff9a8506 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 20 Jul 2020 15:34:18 +0200 Subject: [PATCH 2/8] layerscape: fix indent Fix indent to be consistent with the rest of the file. Signed-off-by: Adrian Schmutzler --- target/linux/layerscape/image/armv8_64b.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index ea17e02c52..b190e0c041 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -37,8 +37,8 @@ define Device/ls1012afrdm append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | \ - check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata + append-rootfs | pad-rootfs | \ + check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb SUPPORTED_DEVICES := fsl,ls1012a-frdm From a2fee73e270305c4cb086055cc30e97f65e6f58b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 8 Jul 2020 14:54:11 +0200 Subject: [PATCH 3/8] bcm47xx: fix switch setup for Linksys WRT610N v2 WRT610N V2 is not detected by the initial network configuration script. The switch remains unconfigured and wlan/lan vlans are not created. This adds the correct setup for the device. Fixes: FS#1869 Suggested-by: Alessandro Radicati Signed-off-by: Adrian Schmutzler --- target/linux/bcm47xx/base-files/etc/board.d/01_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/bcm47xx/base-files/etc/board.d/01_network b/target/linux/bcm47xx/base-files/etc/board.d/01_network index 41a2077ea1..242055f2a4 100755 --- a/target/linux/bcm47xx/base-files/etc/board.d/01_network +++ b/target/linux/bcm47xx/base-files/etc/board.d/01_network @@ -171,6 +171,7 @@ configure_by_model() { "Asus RT-N16"* | \ "Linksys E3000 V1" | \ + "Linksys WRT610N V2" | \ "Netgear WNR3500 V2" | \ "Netgear WNR3500L") ucidef_add_switch "switch0" \ From eff0a0e39e48e4d1d40fc2262f1394d6d391a8c0 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 18 Jul 2020 13:14:28 +0200 Subject: [PATCH 4/8] apm821xx: derive DEVICE_DTS from device name The DEVICE_DTS variable always matches the device definition name, just with "_" replaced by "-". Thus, create a DEVICE_DTS definition in Device/Default and drop all the individual statements. If necessary in the future, local DEVICE_DTS will still overwrite that default. Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/image/Makefile | 1 + target/linux/apm821xx/image/nand.mk | 5 ----- target/linux/apm821xx/image/sata.mk | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 1b7c466a44..2331947e33 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -87,6 +87,7 @@ define Device/Default KERNEL_ENTRY := 0x00000000 KERNEL_LOADADDR := 0x00000000 DEVICE_DTS_DIR := ../dts + DEVICE_DTS = $(subst _,-,$(1)) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) endef diff --git a/target/linux/apm821xx/image/nand.mk b/target/linux/apm821xx/image/nand.mk index a7338e79a0..29a4be0189 100644 --- a/target/linux/apm821xx/image/nand.mk +++ b/target/linux/apm821xx/image/nand.mk @@ -29,7 +29,6 @@ define Device/meraki_mr24 DEVICE_MODEL := MR24 DEVICE_PACKAGES := kmod-spi-gpio -swconfig BOARD_NAME := mr24 - DEVICE_DTS := meraki-mr24 IMAGES := sysupgrade.bin DTB_SIZE := 64512 IMAGE_SIZE := 8191k @@ -47,7 +46,6 @@ define Device/meraki_mx60 DEVICE_PACKAGES := kmod-spi-gpio kmod-usb-ledtrig-usbport kmod-usb-dwc2 \ kmod-usb-storage block-mount BOARD_NAME := mx60 - DEVICE_DTS := meraki-mx60 BLOCKSIZE := 63k IMAGES := sysupgrade.bin DTB_SIZE := 64512 @@ -80,14 +78,12 @@ endef define Device/netgear_wndap620 $(Device/netgear_wndap6x0) DEVICE_MODEL := WNDAP620 (Premium Wireless-N) - DEVICE_DTS := netgear-wndap620 endef TARGET_DEVICES += netgear_wndap620 define Device/netgear_wndap660 $(Device/netgear_wndap6x0) DEVICE_MODEL := WNDAP660 (Dual Radio Dual Band Wireless-N) - DEVICE_DTS := netgear-wndap660 endef TARGET_DEVICES += netgear_wndap660 @@ -100,7 +96,6 @@ define Device/netgear_wndr4700 kmod-nls-utf8 kmod-usb3 kmod-usb-dwc2 kmod-usb-storage \ partx-utils BOARD_NAME := wndr4700 - DEVICE_DTS := netgear-wndr4700 PAGESIZE := 2048 SUBPAGESIZE := 512 BLOCKSIZE := 128k diff --git a/target/linux/apm821xx/image/sata.mk b/target/linux/apm821xx/image/sata.mk index 444b2441f0..6fe8324b93 100644 --- a/target/linux/apm821xx/image/sata.mk +++ b/target/linux/apm821xx/image/sata.mk @@ -7,7 +7,6 @@ define Device/wd_mybooklive DEVICE_VENDOR := Western Digital DEVICE_MODEL := My Book Live Series (Single + Duo) DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic - DEVICE_DTS := wd-mybooklive SUPPORTED_DEVICES += mbl wd,mybooklive-duo BLOCKSIZE := 1k DTB_SIZE := 16384 From 05c74e4000ecdd205d24315984ac300a59c8fea0 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 18 Jul 2020 14:14:01 +0200 Subject: [PATCH 5/8] omap: derive DEVICE_DTS from device name In most cases the DEVICE_DTS name can be derived easily from the node name, so let's do this to enforce harmonized names where possible. Signed-off-by: Adrian Schmutzler --- target/linux/omap/image/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 6a7b20199f..3700788804 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -35,6 +35,7 @@ define Device/Default PROFILES := Default KERNEL_NAME := zImage KERNEL := kernel-bin + DEVICE_DTS = $(lastword $(subst _, ,$(1))) IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) @@ -45,7 +46,6 @@ endef define Device/ti_am335x-evm DEVICE_VENDOR := Texas Instruments DEVICE_MODEL := AM335x EVM - DEVICE_DTS := am335x-evm endef TARGET_DEVICES += ti_am335x-evm @@ -61,7 +61,6 @@ TARGET_DEVICES += ti_am335x-bone-black define Device/ti_omap4-panda DEVICE_VENDOR := PandaBoard.org DEVICE_MODEL := OMAP4 TI pandaboard - DEVICE_DTS := omap4-panda DEVICE_PACKAGES := kmod-usb-net-smsc95xx endef @@ -70,7 +69,6 @@ TARGET_DEVICES += ti_omap4-panda define Device/ti_omap3-beagle DEVICE_VENDOR := BeagleBoard.org DEVICE_MODEL := OMAP3 TI beagleboard - DEVICE_DTS := omap3-beagle # beagleboard doesn't have a network interface, support most common usb net DEVICE_PACKAGES := kmod-usb-net \ kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-hso \ From 42dc5c2a3fb680c481200ce8da5a772af83428f6 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 8 Jul 2020 13:36:54 +0200 Subject: [PATCH 6/8] ramips: improve LED support for D-Link DIR-615 D series This patch adds a trigger for the WAN LED and enhances support for the WiFi LED by enabling activity indication. This is based on bug report feedback (see reference below). While at it, update the LED node names in DTS file. Fixes: FS#732 Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts | 8 ++++---- target/linux/ramips/rt305x/base-files/etc/board.d/01_leds | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts index fa415eb948..94372b2665 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts @@ -74,23 +74,23 @@ leds { compatible = "gpio-leds"; - status { + status_amber { label = "dir-615-d:amber:status"; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - led_status_green: status2 { + led_status_green: status_green { label = "dir-615-d:green:status"; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; - wan { + wan_amber { label = "dir-615-d:amber:wan"; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; - wan2 { + wan_green { label = "dir-615-d:green:wan"; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds index ae813e85d6..8260b09821 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds @@ -33,7 +33,6 @@ dlink,dir-300-b7|\ dlink,dir-320-b1|\ dlink,dir-600-b1|\ dlink,dir-610-a1|\ -dlink,dir-615-d|\ dlink,dir-615-h1|\ dlink,dir-620-a1|\ engenius,esr-9753|\ @@ -66,6 +65,10 @@ asiarf,awapn2403) dlink,dcs-930l-b1) ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps" ;; +dlink,dir-615-d) + ucidef_set_led_netdev "wan" "WAN (green)" "$boardname:green:wan" "eth0.2" + set_wifi_led "rt2800soc-phy0::radio" + ;; dlink,dir-620-d1|\ trendnet,tew-714tru) set_wifi_led "$boardname:green:wifi" From 5e86877f36b0d95127dcef8ed3abf78ecd78061d Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 8 Jul 2020 20:48:57 +0200 Subject: [PATCH 7/8] ath79: correctly define WiFi switch for TL-WR841ND v8 The TL-WR841ND v8 feature a WiFi switch instead of a button. This adds the corresponding input-type to prevent booting into failsafe regularly. This has been defined correctly in ar71xx, but was overlooked when migrating to ath79. In contrast, the TL-WR842ND v2, which has the key set up as switch in ar71xx, actually has a button. The TL-MR3420 v2 has a button as well and is set up correctly for both targets. (Information based on TP-Link user guide) Note: While looking into this, I found that support PR for TL-MR3420 v2 switched reset button to ACTIVE_HIGH. However, the other two device still use ACTIVE_LOW. This seems strange, but I cannot verify it lacking the affected devices. Fixes: FS#2733 Fixes: 9601d94138de ("add support for TP-Link TL-WR841N/ND v8") Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar9341_tplink.dtsi | 11 -------- .../ath79/dts/ar9341_tplink_tl-mr3420-v2.dts | 23 +++++++++++----- .../ath79/dts/ar9341_tplink_tl-wr841-v8.dts | 24 ++++++++++++----- .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts | 27 ++++++++++++------- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi index 6bd7c3409b..c96dbe1918 100644 --- a/target/linux/ath79/dts/ar9341_tplink.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink.dtsi @@ -15,17 +15,6 @@ label-mac-device = &wmac; }; - keys: keys { - compatible = "gpio-keys"; - - rfkill { - label = "WiFi"; - linux,code = ; - gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - debounce-interval = <60>; - }; - }; - leds: leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts index f864381520..e6cf6ef863 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts @@ -6,14 +6,23 @@ / { model = "TP-Link TL-MR3420 v2"; compatible = "tplink,tl-mr3420-v2", "qca,ar9341"; -}; -&keys { - reset { - label = "Reset"; - linux,code = ; - gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - debounce-interval = <60>; + keys { + compatible = "gpio-keys"; + + rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + reset { + label = "Reset/WPS"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; }; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts index 3577e4994f..95a047c6d4 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts @@ -6,14 +6,24 @@ / { model = "TP-Link TL-WR841N/ND v8"; compatible = "tplink,tl-wr841-v8", "qca,ar9341"; -}; -&keys { - reset { - label = "Reset"; - linux,code = ; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; + keys { + compatible = "gpio-keys"; + + rfkill { + label = "WiFi"; + linux,code = ; + linux,input-type = ; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; }; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index d9b0ee86f5..4df0feae98 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -7,6 +7,24 @@ model = "TP-Link TL-WR842N/ND v2"; compatible = "tplink,tl-wr842n-v2", "qca,ar9341"; + keys { + compatible = "gpio-keys"; + + rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + + reset { + label = "Reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + gpio-export { compatible = "gpio-export"; @@ -18,15 +36,6 @@ }; }; -&keys { - reset { - label = "Reset"; - linux,code = ; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; -}; - &leds { usb { label = "tp-link:green:usb"; From f206461153990119066ed08d19414078ac35bbf0 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 21 Jul 2020 22:41:04 +0200 Subject: [PATCH 8/8] glibc: fix memcpy and memmove for negative length [BZ #25620] 6f3459f985 Add NEWS entry for CVE-2020-6096 (bug 25620) 64246fccaf arm: CVE-2020-6096: Fix multiarch memcpy for negative length [BZ #25620] 9bbd2b6172 arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620] Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index e3f2ea60cf..1a084d0862 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -11,8 +11,8 @@ PKG_VERSION:=2.31 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=4e8a33a9590edc5c3a2cc5e726a3f2a73b66cdc0 -PKG_MIRROR_HASH:=41f678661dd1ee644dfae9734e27b47877ed7dee87c27eaddd9055394d36fe6a +PKG_SOURCE_VERSION:=6f3459f9859a7b506c64fa1823769ab631072c6e +PKG_MIRROR_HASH:=01ed0c8131bdc32c9abd3aaaebc4fcffb2d496c2b8c363a0e845ac09d874a2ff PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz