From ff6b36b9548bbb869c2f5a5ffc0e415e25bc857e Mon Sep 17 00:00:00 2001 From: Perry Melange Date: Sun, 21 Feb 2021 14:00:56 +0100 Subject: [PATCH 1/7] feeds.conf.default: remove freifunk feed The freifunk feed is being removed becasue a) it is an external project and the OpenWrt team does not have access to it. b) upon original addition of the feed, there was only a very weak tendency for the addition. c) there is a general lack of interest in the freifunk repo to review and/or merge pull requests. d) as far as can be found, all projects which use the freifunk feed have their own make system and self-maintained feeds list. They do not use the feeds.conf.default from the openwrt repo. more information can be read at the following links: http://lists.openwrt.org/pipermail/openwrt-devel/2021-February/033807.html https://github.com/freifunk/openwrt-packages/issues/37 Signed-off-by: Perry Melange (cherry picked from commit 20caa68fec4fe033f72c9d488639f8dd2bcfa02c) --- feeds.conf.default | 1 - 1 file changed, 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index c30a8fbc23..98bf97232d 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -2,5 +2,4 @@ src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 -src-git freifunk https://github.com/freifunk/openwrt-packages.git;openwrt-21.02 #src-link custom /usr/src/openwrt/custom-feed From a29b3983248588505e927317a162edb8187b94f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 1 Mar 2021 13:29:19 +0100 Subject: [PATCH 2/7] build: fix checks for GCC11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fedora 34 already uses GCC11. Reported-by: Marcin Juszkiewicz Signed-off-by: Petr Štetiar (cherry picked from commit cae69d558135456976b8fc6cb08530d1358cf6d5) --- include/prereq-build.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 6dce11cba2..7c668968b6 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -26,8 +26,8 @@ $(eval $(call TestHostCommand,proper-umask, \ ifndef IB $(eval $(call SetupHostCommand,gcc, \ Please install the GNU C Compiler (gcc) 4.8 or later, \ - $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ - gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ + $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \ + gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \ gcc --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-gcc, \ @@ -38,8 +38,8 @@ $(eval $(call TestHostCommand,working-gcc, \ $(eval $(call SetupHostCommand,g++, \ Please install the GNU C++ Compiler (g++) 4.8 or later, \ - $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ - g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ + $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \ + g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \ g++ --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-g++, \ From 27c5db998cba4bc76b5c9dcf71120181cb813886 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Fri, 29 Jan 2021 19:57:37 +0100 Subject: [PATCH 3/7] Revert "build: replace which with Bash command built-in" This reverts commit c7aec47e5e3a3ff7b5fdaa11cd1e62cae6746acb. The original commit replaces 'which' with 'command'. Sadly most of them are not equivalent and for 'which -a', there is no easy replacements that would not reimplement PATH parsing logic. Hence revert. Keeping a dependency on which is absolutely fine. Signed-off-by: Clemens Fruhwirth (cherry picked from commit 1f5e7224868109a170a9248d18f8d2b6124e9c5a) --- Makefile | 2 +- include/cmake.mk | 2 +- include/prereq.mk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index aecee6929e..e18bc18608 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir world: -DISTRO_PKG_CONFIG:=$(shell command -pv pkg-config | grep -E '\/usr' | head -n 1) +DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1) export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) ifneq ($(OPENWRT_BUILD),1) diff --git a/include/cmake.mk b/include/cmake.mk index de8022ca57..96c4d7df34 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -15,7 +15,7 @@ MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) cmake_tool=$(TOOLCHAIN_DIR)/bin/$(1) else - cmake_tool=$(shell command -v $(1)) + cmake_tool=$(shell which $(1)) endif ifeq ($(CONFIG_CCACHE),) diff --git a/include/prereq.mk b/include/prereq.mk index c11178a884..23d5ded9b2 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -49,7 +49,7 @@ endef define RequireCommand define Require/$(1) - command -pv $(1) + which $(1) endef $$(eval $$(call Require,$(1),$(2))) @@ -103,7 +103,7 @@ define SetupHostCommand $(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \ if [ -n "$$$$$$$$cmd" ]; then \ bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \ - command -pv "$$$$$$$${cmd%% *}")"; \ + which "$$$$$$$${cmd%% *}")"; \ if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \ mkdir -p "$(STAGING_DIR_HOST)/bin"; \ ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \ From ceb6869cd982056b02f97b51a0e4e2d300ea5b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 3 Mar 2021 19:48:55 +0100 Subject: [PATCH 4/7] build: add which command to build requirements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `which` utility is not shipped by default for example on recent Arch Linux and then any steps relying on its presence fails, like for example following Python3 prereq build check: $ python3 --version Python 3.9.1 $ make /bin/sh: line 1: which: command not found ... Checking 'python3'... failed. So make `which` utility host build requirement. References: PR#3820 FS#3525 Signed-off-by: Petr Štetiar (cherry picked from commit 13069b1a1dcbef0bb9b42db98025fa9203283220) --- README.md | 2 +- include/prereq-build.mk | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 21acbf4b80..6bb4d2e913 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ documentation. ``` gcc binutils bzip2 flex python3 perl make find grep diff unzip gawk getopt -subversion libz-dev libc-dev rsync +subversion libz-dev libc-dev rsync which ``` ### Quickstart diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 7c668968b6..86c22f7c95 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -166,6 +166,9 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \ $(eval $(call SetupHostCommand,rsync,Please install 'rsync', \ rsync --version Date: Fri, 5 Mar 2021 12:13:45 +0100 Subject: [PATCH 5/7] bcm27xx: bcm2711: disable HW_RANDOM_BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This driver is only present on BCM2708, BCM2709 and BCM2710. Signed-off-by: Álvaro Fernández Rojas (cherry-picked from commit bac74aff5e) --- target/linux/bcm27xx/bcm2711/config-5.4 | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/bcm27xx/bcm2711/config-5.4 b/target/linux/bcm27xx/bcm2711/config-5.4 index df6237f51e..7efd1c2b07 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.4 +++ b/target/linux/bcm27xx/bcm2711/config-5.4 @@ -257,7 +257,6 @@ CONFIG_HOLES_IN_ZONE=y CONFIG_HOTPLUG_CPU=y CONFIG_HW_CONSOLE=y CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_BCM2835=y CONFIG_HW_RANDOM_IPROC_RNG200=y CONFIG_HZ=250 CONFIG_HZ_250=y From 5601da24a89f396c173c31252d679a9eeb9913c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Fri, 26 Feb 2021 20:49:00 +0100 Subject: [PATCH 6/7] kernel: b53: update the BCM5365 UID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BCM63XX internal PHYs and BCM5365 SoC internal switch are both using the same phy_driver->phy_id, causing conflicts and unnecessary probes. E.g the BCM63XX phy internal IRQ is lost on the first probe. The full BCM5365 UID is 0x00406370. Use an additional byte to mask the BCM5365 UID to avoid duplicate driver phy_id's. This will fix the IRQ issue in internal BCM63XX PHYs and avoid more conflicts in the future. Signed-off-by: Daniel González Cabanelas (merge both cherry-picked commits) Signed-off-by: Álvaro Fernández Rojas (cherry-picked from commits cbcac4fde8 and cfa43f8119) --- target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c | 4 ++-- .../linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index afe2187cd6..98cdbffe73 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -417,9 +417,9 @@ static struct phy_driver b53_phy_driver_id2 = { /* BCM5365 */ static struct phy_driver b53_phy_driver_id3 = { - .phy_id = 0x00406000, + .phy_id = 0x00406300, .name = "Broadcom B53 (3)", - .phy_id_mask = 0x1ffffc00, + .phy_id_mask = 0x1fffff00, .features = 0, .probe = b53_phy_probe, .remove = b53_phy_remove, diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c index e2f8a39ab6..a19eccefd1 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c @@ -24,7 +24,7 @@ #define B53_BRCM_OUI_1 0x0143bc00 #define B53_BRCM_OUI_2 0x03625c00 -#define B53_BRCM_OUI_3 0x00406000 +#define B53_BRCM_OUI_3 0x00406300 static int b53_phy_fixup(struct phy_device *dev) { @@ -40,7 +40,7 @@ static int b53_phy_fixup(struct phy_device *dev) if ((phy_id & 0xfffffc00) == B53_BRCM_OUI_1 || (phy_id & 0xfffffc00) == B53_BRCM_OUI_2 || - (phy_id & 0xfffffc00) == B53_BRCM_OUI_3) { + (phy_id & 0xffffff00) == B53_BRCM_OUI_3) { dev->phy_id = phy_id; } From 7e1ab3b7462b11885a5b9a48804463dba465fe9a Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Fri, 5 Mar 2021 12:09:31 +0000 Subject: [PATCH 7/7] kernel: backport GCC 10 usbip build fix for 5.4 From the original commit message: "With GCC 10, building usbip triggers error for multiple definition of 'udev_context', in: - libsrc/vhci_driver.c:18 and - libsrc/usbip_host_common.c:27. Declare as extern the definition in libsrc/usbip_host_common.c." Signed-off-by: Rui Salvaterra (cherry picked from commit 0eef8402ee2ad014121932c860174e6d95440e17) --- ...-build-error-for-multiple-definition.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch diff --git a/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch new file mode 100644 index 0000000000..03f27fb528 --- /dev/null +++ b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch @@ -0,0 +1,33 @@ +From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001 +From: Antonio Borneo +Date: Thu, 18 Jun 2020 02:08:44 +0200 +Subject: usbip: tools: fix build error for multiple definition + +With GCC 10, building usbip triggers error for multiple definition +of 'udev_context', in: +- libsrc/vhci_driver.c:18 and +- libsrc/usbip_host_common.c:27. + +Declare as extern the definition in libsrc/usbip_host_common.c. + +Signed-off-by: Antonio Borneo +Acked-by: Shuah Khan +Link: https://lore.kernel.org/r/20200618000844.1048309-1-borneo.antonio@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + tools/usb/usbip/libsrc/usbip_host_common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +(limited to 'tools/usb/usbip') + +--- a/tools/usb/usbip/libsrc/usbip_host_common.c ++++ b/tools/usb/usbip/libsrc/usbip_host_common.c +@@ -23,7 +23,7 @@ + #include "list.h" + #include "sysfs_utils.h" + +-struct udev *udev_context; ++extern struct udev *udev_context; + + static int32_t read_attr_usbip_status(struct usbip_usb_device *udev) + {