Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  ipq60xx: add UBI FIT image for Linksys MR7350
  ipq60xx: add linksys MR7350 sysupgrade support
  kernel: bump 5.4 to 5.4.222
  uboot-envtools: add Xiaomi Redmi Router AX6000 support
  kernel: add support for rtl88x2bu driver
  ipq807x: add MPILIB for kernel 5.15
  ipq807x: add CONFIG_CRYPTO for kernel 5.15
  ipq807x: fix kernel 5.15 support for mf269 (coolsnowwolf#10354)
  • Loading branch information
zesming committed Nov 3, 2022
2 parents 85bd6dd + 44d0189 commit 169c0ee
Show file tree
Hide file tree
Showing 9 changed files with 269 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .221
LINUX_KERNEL_HASH-5.4.221 = 27b37fc1fed7b4dcddf5a0a3730fabf25197c0ba13ace684481aa5444649df0a
LINUX_VERSION-5.4 = .222
LINUX_KERNEL_HASH-5.4.222 = 351af7a7ee11544e605d9d97add1421576d69459762d9a704f243db7d1c0324b
6 changes: 5 additions & 1 deletion package/boot/uboot-envtools/files/mediatek_filogic
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ bananapi,bpi-r3)
;;
esac
;;
xiaomi,redmi-router-ax6000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
;;
esac

config_load ubootenv
config_foreach ubootenv_add_app_config ubootenv
config_foreach ubootenv_add_app_config

exit 0
53 changes: 53 additions & 0 deletions package/kernel/rtl88x2bu/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=rtl88x2bu
PKG_RELEASE=1

PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu-20210702.git
PKG_MIRROR_HASH:=d8bc277348cf97a1b645e2c1c07c9a0dcb9ce5796b7fd5bdce87d19b5f3e17bb
PKG_SOURCE_DATE:=2022-10-19
PKG_SOURCE_VERSION:=73a681a0db4a9ad132f85d567e225374c1e6a12b

PKG_BUILD_PARALLEL:=1

STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

define KernelPackage/rtl88x2bu
SUBMENU:=Wireless Drivers
TITLE:=Driver for Realtek 88x2bu devices
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
FILES:=\
$(PKG_BUILD_DIR)/88x2bu.ko
AUTOLOAD:=$(call AutoProbe,88x2bu)
PROVIDES:=kmod-rtl88x2bu
endef

NOSTDINC_FLAGS := \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211 \
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
-include backport/backport.h

NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
CONFIG_RTL8822BU=m \
modules
endef

$(eval $(call KernelPackage,rtl88x2bu))
15 changes: 15 additions & 0 deletions package/kernel/rtl88x2bu/patches/001-use-kernel-byteorder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets
included in addition for example indirectly, do not use realtek own copy
of the byteorder headers.

--- a/include/drv_types.h
+++ b/include/drv_types.h
@@ -30,7 +30,7 @@
#include <drv_conf.h>
#include <basic_types.h>
#include <osdep_service.h>
-#include <rtw_byteorder.h>
+#include <asm/byteorder.h>
#include <wlan_bssdef.h>
#include <wifi.h>
#include <ieee80211.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Fix wireless.h to use linux kernel header files
including uapi version of wireless.h

--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -18,16 +18,17 @@

/***************************** INCLUDES *****************************/

-#if 0
+#if 1
#include <linux/types.h> /* for __u* and __s* typedefs */
#include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */
+ #include <linux/wireless.h>
+ #include <uapi/linux/wireless.h>
#else
#define __user
/* typedef uint16_t __u16; */
#include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */
-#endif

/****************************** TYPES ******************************/
#ifdef CONFIG_COMPAT
@@ -84,4 +85,5 @@ struct iwreq {
union iwreq_data u;
};

+#endif
#endif /* _LINUX_WIRELESS_H */
81 changes: 81 additions & 0 deletions target/linux/ipq60xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,93 @@ REQUIRE_IMAGE_METADATA=1
RAMFS_COPY_BIN='fw_printenv fw_setenv'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'

linksys_get_boot_part() {
local cur_boot_part
local args

# Try to find rootfs from kernel arguments
read -r args < /proc/cmdline
for arg in $args; do
local ubi_mtd_arg=${arg#ubi.mtd=}
case "$ubi_mtd_arg" in
rootfs|alt_rootfs)
echo "$ubi_mtd_arg"
return
;;
esac
done

# Fallback to u-boot env (e.g. when running sysfs)
cur_boot_part="$(/usr/sbin/fw_printenv -n boot_part)"
case $cur_boot_part in
1)
echo rootfs
;;
2|*)
echo alt_rootfs
;;
esac
}

linksys_prepare_ubi() {
local oem_ubivol
local mtdnum
local ubidev

mtdnum=$(find_mtd_index "$CI_UBIPART")
if [ ! "$mtdnum" ]; then
return
fi

ubidev=$(nand_find_ubi "$CI_UBIPART")
if [ ! "$ubidev" ]; then
ubiattach --mtdn="$mtdnum"
ubidev=$(nand_find_ubi "$CI_UBIPART")
fi

if [ "$ubidev" ]; then
oem_ubivol=$(nand_find_volume "$ubidev" squashfs)
[ "$oem_ubivol" ] && ubirmvol "/dev/$ubidev" --name=squashfs
fi
}

linksys_do_upgrade() {
local current_boot_slot
local new_boot_part

current_boot_slot=$(linksys_get_boot_part)
case $current_boot_slot in
rootfs)
CI_UBIPART="alt_rootfs"
CI_KERNPART="alt_kernel"
new_boot_part=2
;;
alt_rootfs)
CI_UBIPART="rootfs"
CI_KERNPART="kernel"
new_boot_part=1
;;
esac
echo "Updating mtd=$CI_UBIPART, boot_part=$new_boot_part"

fw_setenv -s - <<-EOF
boot_part $new_boot_part
auto_recovery yes
EOF

linksys_prepare_ubi
nand_do_upgrade "$1"
}

platform_check_image() {
return 0;
}

platform_do_upgrade() {
case "$(board_name)" in
linksys,mr7350)
linksys_do_upgrade "$1"
;;
cmiot,ax18|\
zn,m2)
nand_do_upgrade "$1"
Expand Down
7 changes: 5 additions & 2 deletions target/linux/ipq60xx/image/generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ define Device/cmiot_ax18
endef
TARGET_DEVICES += cmiot_ax18

define Device/mr7350
define Device/linksys_mr7350
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := MR7350
BLOCKSIZE := 128k
PAGESIZE := 2048
SOC := ipq6018
DEVICE_PACKAGES := kmod-leds-pca963x
endef
TARGET_DEVICES += mr7350
TARGET_DEVICES += linksys_mr7350

define Device/cp01-c1
$(call Device/FitImage)
Expand Down
70 changes: 70 additions & 0 deletions target/linux/ipq807x/config-5.15
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CONFIG_ARM_PSCI_CPUIDLE=y
CONFIG_ARM_PSCI_FW=y
# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
CONFIG_ASN1=y
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
CONFIG_BINARY_PRINTF=y
CONFIG_BLK_DEV_LOOP=y
Expand All @@ -57,7 +58,9 @@ CONFIG_BLK_MQ_VIRTIO=y
CONFIG_BLK_PM=y
CONFIG_CAVIUM_TX2_ERRATUM_219=y
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
CONFIG_CLANG_VERSION=0
CONFIG_CLONE_BACKWARDS=y
CONFIG_CLZ_TAB=y
CONFIG_COMMON_CLK=y
CONFIG_COMMON_CLK_QCOM=y
# CONFIG_COMPAT_32BIT_TIME is not set
Expand All @@ -84,8 +87,27 @@ CONFIG_CPU_RMAP=y
CONFIG_CPU_THERMAL=y
CONFIG_CRC16=y
CONFIG_CRC8=y
CONFIG_CRYPTO_AES_ARM64=y
CONFIG_CRYPTO_AES_ARM64_BS=y
CONFIG_CRYPTO_AES_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_BLAKE2B=y
CONFIG_CRYPTO_BLAKE2S=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CFB=y
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CHACHA20POLY1305=y
CONFIG_CRYPTO_CHACHA20_NEON=y
CONFIG_CRYPTO_CMAC=m
CONFIG_CRYPTO_CRCT10DIF=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_CURVE25519=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_DEV_QCE=y
CONFIG_CRYPTO_DEV_QCE_AEAD=y
Expand All @@ -97,17 +119,59 @@ CONFIG_CRYPTO_DEV_QCE_SHA=y
CONFIG_CRYPTO_DEV_QCE_SKCIPHER=y
CONFIG_CRYPTO_DEV_QCE_SW_MAX_LEN=512
CONFIG_CRYPTO_DEV_QCOM_RNG=y
CONFIG_CRYPTO_DH=y
CONFIG_CRYPTO_DRBG=y
CONFIG_CRYPTO_DRBG_HMAC=y
CONFIG_CRYPTO_DRBG_MENU=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_ECC=y
CONFIG_CRYPTO_ECDH=y
CONFIG_CRYPTO_ECDSA=y
CONFIG_CRYPTO_ECRDSA=y
CONFIG_CRYPTO_GHASH_ARM64_CE=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_KEYWRAP=y
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y
CONFIG_CRYPTO_LIB_DES=y
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_LIB_SM4=y
CONFIG_CRYPTO_LRW=y
CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_NHPOLY1305=y
CONFIG_CRYPTO_NHPOLY1305_NEON=y
CONFIG_CRYPTO_OFB=y
CONFIG_CRYPTO_POLY1305=y
CONFIG_CRYPTO_POLY1305_NEON=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_RNG_DEFAULT=y
CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA256_ARM64=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_SHA3=y
CONFIG_CRYPTO_SHA3_ARM64=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA512_ARM64=y
CONFIG_CRYPTO_SHA512_ARM64_CE=y
CONFIG_CRYPTO_SIMD=y
CONFIG_CRYPTO_SM2=y
CONFIG_CRYPTO_SM3=y
CONFIG_CRYPTO_SM3_ARM64_CE=y
CONFIG_CRYPTO_SM4_ARM64_CE=y
CONFIG_CRYPTO_STREEBOG=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_XXHASH=y
CONFIG_CRYPTO_ZSTD=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DEV_COREDUMP=y
Expand Down Expand Up @@ -190,6 +254,7 @@ CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
# CONFIG_KPSS_XCC is not set
CONFIG_LIBFDT=y
CONFIG_LLD_VERSION=0
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_LTO_NONE=y
Expand Down Expand Up @@ -219,6 +284,7 @@ CONFIG_MMC_SDHCI_MSM=y
# CONFIG_MMC_SDHCI_PCI is not set
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MPILIB=y
# CONFIG_MSM_GCC_8660 is not set
# CONFIG_MSM_GCC_8916 is not set
# CONFIG_MSM_GCC_8939 is not set
Expand Down Expand Up @@ -267,6 +333,7 @@ CONFIG_OF_GPIO=y
CONFIG_OF_IRQ=y
CONFIG_OF_KOBJ=y
CONFIG_OF_MDIO=y
CONFIG_OID_REGISTRY=y
CONFIG_PADATA=y
CONFIG_PARTITION_PERCPU=y
CONFIG_PCI=y
Expand Down Expand Up @@ -362,6 +429,7 @@ CONFIG_QCOM_Q6V5_COMMON=y
# CONFIG_QCOM_Q6V5_PAS is not set
CONFIG_QCOM_Q6V5_WCSS=y
CONFIG_QCOM_QFPROM=y
# CONFIG_QCOM_QMI_HELPERS is not set
# CONFIG_QCOM_RMTFS_MEM is not set
# CONFIG_QCOM_RPMH is not set
CONFIG_QCOM_RPROC_COMMON=y
Expand Down Expand Up @@ -440,6 +508,7 @@ CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CONSOLE=y
CONFIG_SGL_ALLOC=y
CONFIG_SG_POOL=y
# CONFIG_SHORTCUT_FE is not set
CONFIG_SMP=y
# CONFIG_SM_GCC_8150 is not set
# CONFIG_SM_GCC_8250 is not set
Expand Down Expand Up @@ -490,6 +559,7 @@ CONFIG_VIRTIO=y
CONFIG_VMAP_STACK=y
CONFIG_WANT_DEV_COREDUMP=y
CONFIG_WATCHDOG_CORE=y
CONFIG_XOR_BLOCKS=y
CONFIG_XPS=y
CONFIG_XXHASH=y
CONFIG_ZLIB_DEFLATE=y
Expand Down
Loading

0 comments on commit 169c0ee

Please sign in to comment.