From 5c1f6853afeabd6507ca87d341deb7eeba9a8838 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Tue, 8 Dec 2020 18:41:42 +0100 Subject: [PATCH 01/12] lantiq: xrx200: remove redundant stp parameters These parameters are the same as in vr9.dtsi. This patch removes redundant parameters. Signed-off-by: Aleksander Jan Bajkowski --- .../arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi | 3 --- .../arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi | 1 - .../arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi | 6 ------ 3 files changed, 10 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi index 0a8fa19e6e..08d9148faf 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi @@ -263,9 +263,6 @@ status = "okay"; lantiq,shadow = <0xffff>; lantiq,groups = <0x3>; - lantiq,dsl = <0x0>; - lantiq,phy1 = <0x0>; - lantiq,phy2 = <0x0>; /* lantiq,rising; */ }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index 7eac5c396c..f5b0b4f2a1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -262,7 +262,6 @@ status = "okay"; lantiq,shadow = <0xffff>; - lantiq,groups = <0x7>; lantiq,dsl = <0x3>; lantiq,phy1 = <0x7>; lantiq,phy2 = <0x7>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi index 230d804d9a..ee951dc3be 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi @@ -232,12 +232,6 @@ &stp { status = "okay"; - - lantiq,shadow = <0xffffff>; - lantiq,groups = <0x7>; - lantiq,dsl = <0x0>; - lantiq,phy1 = <0x0>; - lantiq,phy2 = <0x0>; }; &usb_phy0 { From debbc0a8a8ed1441ffe5524316e4cda28e742320 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Sat, 19 Dec 2020 17:43:24 +0100 Subject: [PATCH 02/12] ipq40xx: use upper case for NETGEAR in DEVICE_VENDOR Adjust spelling of vendor name to what is used in other places. Also move definition in shared section. Signed-off-by: Moritz Warning [improve commit title/message] Signed-off-by: Adrian Schmutzler --- target/linux/ipq40xx/image/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index d4188f5282..b3f2d1f755 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -594,6 +594,7 @@ TARGET_DEVICES += mobipromo_cm520-79f define Device/netgear_ex61x0v2 $(call Device/DniImage) + DEVICE_VENDOR := NETGEAR DEVICE_DTS_CONFIG := config@4 NETGEAR_BOARD_ID := EX6150v2series NETGEAR_HW_ID := 29765285+16+0+128+2x2 @@ -603,7 +604,6 @@ endef define Device/netgear_ex6100v2 $(call Device/netgear_ex61x0v2) - DEVICE_VENDOR := Netgear DEVICE_MODEL := EX6100 DEVICE_VARIANT := v2 endef @@ -611,7 +611,6 @@ TARGET_DEVICES += netgear_ex6100v2 define Device/netgear_ex6150v2 $(call Device/netgear_ex61x0v2) - DEVICE_VENDOR := Netgear DEVICE_MODEL := EX6150 DEVICE_VARIANT := v2 endef From d69ec61f7d51f4fb671345043bc6d8e4fe916815 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Sat, 19 Dec 2020 17:43:52 +0100 Subject: [PATCH 03/12] bcm53xx: use correct case for TP-Link in DEVICE_VENDOR Adjust spelling of vendor names to what is used in other places. Signed-off-by: Moritz Warning [improve commit title/message] Signed-off-by: Adrian Schmutzler --- target/linux/bcm53xx/image/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 4918dfb107..00141118a1 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -433,7 +433,7 @@ endef TARGET_DEVICES += tenda_ac9 define Device/tplink_archer-c5-v2 - DEVICE_VENDOR := TP-LINK + DEVICE_VENDOR := TP-Link DEVICE_MODEL := Archer C5 DEVICE_VARIANT := v2 DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) @@ -445,7 +445,7 @@ endef TARGET_DEVICES += tplink_archer-c5-v2 define Device/tplink_archer-c9-v1 - DEVICE_VENDOR := TP-LINK + DEVICE_VENDOR := TP-Link DEVICE_MODEL := Archer C9 DEVICE_VARIANT := v1 DEVICE_PACKAGES := $(USB3_PACKAGES) From 0d96d36841e817f368e86d4af725570d757cb0ca Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Thu, 17 Dec 2020 17:24:26 +0100 Subject: [PATCH 04/12] ath79: add support for AirTight C-75 AirTight Networks (later renamed to Mojo Networks) C-75 is a dual-band access point, also sold by WatchGuard under name AP320. Specification SoC: Qualcomm Atheros QCA9550 RAM: 128 MiB DDR2 Flash: 2x 16 MiB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9890 oversized Mini PCIe card Ethernet: 2x 10/100/1000 Mbps QCA8334 port labeled LAN1 is PoE capable (802.3at) USB: 1x 2.0 LEDs: 7x which two are GPIO controlled, four switch controlled, one controlled by wireless driver Buttons: 1x GPIO controlled Serial: RJ-45 port, Cisco pinout baud: 115200, parity: none, flow control: none JTAG: Yes, pins marked J1 on PCB Installation 1. Prepare TFTP server with OpenWrt initramfs-kernel image. 2. Connect to one of LAN ports. 3. Connect to serial port. 4. Power on the device and when prompted to stop autoboot, hit any key. 5. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use 'setenv' to do that, then run following commands: tftpboot 0x81000000 bootm 0x81000000 6. Wait about 1 minute for OpenWrt to boot. 7. Transfer OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade -n /tmp/ 8. After flashing, the access point will reboot to OpenWrt. Wait few minutes, until the Power LED stops blinking, then it's ready for configuration. Known issues Green power LED does not work. Additional information The U-Boot fails to initialise ethernet ports correctly when a UART adapter is attached to UART pins (marked J3 on PCB). Cc: Vladimir Georgievsky Signed-off-by: Tomasz Maciej Nowak --- .../linux/ath79/dts/qca9550_airtight_c-75.dts | 169 ++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 4 + target/linux/ath79/image/generic.mk | 13 ++ 3 files changed, 186 insertions(+) create mode 100644 target/linux/ath79/dts/qca9550_airtight_c-75.dts diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts new file mode 100644 index 0000000000..566aa6aef6 --- /dev/null +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include + +/ { + model = "AirTight Networks C-75"; + compatible = "airtight,c-75", "qca,qca9550", "qca,qca9558"; + + aliases { + label-mac-device = ð0; + led-boot = &led_power; + led-failsafe = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "amber:power"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + phy-handle = <&phy0>; + pll-data = <0xa6000000 0x00000101 0x00001616>; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x04 0x07600000 /* PORT0 PAD MODE CTRL */ + 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */ + 0x58 0xc935c935 /* LED2 CTRL */ + 0x5c 0x03ffff00 /* LED3 CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6_STATUS */ + >; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x6>; + pll-data = <0x03000101 0x00000101 0x00001616>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&pcie0 { + status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0000 0 0 0 0>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + label = "wlandrv"; + reg = <0x050000 0x010000>; + read-only; + }; + + partition@60000 { + label = "firmware"; + reg = <0x060000 0xf90000>; + compatible = "denx,uimage"; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; + + flash@1 { + compatible = "jedec,spi-nor"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "opt"; + reg = <0x0 0x1000000>; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; 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 905848a2ba..866d74fae4 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 @@ -81,6 +81,10 @@ ath79_setup_interfaces() winchannel,wb2000) ucidef_set_interface_lan "eth0" ;; + airtight,c-75) + ucidef_add_switch "switch0" \ + "0@eth0" "2:wan" "3:lan" "6@eth1" + ;; alfa-network,ap121fe) ucidef_set_interface_lan "eth0 usb0" ;; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index b3fca9eb8f..baaea00c30 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -237,6 +237,19 @@ define Device/adtran_bsap1840 endef TARGET_DEVICES += adtran_bsap1840 +define Device/airtight_c-75 + SOC := qca9550 + DEVICE_VENDOR := AirTight Networks + DEVICE_MODEL := C-75 + DEVICE_ALT0_VENDOR := Mojo Networks + DEVICE_ALT0_MODEL := C-75 + DEVICE_ALT1_VENDOR := WatchGuard + DEVICE_ALT1_MODEL := AP320 + DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct kmod-usb2 + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += airtight_c-75 + define Device/alfa-network_ap121f SOC := ar9331 DEVICE_VENDOR := ALFA Network From 13581a5fa7ed09aa04393d496f44d0bf068e3024 Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Thu, 17 Dec 2020 17:24:27 +0100 Subject: [PATCH 05/12] ath79: airtight c-75: use second flash chip The flash capacity is divided in two flash chips and currently only first is used. Increase available space for OpenWrt by additional 16 MiB using mtd-concat driver. Because U-Boot might not be able to load kernel image spanned through two flash chips, the size of kernel is limited to space available on first first chip. Cc: Vladimir Georgievsky Signed-off-by: Tomasz Maciej Nowak --- .../linux/ath79/dts/qca9550_airtight_c-75.dts | 26 +++++++++++++++---- target/linux/ath79/image/generic.mk | 3 ++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts index 566aa6aef6..1bdbc86156 100644 --- a/target/linux/ath79/dts/qca9550_airtight_c-75.dts +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -41,6 +41,23 @@ linux,default-trigger = "phy1tpt"; }; }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&concat0 &concat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x1f90000>; + compatible = "denx,uimage"; + }; + }; + }; }; ð0 { @@ -118,10 +135,9 @@ read-only; }; - partition@60000 { - label = "firmware"; + concat0: partition@60000 { + label = "reserved1"; reg = <0x060000 0xf90000>; - compatible = "denx,uimage"; }; art: partition@ff0000 { @@ -142,8 +158,8 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { - label = "opt"; + concat1: partition@0 { + label = "reserved2"; reg = <0x0 0x1000000>; }; }; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index baaea00c30..4d181245a6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -246,7 +246,8 @@ define Device/airtight_c-75 DEVICE_ALT1_VENDOR := WatchGuard DEVICE_ALT1_MODEL := AP320 DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct kmod-usb2 - IMAGE_SIZE := 15936k + IMAGE_SIZE := 32320k + KERNEL_SIZE := 15936k endef TARGET_DEVICES += airtight_c-75 From aa08f43cab880d1683d0ad2c970ce91f3405afc7 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 17 Dec 2020 12:51:26 +0100 Subject: [PATCH 06/12] toolchain: Deactivate sanitizer on MIPS and ARC MIPS 32 bit support for sanitizer was added with GCC 9, MIPS 64 bit and ARC are still not supported in GCC 10. Deactivate them for now and change this when we change the default compiler to GCC 9 or later. Signed-off-by: Hauke Mehrtens --- package/libs/toolchain/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index 9851a5f1cd..6853d95997 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -115,7 +115,7 @@ define Package/libasan $(call Package/gcc/Default) NAME:=libasan TITLE:=Runtime library for AddressSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc ABI_VERSION:=5 endef @@ -144,7 +144,7 @@ define Package/libtsan $(call Package/gcc/Default) NAME:=libtsan TITLE:=Runtime library for ThreadSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc ABI_VERSION:=0 endef @@ -173,7 +173,7 @@ define Package/liblsan $(call Package/gcc/Default) NAME:=liblsan TITLE:=Runtime library for LeakSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc ABI_VERSION:=0 endef @@ -202,7 +202,7 @@ define Package/libubsan $(call Package/gcc/Default) NAME:=libubsan TITLE:=Runtime library for UndefinedBehaviorSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc ABI_VERSION:=1 endef From 736eee5cc6d9e96f5fae26bd6fcbfdc3d7968166 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 17 Dec 2020 13:58:01 +0100 Subject: [PATCH 07/12] mt76: Fix compile against glibc The mt76 test tools did not compile against glibc. Signed-off-by: Hauke Mehrtens --- package/kernel/mt76/Makefile | 2 +- ...et-mode-for-new-file-tmp-mt76-test-s.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index fd39d7a561..8e971f2ada 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mt76 -PKG_RELEASE=2 +PKG_RELEASE=3 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= diff --git a/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch b/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch new file mode 100644 index 0000000000..71b43a1cb6 --- /dev/null +++ b/package/kernel/mt76/patches/100-tools-Set-mode-for-new-file-tmp-mt76-test-s.patch @@ -0,0 +1,25 @@ +From fe89f9bc4055fd6055ce8792a715a40a6c75ba44 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 17 Dec 2020 13:54:04 +0100 +Subject: [PATCH] tools: Set mode for new file /tmp/mt76-test-%s + +Set the file system mode for the newly created file /tmp/mt76-test-%s, +this is mandatory according to the man page and fixes a compile error +with glibc. + +Signed-off-by: Hauke Mehrtens +--- + tools/eeprom.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/eeprom.c ++++ b/tools/eeprom.c +@@ -77,7 +77,7 @@ mt76_eeprom_create_file(void) + return -1; + } + +- fd = open(eeprom_file, O_RDWR | O_CREAT | O_EXCL); ++ fd = open(eeprom_file, O_RDWR | O_CREAT | O_EXCL, 00644); + if (fd < 0) + goto out; + From 85caf21ade2907cfd40c28783192ff31c16a74dc Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Fri, 18 Dec 2020 15:46:21 +0100 Subject: [PATCH 08/12] mvebu: macchiatobin-singleshot: enable heartbeat LED With board revision 1.3, SolidRun moved the power LED to the middle of the board. In old place of power LED a GPIO controllable heartbeat LED was added. This commit touches only Single Shot variant, because all have revision 1.3. Some boards could be placed in an enclosure, therefore the LED18 is enabled by default, since that'll be the only visible indicator that the board is operating. Ref: http://wiki.macchiatobin.net/tiki-index.php?page=Schematics#Revision1.3_Electrical_Design_Changes Ref: http://macchiatobin.net/wp-content/uploads/2017/11/MACCHIATOBin-rev-1_3.pdf Reported-by: Alexandra Alth Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/cortexa72.mk | 2 +- ...s-mcbin-singleshot-add-heartbeat-LED.patch | 65 +++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk index 1440c07a0b..8bd4581766 100644 --- a/target/linux/mvebu/image/cortexa72.mk +++ b/target/linux/mvebu/image/cortexa72.mk @@ -38,7 +38,7 @@ define Device/marvell_macchiatobin-singleshot DEVICE_ALT0_VENDOR := SolidRun DEVICE_ALT0_MODEL := Armada 8040 Community Board DEVICE_ALT0_VARIANT := Single Shot - DEVICE_PACKAGES += kmod-i2c-mux-pca954x + DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-ledtrig-heartbeat DEVICE_DTS := armada-8040-mcbin-singleshot SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot endef diff --git a/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch b/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch new file mode 100644 index 0000000000..c3abae60a6 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch @@ -0,0 +1,65 @@ +From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Tue, 10 Nov 2020 16:38:31 +0100 +Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED + +With board revision 1.3, SolidRun moved the power LED to the middle of +the board. In old place of power LED a GPIO controllable heartbeat LED +was added. This commit only touches Single Shot variant, since only this +variant is all revision 1.3. + +Note: +This is slightly modified patch. Some boards could be placed in an +enclosure, so the LED18 is enabled by default, since that'll be the only +visible indicator that the board is operating. + +Reported-by: Alexandra Alth +Signed-off-by: Tomasz Maciej Nowak +Signed-off-by: Gregory CLEMENT +--- + .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts ++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts +@@ -5,6 +5,8 @@ + * Device Tree file for MACCHIATOBin Armada 8040 community board platform + */ + ++#include ++ + #include "armada-8040-mcbin.dtsi" + + / { +@@ -12,6 +14,20 @@ + compatible = "marvell,armada8040-mcbin-singleshot", + "marvell,armada8040-mcbin", "marvell,armada8040", + "marvell,armada-ap806-quad", "marvell,armada-ap806"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-0 = <&cp0_led18_pins>; ++ pinctrl-names = "default"; ++ ++ led18 { ++ gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>; ++ function = LED_FUNCTION_HEARTBEAT; ++ color = ; ++ linux,default-trigger = "heartbeat"; ++ default-state = "on"; ++ }; ++ }; + }; + + &cp0_eth0 { +@@ -27,3 +43,10 @@ + managed = "in-band-status"; + sfp = <&sfp_eth1>; + }; ++ ++&cp0_pinctrl { ++ cp0_led18_pins: led18-pins { ++ marvell,pins = "mpp33"; ++ marvell,function = "gpio"; ++ }; ++}; From 0cf3c5dd7257dff1c87b61c5e53e5b1787ab7015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 14 Dec 2020 08:46:36 +0100 Subject: [PATCH 09/12] uhttpd: don't redirect to HTTPS by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So we can ship px5g-wolfssl by default in the release image, but still make the HTTPS for LuCI optional. This small change with addition of `CONFIG_PACKAGE_px5g-wolfssl=y` into the buildbot's seed config for the next release should provide optional HTTPS in the next release. Disabling the current default automatic uhttpd's redirect to HTTPS should make the HTTPS optional. That's it, user would either need to switch to HTTPS by manually switching to https:// protocol in the URL or by issuing the following commands to make the HTTPS automatic redirect permanent: $ uci set uhttpd.main.redirect_https=1 $ uci commit uhttpd $ service uhttpd reload Signed-off-by: Petr Štetiar --- package/network/services/uhttpd/files/uhttpd.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config index aeded08afc..40ce67fd01 100644 --- a/package/network/services/uhttpd/files/uhttpd.config +++ b/package/network/services/uhttpd/files/uhttpd.config @@ -10,7 +10,7 @@ config uhttpd main list listen_https [::]:443 # Redirect HTTP requests to HTTPS if possible - option redirect_https 1 + option redirect_https 0 # Server document root option home /www From 7a181a65f2e5d19e379cebbb980aa2f2985709e2 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 20 Dec 2020 18:02:54 +0100 Subject: [PATCH 10/12] treewide: fix initramfs detection Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to now use tmpfs, it causes $(rootfs_type) to now return tmpfs when running initramfs image instead of being empty. This broke initramfs detection which is required so that when installing on MikroTik devices firmware partition would first get erased fully before writing. So, lets test for $(rootfs_type) returning "tmpfs" instead. Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail) Signed-off-by: Robert Marko --- target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh | 2 +- target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh index 5ee5492369..97d388168f 100644 --- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh @@ -39,7 +39,7 @@ platform_do_upgrade() { ;; *) # NOR devices: erase firmware if booted from initramfs - [ -z "$(rootfs_type)" ] && mtd erase firmware + [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware default_do_upgrade "$1" ;; diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index c68b012d0b..99ed36e429 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -31,7 +31,7 @@ platform_do_upgrade() { mikrotik,routerboard-760igs|\ mikrotik,routerboard-m11g|\ mikrotik,routerboard-m33g) - [ -z "$(rootfs_type)" ] && mtd erase firmware + [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware ;; asus,rt-ac65p|\ asus,rt-ac85p) From 20d847d1338f716fc9f143f633b6f79ba6017b5c Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 20 Dec 2020 18:02:53 +0100 Subject: [PATCH 11/12] base-files: upgrade: fix initramfs detection Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to now use tmpfs, it causes $(rootfs_type) to now return tmpfs when running initramfs image instead of being empty. This broke initramfs detection which prevents config files from being saved as it does not work from initramfs. So, lets test for $(rootfs_type) returning "tmpfs" instead. Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail) Signed-off-by: Robert Marko --- package/base-files/Makefile | 2 +- package/base-files/files/sbin/sysupgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index fbcb694592..fb1267ea5b 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:=240 +PKG_RELEASE:=241 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index ca2eb298dc..3300d8e1ea 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -216,7 +216,7 @@ include /lib/upgrade do_save_conffiles() { local conf_tar="$1" - [ -z "$(rootfs_type)" ] && { + [ "$(rootfs_type)" = "tmpfs" ] && { echo "Cannot save config while running from ramdisk." >&2 ask_bool 0 "Abort" && exit rm -f "$conf_tar" From d6cb50c7ba8447f018139401d0d3821069e5f389 Mon Sep 17 00:00:00 2001 From: Hirokazu MORIKAWA Date: Mon, 21 Dec 2020 13:49:40 +0900 Subject: [PATCH 12/12] include/cmake.mk: Fix the bug in ccache support Fix the bug in ccache support due to this change. https://github.com/openwrt/openwrt/commit/bfc433efd4a0c6875a92981d1bd2a5e3e60c61c6 The new cmake uses this for the wrapper. https://cmake.org/cmake/help/v3.19/prop_tgt/LANG_COMPILER_LAUNCHER.html Signed-off-by: Hirokazu MORIKAWA --- include/cmake.mk | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/include/cmake.mk b/include/cmake.mk index 0a20530a16..96c4d7df34 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -19,26 +19,22 @@ else endif ifeq ($(CONFIG_CCACHE),) + CMAKE_C_COMPILER_LAUNCHER:= + CMAKE_CXX_COMPILER_LAUNCHER:= CMAKE_C_COMPILER:=$(call cmake_tool,$(TARGET_CC)) CMAKE_CXX_COMPILER:=$(call cmake_tool,$(TARGET_CXX)) - CMAKE_C_COMPILER_ARG1:= - CMAKE_CXX_COMPILER_ARG1:= CMAKE_HOST_C_COMPILER:=$(HOSTCC) CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX) - CMAKE_HOST_C_COMPILER_ARG1:= - CMAKE_HOST_CXX_COMPILER_ARG1:= else CCACHE:=$(STAGING_DIR_HOST)/bin/ccache - CMAKE_C_COMPILER:=$(CCACHE) - CMAKE_C_COMPILER_ARG1:=$(TARGET_CC_NOCACHE) - CMAKE_CXX_COMPILER:=$(CCACHE) - CMAKE_CXX_COMPILER_ARG1:=$(TARGET_CXX_NOCACHE) + CMAKE_C_COMPILER_LAUNCHER:=$(CCACHE) + CMAKE_CXX_COMPILER_LAUNCHER:=$(CCACHE) + CMAKE_C_COMPILER:=$(TARGET_CC_NOCACHE) + CMAKE_CXX_COMPILER:=$(TARGET_CXX_NOCACHE) - CMAKE_HOST_C_COMPILER:=$(CCACHE) - CMAKE_HOST_C_COMPILER_ARG1:=$(HOSTCC_NOCACHE) - CMAKE_HOST_CXX_COMPILER:=$(CCACHE) - CMAKE_HOST_CXX_COMPILER_ARG1:=$(HOSTCXX_NOCACHE) + CMAKE_HOST_C_COMPILER:=$(HOSTCC_NOCACHE) + CMAKE_HOST_CXX_COMPILER:=$(HOSTCXX_NOCACHE) endif CMAKE_AR:=$(call cmake_tool,$(TARGET_AR)) CMAKE_NM:=$(call cmake_tool,$(TARGET_NM)) @@ -61,12 +57,12 @@ define Build/Configure/Default -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ + -DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ -DCMAKE_C_COMPILER="$(CMAKE_C_COMPILER)" \ - -DCMAKE_C_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="$(CMAKE_CXX_COMPILER_LAUNCHER)" \ -DCMAKE_CXX_COMPILER="$(CMAKE_CXX_COMPILER)" \ - -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CXX_COMPILER_ARG1)" \ + -DCMAKE_ASM_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ -DCMAKE_ASM_COMPILER="$(CMAKE_C_COMPILER)" \ - -DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_C_COMPILER_ARG1)" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS) $(CMAKE_SHARED_LDFLAGS)" \ @@ -107,12 +103,12 @@ define Host/Configure/Default LDFLAGS="$(HOST_LDFLAGS)" \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ -DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \ - -DCMAKE_C_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="$(CMAKE_CXX_COMPILER_LAUNCHER)" \ -DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \ - -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_HOST_CXX_COMPILER_ARG1)" \ + -DCMAKE_ASM_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ -DCMAKE_ASM_COMPILER="$(CMAKE_HOST_C_COMPILER)" \ - -DCMAKE_ASM_COMPILER_ARG1="$(CMAKE_HOST_C_COMPILER_ARG1)" \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \