Merge Official Source

This commit is contained in:
Tianling Shen 2020-12-22 18:15:45 +08:00
commit 054c823a9e
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
18 changed files with 320 additions and 42 deletions

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mt76
PKG_RELEASE=2
PKG_RELEASE=3
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=

View File

@ -0,0 +1,25 @@
From fe89f9bc4055fd6055ce8792a715a40a6c75ba44 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
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 <hauke@hauke-m.de>
---
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;

View File

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

View File

@ -0,0 +1,185 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "AirTight Networks C-75";
compatible = "airtight,c-75", "qca,qca9550", "qca,qca9558";
aliases {
label-mac-device = &eth0;
led-boot = &led_power;
led-failsafe = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
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";
};
};
};
};
&eth0 {
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 */
>;
};
};
&eth1 {
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>;
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -263,9 +263,6 @@
status = "okay";
lantiq,shadow = <0xffff>;
lantiq,groups = <0x3>;
lantiq,dsl = <0x0>;
lantiq,phy1 = <0x0>;
lantiq,phy2 = <0x0>;
/* lantiq,rising; */
};

View File

@ -262,7 +262,6 @@
status = "okay";
lantiq,shadow = <0xffff>;
lantiq,groups = <0x7>;
lantiq,dsl = <0x3>;
lantiq,phy1 = <0x7>;
lantiq,phy2 = <0x7>;

View File

@ -232,12 +232,6 @@
&stp {
status = "okay";
lantiq,shadow = <0xffffff>;
lantiq,groups = <0x7>;
lantiq,dsl = <0x0>;
lantiq,phy1 = <0x0>;
lantiq,phy2 = <0x0>;
};
&usb_phy0 {

View File

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

View File

@ -0,0 +1,65 @@
From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001
From: Tomasz Maciej Nowak <tmn505@gmail.com>
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 <alexandra@alth.de>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
.../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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
+ 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";
+ };
+};

View File

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