From 64782497dbdf124d9f7979ae1aa48f20c9b9dec8 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 11 Aug 2023 14:48:41 -0400 Subject: [PATCH 01/20] kernel: bump 5.15 to 5.15.126 1. Disable unneeded errata Kconfig symbols 2. Update kernel Changelog: https://lore.kernel.org/stable/2023081111-unlocking-synopsis-d7d5@gregkh/ All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia --- include/kernel-5.15 | 4 ++-- .../700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch | 2 +- ...701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 2 +- target/linux/generic/config-5.15 | 4 ++++ target/linux/generic/hack-5.15/901-debloat_sock_diag.patch | 2 +- target/linux/generic/hack-5.15/902-debloat_proc.patch | 2 +- .../mediatek/patches-5.15/901-arm-add-cmdline-override.patch | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 43e03fac8d..7687c40aa8 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .125 -LINUX_KERNEL_HASH-5.15.125 = 150f3846b76cd23a6135f49cef71372bade5a06e851cb4f8558df8b862d8fec7 +LINUX_VERSION-5.15 = .126 +LINUX_KERNEL_HASH-5.15.126 = adf4aab9840f89ee151b837defbe16e9f388e8eef20df7ee94bf63be33b3ed6f diff --git a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch index af1c9bcefd..ba09c562ae 100644 --- a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch +++ b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1538,10 +1538,14 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1542,10 +1542,14 @@ static int bcm_sf2_sw_probe(struct platf rev = reg_readl(priv, REG_PHY_REVISION); priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; diff --git a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch index e78b4a47d7..b5baa8717e 100644 --- a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch +++ b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1552,6 +1552,12 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1556,6 +1556,12 @@ static int bcm_sf2_sw_probe(struct platf priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, priv->irq0, priv->irq1); diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index d7e4742d63..de619f60b6 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -330,6 +330,10 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_1530923 is not set # CONFIG_ARM64_ERRATUM_1542419 is not set # CONFIG_ARM64_ERRATUM_1742098 is not set +# CONFIG_ARM64_ERRATUM_2253138 is not set +# CONFIG_ARM64_ERRATUM_2224489 is not set +# CONFIG_ARM64_ERRATUM_2054223 is not set +# CONFIG_ARM64_ERRATUM_2067961 is not set # CONFIG_ARM64_ERRATUM_2441007 is not set # CONFIG_ARM64_ERRATUM_2441009 is not set # CONFIG_ARM64_ERRATUM_819472 is not set diff --git a/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch b/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch index 1f3802aa5b..5c1ce01a2c 100644 --- a/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch @@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, u32)); INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, -@@ -1983,9 +1997,11 @@ static void __sk_free(struct sock *sk) +@@ -1986,9 +2000,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch index b1c1c8171c..8039d4161a 100644 --- a/target/linux/generic/hack-5.15/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3877,6 +3877,8 @@ static __net_initdata struct pernet_oper +@@ -3880,6 +3880,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch b/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch index a22a1124e9..5ded06ff63 100644 --- a/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch +++ b/target/linux/mediatek/patches-5.15/901-arm-add-cmdline-override.patch @@ -37,7 +37,7 @@ * managed to set the command line, unless CONFIG_CMDLINE_FORCE --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -1983,6 +1983,14 @@ config CMDLINE_FORCE +@@ -2057,6 +2057,14 @@ config CMDLINE_FORCE endchoice From 0454691960e16bb93ed01f89352cbb375008aaf5 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 4 Aug 2023 14:07:43 +0100 Subject: [PATCH 02/20] mediatek: filogic: mt7988: mark RTC clock as critical A dependency of the MT7988 MMC host controller on the SoC's RTC clock being running has been discovered. Mark RTC clock as critical to fix MMC host on MT7988. Signed-off-by: Daniel Golle --- .../drivers/clk/mediatek/clk-mt7988-infracfg.c | 9 ++++++++- .../files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/target/linux/mediatek/files-5.15/drivers/clk/mediatek/clk-mt7988-infracfg.c b/target/linux/mediatek/files-5.15/drivers/clk/mediatek/clk-mt7988-infracfg.c index 77e25383b6..bce8d56375 100644 --- a/target/linux/mediatek/files-5.15/drivers/clk/mediatek/clk-mt7988-infracfg.c +++ b/target/linux/mediatek/files-5.15/drivers/clk/mediatek/clk-mt7988-infracfg.c @@ -190,6 +190,13 @@ static const struct mtk_gate_regs infra3_cg_regs = { #define GATE_INFRA3(_id, _name, _parent, _shift) \ GATE_INFRA3_FLAGS(_id, _name, _parent, _shift, 0) +#define GATE_CRITICAL(_id, _name, _parent, _regs, _shift) { \ + .id = _id, .name = _name, .parent_name = _parent, \ + .regs = _regs, .shift = _shift, \ + .flags = CLK_IS_CRITICAL, \ + .ops = &mtk_clk_gate_ops_setclr, \ + } + static const struct mtk_gate infra_clks[] = { /* INFRA0 */ GATE_INFRA0(CLK_INFRA_PCIE_PERI_26M_CK_P0, @@ -271,7 +278,7 @@ static const struct mtk_gate infra_clks[] = { "sysaxi_sel", 17), GATE_INFRA2(CLK_INFRA_66M_FLASHIF_AXI, "infra_hf_66m_flashif_axi", "sysaxi_sel", 18), - GATE_INFRA2(CLK_INFRA_RTC, "infra_f_frtc", "top_rtc_32k", 19), + GATE_CRITICAL(CLK_INFRA_RTC, "infra_f_frtc", "top_rtc_32k", &infra2_cg_regs, 19), GATE_INFRA2(CLK_INFRA_26M_ADC_BCK, "infra_f_26m_adc_bck", "csw_infra_f26m_sel", 20), GATE_INFRA2(CLK_INFRA_RC_ADC, "infra_f_frc_adc", "infra_f_26m_adc_bck", diff --git a/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c b/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c index 111b516ae5..a5d21d756d 100644 --- a/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c +++ b/target/linux/mediatek/files-6.1/drivers/clk/mediatek/clk-mt7988-infracfg.c @@ -190,6 +190,13 @@ static const struct mtk_gate_regs infra3_cg_regs = { #define GATE_INFRA3(_id, _name, _parent, _shift) \ GATE_INFRA3_FLAGS(_id, _name, _parent, _shift, 0) +#define GATE_CRITICAL(_id, _name, _parent, _regs, _shift) { \ + .id = _id, .name = _name, .parent_name = _parent, \ + .regs = _regs, .shift = _shift, \ + .flags = CLK_IS_CRITICAL, \ + .ops = &mtk_clk_gate_ops_setclr, \ + } + static const struct mtk_gate infra_clks[] = { /* INFRA0 */ GATE_INFRA0(CLK_INFRA_PCIE_PERI_26M_CK_P0, @@ -271,7 +278,7 @@ static const struct mtk_gate infra_clks[] = { "sysaxi_sel", 17), GATE_INFRA2(CLK_INFRA_66M_FLASHIF_AXI, "infra_hf_66m_flashif_axi", "sysaxi_sel", 18), - GATE_INFRA2(CLK_INFRA_RTC, "infra_f_frtc", "top_rtc_32k", 19), + GATE_CRITICAL(CLK_INFRA_RTC, "infra_f_frtc", "top_rtc_32k", &infra2_cg_regs, 19), GATE_INFRA2(CLK_INFRA_26M_ADC_BCK, "infra_f_26m_adc_bck", "csw_infra_f26m_sel", 20), GATE_INFRA2(CLK_INFRA_RC_ADC, "infra_f_frc_adc", "infra_f_26m_adc_bck", From 3c2f7bb555c2cd5c4be8aed11b9d31b48cc0bcf8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 9 Aug 2023 12:21:41 +0100 Subject: [PATCH 03/20] uboot-mediatek: bpi-r3: prepare for larger FIT structures Instead of reading only a single 4kiB page, read the first 128kiB to determine the size of an uImage.FIT using 'imsz' or 'imszb'. This will be needed once we add more Device Tree Overlays, which may happen for the BPi-R3 mini. Signed-off-by: Daniel Golle --- package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch b/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch index 98010a3304..146a93f4f3 100644 --- a/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch +++ b/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch @@ -840,7 +840,7 @@ +boot_tftp_recovery=run boot_update_conf ; tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp=run boot_update_conf ; tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf +mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size -+mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 ++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 +part_default=production +part_recovery=recovery +reset_factory=eraseenv && reset @@ -931,8 +931,8 @@ +boot_write_fip=mtd erase fip && mtd write fip $loadaddr +boot_write_preloader=mtd erase bl2 && mtd write bl2 $loadaddr +reset_factory=mtd erase u-boot-env -+nor_read_production=mtd read fit $loadaddr 0x0 0x1000 && imsz $loadaddr image_size && mtd read fit $loadaddr 0x0 $image_size -+nor_read_recovery=mtd read recovery $loadaddr 0x0 0x1000 && imsz $loadaddr image_size && mtd read recovery $loadaddr 0x0 $image_size ++nor_read_production=mtd read fit $loadaddr 0x0 0x20000 && imsz $loadaddr image_size && mtd read fit $loadaddr 0x0 $image_size ++nor_read_recovery=mtd read recovery $loadaddr 0x0 0x20000 && imsz $loadaddr image_size && mtd read recovery $loadaddr 0x0 $image_size +nor_pad_size=imsz $loadaddr image_size ; setexpr image_eb 0x$image_size / 0x10000 ; setexpr tmp1 0x$image_size % 0x10000 ; test 0x$tmp1 -gt 0 && setexpr image_eb 0x$image_eb + 1 ; setexpr image_eb $image_eb * 0x10000 +nor_write_production=run nor_pad_size ; test 0x$image_eb -le 0x3000000 && mtd erase fit && mtd write fit $loadaddr 0x0 $image_eb +nor_write_recovery=run nor_pad_size ; test 0x$image_eb -le 0x900000 && mtd erase recovery 0x0 0x$image_eb && mtd write recovery $loadaddr 0x0 $image_eb @@ -1067,7 +1067,7 @@ +boot_tftp=run boot_update_conf ; tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf +boot_update_conf=if nand info ; then setenv bootconf $bootconf_base#$bootconf_emmc#$bootconf_nand ; else setenv bootconf $bootconf_base#$bootconf_emmc#$bootconf_nor ; fi +mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size -+mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 ++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 +part_default=production +part_recovery=recovery +reset_factory=eraseenv && reset From c524a76f4c09a4e3fa4572612d336b4ef7ff2fb8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 11 Aug 2023 14:16:08 +0100 Subject: [PATCH 04/20] armsr: remove redundant phy-marvell-10g module the Marvell 10G PHY driver is no way specific to ARM SystemReady systems, it frequently occurs on SFP+ copper modules and is useful on many targets. Hence it been added to package/kernel/linux/modules/netdevices and we can remove the now redundant target-specific module. Signed-off-by: Daniel Golle --- target/linux/armsr/modules.mk | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/target/linux/armsr/modules.mk b/target/linux/armsr/modules.mk index 7a349337d8..2bd5748e90 100644 --- a/target/linux/armsr/modules.mk +++ b/target/linux/armsr/modules.mk @@ -151,17 +151,6 @@ endef $(eval $(call KernelPackage,marvell-mdio)) -define KernelPackage/phy-marvell-10g - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Marvell Alaska 10G PHY driver - DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy - KCONFIG:=CONFIG_MARVELL_10G_PHY - FILES=$(LINUX_DIR)/drivers/net/phy/marvell10g.ko - AUTOLOAD=$(call AutoLoad,35,marvell10g) -endef - -$(eval $(call KernelPackage,phy-marvell-10g)) - define KernelPackage/mvneta SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Marvell Armada 370/38x/XP/37xx network driver From 42e14d3ed870e56c29bff84ce686839d9bab2034 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 13 Aug 2023 14:57:10 +0100 Subject: [PATCH 05/20] generic: 5.15: rename patches to match correct version Rename two patches which were only accepted in Linux 6.2, but were marked as if they were accepted in Linux 6.1. Signed-off-by: Daniel Golle --- ...tch => 890-v6.2-mtd-spinand-winbond-fix-flash-detection.patch} | 0 ...02KV.patch => 891-v6.2-mtd-spinand-winbond-add-W25N02KV.patch} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/generic/backport-5.15/{890-v6.1-mtd-spinand-winbond-fix-flash-detection.patch => 890-v6.2-mtd-spinand-winbond-fix-flash-detection.patch} (100%) rename target/linux/generic/backport-5.15/{891-v6.1-mtd-spinand-winbond-add-W25N02KV.patch => 891-v6.2-mtd-spinand-winbond-add-W25N02KV.patch} (100%) diff --git a/target/linux/generic/backport-5.15/890-v6.1-mtd-spinand-winbond-fix-flash-detection.patch b/target/linux/generic/backport-5.15/890-v6.2-mtd-spinand-winbond-fix-flash-detection.patch similarity index 100% rename from target/linux/generic/backport-5.15/890-v6.1-mtd-spinand-winbond-fix-flash-detection.patch rename to target/linux/generic/backport-5.15/890-v6.2-mtd-spinand-winbond-fix-flash-detection.patch diff --git a/target/linux/generic/backport-5.15/891-v6.1-mtd-spinand-winbond-add-W25N02KV.patch b/target/linux/generic/backport-5.15/891-v6.2-mtd-spinand-winbond-add-W25N02KV.patch similarity index 100% rename from target/linux/generic/backport-5.15/891-v6.1-mtd-spinand-winbond-add-W25N02KV.patch rename to target/linux/generic/backport-5.15/891-v6.2-mtd-spinand-winbond-add-W25N02KV.patch From e6f8b699189139f09c3685332310ff870610de5e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 13 Aug 2023 14:52:44 +0100 Subject: [PATCH 06/20] generic: backport fix for Winbond SPI NAND Avoid using stack allocated memory for DMA operations. Fixes: 156c00dedc ("generic: backport Winbond W25N02KV SPI-NAND support") Fixes: b71c870caa ("generic: 6.1: re-add two Winbond nand fixes") Signed-off-by: Daniel Golle --- ...d-spinand-winbond-Fix-ecc_get_status.patch | 49 +++++++++++++++++++ ...d-spinand-winbond-Fix-ecc_get_status.patch | 49 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 target/linux/generic/backport-5.15/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch create mode 100644 target/linux/generic/backport-6.1/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch diff --git a/target/linux/generic/backport-5.15/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch b/target/linux/generic/backport-5.15/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch new file mode 100644 index 0000000000..2f408f5a30 --- /dev/null +++ b/target/linux/generic/backport-5.15/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch @@ -0,0 +1,49 @@ +From f5a05060670a4d8d6523afc7963eb559c2e3615f Mon Sep 17 00:00:00 2001 +From: Olivier Maignial +Date: Fri, 23 Jun 2023 17:33:37 +0200 +Subject: [PATCH] mtd: spinand: winbond: Fix ecc_get_status + +Reading ECC status is failing. + +w25n02kv_ecc_get_status() is using on-stack buffer for +SPINAND_GET_FEATURE_OP() output. It is not suitable for +DMA needs of spi-mem. + +Fix this by using the spi-mem operations dedicated buffer +spinand->scratchbuf. + +See +spinand->scratchbuf: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418 +spi_mem_check_op(): +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199 + +Fixes: 6154c7a58348 ("mtd: spinand: winbond: add Winbond W25N02KV flash support") +Cc: stable@vger.kernel.org +Signed-off-by: Olivier Maignial +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM +--- + drivers/mtd/nand/spi/winbond.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/nand/spi/winbond.c ++++ b/drivers/mtd/nand/spi/winbond.c +@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struc + { + struct nand_device *nand = spinand_to_nand(spinand); + u8 mbf = 0; +- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf); ++ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); + + switch (status & STATUS_ECC_MASK) { + case STATUS_ECC_NO_BITFLIPS: +@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struc + if (spi_mem_exec_op(spinand->spimem, &op)) + return nanddev_get_ecc_conf(nand)->strength; + +- mbf >>= 4; ++ mbf = *(spinand->scratchbuf) >> 4; + + if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf)) + return nanddev_get_ecc_conf(nand)->strength; diff --git a/target/linux/generic/backport-6.1/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch b/target/linux/generic/backport-6.1/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch new file mode 100644 index 0000000000..2f408f5a30 --- /dev/null +++ b/target/linux/generic/backport-6.1/892-v6.5-mtd-spinand-winbond-Fix-ecc_get_status.patch @@ -0,0 +1,49 @@ +From f5a05060670a4d8d6523afc7963eb559c2e3615f Mon Sep 17 00:00:00 2001 +From: Olivier Maignial +Date: Fri, 23 Jun 2023 17:33:37 +0200 +Subject: [PATCH] mtd: spinand: winbond: Fix ecc_get_status + +Reading ECC status is failing. + +w25n02kv_ecc_get_status() is using on-stack buffer for +SPINAND_GET_FEATURE_OP() output. It is not suitable for +DMA needs of spi-mem. + +Fix this by using the spi-mem operations dedicated buffer +spinand->scratchbuf. + +See +spinand->scratchbuf: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mtd/spinand.h?h=v6.3#n418 +spi_mem_check_op(): +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-mem.c?h=v6.3#n199 + +Fixes: 6154c7a58348 ("mtd: spinand: winbond: add Winbond W25N02KV flash support") +Cc: stable@vger.kernel.org +Signed-off-by: Olivier Maignial +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/DB4P250MB1032EDB9E36B764A33769039FE23A@DB4P250MB1032.EURP250.PROD.OUTLOOK.COM +--- + drivers/mtd/nand/spi/winbond.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/nand/spi/winbond.c ++++ b/drivers/mtd/nand/spi/winbond.c +@@ -108,7 +108,7 @@ static int w25n02kv_ecc_get_status(struc + { + struct nand_device *nand = spinand_to_nand(spinand); + u8 mbf = 0; +- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf); ++ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf); + + switch (status & STATUS_ECC_MASK) { + case STATUS_ECC_NO_BITFLIPS: +@@ -126,7 +126,7 @@ static int w25n02kv_ecc_get_status(struc + if (spi_mem_exec_op(spinand->spimem, &op)) + return nanddev_get_ecc_conf(nand)->strength; + +- mbf >>= 4; ++ mbf = *(spinand->scratchbuf) >> 4; + + if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf)) + return nanddev_get_ecc_conf(nand)->strength; From 813ef01a278e6b551dd16c0b07fb99262e0fea6b Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 11 Aug 2023 19:06:10 -0700 Subject: [PATCH 07/20] tools/xz: update to 5.4.4 * liblzma and xzdec can now build against WASI SDK when threading support is disabled. xz and tests don't build yet. * CMake: - Fixed a bug preventing other projects from including liblzma multiple times using find_package(). - Don't create broken symlinks in Cygwin and MSYS2 unless supported by the environment. This prevented building for the default MSYS2 environment. The problem was introduced in xz 5.4.0. * Documentation: - Small improvements to man pages. - Small improvements and typo fixes for liblzma API documentation. * Tests: - Added a new section to INSTALL to describe basic test usage and address recent questions about building the tests when cross compiling. - Small fixes and improvements to the tests. * Translations: - Fixed a mistake that caused one of the error messages to not be translated. This only affected versions 5.4.2 and 5.4.3. - Updated the Chinese (simplified), Croatian, Esperanto, German, Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and Vietnamese translations. - Updated the German, Korean, Romanian, and Ukrainian man page translations. Signed-off-by: Rosen Penev --- tools/xz/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xz/Makefile b/tools/xz/Makefile index 67f96aa0de..757d5ae0e1 100644 --- a/tools/xz/Makefile +++ b/tools/xz/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xz -PKG_VERSION:=5.4.3 +PKG_VERSION:=5.4.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/lzmautils \ http://tukaani.org/xz -PKG_HASH:=9243a04598d7a70c1f567a0143a255581ac5c64b140fd55fd5cbc1e00b0e6f90 +PKG_HASH:=0b6fcde1ac38e90433a2556f500c065950b9bcd2d602006efc334782bdfe6296 PKG_CPE_ID:=cpe:/a:tukaani:xz HOST_BUILD_PARALLEL:=1 From 00ce1c05877ac38f5ff00c1c2ce3468d5168f76c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 13 Aug 2023 22:32:20 +0200 Subject: [PATCH 08/20] linux-firmware: Update Intel AX200 and AX210 firmware This updates the Intel iwlwifi firmware for AX200 and AX210 from version 66 to version 72. Version 72 is the latest version supported by iwlwifi from kernel 6.1. Signed-off-by: Hauke Mehrtens Reviewed-by: Robert Marko --- package/firmware/linux-firmware/intel.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk index 23b58358b4..cb7b7f4ae4 100644 --- a/package/firmware/linux-firmware/intel.mk +++ b/package/firmware/linux-firmware/intel.mk @@ -173,14 +173,14 @@ $(eval $(call BuildPackage,iwlwifi-firmware-iwl9260)) Package/iwlwifi-firmware-ax200 = $(call Package/firmware-default,Intel AX200 firmware) define Package/iwlwifi-firmware-ax200/install $(INSTALL_DIR) $(1)/lib/firmware - $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-cc-a0-66.ucode $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-cc-a0-72.ucode $(1)/lib/firmware endef $(eval $(call BuildPackage,iwlwifi-firmware-ax200)) Package/iwlwifi-firmware-ax210 = $(call Package/firmware-default,Intel AX210 firmware) define Package/iwlwifi-firmware-ax210/install $(INSTALL_DIR) $(1)/lib/firmware - $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-ty-a0-gf-a0-66.ucode $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-ty-a0-gf-a0-72.ucode $(1)/lib/firmware $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-ty-a0-gf-a0.pnvm $(1)/lib/firmware endef $(eval $(call BuildPackage,iwlwifi-firmware-ax210)) From 9e9dc1890c6f58d858208136ecfa435445dfca09 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 14 Aug 2023 13:47:49 +0200 Subject: [PATCH 09/20] ipq40xx: commonize Meraki recipe MR33 and MR74 share pretty much everything in the image recipe, so lets extract a common recipe to avoid duplication. Signed-off-by: Robert Marko --- target/linux/ipq40xx/image/generic.mk | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index a9dd2aa091..55e143e0dd 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -756,26 +756,25 @@ define Device/luma_wrtq-329acn endef TARGET_DEVICES += luma_wrtq-329acn -define Device/meraki_mr33 +define Device/meraki_common $(call Device/FitImage) DEVICE_VENDOR := Cisco Meraki - DEVICE_MODEL := MR33 SOC := qcom-ipq4029 BLOCKSIZE := 128k PAGESIZE := 2048 DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct +endef + +define Device/meraki_mr33 + $(call Device/meraki_common) + DEVICE_MODEL := MR33 DEFAULT := n endef TARGET_DEVICES += meraki_mr33 define Device/meraki_mr74 - $(call Device/FitImage) - DEVICE_VENDOR := Cisco Meraki + $(call Device/meraki_common) DEVICE_MODEL := MR74 - SOC := qcom-ipq4029 - BLOCKSIZE := 128k - PAGESIZE := 2048 - DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct DEVICE_DTS_CONFIG := config@3 DEFAULT := n endef From bb4a25860f593790aaedc1b31dde33fbc519e7bf Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 14 Aug 2023 13:48:37 +0200 Subject: [PATCH 10/20] ipq40xx: meraki: remove swconfig in DEVICE_PACKAGES ipq40xx was converted to DSA and swconfig is not being included at all in the default packages so there is no need to drop it from device packages. Signed-off-by: Robert Marko --- target/linux/ipq40xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 55e143e0dd..78fa22c234 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -762,7 +762,7 @@ define Device/meraki_common SOC := qcom-ipq4029 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct + DEVICE_PACKAGES := ath10k-firmware-qca9887-ct endef define Device/meraki_mr33 From f1c80445bd7e3b2f7fc3e4c8136402b30834d4e9 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 14 Aug 2023 13:50:47 +0200 Subject: [PATCH 11/20] ipq40xx: meraki: define DTB load address It seems that the Meraki bootloader does not respect the kernel ARM booting specification[1] that requires that address where DTB is located needs to be 64-bit aligned and often places the DTB on a non 64-bit aligned address and then kernel fails to find the DTB magic and fails to boot. Even worse, there is no prints until early printk is enabled and then its visible that kernel is trying to find the ATAG-s as DTB was not found or is invalid. Unifi 6 devices had the same issue and it can be solved by passing the load adress as part of the FIT image. It seems that the vendor was aware of the issue and is always relocating the DTB to 0x89000000, so lets just do the same. Now that booting is reliable, reenable default images for the Meraki MR33 and MR74 devices. Reviewed-by: Lech Perczak lech.perczak@gmail.com Signed-off-by: Robert Marko --- target/linux/ipq40xx/image/generic.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 78fa22c234..907558302c 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -762,13 +762,13 @@ define Device/meraki_common SOC := qcom-ipq4029 BLOCKSIZE := 128k PAGESIZE := 2048 + DEVICE_DTS_LOADADDR := 0x89000000 DEVICE_PACKAGES := ath10k-firmware-qca9887-ct endef define Device/meraki_mr33 $(call Device/meraki_common) DEVICE_MODEL := MR33 - DEFAULT := n endef TARGET_DEVICES += meraki_mr33 @@ -776,7 +776,6 @@ define Device/meraki_mr74 $(call Device/meraki_common) DEVICE_MODEL := MR74 DEVICE_DTS_CONFIG := config@3 - DEFAULT := n endef TARGET_DEVICES += meraki_mr74 From 54e5e396c59948224dfb8ccf7aa8afe11462f647 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Wed, 2 Aug 2023 08:23:02 +0300 Subject: [PATCH 12/20] ramips: improve Xiaomi mi-mini indications Sets status indications led color on Xiaomi mi-mini router as other Xiaomi routers Signed-off-by: Ivan Pavlov --- target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 1dd3f2eb47..95868c9be9 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -8,8 +8,8 @@ model = "Xiaomi MiWiFi Mini"; aliases { - led-boot = &led_blue; - led-failsafe = &led_blue; + led-boot = &led_yellow; + led-failsafe = &led_red; led-running = &led_blue; led-upgrade = &led_blue; label-mac-device = ðernet; @@ -25,15 +25,14 @@ led_blue: blue { label = "blue:status"; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; - default-state = "on"; }; - yellow { + led_yellow: yellow { label = "yellow:status"; gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; - red { + led_red: red { label = "red:status"; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; From a87bc138cfccd8de06afaad81f7ba838a87fe4f8 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Wed, 2 Aug 2023 08:53:23 +0300 Subject: [PATCH 13/20] uboot-envtools: add u-boot env config for Xiaomi mi-mini Add u-boot env config for Xiaomi mi-mini for using fw_printenv and fw_setenv on this board Signed-off-by: Ivan Pavlov --- package/boot/uboot-envtools/files/ramips | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index c94f8d69c7..835b4ec3e1 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -105,6 +105,10 @@ snr,cpe-w4n-mt) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000" ;; +xiaomi,miwifi-mini) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" + ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000" + ;; xiaomi,mi-router-3g-v2|\ xiaomi,mi-router-4a-gigabit|\ xiaomi,miwifi-3c) From ff71035751bf440401b4bbc32e0b61ba11178234 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 13 Aug 2023 22:50:19 +0200 Subject: [PATCH 14/20] x86: Activate CONFIG_PCIEASPM This activates PCI Express ASPM control in Linux. Without this option it is completely controlled by the BIOS, now Linux will take over and apply some workarounds if needed. Fixes: #13248 Signed-off-by: Hauke Mehrtens --- target/linux/x86/64/config-5.15 | 5 +++++ target/linux/x86/generic/config-5.15 | 5 +++++ target/linux/x86/legacy/config-5.15 | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/target/linux/x86/64/config-5.15 b/target/linux/x86/64/config-5.15 index d80706338b..720809e985 100644 --- a/target/linux/x86/64/config-5.15 +++ b/target/linux/x86/64/config-5.15 @@ -356,6 +356,11 @@ CONFIG_PATA_VIA=y CONFIG_PCC=y # CONFIG_PCENGINES_APU2 is not set CONFIG_PCIEAER=y +CONFIG_PCIEASPM=y +CONFIG_PCIEASPM_DEFAULT=y +# CONFIG_PCIEASPM_PERFORMANCE is not set +# CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y CONFIG_PCIE_PME=y CONFIG_PCI_HYPERV=y diff --git a/target/linux/x86/generic/config-5.15 b/target/linux/x86/generic/config-5.15 index 29c1e43b22..0aa6f3da5a 100644 --- a/target/linux/x86/generic/config-5.15 +++ b/target/linux/x86/generic/config-5.15 @@ -308,6 +308,11 @@ CONFIG_PATA_TIMINGS=y CONFIG_PATA_VIA=y # CONFIG_PCENGINES_APU2 is not set CONFIG_PCIEAER=y +CONFIG_PCIEASPM=y +CONFIG_PCIEASPM_DEFAULT=y +# CONFIG_PCIEASPM_PERFORMANCE is not set +# CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y CONFIG_PCIE_PME=y CONFIG_PCI_MMCONFIG=y diff --git a/target/linux/x86/legacy/config-5.15 b/target/linux/x86/legacy/config-5.15 index d6802d6c99..8e17703cbc 100644 --- a/target/linux/x86/legacy/config-5.15 +++ b/target/linux/x86/legacy/config-5.15 @@ -184,6 +184,11 @@ CONFIG_PATA_SIS=y CONFIG_PATA_TIMINGS=y CONFIG_PATA_VIA=y CONFIG_PCIEAER=y +CONFIG_PCIEASPM=y +CONFIG_PCIEASPM_DEFAULT=y +# CONFIG_PCIEASPM_PERFORMANCE is not set +# CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEPORTBUS=y CONFIG_PCI_MMCONFIG=y # CONFIG_PCWATCHDOG is not set From 54d470ed0ecaff9e8084c013ddbc95e8afc3ab42 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 13 Aug 2023 23:02:03 +0200 Subject: [PATCH 15/20] x86: Add virtualization time sync support This compiles the CONFIG_PTP_1588_CLOCK support into the kernel binary and activates the drivers for KVM and VMware which allow syncing the host time with the VM when OpenWrt is running in a VM. With this change the CONFIG_HYPERV_UTILS driver is now build into the kernel, because it depends on the PTP framework being compiled in. CONFIG_HYPERV_UTILS was build as a module, but not packages before. Fixes: #13277 Signed-off-by: Hauke Mehrtens --- target/linux/x86/64/config-5.15 | 5 +++++ target/linux/x86/generic/config-5.15 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/target/linux/x86/64/config-5.15 b/target/linux/x86/64/config-5.15 index 720809e985..28a4758e57 100644 --- a/target/linux/x86/64/config-5.15 +++ b/target/linux/x86/64/config-5.15 @@ -328,6 +328,7 @@ CONFIG_ND_CLAIM=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_FAILOVER=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NITRO_ENCLAVES is not set CONFIG_NR_CPUS=512 CONFIG_NR_CPUS_DEFAULT=64 @@ -395,7 +396,11 @@ CONFIG_PM_SLEEP_SMP=y CONFIG_PNP=y CONFIG_PNPACPI=y CONFIG_PNP_DEBUG_MESSAGES=y +CONFIG_PPS=y CONFIG_PROC_EVENTS=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_KVM=y +CONFIG_PTP_1588_CLOCK_VMW=y CONFIG_PVH=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y diff --git a/target/linux/x86/generic/config-5.15 b/target/linux/x86/generic/config-5.15 index 0aa6f3da5a..06f0008021 100644 --- a/target/linux/x86/generic/config-5.15 +++ b/target/linux/x86/generic/config-5.15 @@ -285,6 +285,7 @@ CONFIG_ND_CLAIM=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_FAILOVER=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_PTP_CLASSIFY=y CONFIG_NO_HZ=y CONFIG_NR_CPUS=4 CONFIG_NR_CPUS_DEFAULT=8 @@ -346,8 +347,12 @@ CONFIG_PNP=y CONFIG_PNPACPI=y # CONFIG_PNPBIOS is not set CONFIG_PNP_DEBUG_MESSAGES=y +CONFIG_PPS=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PROC_EVENTS=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_KVM=y +CONFIG_PTP_1588_CLOCK_VMW=y CONFIG_PVH=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y From dfdaa3630bf718c7c7f42c85adb4ddfdb7d4f59c Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 30 Jul 2023 13:24:25 +0200 Subject: [PATCH 16/20] tools: mold: update to 2.1.0 v2.0.0: - transition from AGPL to MIT - Previously, mold could not produce an object file with more than 65520 sections using the --relocatable option. Now the bug has been fixed. - mold now interprets -undefined as a synonym for --undefined instead of -u ndefined. This seems inconsistent, as -ufoo is generally treated as -u foo (which is an alias for --undefined foo), but this is the behavior of the GNU linkers and LLVM lld, so we prioritize compatibility over consistency. - -nopie is now handled as a synonym for --no-pie. - [RISC-V] R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128 relocation types are now supported (4bffe26, 1ac5fe7) - [PPC64] R_PPC64_REL32 relocation type is now supported. (ebd780e) v2.1.0: - Loongson's LoongArch CPU has been supported. (03b1a1c) - -z nosectionheader has been added to eliminate section headers from the output file. (084ca55) - Previously, linking with the -z pack-relative-relocs option produces an executable that glibc 2.38 refuses to run with DT_RELR without GLIBC_ABI_DT_RELR dependency error. Now, mold produces binaries compatible with glibc 2.38. (f467ad1) - [ARM64] R_AARCH64_ADR_PREL_PG_HI21_NC relocation type has been supported. (17a5c3e) - [ARM64] R_AARCH64_MOVW_UABS_G3 relocation type has now been handled as a PLT-generating relocation to fix an issue when main is not defined in the main executable but rather in a .so file. (e764557) - [RISC-V] We now merge input .riscv.attributes contents. Previously, we just concatenated them. (aa64491) Signed-off-by: Andre Heider --- tools/mold/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mold/Makefile b/tools/mold/Makefile index e8fcecbfed..b266cea77d 100644 --- a/tools/mold/Makefile +++ b/tools/mold/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mold -PKG_VERSION:=1.11.0 +PKG_VERSION:=2.1.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags -PKG_HASH:=99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f +PKG_HASH:=a32bec1282671b18ea4691855aed925ea2f348dfef89cb7689cd81273ea0c5df include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk From cbf8c76d0a30838961553b75ba038ecc7a29a621 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 11 Aug 2023 19:17:26 -0700 Subject: [PATCH 17/20] tools/meson: update to 1.2.1 Remove PKG_RELEASE as it's not really used with tools. Changelog: https://mesonbuild.com/Release-notes-for-1-2-0.html Signed-off-by: Rosen Penev --- tools/meson/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/meson/Makefile b/tools/meson/Makefile index f957bfb49f..23bb393a59 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -1,12 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=1.1.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) -PKG_HASH:=d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c +PKG_HASH:=b1db3a153087549497ee52b1c938d2134e0338214fe14f7efd16fecd57b639f5 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 From 728581dc4bc7f32a29b1fbba6aa54ed6266feb33 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 15 Mar 2023 20:02:45 -0700 Subject: [PATCH 18/20] prereq-build: increase GCC requirement to 8 The current minimum OS requirement for OpenWrt is Ubuntu 18.04, which includes 7 and 8. 8 is necessary for ccache. gcc and g+++ are now symlinked to staging_dir, similar to Python. Signed-off-by: Rosen Penev --- include/prereq-build.mk | 22 ++++++++++++---------- rules.mk | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 5b63490ca3..e5f20fff22 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -32,28 +32,30 @@ $(eval $(call TestHostCommand,proper-umask, \ ifndef IB $(eval $(call SetupHostCommand,gcc, \ - Please install the GNU C Compiler (gcc) 6 or later, \ - $(CC) -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \ - gcc -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \ + Please install the GNU C Compiler (gcc) 8 or later, \ + $(CC) -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ + gcc -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ + gcc-8 -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ gcc --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-gcc, \ - Please reinstall the GNU C Compiler (6 or later) - \ + Please reinstall the GNU C Compiler (8 or later) - \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ - gcc -x c -o $(TMP_DIR)/a.out -)) + $(STAGING_DIR_HOST)/bin/gcc -x c -o $(TMP_DIR)/a.out -)) $(eval $(call SetupHostCommand,g++, \ - Please install the GNU C++ Compiler (g++) 6 or later, \ - $(CXX) -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \ - g++ -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \ + Please install the GNU C++ Compiler (g++) 8 or later, \ + $(CXX) -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ + g++ -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ + g++-8 -dumpversion | grep -E '^([8-9]\.?|1[0-9]\.?)', \ g++ --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-g++, \ - Please reinstall the GNU C++ Compiler (6 or later) - \ + Please reinstall the GNU C++ Compiler (8 or later) - \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ - g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ + $(STAGING_DIR_HOST)/bin/g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) $(eval $(call RequireCHeader,ncurses.h, \ diff --git a/rules.mk b/rules.mk index ca27583d27..f298c8d794 100644 --- a/rules.mk +++ b/rules.mk @@ -240,8 +240,8 @@ PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config export PKG_CONFIG -HOSTCC:=gcc -HOSTCXX:=g++ +HOSTCC:=$(STAGING_DIR_HOST)/bin/gcc +HOSTCXX:=$(STAGING_DIR_HOST)/bin/g++ HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include) HOST_CXXFLAGS:= HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS) From 58c19759e41225386365f9b240bc8e2af9bba367 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 11 Aug 2023 19:13:41 -0700 Subject: [PATCH 19/20] tools/pkgconf: update to 2.0.1 Changes from 2.0.0 to 2.0.1: ---------------------------- * The behavior of --modversion was largely reverted back to the traditional pkg-config behavior, but still operates on a solved dependency graph. The order of --modversion output is based on the dependency resolution queue which is passed to the solver, which itself generally maps to the order of the constrants provided on the command line. * A new flag, --verbose, has been added. When used with `--modversion`, it is possible to disambiguate which version belongs to which module: % pkgconf --modversion --verbose foo bar foo: 1.2.3 bar: 1.3 Changes from 1.9.5 to 2.0.0: ---------------------------- * When flattening the dependency graph, retain the latest seen edges rather than the earliest. * Fix a long-standing bug where the dependency resolution queue was evaluated in reverse. This bug masked the aforementioned dependency flattening bug in many cases. * Fix handling of --with-path, which was appending paths to the search list rather than prepending them as intended. * Error when --modversion is requested with more than one package, as the output is ambiguous. Signed-off-by: Rosen Penev --- tools/pkgconf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pkgconf/Makefile b/tools/pkgconf/Makefile index d0a8a271d9..da1f005be6 100644 --- a/tools/pkgconf/Makefile +++ b/tools/pkgconf/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pkgconf -PKG_VERSION:=1.9.5 +PKG_VERSION:=2.0.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf -PKG_HASH:=1ac1656debb27497563036f7bffc281490f83f9b8457c0d60bcfb638fb6b6171 +PKG_HASH:=3238af7473740844e5159dd8fb6540603e3fbcebf60beb3c8a426cdca2e29c51 PKG_CPE_ID:=cpe:/a:pkgconf:pkgconf From 497012ab4eb1f37cbbbff9a766d2fecdb43dd0db Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 14 Aug 2023 23:33:49 +0200 Subject: [PATCH 20/20] scripts: qemustart: Fix x86/legacy bootup The ide-drive option was renamed to ide-hd in qemu 6.0. With this change qemu is starting again on Debian 12. Signed-off-by: Hauke Mehrtens --- scripts/qemustart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qemustart b/scripts/qemustart index f6a4655129..6c4c9be4cb 100755 --- a/scripts/qemustart +++ b/scripts/qemustart @@ -309,12 +309,12 @@ start_qemu_x86() { # To use AHCI interface # # -device ich9-ahci,id=ahci \ - # -device ide-drive,drive=drv0,bus=ahci.0 \ + # -device ide-hd,drive=drv0,bus=ahci.0 \ # -drive "file=$rootfs,format=raw,id=drv0,if=none" \ # # [1] https://dev.openwrt.org/ticket/17947 "$qemu_exe" -machine "$mach" -nographic \ - -device ide-drive,drive=drv0 \ + -device ide-hd,drive=drv0 \ -drive "file=$rootfs,format=raw,id=drv0,if=none" \ "${o_qemu_extra[@]}" ;;