From 936220186d5d2ca99a9b5c7c895fe04ac5e2ce35 Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Fri, 1 Jan 2021 12:27:33 +0100 Subject: [PATCH 01/17] tools/cmake: always use non-ccache CC and CXX variables cmake is a dependency of ccache, which means it is build before ccache is available and hence must be build with non-ccache CC and CXX. It currently works, because the cmake build system splits the compiler variable and treats them as multiple compilers to check. For "ccache gcc" it first tests for "ccache", which always fails, because ccache is not a compiler by itself, even if it is available, and then ends up calling "gcc" alone, effectively never using ccache. Let's make this explicit by forcing the use of non-ccache CC and CXX. Signed-off-by: Sven Wegener --- tools/cmake/Makefile | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 64164fdd1d..006934466a 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -21,21 +21,9 @@ HOST_CONFIGURE_PARALLEL:=1 include $(INCLUDE_DIR)/host-build.mk -# Workaround for GCC versions below 6.X and ccache -# Reference: https://github.com/openwrt/openwrt/pull/1929 -GCC_DMPVER_GREPCMD := grep -E '^(4\.[8-9]|[5]\.?)' -GCC_DMPVER_STRING := $(shell $(HOSTCC_NOCACHE) -dumpversion | $(GCC_DMPVER_GREPCMD)) -ifneq ($(GCC_DMPVER_STRING),) - ifeq ($(CONFIG_CCACHE),y) - $(info GCC version less than 6.0 detected, disabling CCACHE) - HOST_CONFIGURE_VARS:=$(filter-out CC=% gcc%",$(HOST_CONFIGURE_VARS)) CC="$(HOSTCC_NOCACHE)" - HOST_CONFIGURE_VARS:=$(filter-out CXX=% g++%",$(HOST_CONFIGURE_VARS)) CXX="$(HOSTCXX_NOCACHE)" - else - $(info GCC version greater or equal to 6.0 detected, no workaround set for CCACHE) - endif -endif - HOST_CONFIGURE_VARS += \ + CC="$(HOSTCC_NOCACHE)" \ + CXX="$(HOSTCXX_NOCACHE)" \ MAKEFLAGS="$(HOST_JOBS)" \ CXXFLAGS="$(HOST_CFLAGS)" From 7b3dd33c203e3b080e8529f312c34c265a672a4a Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Thu, 7 Jan 2021 10:22:54 +0100 Subject: [PATCH 02/17] imx6: gw52xx: fix duplicate regulator naming 2 regulator descriptions carry identical naming. This leads to following boot warning: [ 0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present! Fix this by renaming the one used for audio. Signed-off-by: Koen Vandeputte --- ...gw52xx-fix-duplicate-regulator-namin.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch diff --git a/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch b/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch new file mode 100644 index 0000000000..c459e6f11c --- /dev/null +++ b/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch @@ -0,0 +1,37 @@ +From 069abe403d4eba85eccea16f8b72186a89a68bb1 Mon Sep 17 00:00:00 2001 +From: Koen Vandeputte +Date: Thu, 7 Jan 2021 10:06:03 +0100 +Subject: [PATCH] ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming + +2 regulator descriptions carry identical naming. + +This leads to following boot warning: +[ 0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present! + +Fix this by renaming the one used for audio. + +Fixes: 5051bff33102 ("ARM: dts: imx: ventana: add LTC3676 PMIC support") +Signed-off-by: Tim Harvey +Signed-off-by: Koen Vandeputte +Cc: Fabio Estevam +Cc: Rob Herring +Cc: Sascha Hauer +Cc: Shawn Guo +Cc: NXP Linux Team +Cc: Pengutronix Kernel Team +Cc: stable@vger.kernel.org # v4.11 +--- + arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +@@ -273,7 +273,7 @@ + + /* VDD_AUD_1P8: Audio codec */ + reg_aud_1p8v: ldo3 { +- regulator-name = "vdd1p8"; ++ regulator-name = "vdd1p8a"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; From 87bd9405361bef238fb8fd1fc985a312033699ae Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Thu, 7 Jan 2021 11:28:27 +0100 Subject: [PATCH 03/17] imx6: refresh kernel config Signed-off-by: Koen Vandeputte --- target/linux/imx6/config-5.4 | 75 +----------------------------------- 1 file changed, 2 insertions(+), 73 deletions(-) diff --git a/target/linux/imx6/config-5.4 b/target/linux/imx6/config-5.4 index fe380f587b..af403395f7 100644 --- a/target/linux/imx6/config-5.4 +++ b/target/linux/imx6/config-5.4 @@ -2,23 +2,6 @@ CONFIG_AHCI_IMX=y CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_ARCH_HAS_BINFMT_FLAT=y -CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_ARCH_HAS_KCOV=y -CONFIG_ARCH_HAS_KEEPINITRD=y -CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y -CONFIG_ARCH_HAS_PHYS_TO_DMA=y -CONFIG_ARCH_HAS_RESET_CONTROLLER=y -CONFIG_ARCH_HAS_SETUP_DMA_OPS=y -CONFIG_ARCH_HAS_SET_MEMORY=y -CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y @@ -30,15 +13,7 @@ CONFIG_ARCH_MXC=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y -CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ARM=y CONFIG_ARM_CPU_SUSPEND=y CONFIG_ARM_CRYPTO=y @@ -69,7 +44,6 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y CONFIG_BLK_SCSI_REQUEST=y CONFIG_CACHE_L2X0=y -CONFIG_CC_HAS_KASAN_GENERIC=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_IMX_GPT=y CONFIG_CLKSRC_MMIO=y @@ -200,7 +174,6 @@ CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FSL_GUTS=y CONFIG_FS_ENCRYPTION=y -# CONFIG_FSL_IMX8_DDR_PMU is not set CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y CONFIG_FS_POSIX_ACL=y @@ -228,6 +201,7 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GIANFAR is not set CONFIG_GLOB=y CONFIG_GPIOLIB=y @@ -236,59 +210,14 @@ CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MXC=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAVE_ARCH_AUDITSYSCALL=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_ARM_SCU=y -CONFIG_HAVE_ARM_SMCCC=y -CONFIG_HAVE_ARM_TWD=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_COPY_THREAD_TLS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y -CONFIG_HAVE_EBPF_JIT=y -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_IDE=y -CONFIG_HAVE_IMX_ANATOP=y -CONFIG_HAVE_IMX_GPC=y -CONFIG_HAVE_IMX_MMDC=y -CONFIG_HAVE_IMX_SRC=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_HAVE_NET_DSA=y -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_PCI=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_RSEQ=y CONFIG_HAVE_SMP=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_UID16=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HWMON=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_IMX_RNGC=y From ecded5bf0908953c47933967c0046cceb3ce0ec1 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Thu, 7 Jan 2021 11:34:45 +0100 Subject: [PATCH 04/17] imx6: disable unrequired pcie host driver imx6 has it's own pcie host driver so we do not need the one from DW. This fixes following boot error: [ 0.156913] dw-pcie 1ffc000.pcie: IRQ index 1 not found Fixes: 6d5291ff7244 ("imx6: add support for kernel 5.4") Signed-off-by: Tim Harvey Signed-off-by: Koen Vandeputte --- target/linux/imx6/config-5.4 | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/linux/imx6/config-5.4 b/target/linux/imx6/config-5.4 index af403395f7..8d3cd56d5d 100644 --- a/target/linux/imx6/config-5.4 +++ b/target/linux/imx6/config-5.4 @@ -327,8 +327,6 @@ CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y CONFIG_PCIE_DW=y CONFIG_PCIE_DW_HOST=y -CONFIG_PCIE_DW_PLAT=y -CONFIG_PCIE_DW_PLAT_HOST=y CONFIG_PCIE_PME=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS_GENERIC=y From 0070650df45da29a55a89922544dba6859c18f2b Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 1 Jan 2021 16:48:52 -0500 Subject: [PATCH 05/17] ath79: move small-flash Engenius boards to tiny This moves some of the Engenius boards from generic to tiny: - EAP350 v1 - ECB350 v1 - ENH202 v1 For these, factory.bin builds are already failing on master branch because of the unique situation for these boards: - 8 MB flash - an extra "failsafe" image for recovery - TFTP does not work (barely possible with 600 MTU) - bootloader loads image from a longer flash offset - 1 eraseblock each needed for OKLI kernel loader and fake rootfs - using mtd-concat to make use of remaining space... The manual alternative would be removing the failsafe partition. However this comes with the risk of extremely difficult recovery if a flash ever fails because TFTP on the bootloader is bugged. Signed-off-by: Michael Pratt [improve commit message] Signed-off-by: Adrian Schmutzler --- .../generic/base-files/etc/board.d/01_leds | 8 --- .../generic/base-files/etc/board.d/02_network | 32 ++++----- .../etc/hotplug.d/firmware/10-ath9k-eeprom | 5 +- target/linux/ath79/image/common-engenius.mk | 33 +++++++++ target/linux/ath79/image/generic.mk | 70 +------------------ target/linux/ath79/image/tiny.mk | 35 ++++++++++ .../ath79/tiny/base-files/etc/board.d/01_leds | 8 +++ .../tiny/base-files/etc/board.d/02_network | 10 +++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 + 9 files changed, 104 insertions(+), 100 deletions(-) create mode 100644 target/linux/ath79/image/common-engenius.mk diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index b961e7d3e8..079c8d4e47 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -182,14 +182,6 @@ dlink,dap-1365-a1) dlink,dir-859-a1) ucidef_set_led_switch "internet" "WAN" "green:internet" "switch0" "0x20" ;; -engenius,enh202-v1) - ucidef_set_led_switch "lan" "LAN" "amber:lan" "switch0" "0x10" - ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" - ucidef_set_rssimon "wlan0" "200000" "1" - ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100" - ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100" - ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100" - ;; engenius,ens202ext-v1|\ engenius,enstationac-v1) ucidef_set_rssimon "wlan0" "200000" "1" 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 c79286d45d..c08f374d3a 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 @@ -33,11 +33,9 @@ ath79_setup_interfaces() dlink,dap-3320-a1|\ dlink,dir-505|\ engenius,eap300-v2|\ - engenius,eap350-v1|\ engenius,eap600|\ engenius,ecb1200|\ engenius,ecb1750|\ - engenius,ecb350-v1|\ engenius,ecb600|\ enterasys,ws-ap3705i|\ glinet,gl-ar300m-lite|\ @@ -227,11 +225,6 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:wan" "2:lan:3" "3:lan:2" ;; - engenius,enh202-v1) - ucidef_set_interface_wan "eth0" - ucidef_add_switch "switch0" \ - "0@eth1" "4:lan:1" - ;; engenius,ens202ext-v1) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ @@ -530,19 +523,6 @@ ath79_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) label_mac=$lan_mac ;; - engenius,enh202-v1|\ - ubnt,airrouter|\ - ubnt,bullet-m-ar7240|\ - ubnt,bullet-m-ar7241|\ - ubnt,nanobridge-m|\ - ubnt,nanostation-loco-m|\ - ubnt,nanostation-m|\ - ubnt,picostation-m|\ - ubnt,powerbridge-m|\ - ubnt,rocket-m|\ - ubnt,unifi) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) - ;; engenius,epg5000) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) @@ -623,6 +603,18 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_text mac 0x18) label_mac=$wan_mac ;; + ubnt,airrouter|\ + ubnt,bullet-m-ar7240|\ + ubnt,bullet-m-ar7241|\ + ubnt,nanobridge-m|\ + ubnt,nanostation-loco-m|\ + ubnt,nanostation-m|\ + ubnt,picostation-m|\ + ubnt,powerbridge-m|\ + ubnt,rocket-m|\ + ubnt,unifi) + label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + ;; ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac-gen2|\ ubnt,powerbeam-5ac-500|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 28ac38e1d4..95ad2a57ef 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -74,10 +74,7 @@ case "$FIRMWARE" in avm,fritz300e) caldata_extract_reverse "urloader" 0x1541 0x440 ;; - buffalo,wzr-hp-g302h-a1a0|\ - engenius,eap350-v1|\ - engenius,ecb350-v1|\ - engenius,enh202-v1) + buffalo,wzr-hp-g302h-a1a0) caldata_extract "art" 0x1000 0xeb8 ;; buffalo,wzr-hp-g450h|\ diff --git a/target/linux/ath79/image/common-engenius.mk b/target/linux/ath79/image/common-engenius.mk new file mode 100644 index 0000000000..56e8f8cf67 --- /dev/null +++ b/target/linux/ath79/image/common-engenius.mk @@ -0,0 +1,33 @@ +DEVICE_VARS += ENGENIUS_IMGNAME + +# This needs to make /tmp/_sys/sysupgrade.tgz an empty file prior to +# sysupgrade, as otherwise it will implant the old configuration from +# OEM firmware when writing rootfs from factory.bin +define Build/engenius-tar-gz + -[ -f "$@" ] && \ + mkdir -p $@.tmp && \ + touch $@.tmp/failsafe.bin && \ + echo '#!/bin/sh' > $@.tmp/before-upgrade.sh && \ + echo ': > /tmp/_sys/sysupgrade.tgz' >> $@.tmp/before-upgrade.sh && \ + $(CP) $(KDIR)/loader-$(DEVICE_NAME).uImage \ + $@.tmp/openwrt-$(word 1,$(1))-uImage-lzma.bin && \ + $(CP) $@ $@.tmp/openwrt-$(word 1,$(1))-root.squashfs && \ + $(TAR) -cp --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \ + $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ + -C $@.tmp . | gzip -9n > $@ && \ + rm -rf $@.tmp +endef + +define Device/engenius_loader_okli + DEVICE_VENDOR := EnGenius + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 + LOADER_TYPE := bin + COMPILE := loader-$(1).bin loader-$(1).uImage + COMPILE/loader-$(1).bin := loader-okli-compile + COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ + uImage lzma + IMAGES += factory.bin + IMAGE/factory.bin := append-squashfs-fakeroot-be | pad-to $$$$(BLOCKSIZE) | \ + append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ + check-size | engenius-tar-gz $$$$(ENGENIUS_IMGNAME) +endef diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 190f477b7e..ccc9ff2ac2 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1,12 +1,12 @@ include ./common-buffalo.mk +include ./common-engenius.mk include ./common-netgear.mk include ./common-tp-link.mk include ./common-yuncore.mk DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK -DEVICE_VARS += KERNEL_INITRAMFS_PREFIX -DEVICE_VARS += DAP_SIGNATURE ENGENIUS_IMGNAME +DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL define Build/add-elecom-factory-initramfs @@ -69,24 +69,6 @@ define Build/edimax-headers rm -rf $@.uImage $@.rootfs endef -# This needs to make /tmp/_sys/sysupgrade.tgz an empty file prior to -# sysupgrade, as otherwise it will implant the old configuration from -# OEM firmware when writing rootfs from factory.bin -define Build/engenius-tar-gz - -[ -f "$@" ] && \ - mkdir -p $@.tmp && \ - touch $@.tmp/failsafe.bin && \ - echo '#!/bin/sh' > $@.tmp/before-upgrade.sh && \ - echo ': > /tmp/_sys/sysupgrade.tgz' >> $@.tmp/before-upgrade.sh && \ - $(CP) $(KDIR)/loader-$(DEVICE_NAME).uImage \ - $@.tmp/openwrt-$(word 1,$(1))-uImage-lzma.bin && \ - $(CP) $@ $@.tmp/openwrt-$(word 1,$(1))-root.squashfs && \ - $(TAR) -cp --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \ - $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ - -C $@.tmp . | gzip -9n > $@ && \ - rm -rf $@.tmp -endef - define Build/mkdapimg2 $(STAGING_DIR_HOST)/bin/mkdapimg2 \ -i $@ -o $@.new \ @@ -974,20 +956,6 @@ define Device/embeddedwireless_dorin endef TARGET_DEVICES += embeddedwireless_dorin -define Device/engenius_loader_okli - DEVICE_VENDOR := EnGenius - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 - LOADER_TYPE := bin - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ - uImage lzma - IMAGES += factory.bin - IMAGE/factory.bin := append-squashfs-fakeroot-be | pad-to $$$$(BLOCKSIZE) | \ - append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - check-size | engenius-tar-gz $$$$(ENGENIUS_IMGNAME) -endef - define Device/engenius_eap300-v2 $(Device/engenius_loader_okli) SOC := ar9341 @@ -999,17 +967,6 @@ define Device/engenius_eap300-v2 endef TARGET_DEVICES += engenius_eap300-v2 -define Device/engenius_eap350-v1 - $(Device/engenius_loader_okli) - SOC := ar7242 - DEVICE_MODEL := EAP350 - DEVICE_VARIANT := v1 - IMAGE_SIZE := 4864k - LOADER_FLASH_OFFS := 0x1b0000 - ENGENIUS_IMGNAME := senao-eap350 -endef -TARGET_DEVICES += engenius_eap350-v1 - define Device/engenius_eap600 $(Device/engenius_loader_okli) SOC := ar9344 @@ -1046,17 +1003,6 @@ define Device/engenius_ecb1750 endef TARGET_DEVICES += engenius_ecb1750 -define Device/engenius_ecb350-v1 - $(Device/engenius_loader_okli) - SOC := ar7242 - DEVICE_MODEL := ECB350 - DEVICE_VARIANT := v1 - IMAGE_SIZE := 4864k - LOADER_FLASH_OFFS := 0x1b0000 - ENGENIUS_IMGNAME := senao-ecb350 -endef -TARGET_DEVICES += engenius_ecb350-v1 - define Device/engenius_ecb600 $(Device/engenius_loader_okli) SOC := ar9344 @@ -1067,18 +1013,6 @@ define Device/engenius_ecb600 endef TARGET_DEVICES += engenius_ecb600 -define Device/engenius_enh202-v1 - $(Device/engenius_loader_okli) - SOC := ar7240 - DEVICE_MODEL := ENH202 - DEVICE_VARIANT := v1 - DEVICE_PACKAGES := rssileds - IMAGE_SIZE := 4864k - LOADER_FLASH_OFFS := 0x1b0000 - ENGENIUS_IMGNAME := senao-enh202 -endef -TARGET_DEVICES += engenius_enh202-v1 - define Device/engenius_ens202ext-v1 $(Device/engenius_loader_okli) SOC := ar9341 diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 83c34d718b..36d2818ad5 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -1,4 +1,5 @@ include ./common-buffalo.mk +include ./common-engenius.mk define Device/buffalo_whr-g301n $(Device/buffalo_common) @@ -30,6 +31,40 @@ define Device/dlink_dir-615-e4 endef TARGET_DEVICES += dlink_dir-615-e4 +define Device/engenius_eap350-v1 + $(Device/engenius_loader_okli) + SOC := ar7242 + DEVICE_MODEL := EAP350 + DEVICE_VARIANT := v1 + IMAGE_SIZE := 4864k + LOADER_FLASH_OFFS := 0x1b0000 + ENGENIUS_IMGNAME := senao-eap350 +endef +TARGET_DEVICES += engenius_eap350-v1 + +define Device/engenius_ecb350-v1 + $(Device/engenius_loader_okli) + SOC := ar7242 + DEVICE_MODEL := ECB350 + DEVICE_VARIANT := v1 + IMAGE_SIZE := 4864k + LOADER_FLASH_OFFS := 0x1b0000 + ENGENIUS_IMGNAME := senao-ecb350 +endef +TARGET_DEVICES += engenius_ecb350-v1 + +define Device/engenius_enh202-v1 + $(Device/engenius_loader_okli) + SOC := ar7240 + DEVICE_MODEL := ENH202 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := rssileds + IMAGE_SIZE := 4864k + LOADER_FLASH_OFFS := 0x1b0000 + ENGENIUS_IMGNAME := senao-enh202 +endef +TARGET_DEVICES += engenius_enh202-v1 + define Device/pqi_air-pen SOC := ar9330 DEVICE_VENDOR := PQI diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index 26926b6f64..f0b4acf066 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -21,6 +21,14 @@ tplink,tl-wr941-v4) ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ;; +engenius,enh202-v1) + ucidef_set_led_switch "lan" "LAN" "amber:lan" "switch0" "0x10" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100" + ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100" + ;; netgear,wnr1000-v2|\ netgear,wnr2000-v3) ucidef_set_led_netdev "wan-amber" "WAN (amber)" "amber:wan" "eth0" diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index cbcdbe9a89..ce95bf7037 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -28,6 +28,8 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" ;; + engenius,eap350-v1|\ + engenius,ecb350-v1|\ pqi,air-pen|\ tplink,tl-mr10u|\ tplink,tl-mr3020-v1|\ @@ -51,6 +53,11 @@ ath79_setup_interfaces() tplink,tl-wr802n-v2) ucidef_set_interface_lan "eth0" ;; + engenius,enh202-v1) + ucidef_set_interface_wan "eth0" + ucidef_add_switch "switch0" \ + "0@eth1" "4:lan:1" + ;; tplink,tl-mr3220-v1|\ tplink,tl-mr3420-v1|\ tplink,tl-mr3420-v3|\ @@ -99,6 +106,9 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_ascii "nvram" "wan_mac") label_mac=$wan_mac ;; + engenius,enh202-v1) + label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + ;; tplink,tl-wr941-v2|\ tplink,tl-wr941n-v7-cn) base_mac=$(mtd_get_mac_binary u-boot 0x1fc00) diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 6ae2dc5f94..ffbc46afd0 100644 --- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -10,6 +10,9 @@ case "$FIRMWARE" in "ath9k-eeprom-pci-0000:00:00.0.bin") case $board in buffalo,whr-g301n|\ + engenius,eap350-v1|\ + engenius,ecb350-v1|\ + engenius,enh202-v1|\ tplink,tl-wa701nd-v1|\ tplink,tl-wa730re-v1|\ tplink,tl-wa801nd-v1|\ From 51360a913b492d042a697a9658a21f820a027fa1 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 1 Jan 2021 17:08:34 -0500 Subject: [PATCH 06/17] ath79: make Engenius fakeroot partitions read-only For: - ENH202 v1 - ENS202EXT v1 These boards were committed before it was discovered that for all Engenius boards with a "failsafe" image, forcing the failsafe image to load next boot can be achieved by editing the u-boot environment like: `fw_setenv rootfs_checksum 0` So it's not necessary to delete a partition to boot to failsafe image. Signed-off-by: Michael Pratt --- target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts | 1 + target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts index 77b2f3fa1a..1d26a9765b 100644 --- a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts +++ b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts @@ -136,6 +136,7 @@ partition@1a0000 { label = "fakeroot"; reg = <0x1a0000 0x10000>; + read-only; }; fwconcat0: partition@1b0000 { diff --git a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts index 8b28d581b1..6e296ab496 100644 --- a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts +++ b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts @@ -130,6 +130,7 @@ partition@220000 { label = "fakeroot"; reg = <0x220000 0x010000>; + read-only; }; fwconcat0: partition@230000 { From 81655e1450a80276db32c8a8e10de73a256bc664 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 4 Jan 2021 01:28:44 +0100 Subject: [PATCH 07/17] base-files: read all 3 bytes in get_magic_vfat() at once While the speed improvement might be negligible, there is still no reason to read individual bytes. Signed-off-by: Adrian Schmutzler --- package/base-files/Makefile | 2 +- package/base-files/files/lib/upgrade/common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8d40eb0e49..f18f221129 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:=245 +PKG_RELEASE:=246 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index e8a28f4138..c28bae48a1 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -130,7 +130,7 @@ get_magic_gpt() { } get_magic_vfat() { - (get_image "$@" | dd bs=1 count=3 skip=54) 2>/dev/null + (get_image "$@" | dd bs=3 count=1 skip=18) 2>/dev/null } get_magic_fat32() { From ac16e6b2eaec4f174a54bff25755ad071157aaa8 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Wed, 6 Jan 2021 22:45:17 +0100 Subject: [PATCH 08/17] realtek: set PoE power budget for ZyXEL GS1900-10HP As per the manufacturer's specifications, set the GS1900-10HP PoE power budget to 77W. Signed-off-by: Stijn Segers --- target/linux/realtek/base-files/etc/board.d/02_network | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 84980c8982..84fefa536d 100755 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -52,6 +52,9 @@ case $board in netgear,gs110tpp-v1) ucidef_set_poe 130 "$lan_list" ;; +zyxel,gs1900-10hp) + ucidef_set_poe 77 "$lan_list" + ;; esac board_config_flush From 5f958cb21fb0830b2dc43e247437172b88c15e2b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 7 Jan 2021 19:30:36 +0100 Subject: [PATCH 09/17] realtek: remove duplicate '/dts-v1/;' identifier The identifier is already present in rtl838x.dtsi, and adding it twice is not only redundant but actually wrong. Signed-off-by: Adrian Schmutzler --- target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts | 1 - target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts index 1bf175b7bf..80699df291 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-or-later -/dts-v1/; #include "rtl838x.dtsi" diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index 4458acee2e..ce6085b28e 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-or-later -/dts-v1/; #include "rtl838x.dtsi" From 5bdf50d13b5c430be6dec505c92530cb2cf1f2f3 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Wed, 6 Jan 2021 22:45:18 +0100 Subject: [PATCH 10/17] realtek: move memory node to device DTS Move the memory out of the rtl838x.dtsi and into the device family DTSI or device DTS if applicable. This aligns with upstream practice. Signed-off-by: Stijn Segers [add missing block for dgs-1210-10p, move block below chosen node] Signed-off-by: Adrian Schmutzler --- target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts | 5 +++++ target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 5 +++++ target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts | 5 +++++ target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts | 5 +++++ target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi | 5 +++++ target/linux/realtek/dts/rtl838x.dtsi | 5 ----- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts index 80699df291..251585a8da 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts @@ -13,6 +13,11 @@ bootargs = "console=ttyS0,115200"; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index ce6085b28e..b316710388 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -20,6 +20,11 @@ bootargs = "console=ttyS0,115200"; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + gpio1: rtl8231-gpio { status = "okay"; diff --git a/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts b/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts index a5dd3be0a4..28c4fd2970 100644 --- a/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts +++ b/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts @@ -20,6 +20,11 @@ bootargs = "console=ttyS0,115200"; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts index 05010ffc0d..a2ebdad11b 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts @@ -20,6 +20,11 @@ bootargs = "console=ttyS0,115200"; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + leds { compatible = "gpio-leds"; diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi index 74043c097a..e41c6f9f22 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi @@ -17,6 +17,11 @@ bootargs = "console=ttyS0,115200"; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + leds { compatible = "gpio-leds"; diff --git a/target/linux/realtek/dts/rtl838x.dtsi b/target/linux/realtek/dts/rtl838x.dtsi index 15d518578b..36d8847a15 100644 --- a/target/linux/realtek/dts/rtl838x.dtsi +++ b/target/linux/realtek/dts/rtl838x.dtsi @@ -64,11 +64,6 @@ }; }; - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - chosen { bootargs = "console=ttyS0,38400"; }; From e1f5ffa48c0fc498b93dc19eb6f2676a98421973 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Wed, 6 Jan 2021 22:45:19 +0100 Subject: [PATCH 11/17] realtek: ZyXEL: spell as done by manufacturer ZyXEL spells its own name all uppercase with just the Y lowercase. Adapt the realtek target to follow this (other OpenWrt targets already do so). Signed-off-by: Stijn Segers --- target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 2 +- target/linux/realtek/image/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index b316710388..b114cb6b5a 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -7,7 +7,7 @@ / { compatible = "zyxel,gs1900-10hp", "realtek,rtl838x-soc"; - model = "Zyxel GS1900-10HP Switch"; + model = "ZyXEL GS1900-10HP Switch"; aliases { led-boot = &led_sys; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 85b30aae1e..765e516a0a 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -68,7 +68,7 @@ TARGET_DEVICES += netgear_gs110tpp-v1 define Device/zyxel_gs1900-10hp SOC := rtl8380 IMAGE_SIZE := 6976k - DEVICE_VENDOR := Zyxel + DEVICE_VENDOR := ZyXEL DEVICE_MODEL := GS1900-10HP endef TARGET_DEVICES += zyxel_gs1900-10hp From 211fed5f4930a26213281be67119c50e533c97a4 Mon Sep 17 00:00:00 2001 From: "Leon M. George" Date: Tue, 5 Jan 2021 10:42:34 +0100 Subject: [PATCH 12/17] ramips: remove trailing whitespace in Makefiles Remove trailing whitespaces in two *.mk files. Signed-off-by: Leon M. George [fix title, add message] Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/mt7621.mk | 2 +- target/linux/ramips/image/rt305x.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 720d435665..d530d5ad3e 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -240,7 +240,7 @@ define Device/dlink_dir-8xx-r1 IMAGE_SIZE := 16064k DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware - KERNEL_INITRAMFS := $$(KERNEL) + KERNEL_INITRAMFS := $$(KERNEL) IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs |\ pad-rootfs | append-metadata | check-size diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 7d145c3992..cf24be0f1b 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -1071,7 +1071,7 @@ define Device/unbranded_a5-v11 IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B A5-V11 -F 4M - DEVICE_VENDOR := + DEVICE_VENDOR := DEVICE_MODEL := A5-V11 DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 SUPPORTED_DEVICES += a5-v11 From 9919a1e7eacb894c14496c0a7fdb12f0c0e7cffa Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Mon, 4 Jan 2021 17:59:30 +0100 Subject: [PATCH 13/17] kernel: add hid-cp2112 driver support This patch adds kernel module for Silicon Labs CP2112 HID USB to SMBus Master Bridge. This is a HID device driver which registers as an i2c adapter and gpiochip to expose these functions of the CP2112. Signed-off-by: Pawel Dembicki --- package/kernel/linux/modules/usb.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 81a7f00066..d050165df3 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1486,6 +1486,23 @@ endef $(eval $(call KernelPackage,usb-hid)) +define KernelPackage/usb-hid-cp2112 + SUBMENU:=$(USB_MENU) + TITLE:=Silicon Labs CP2112 HID USB to SMBus Master Bridge + KCONFIG:=CONFIG_GPIOLIB=y CONFIG_HID_CP2112 + DEPENDS:=+kmod-usb-hid +kmod-i2c-core + FILES:=$(LINUX_DIR)/drivers/hid/hid-cp2112.ko + AUTOLOAD:=$(call AutoProbe,hid-cp2112) +endef + +define KernelPackage/usb-hid-cp2112/description + HID device driver which registers as an i2c adapter and gpiochip to expose + these functions of the CP2112. +endef + +$(eval $(call KernelPackage,usb-hid-cp2112)) + + define KernelPackage/usb-yealink TITLE:=USB Yealink VOIP phone DEPENDS:=+kmod-input-evdev From 0542cb6a2b54b7694d7c668f5d6a200cfcc311e3 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Fri, 8 Jan 2021 14:32:47 +0100 Subject: [PATCH 14/17] realtek: introduce shared DTSI for GS1900 series The ZyXEL GS1900-8HP v1, v2 and GS1900-10HP are all built on a similar Realtek RTL8380M platform. Create a common DTSI in preparation for GS1900-8HP support, and switch to the macros defined in rtl838x.dtsi. Signed-off-by: Stijn Segers [drop redundant includes, use &mdio directly, do not replace SFP ports] Signed-off-by: Adrian Schmutzler --- .../realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 213 +----------------- .../realtek/dts/rtl8380_zyxel_gs1900.dtsi | 148 ++++++++++++ 2 files changed, 153 insertions(+), 208 deletions(-) create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index b114cb6b5a..92d0e25fc4 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -1,60 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include "rtl838x.dtsi" - -#include -#include +#include "rtl8380_zyxel_gs1900.dtsi" / { compatible = "zyxel,gs1900-10hp", "realtek,rtl838x-soc"; model = "ZyXEL GS1900-10HP Switch"; - aliases { - led-boot = &led_sys; - led-failsafe = &led_sys; - led-running = &led_sys; - led-upgrade = &led_sys; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - - gpio1: rtl8231-gpio { - status = "okay"; - - poe_enable { - gpio-hog; - gpios = <13 0>; - output-high; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_sys: sys { - label = "gs1900:green:sys"; - gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>; - }; - }; - /* i2c of the left SFP cage: port 9 */ i2c0: i2c-gpio-0 { compatible = "i2c-gpio"; @@ -92,161 +43,15 @@ mod-def0-gpio = <&gpio1 32 GPIO_ACTIVE_LOW>; tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>; }; - }; -&spi0 { - status = "okay"; - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x40000>; - read-only; - }; - partition@40000 { - label = "u-boot-env"; - reg = <0x40000 0x10000>; - read-only; - }; - partition@50000 { - label = "u-boot-env2"; - reg = <0x50000 0x10000>; - read-only; - }; - partition@60000 { - label = "jffs"; - reg = <0x60000 0x100000>; - }; - partition@160000 { - label = "jffs2"; - reg = <0x160000 0x100000>; - }; - partition@b260000 { - label = "firmware"; - reg = <0x260000 0x6d0000>; - compatible = "denx,uimage"; - }; - partition@930000 { - label = "runtime2"; - reg = <0x930000 0x6d0000>; - }; - }; - }; -}; - -ðernet0 { - mdio: mdio-bus { - compatible = "realtek,rtl838x-mdio"; - regmap = <ðernet0>; - #address-cells = <1>; - #size-cells = <0>; - - /* Internal phy */ - phy8: ethernet-phy@8 { - reg = <8>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy9: ethernet-phy@9 { - reg = <9>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy10: ethernet-phy@10 { - reg = <10>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy11: ethernet-phy@11 { - reg = <11>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy12: ethernet-phy@12 { - reg = <12>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy13: ethernet-phy@13 { - reg = <13>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy14: ethernet-phy@14 { - reg = <14>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy15: ethernet-phy@15 { - reg = <15>; - compatible = "ethernet-phy-ieee802.3-c22"; - }; - phy24: ethernet-phy@24 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <24>; - }; - phy26: ethernet-phy@26 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <26>; - }; - }; +&mdio { + INTERNAL_PHY(24) + INTERNAL_PHY(26) }; &switch0 { ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <8>; - label = "lan1"; - phy-handle = <&phy8>; - phy-mode = "internal"; - }; - port@1 { - reg = <9>; - label = "lan2"; - phy-handle = <&phy9>; - phy-mode = "internal"; - }; - port@2 { - reg = <10>; - label = "lan3"; - phy-handle = <&phy10>; - phy-mode = "internal"; - }; - port@3 { - reg = <11>; - label = "lan4"; - phy-handle = <&phy11>; - phy-mode = "internal"; - }; - port@4 { - reg = <12>; - label = "lan5"; - phy-handle = <&phy12>; - phy-mode = "internal"; - }; - port@5 { - reg = <13>; - label = "lan6"; - phy-handle = <&phy13>; - phy-mode = "internal"; - }; - port@6 { - reg = <14>; - label = "lan7"; - phy-handle = <&phy14>; - phy-mode = "internal"; - }; - port@7 { - reg = <15>; - label = "lan8"; - phy-handle = <&phy15>; - phy-mode = "internal"; - }; port@24 { reg = <24>; label = "lan9"; @@ -260,6 +65,7 @@ pause; }; }; + port@26 { reg = <26>; label = "lan10"; @@ -273,14 +79,5 @@ pause; }; }; - port@28 { - ethernet = <ðernet0>; - reg = <28>; - phy-mode = "internal"; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; }; }; diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi new file mode 100644 index 0000000000..c3e16c001a --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl838x.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + gpio1: rtl8231-gpio { + status = "okay"; + + poe_enable { + gpio-hog; + gpios = <13 0>; + output-high; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "gs1900:green:sys"; + gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + read-only; + }; + partition@50000 { + label = "u-boot-env2"; + reg = <0x50000 0x10000>; + read-only; + }; + partition@60000 { + label = "jffs"; + reg = <0x60000 0x100000>; + }; + partition@160000 { + label = "jffs2"; + reg = <0x160000 0x100000>; + }; + partition@b260000 { + label = "firmware"; + reg = <0x260000 0x6d0000>; + compatible = "denx,uimage"; + }; + partition@930000 { + label = "runtime2"; + reg = <0x930000 0x6d0000>; + }; + }; + }; +}; + +ðernet0 { + mdio: mdio-bus { + compatible = "realtek,rtl838x-mdio"; + regmap = <ðernet0>; + #address-cells = <1>; + #size-cells = <0>; + + INTERNAL_PHY(8) + INTERNAL_PHY(9) + INTERNAL_PHY(10) + INTERNAL_PHY(11) + INTERNAL_PHY(12) + INTERNAL_PHY(13) + INTERNAL_PHY(14) + INTERNAL_PHY(15) + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT(8, 1, internal) + SWITCH_PORT(9, 2, internal) + SWITCH_PORT(10, 3, internal) + SWITCH_PORT(11, 4, internal) + SWITCH_PORT(12, 5, internal) + SWITCH_PORT(13, 6, internal) + SWITCH_PORT(14, 7, internal) + SWITCH_PORT(15, 8, internal) + + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; From 40ea2fea4ff215eb260d261a6e78c90f150e0eb0 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 8 Jan 2021 20:37:37 +0100 Subject: [PATCH 15/17] realtek: remove model prefix from LED label for ZyXEL GS1900 This is used as fixed status LED, so no migration is needed. Signed-off-by: Adrian Schmutzler --- target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi index c3e16c001a..5f06339d13 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi @@ -47,7 +47,7 @@ compatible = "gpio-leds"; led_sys: sys { - label = "gs1900:green:sys"; + label = "green:sys"; gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>; }; }; From c4bfe68c83910e613f07350587a8709a16bd1ffa Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Fri, 8 Jan 2021 14:32:48 +0100 Subject: [PATCH 16/17] realtek: add support for ZyXEL GS1900-8HP v1 and v2 The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support. There are two versions on the market (v1 & v2) which share similar specs (same flash size and flash layout, same RAM size, same PoE+ power envelope) but have a different case and board layout that they each share with other GS1900 siblings. The v1 seems to share its PCB and case with non-PoE GS1900-8; as such, adding support for the GS1900-8 would probably be trivial. The v2 seems to share its casing and platform with its already supported bigger brother, the GS1900-10HP - its board looks the same, except for two holes where the GS1900-10 has its SFP ports. Like their 10 port sibling, both devices have a dual firmware layout. Both GS1900-8HP boards have the same 70W PoE+ power budget. In order to manipulate the PoE+, one needs the rtl83xx-poe package [1]. After careful consideration it was decided to go with separate images for each version. Specifications (v1) ------------------- * SoC: Realtek RTL8380M 500 MHz MIPS 4KEc * Flash: Macronix MX25L12835F 16 MiB * RAM: Nanya NT5TU128M8HE-AC 128 MiB DDR2 SDRAM * Ethernet: 8x 10/100/1000 Mbit * PoE+: Broadcom BCM59111KMLG (IEEE 802.3at-2009 compliant, 2x) * UART: 1 serial header with populated standard pin connector on the left side of the PCB, towards the bottom. Pins are labeled: + VCC (3.3V) + TX + RX + GND Specifications (v2) ------------------- * SoC: Realtek RTL8380M 500 MHz MIPS 4KEc * Flash: Macronix MX25L12835F 16 MiB * RAM: Samsung K4B1G0846G 128 MiB DDR3 SDRAM * Ethernet: 8x 10/100/1000 Mbit * PoE+: Broadcom BCM59121B0KMLG (IEEE 802.3at-2009 compliant) * UART: 1 angled serial header with populated standard pin connector accessible from outside through the ventilation slits on the side. Pins from top to bottom are clearly marked on the PCB: + VCC (3.3V) + TX + RX + GND Serial connection parameters for both devices: 115200 8N1. Installation ------------ Instructions are identical to those for the GS1900-10HP and apply both to the GS1900-8HP v1 and v2 as well. * Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10). * Set up a TFTP server on your client and make it serve the initramfs image. * Connect serial, power up the switch, interrupt U-boot by hitting the space bar, and enable the network: > rtk network on * Since the GS1900-10HP is a dual-partition device, you want to keep the OEM firmware on the backup partition for the time being. OpenWrt can only boot off the first partition anyway (hardcoded in the DTS). To make sure we are manipulating the first partition, issue the following commands: > setsys bootpartition 0 > savesys * Download the image onto the device and boot from it: > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-8hp-v{1,2}-initramfs-kernel.bin > bootm * Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it: > sysupgrade /tmp//tmp/openwrt-realtek-generic-zyxel_gs1900-8hp-v{1,2}-squashfs-sysupgrade.bin Signed-off-by: Stijn Segers [merge PoE case, keep device definitions separate, change all those hashes in the commit message to something else so they don't get removed when changing the commit ...] Signed-off-by: Adrian Schmutzler --- .../realtek/base-files/etc/board.d/02_network | 4 ++++ .../dts/rtl8380_zyxel_gs1900-8hp-v1.dts | 8 ++++++++ .../dts/rtl8380_zyxel_gs1900-8hp-v2.dts | 8 ++++++++ target/linux/realtek/image/Makefile | 20 +++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v1.dts create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v2.dts diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 84fefa536d..2568fd2e0e 100755 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -55,6 +55,10 @@ netgear,gs110tpp-v1) zyxel,gs1900-10hp) ucidef_set_poe 77 "$lan_list" ;; +zyxel,gs1900-8hp-v1|\ +zyxel,gs1900-8hp-v2) + ucidef_set_poe 70 "$lan_list" + ;; esac board_config_flush diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v1.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v1.dts new file mode 100644 index 0000000000..0d9b7c97c0 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_zyxel_gs1900.dtsi" + +/ { + compatible = "zyxel,gs1900-8hp-v1", "realtek,rtl838x-soc"; + model = "ZyXEL GS1900-8HP v1 Switch"; +}; diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v2.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v2.dts new file mode 100644 index 0000000000..cdc4aed6d1 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp-v2.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_zyxel_gs1900.dtsi" + +/ { + compatible = "zyxel,gs1900-8hp-v2", "realtek,rtl838x-soc"; + model = "ZyXEL GS1900-8HP v2 Switch"; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 765e516a0a..1251b47c93 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -73,4 +73,24 @@ define Device/zyxel_gs1900-10hp endef TARGET_DEVICES += zyxel_gs1900-10hp +define Device/zyxel_gs1900-8hp-v1 + SOC := rtl8380 + IMAGE_SIZE := 6976k + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := GS1900-8HP + DEVICE_VARIANT := v1 + DEVICE_PACKAGES += lua-rs232 +endef +TARGET_DEVICES += zyxel_gs1900-8hp-v1 + +define Device/zyxel_gs1900-8hp-v2 + SOC := rtl8380 + IMAGE_SIZE := 6976k + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := GS1900-8HP + DEVICE_VARIANT := v2 + DEVICE_PACKAGES += lua-rs232 +endef +TARGET_DEVICES += zyxel_gs1900-8hp-v2 + $(eval $(call BuildImage)) From 4ebec0b3e2bc259be8c788a9a792ed2250b30433 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 6 Jan 2021 12:37:16 -0500 Subject: [PATCH 17/17] kernel: bump 5.4 to 5.4.87 All modification by update_kernel.sh. Build system: x86_64 Build-tested: ipq806x/R7800, bcm27xx/bcm2711 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Compile-tested [*]: ath79/{generic,tiny}, ipq40xx, octeon, ramips/mt7621, realtek, x86/64. Run-tested [*]: ramips/mt7621 (DIR-878 A1, R6800, RT-AC57U), octeon (EdgeRouter Lite). Signed-off-by: John Audia Tested-by: Stijn Segers [*] --- include/kernel-version.mk | 4 ++-- .../950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch | 2 +- target/linux/generic/hack-5.4/204-module_strip.patch | 4 ++-- .../generic/pending-5.4/530-jffs2_make_lzma_available.patch | 2 +- ...PS-Fix-memory-reservation-in-bootmem_init-for-cert.patch | 6 +++--- .../patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch | 4 ++-- target/linux/realtek/patches-5.4/705-add-rtl-phy.patch | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index dcbc45823b..4a2b9ae2f4 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .86 +LINUX_VERSION-5.4 = .87 -LINUX_KERNEL_HASH-5.4.86 = eb36b5fc6ef7b953acba0a3e62d872e0330c4d34b38d58f5714493a4fe3b0e8b +LINUX_KERNEL_HASH-5.4.87 = 6a34e93e2e84bb645155124962307ad9d3646124f43838d087209ed4ea595c31 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch b/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch index a800039f88..87240aa5d8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch @@ -11,7 +11,7 @@ other with conf_req and conf_rsp messages, in a demented game of tag. --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c -@@ -342,7 +342,8 @@ static void h5_handle_internal_rx(struct +@@ -346,7 +346,8 @@ static void h5_handle_internal_rx(struct h5_link_control(hu, conf_req, 3); } else if (memcmp(data, conf_req, 2) == 0) { h5_link_control(hu, conf_rsp, 2); diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index f311b176f3..2b4435f93e 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3127,9 +3127,11 @@ static int setup_load_info(struct load_i +@@ -3125,9 +3125,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3150,6 +3152,7 @@ static int check_modinfo(struct module * +@@ -3148,6 +3150,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch index eb0e51d574..f497688556 100644 --- a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch @@ -244,7 +244,7 @@ Signed-off-by: Alexandros C. Couloumbis +} --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c -@@ -377,14 +377,41 @@ static int __init init_jffs2_fs(void) +@@ -380,14 +380,41 @@ static int __init init_jffs2_fs(void) BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); diff --git a/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch b/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch index fa923f1829..63429f49b0 100644 --- a/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch +++ b/target/linux/ramips/patches-5.4/0003-MIPS-Fix-memory-reservation-in-bootmem_init-for-cert.patch @@ -16,7 +16,7 @@ Signed-off-by: Tobias Wolf --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -285,6 +285,8 @@ static unsigned long __init init_initrd( +@@ -287,6 +287,8 @@ static unsigned long __init init_initrd( * Initialize the bootmem allocator. It also setup initrd related data * if needed. */ @@ -25,7 +25,7 @@ Signed-off-by: Tobias Wolf #if defined(CONFIG_SGI_IP27) || (defined(CONFIG_CPU_LOONGSON3) && defined(CONFIG_NUMA)) static void __init bootmem_init(void) -@@ -323,7 +325,7 @@ static void __init bootmem_init(void) +@@ -325,7 +327,7 @@ static void __init bootmem_init(void) /* * Reserve any memory between the start of RAM and PHYS_OFFSET */ @@ -34,7 +34,7 @@ Signed-off-by: Tobias Wolf memblock_reserve(PHYS_OFFSET, ramstart - PHYS_OFFSET); if (PFN_UP(ramstart) > ARCH_PFN_OFFSET) { -@@ -384,8 +386,6 @@ static void __init bootmem_init(void) +@@ -386,8 +388,6 @@ static void __init bootmem_init(void) #endif /* CONFIG_SGI_IP27 */ diff --git a/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch index 6b1cc15158..bedea14506 100644 --- a/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch +++ b/target/linux/ramips/patches-5.4/0013-owrt-hack-fix-mt7688-cache-issue.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -652,8 +652,6 @@ static void __init arch_mem_init(char ** +@@ -723,8 +723,6 @@ static void __init arch_mem_init(char ** memblock_reserve(crashk_res.start, crashk_res.end - crashk_res.start + 1); #endif @@ -19,7 +19,7 @@ Signed-off-by: John Crispin /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate -@@ -770,6 +768,7 @@ void __init setup_arch(char **cmdline_p) +@@ -841,6 +839,7 @@ void __init setup_arch(char **cmdline_p) cpu_cache_init(); paging_init(); diff --git a/target/linux/realtek/patches-5.4/705-add-rtl-phy.patch b/target/linux/realtek/patches-5.4/705-add-rtl-phy.patch index ea0d48861d..f4cd8f2d6d 100644 --- a/target/linux/realtek/patches-5.4/705-add-rtl-phy.patch +++ b/target/linux/realtek/patches-5.4/705-add-rtl-phy.patch @@ -1,9 +1,9 @@ --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -454,6 +454,12 @@ +@@ -540,6 +540,12 @@ config REALTEK_PHY ---help--- Supports the Realtek 821x PHY. - + +config REALTEK_SOC_PHY + tristate "Realtek SoC PHYs" + depends on RTL838X @@ -15,7 +15,7 @@ ---help--- --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -87,6 +87,7 @@ +@@ -102,6 +102,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o obj-$(CONFIG_REALTEK_PHY) += realtek.o