mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
Merge Official Source
This commit is contained in:
commit
4d34283cf9
@ -30,6 +30,14 @@ define Download/BPI-R2-preloader-2k.img.gz
|
||||
endef
|
||||
$(eval $(call Download,BPI-R2-preloader-2k.img.gz))
|
||||
|
||||
define Download/BPI-R64-preloader-2k.img.gz
|
||||
FILE:=$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz
|
||||
URL:=$(BPI_PRELOADER_URL)
|
||||
URL_FILE:=BPI-R64-preloader-2k.img.gz
|
||||
HASH:=1a4b55da1717190aa4e790ce93850605e9b15aae4c3248bcf8734aac020ab0e4
|
||||
endef
|
||||
$(eval $(call Download,BPI-R64-preloader-2k.img.gz))
|
||||
|
||||
|
||||
define Package/mt7623n-preloader
|
||||
SECTION:=boot
|
||||
@ -43,10 +51,23 @@ define Package/mt7623n-preloader/description
|
||||
Preloader image for mt7623n based boards like Banana Pi R2.
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_mediatek_mt7622
|
||||
TITLE:=mt7622-preloader
|
||||
DEFAULT:=y if TARGET_mediatek
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader/description
|
||||
Preloader image for mt7622 based boards like Banana Pi R64.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz $(PKG_BUILD_DIR)/mt7622_bpir64-preloader.bin.gz
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@ -59,3 +80,4 @@ define Build/InstallDev
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mt7623n-preloader))
|
||||
$(eval $(call BuildPackage,mt7622-preloader))
|
||||
|
@ -82,9 +82,9 @@ detect_mac80211() {
|
||||
|
||||
iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
|
||||
|
||||
iw phy "$dev" info | grep -q '5180 MHz' && {
|
||||
iw phy "$dev" info | grep -q '\* 5... MHz \[' && {
|
||||
mode_band="a"
|
||||
channel="36"
|
||||
channel=$(iw phy "$dev" info | grep '\* 5... MHz \[' | grep '(disabled)' -v -m 1 | sed 's/[^[]*\[\|\].*//g')
|
||||
iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80"
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zram-swap
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/zram-swap
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+kmod-zram +!(BUSYBOX_CONFIG_MKSWAP&&BUSYBOX_CONFIG_SWAPON&&BUSYBOX_CONFIG_SWAPOFF):swap-utils
|
||||
DEPENDS:=+kmod-zram +@BUSYBOX_CONFIG_MKSWAP +@BUSYBOX_CONFIG_SWAPON +@BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD +@BUSYBOX_CONFIG_FEATURE_SWAPON_PRI +@BUSYBOX_CONFIG_SWAPOFF
|
||||
TITLE:=ZRAM swap scripts
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
@ -35,18 +35,18 @@ zram_applicable()
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v mkswap >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'mkswap' not installed"
|
||||
[ -x /sbin/mkswap ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox mkswap' not installed"
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v swapon >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'swapon' not installed"
|
||||
[ -x /sbin/swapon ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapon' not installed"
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v swapoff >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'swapoff' not installed"
|
||||
[ -x /sbin/swapoff ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapoff' not installed"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
@ -182,8 +182,8 @@ start()
|
||||
zram_comp_algo "$zram_dev"
|
||||
zram_comp_streams "$zram_dev"
|
||||
echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize"
|
||||
mkswap "$zram_dev"
|
||||
swapon -d $zram_priority "$zram_dev"
|
||||
/sbin/mkswap "$zram_dev"
|
||||
/sbin/swapon -d $zram_priority "$zram_dev"
|
||||
}
|
||||
|
||||
stop()
|
||||
@ -192,7 +192,7 @@ stop()
|
||||
|
||||
for zram_dev in $( grep zram /proc/swaps |awk '{print $1}' ); do {
|
||||
logger -s -t zram_stop -p daemon.debug "deactivate swap $zram_dev"
|
||||
swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back"
|
||||
/sbin/swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back"
|
||||
local dev_index="$( echo $zram_dev | grep -o "[0-9]*$" )"
|
||||
if [ $dev_index -ne 0 ]; then
|
||||
logger -s -t zram_stop -p daemon.debug "removing zram $zram_dev"
|
||||
|
@ -14,7 +14,7 @@ case "$FIRMWARE" in
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e)
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
ath10kcal_extract "0:ART" 4096 12064
|
||||
caldata_extract "0:ART" 0x1000 0x2f20
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
@ -83,7 +83,7 @@ case "$FIRMWARE" in
|
||||
"ath10k/pre-cal-pci-0002:01:00.0.bin")
|
||||
case $board in
|
||||
edgecore,ecw5410)
|
||||
ath10kcal_extract "0:ART" 20480 12064
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -8,10 +8,6 @@
|
||||
compatible = "edgecore,ecw5410", "qcom,ipq8064";
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
nss@40000000 {
|
||||
reg = <0x40000000 0x1000000>;
|
||||
no-map;
|
||||
@ -26,11 +22,6 @@
|
||||
reg = <0x44000000 0x600000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
rsvd@41200000 {
|
||||
reg = <0x41200000 0x300000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
cpus {
|
||||
@ -42,21 +33,19 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &gsbi4_serial;
|
||||
serial1 = &gsbi1_serial;
|
||||
mdio-gpio0 = &mdio0;
|
||||
ethernet0 = &gmac3;
|
||||
ethernet1 = &gmac2;
|
||||
|
||||
led-boot = &power_green;
|
||||
led-failsafe = &power_red;
|
||||
led-running = &power_green;
|
||||
led-upgrade = &power_green;
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-append = " console=ttyMSM0,115200n8 root=/dev/ubiblock0_1";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
keys {
|
||||
@ -76,7 +65,7 @@
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
power_green: power_green {
|
||||
led_power_green: power_green {
|
||||
label = "ecw5410:green:power";
|
||||
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@ -96,7 +85,7 @@
|
||||
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
power_red: power_red {
|
||||
led_power_red: power_red {
|
||||
label = "ecw5410:red:power";
|
||||
gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@ -133,40 +122,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
nand_pins: nand_pins {
|
||||
disable {
|
||||
pins = "gpio34", "gpio35", "gpio36", "gpio37",
|
||||
"gpio38";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pullups {
|
||||
pins = "gpio39";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
hold {
|
||||
pins = "gpio40", "gpio41", "gpio42", "gpio43",
|
||||
"gpio44", "gpio45", "gpio46", "gpio47";
|
||||
function = "nand";
|
||||
drive-strength = <10>;
|
||||
bias-bus-hold;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0_pins: mdio0_pins {
|
||||
mux {
|
||||
pins = "gpio0", "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
pins = "gpio16", "gpio23", "gpio24", "gpio26",
|
||||
@ -208,22 +163,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi4 {
|
||||
qcom,mode = <GSBI_PROT_I2C_UART>;
|
||||
status = "okay";
|
||||
|
||||
serial@16340000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/*
|
||||
* The i2c device on gsbi4 should not be enabled.
|
||||
* On ipq806x designs gsbi4 i2c is meant for exclusive
|
||||
* RPM usage. Turning this on in kernel manifests as
|
||||
* i2c failure for the RPM.
|
||||
*/
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
status = "okay";
|
||||
|
@ -109,6 +109,19 @@ define Device/compex_wpq864
|
||||
endef
|
||||
TARGET_DEVICES += compex_wpq864
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := ECW5410
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea7500-v1
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
@ -126,18 +139,6 @@ define Device/linksys_ea7500-v1
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea7500-v1
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_TITLE := Edgecore ECW5410
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS := qcom-ipq8068-ecw5410
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea8500
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright © 2019 Alexey Loukianov <lx2@lexa2.ru>
|
||||
# Copyright © 2020 David Woodhouse <dwmw2@infradead.org>
|
||||
|
@ -0,0 +1,27 @@
|
||||
From: Frank Wunderlich <frank-w@public-files.de>
|
||||
Date: Mon, 7 Sep 2020 09:05:17 +0200
|
||||
|
||||
port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option
|
||||
which causes rx drops on running iperf.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board")
|
||||
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
|
||||
---
|
||||
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
|
||||
index 2b760f90f38c..5375c6699843 100644
|
||||
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
|
||||
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
|
||||
@@ -192,6 +192,7 @@ port@6 {
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
+ pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
--
|
||||
2.25.1
|
Loading…
x
Reference in New Issue
Block a user