From 181054bf7939decd8ce6f32b6f8e2a363ab55e24 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 16 Jun 2021 18:05:04 -1000 Subject: [PATCH 01/10] build: create profiles.json per default The file is a info file just like config.buildinfo, feeds.buildinfo and version.buildinfo. It bundles these and more information in a machine readable way. This commit enables the creation of profiles.json by default and not only for buildbots. By doing so it follow the behaviour of the ImageBuilder which always creates the file, lastly this increases the files visibility for downstream projects. Signed-off-by: Paul Spooren --- config/Config-build.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Config-build.in b/config/Config-build.in index 342859b7c0..f0e1aaa695 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -21,7 +21,7 @@ menu "Global build settings" config JSON_OVERVIEW_IMAGE_INFO bool "Create JSON info file overview per target" - default BUILDBOT + default y help Create a JSON info file called profiles.json in the target directory containing machine readable list of built profiles From f0f1d68d528402b4d51a1dd08d2e2c9034167f92 Mon Sep 17 00:00:00 2001 From: Michael Yartys Date: Mon, 21 Jun 2021 13:37:20 +0200 Subject: [PATCH 02/10] ath10k-ct: fix typo in Makefile Add forgotten colon to Makefile. Signed-off-by: Michael Yartys --- package/kernel/ath10k-ct/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index f06d7cf132..5681c5c2cd 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ath10k-ct -PKG_RELEASE=$(AUTORELEASE) +PKG_RELEASE:=$(AUTORELEASE) PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= From 92ac2a20ebba9f8695b464041cc8aeb30bb85576 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Apr 2021 09:28:02 +0200 Subject: [PATCH 03/10] uci: add uci_revert function Add missing uci_revert shell function wrapper. Signed-off-by: Florian Eckert --- package/system/uci/Makefile | 2 +- package/system/uci/files/lib/config/uci.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 2036f92a7e..1355955d1a 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 8d32cd1743..6ebfb73ae4 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -149,6 +149,14 @@ uci_remove_list() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" } +uci_revert() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" +} + uci_commit() { local PACKAGE="$1" /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE From f1e41155c98cb5f2e0647e064ec0b3cfbf346e41 Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Tue, 15 Jun 2021 08:03:05 -0500 Subject: [PATCH 04/10] kernel/modules: make sure igb loads at boot Without loading the igb at boot, the recovery wouldn't have network available. All network drivers should be loaded before etc/board.d/02_network is called. Note that other network drivers already have this set, such as tg3. Fixes: 7e0e5110bc90 ("kernel: add igb kernel module") Signed-off-by: Chris Blake --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 10eb26a7af..b91442748d 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -657,7 +657,7 @@ define KernelPackage/igb CONFIG_IGB_HWMON=y \ CONFIG_IGB_DCA=n FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igb/igb.ko - AUTOLOAD:=$(call AutoLoad,35,igb) + AUTOLOAD:=$(call AutoLoad,35,igb,1) endef define KernelPackage/igb/description From 2c9537e27495afdf929975c8a154cc66de902df0 Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Thu, 10 Jun 2021 12:15:58 +0200 Subject: [PATCH 05/10] grub2: update to 2.06 -300-CVE-2015-8370.patch is upstreamed with different code (upstream id: 451d80e52d851432e109771bb8febafca7a5f1f2) - fixup OpenWrts setup_root patch compile tested: x86_64,i386 runtime tested: VM x86_64,VM i386 - booted fine - grub-editenv worked Signed-off-by: Dirk Neukirchen --- package/boot/grub2/Makefile | 6 +-- .../grub2/patches/100-grub_setup_root.patch | 32 +++++++-------- .../grub2/patches/300-CVE-2015-8370.patch | 40 ------------------- 3 files changed, 19 insertions(+), 59 deletions(-) delete mode 100644 package/boot/grub2/patches/300-CVE-2015-8370.patch diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 3cdb608cbf..9c67ff589b 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -7,12 +7,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub PKG_CPE_ID:=cpe:/a:gnu:grub2 -PKG_VERSION:=2.06~rc1 +PKG_VERSION:=2.06 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub -PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484 +PKG_SOURCE_URL:=@GNU/grub +PKG_HASH:=b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1 HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=grub2/host diff --git a/package/boot/grub2/patches/100-grub_setup_root.patch b/package/boot/grub2/patches/100-grub_setup_root.patch index e075d052cb..f20b310e12 100644 --- a/package/boot/grub2/patches/100-grub_setup_root.patch +++ b/package/boot/grub2/patches/100-grub_setup_root.patch @@ -18,24 +18,24 @@ --- a/util/grub-install.c +++ b/util/grub-install.c -@@ -1720,7 +1720,7 @@ main (int argc, char *argv[]) - /* Now perform the installation. */ +@@ -1721,7 +1721,7 @@ main (int argc, char *argv[]) if (install_bootsector) - grub_util_bios_setup (platdir, "boot.img", "core.img", -- install_drive, force, -+ NULL, install_drive, force, - fs_probe, allow_floppy, add_rs_codes, - !grub_install_is_short_mbrgap_supported ()); - break; -@@ -1747,7 +1747,7 @@ main (int argc, char *argv[]) - /* Now perform the installation. */ + { + grub_util_bios_setup (platdir, "boot.img", "core.img", +- install_drive, force, ++ NULL, install_drive, force, + fs_probe, allow_floppy, add_rs_codes, + !grub_install_is_short_mbrgap_supported ()); + +@@ -1752,7 +1752,7 @@ main (int argc, char *argv[]) if (install_bootsector) - grub_util_sparc_setup (platdir, "boot.img", "core.img", -- install_drive, force, -+ NULL, install_drive, force, - fs_probe, allow_floppy, - 0 /* unused */, 0 /* unused */ ); - break; + { + grub_util_sparc_setup (platdir, "boot.img", "core.img", +- install_drive, force, ++ NULL, install_drive, force, + fs_probe, allow_floppy, + 0 /* unused */, 0 /* unused */ ); + --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -87,6 +87,8 @@ static struct argp_option options[] = { diff --git a/package/boot/grub2/patches/300-CVE-2015-8370.patch b/package/boot/grub2/patches/300-CVE-2015-8370.patch deleted file mode 100644 index 22f6c90928..0000000000 --- a/package/boot/grub2/patches/300-CVE-2015-8370.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Hector Marco-Gisbert -Date: Fri, 13 Nov 2015 16:21:09 +0100 -Subject: [PATCH] Fix security issue when reading username and password - - This patch fixes two integer underflows at: - * grub-core/lib/crypto.c - * grub-core/normal/auth.c - -Resolves: CVE-2015-8370 - -Signed-off-by: Hector Marco-Gisbert -Signed-off-by: Ismael Ripoll-Ripoll ---- - grub-core/lib/crypto.c | 2 +- - grub-core/normal/auth.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/grub-core/lib/crypto.c -+++ b/grub-core/lib/crypto.c -@@ -468,7 +468,7 @@ grub_password_get (char buf[], unsigned - break; - } - -- if (key == '\b') -+ if (key == '\b' && cur_len) - { - if (cur_len) - cur_len--; ---- a/grub-core/normal/auth.c -+++ b/grub-core/normal/auth.c -@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned - break; - } - -- if (key == GRUB_TERM_BACKSPACE) -+ if (key == GRUB_TERM_BACKSPACE && cur_len) - { - if (cur_len) - { From f2f137593eb6c0e849352e85c003c91f8be81dd1 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 21 Jun 2021 23:50:05 +0200 Subject: [PATCH 06/10] ath79: add missing GPIO_LATCH symbol Fixes commit 7b8931678c36 ("ath79: add gpio-latch driver for MikroTik RouterBOARDs") Signed-off-by: David Bauer --- target/linux/ath79/config-5.10 | 1 + target/linux/ath79/config-5.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ath79/config-5.10 b/target/linux/ath79/config-5.10 index d4abddb445..c95c073563 100644 --- a/target/linux/ath79/config-5.10 +++ b/target/linux/ath79/config-5.10 @@ -72,6 +72,7 @@ CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_ATH79=y CONFIG_GPIO_GENERIC=y +# CONFIG_GPIO_LATCH is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y diff --git a/target/linux/ath79/config-5.4 b/target/linux/ath79/config-5.4 index b39d5ec964..9c5520775d 100644 --- a/target/linux/ath79/config-5.4 +++ b/target/linux/ath79/config-5.4 @@ -90,6 +90,7 @@ CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_ATH79=y CONFIG_GPIO_GENERIC=y +# CONFIG_GPIO_LATCH is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y From 219e17a35088a90eea664fbb4c66549d701a3cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 21 Jun 2021 11:42:25 +0200 Subject: [PATCH 07/10] ustream-ssl: variants conflict with each other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds conflicts between variants of libustream pacakge. They provide the same file and thus it should not be possible to install them side by side. Signed-off-by: Karel Kočí --- package/libs/ustream-ssl/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index 3d1e48dcbd..f762c89d29 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ustream-ssl -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git @@ -37,6 +37,7 @@ define Package/libustream-wolfssl $(Package/libustream/default) TITLE += (wolfssl) DEPENDS += +PACKAGE_libustream-wolfssl:libwolfssl + CONFLICTS := libustream-openssl VARIANT:=wolfssl endef @@ -44,6 +45,7 @@ define Package/libustream-mbedtls $(Package/libustream/default) TITLE += (mbedtls) DEPENDS += +libmbedtls + CONFLICTS := libustream-openssl libustream-wolfssl VARIANT:=mbedtls DEFAULT_VARIANT:=1 endef From 9f09c1936a4a13b67fcba632f7ca02331f685359 Mon Sep 17 00:00:00 2001 From: Timo Sigurdsson Date: Tue, 15 Jun 2021 23:08:56 +0200 Subject: [PATCH 08/10] hostapd: make country3 option configurable The country3 option in hostapd.conf allows the third octet of the country string to be set. It can be used e.g. to indicate indoor or outdoor use (see hostapd.conf for further details). Make this option configurable but optional in OpenWrt. Signed-off-by: Timo Sigurdsson --- package/network/services/hostapd/files/hostapd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8a6c904c58..060199fa0c 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -93,7 +93,7 @@ hostapd_common_add_device_config() { config_add_array supported_rates config_add_string beacon_rate - config_add_string country + config_add_string country country3 config_add_boolean country_ie doth config_add_boolean spectrum_mgmt_required config_add_int local_pwr_constraint @@ -119,7 +119,7 @@ hostapd_prepare_device_config() { local base_cfg= - json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ + json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc @@ -134,6 +134,7 @@ hostapd_prepare_device_config() { [ -n "$country" ] && { append base_cfg "country_code=$country" "$N" + [ -n "$country3" ] && append base_cfg "country3=$country3" "$N" [ "$country_ie" -gt 0 ] && { append base_cfg "ieee80211d=1" "$N" From 85ce590705072be78c3ef7dc6b64e3b1facc892b Mon Sep 17 00:00:00 2001 From: Timo Sigurdsson Date: Tue, 15 Jun 2021 23:12:08 +0200 Subject: [PATCH 09/10] hostapd: fix handling of the channel utilization options Commit 0a7657c ("hostapd: add channel utilization as config option") added the two new uci options bss_load_update_period and chan_util_avg_period. However, the corresponding "config_add_int" calls for these options weren't added, so attempting to actually use these options and change their values is bound to fail - they always stay at their defaults. Add the missing code to actually make these options work. Fixes: 0a7657c ("hostapd: add channel utilization as config option") Signed-off-by: Timo Sigurdsson --- package/network/services/hostapd/files/hostapd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 060199fa0c..b9409c8ca3 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -263,6 +263,8 @@ hostapd_common_add_bss_config() { config_add_int acct_port config_add_int acct_interval + config_add_int bss_load_update_period chan_util_avg_period + config_add_string dae_client config_add_string dae_secret config_add_int dae_port From f8d5bd20b31842ef7fdb740d27c70294f21c6124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 22 Jun 2021 07:47:18 +0200 Subject: [PATCH 10/10] bcm4908: fix Ethernet broken state after interface restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes traffic stalls after ifdown & ifup. Signed-off-by: Rafał Miłecki --- ...4908_enet-reset-DMA-rings-sw-indexes.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-reset-DMA-rings-sw-indexes.patch diff --git a/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-reset-DMA-rings-sw-indexes.patch b/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-reset-DMA-rings-sw-indexes.patch new file mode 100644 index 0000000000..7e82230f9a --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-reset-DMA-rings-sw-indexes.patch @@ -0,0 +1,43 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 22 Jun 2021 07:05:04 +0200 +Subject: [PATCH] net: broadcom: bcm4908_enet: reset DMA rings sw indexes + properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Resetting software indexes in bcm4908_dma_alloc_buf_descs() is not +enough as it's called during device probe only. Driver resets DMA on +every .ndo_open callback and it's required to reset indexes then. + +This fixes inconsistent rings state and stalled traffic after interface +down & up sequence. + +Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver") +Signed-off-by: Rafał Miłecki +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -174,9 +174,6 @@ static int bcm4908_dma_alloc_buf_descs(s + if (!ring->slots) + goto err_free_buf_descs; + +- ring->read_idx = 0; +- ring->write_idx = 0; +- + return 0; + + err_free_buf_descs: +@@ -303,6 +300,9 @@ static void bcm4908_enet_dma_ring_init(s + + enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, + (uint32_t)ring->dma_addr); ++ ++ ring->read_idx = 0; ++ ring->write_idx = 0; + } + + static void bcm4908_enet_dma_uninit(struct bcm4908_enet *enet)