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)" \ 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" 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; + 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 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..1bdbc86156 --- /dev/null +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -0,0 +1,185 @@ +// 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"; + }; + }; + + 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 { + 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; + }; + + concat0: partition@60000 { + label = "reserved1"; + reg = <0x060000 0xf90000>; + }; + + 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>; + + concat1: partition@0 { + label = "reserved2"; + 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 70e16bd053..8aff8bdbfe 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 643456ad45..9b8c16e2e3 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -264,6 +264,20 @@ 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 := 32320k + KERNEL_SIZE := 15936k +endef +TARGET_DEVICES += airtight_c-75 + define Device/alfa-network_ap121f SOC := ar9331 DEVICE_VENDOR := ALFA Network 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/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index fba6562f63..5773f1bf6c 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) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index f403706f5d..0fdbda8e53 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 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 { 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"; ++ }; ++}; 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)