Re: [PATCH] octeontx: add linux 5.10 testing kernel support

2021-09-12 Thread Daniel Danzberger
On Sat, 2021-09-04 at 15:18 +0200, Daniel Danzberger wrote:
> > > 
> > > > +CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
> > > 
> > > CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y might not be a performance
> > > win,
> > > especially with only 1 GiB of RAM. Should be measured, otherwise
> > > MADVISE should be selected instead.
> > Same here, it was selected in the 5.4 kernel config and I have only
> > run
> > tested with this option so far.
> > Let me do some benchmarking with MADVISE before we continue here
> > ...
> Looks like none of the processes running even gets a huge page:
> --
> root@OpenWrt:~# grep AnonHugePages /proc/meminfo 
> AnonHugePages: 0 kB
> root@OpenWrt:~# 
> --
> Even my test tool that just allocs one 8MB block doesn't get one.
> Looks like CONFIG_TRANSPARENT_HUGEPAGE isn't working on this
> platform.
After further testing, huge pages only get used when memory is
allocated >= 2MB with mmap() on arm64.
Unlike on x86 where processes get a huge page when using malloc() or
mmap() >= 2MB.
So I think we can safely keep CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y like
in 5.4



-- 
Regards

Daniel Danzberger
embeDD GmbH, Alter Postplatz 2, CH-6370 Stans


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] octeontx: add linux 5.10 testing kernel support

2021-09-12 Thread Daniel Danzberger
Changes from 5.4 to 5.10:
-
 - patches from 5.4 are all upstream for 5.10 execpt for
   0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

 - disable block device data integrity (DIF/DIX/T10) in default config
   (CONFIG_BLK_DEV_INTEGRITY)
   This feature is only supported by:
 - Enterprise SAS/SCSI HBAs and Disks
 - Software raid
 - NVMEs with metadata capabilities (most don't have this)
   None of which are part of any octeontx boards.

 - arm64 TEXT_OFFSET (0x8) has been removed after 5.4
   This will break Uimages with kernel load addresses that aren't 2MiB
   aligned any longer. Resulting in the kernel silently fail to boot.
   For Gatworks newport boards for example, the uimage kernel load
   and execute address is 0x2008. These need to be changed to
   0x2000 when running kernels beyond 5.4.

Tested-on: Gateworks Newport GW64xx

Signed-off-by: Daniel Danzberger 
---
 target/linux/octeontx/Makefile|   1 +
 target/linux/octeontx/config-5.10 | 423 ++
 ...r-Gateworks-PLX-PEX860x-switch-with-.patch |  59 +++
 3 files changed, 483 insertions(+)
 create mode 100644 target/linux/octeontx/config-5.10
 create mode 100644 
target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile
index c30799b744..44bbc76a43 100644
--- a/target/linux/octeontx/Makefile
+++ b/target/linux/octeontx/Makefile
@@ -10,6 +10,7 @@ BOARDNAME:=Octeon-TX
 FEATURES:=targz pcie gpio rtc usb fpu
 
 KERNEL_PATCHVER:=5.4
+KERNEL_TESTING_PATCHVER:=5.10
 
 define Target/Description
Build images for Octeon-TX CN80XX/CN81XX based boards
diff --git a/target/linux/octeontx/config-5.10 
b/target/linux/octeontx/config-5.10
new file mode 100644
index 00..6e9cdc1de2
--- /dev/null
+++ b/target/linux/octeontx/config-5.10
@@ -0,0 +1,423 @@
+CONFIG_64BIT=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_HEADER=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=33
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_THUNDER=y
+CONFIG_ARM64=y
+CONFIG_ARM64_4K_PAGES=y
+CONFIG_ARM64_CNP=y
+CONFIG_ARM64_CRYPTO=y
+CONFIG_ARM64_ERRATUM_1165522=y
+CONFIG_ARM64_ERRATUM_1286807=y
+CONFIG_ARM64_ERRATUM_819472=y
+CONFIG_ARM64_ERRATUM_824069=y
+CONFIG_ARM64_ERRATUM_826319=y
+CONFIG_ARM64_ERRATUM_827319=y
+CONFIG_ARM64_ERRATUM_843419=y
+CONFIG_ARM64_HW_AFDBM=y
+CONFIG_ARM64_MODULE_PLTS=y
+CONFIG_ARM64_PAGE_SHIFT=12
+CONFIG_ARM64_PAN=y
+CONFIG_ARM64_PA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_PTR_AUTH=y
+CONFIG_ARM64_SVE=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_ARM64_UAO=y
+CONFIG_ARM64_VA_BITS=48
+# CONFIG_ARM64_VA_BITS_39 is not set
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_ARM64_VHE=y
+CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
+CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
+CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_CPUIDLE=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GIC_V2M=y
+CONFIG_ARM_GIC_V3=y
+CONFIG_ARM_GIC_V3_ITS=y
+CONFIG_ARM_GIC_V3_ITS_PCI=y
+CONFIG_ARM_PSCI_FW=y
+CONFIG_ARM_SBSA_WATCHDOG=y
+CONFIG_ATA=y
+# CONFIG_ATA_SFF is not set
+CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
+CONFIG_BALLOON_COMPACTION=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_BLK_PM=y
+CONFIG_BLK_SCSI_REQUEST=y
+CONFIG_CAVIUM_ERRATUM_22375=y
+CONFIG_CAVIUM_ERRATUM_23144=y
+CONFIG_CAVIUM_ERRATUM_23154=y
+CONFIG_CAVIUM_ERRATUM_27456=y
+CONFIG_CAVIUM_ERRATUM_30115=y
+CONFIG_CAVIUM_TX2_ERRATUM_219=y
+CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_CS2000_CP=y
+# CONFIG_COMPAT_32BIT_TIME is not set
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRASH_CORE=y
+CONFIG_CRASH_DUMP=y
+CONFIG_CRC16=y
+CONFIG_CRC7=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRYPTO_AES_ARM64=y
+CONFIG_CRYPTO_AES_ARM64_CE=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_DRBG=y

[PATCH v2] sunxi: bring up DSA b53 switch on Lamobo R1

2021-09-12 Thread Daniel Golle
Build cortexa7 subtarget with DSA driver for MDIO-connected Broadcom
BCM53xxx switches. This is needed for the Lamobo R1 aka. BananaPi
BPi-R1 board which comes with such a switch IC.

Remove old swconfig driver from target kernel config as the only board
using it is now supported by the DSA driver.

No changes to device tree are needed as upstream DTS already got a
DSA switch definition and we are just using that upstream source.

Update default network config of the Lamobo R1 to create lan bridge
with all 4 lan ports.

Introduce DEVICE_COMPAT_VERSION for the board to inform users about
having the re-create their network configuration and add device alias
as Bananapi BPi-R1 while at it.

Signed-off-by: Daniel Golle 
---
I do not have the hardware for testing myself, just following user
reporting non-working image with current swconfig hackery in forums:

https://forum.openwrt.org/t/banana-pi-r1-not-able-to-create-a-working-image/105984/5


 .../sunxi/base-files/etc/board.d/02_network   |  3 +-
 .../base-files/etc/board.d/05_compat-version  | 15 
 target/linux/sunxi/config-5.4 |  4 -
 target/linux/sunxi/cortexa7/config-5.4| 12 +++
 target/linux/sunxi/image/cortexa7.mk  |  6 +-
 ...un7i-Add-BCM53125-switch-nodes-to-th.patch | 86 ---
 6 files changed, 33 insertions(+), 93 deletions(-)
 create mode 100644 target/linux/sunxi/base-files/etc/board.d/05_compat-version
 delete mode 100644 
target/linux/sunxi/patches-5.4/310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network 
b/target/linux/sunxi/base-files/etc/board.d/02_network
index 5b59333b1f..d5c615e7f2 100644
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -11,8 +11,7 @@ friendlyarm,nanopi-r1)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 lamobo,lamobo-r1)
-   ucidef_add_switch "switch0" \
-   "4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0"
+   ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
;;
 olimex,a20-olinuxino-micro)
ucidef_set_interface_lan "wlan0"
diff --git a/target/linux/sunxi/base-files/etc/board.d/05_compat-version 
b/target/linux/sunxi/base-files/etc/board.d/05_compat-version
new file mode 100644
index 00..3fc777eb69
--- /dev/null
+++ b/target/linux/sunxi/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,15 @@
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+   lamobo,lamobo-r1)
+   ucidef_set_compat_version "1.1"
+   ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/sunxi/config-5.4 b/target/linux/sunxi/config-5.4
index 377234b828..e01a2cbd5e 100644
--- a/target/linux/sunxi/config-5.4
+++ b/target/linux/sunxi/config-5.4
@@ -523,10 +523,6 @@ CONFIG_SUNXI_SRAM=y
 CONFIG_SUNXI_WATCHDOG=y
 CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWCONFIG=y
-CONFIG_SWCONFIG_B53=y
-CONFIG_SWCONFIG_B53_PHY_DRIVER=y
-CONFIG_SWCONFIG_B53_PHY_FIXUP=y
 CONFIG_SWIOTLB=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y
diff --git a/target/linux/sunxi/cortexa7/config-5.4 
b/target/linux/sunxi/cortexa7/config-5.4
index 0b3697028f..4ead820881 100644
--- a/target/linux/sunxi/cortexa7/config-5.4
+++ b/target/linux/sunxi/cortexa7/config-5.4
@@ -13,3 +13,15 @@ CONFIG_MDIO_BUS_MUX=y
 # CONFIG_PINCTRL_SUN50I_H6 is not set
 # CONFIG_PINCTRL_SUN50I_H6_R is not set
 CONFIG_UNWINDER_ARM=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_TAG_BRCM=y
+CONFIG_NET_DSA_TAG_BRCM_COMMON=y
+CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_B53=y
+CONFIG_B53_MDIO_DRIVER=y
+# CONFIG_B53_MMAP_DRIVER is not set
+# CONFIG_B53_SERDES is not set
+# CONFIG_B53_SPI_DRIVER is not set
+# CONFIG_B53_SRAB_DRIVER is not set
diff --git a/target/linux/sunxi/image/cortexa7.mk 
b/target/linux/sunxi/image/cortexa7.mk
index 59f11bc83c..28fac13064 100644
--- a/target/linux/sunxi/image/cortexa7.mk
+++ b/target/linux/sunxi/image/cortexa7.mk
@@ -64,7 +64,11 @@ TARGET_DEVICES += friendlyarm_zeropi
 define Device/lamobo_lamobo-r1
   DEVICE_VENDOR := Lamobo
   DEVICE_MODEL := Lamobo R1
-  DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-basic-wolfssl
+  DEVICE_ALT0_VENDOR := Bananapi
+  DEVICE_ALT0_MODEL := BPi-R1
+  DEVICE_PACKAGES := kmod-ata-sunxi kmod-rtl8192cu wpad-basic-wolfssl
+  DEVICE_COMPAT_VERSION := 1.1
+  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
   SOC := sun7i-a20
 endef
 TARGET_DEVICES += lamobo_lamobo-r1
diff --git 
a/target/linux/sunxi/patches-5.4/310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch
 
b/target/linux/sunxi/patches-5.4/310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch
deleted file mode 100644
index 79c1671de1..00
--- 
a/target/linux/sunxi/patches-5.4/310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch
+++ 

Re: [PATCH,opkg-lede] opkg_remove: avoid remove pkg repeatly with option --force-removal-of-dependent-packages

2021-09-12 Thread Etienne Champetier
+ @Jo-Philipp Wich

Tested using mvebu target removing librt

Le mar. 7 sept. 2021 à 18:42, Etienne Champetier
 a écrit :
>
> From: Hongxu Jia 
>
> While remove pkg with '--force-removal-of-dependent-packages',
> pkg may be added to pkgs remove list multiple times, add status
> check to make sure pkg only be removed once.
>
> Signed-off-by: Hongxu Jia 
> Signed-off-by: Paul Barker 
> (Cherry picked from 
> https://git.yoctoproject.org/cgit/cgit.cgi/opkg/commit/?id=e8996180833aa35d101fbeadec3d787ce0bbda5c)
> (Fixes https://dev.archive.openwrt.org/ticket/18320 and openwrt/packages CI)
> ---
>  libopkg/opkg_remove.c | 8 
>  1 file changed, 8 insertions(+)
>
> diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
> index 96ca558..c2abf81 100644
> --- a/libopkg/opkg_remove.c
> +++ b/libopkg/opkg_remove.c
> @@ -249,6 +249,14 @@ int opkg_remove_pkg(pkg_t * pkg, int from_upgrade)
> if ((parent_pkg = pkg->parent) == NULL)
> return 0;
>
> +   /* While remove pkg with '--force-removal-of-dependent-packages',
> +  pkg may be added to remove list multiple times, add status
> +  check to make sure pkg only be removed once. */
> +   if (conf->force_removal_of_dependent_packages &&
> +   pkg->state_flag & SF_FILELIST_CHANGED &&
> +   pkg->state_status == SS_NOT_INSTALLED)
> +   return 0;
> +
> /* only attempt to remove dependent installed packages if
>  * force_depends is not specified or the package is being
>  * replaced.
> --
> 2.31.1
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Build issues gcc10

2021-09-12 Thread Stefan Lippers-Hollmann
Hi

On 2021-09-12, Adrian Schmutzler wrote:
> Hi,
>
> I'm having build issues with master and (default) gcc10 on ipq targets.

Just for reference, I've just (successfully) tried an ipq806x build on
a long-standing, but fully updated, Debian/ unstable host, using gcc-10
on the host

$ gcc --version
gcc (Debian 10.3.0-10) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is 
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

and for the OpenWrt build

$ grep CONFIG_GCC_VERSION .config
CONFIG_GCC_VERSION="10.3.0"

$ git describe
reboot-17502-g0470159552

Rather minimal build-config (no feeds installed), roughly matching the
buildbot configs (just omitting the imagebuilder):

$ ./scripts/diffconfig.sh
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_askey_rt4230w-rev6=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_askey_rt4230w-rev6=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_asrock_g10=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_asrock_g10=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_buffalo_wxr-2533dhp=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_buffalo_wxr-2533dhp=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_compex_wpq864=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_compex_wpq864=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_edgecore_ecw5410=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_edgecore_ecw5410=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_linksys_ea7500-v1=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_linksys_ea7500-v1=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_linksys_ea8500=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_linksys_ea8500=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_nec_wg2600hp=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_nec_wg2600hp=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_nec_wg2600hp3=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_nec_wg2600hp3=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_netgear_d7800=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_d7800=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_netgear_r7500=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_r7500=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_netgear_r7500v2=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_r7500v2=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_r7800=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_qcom_ipq8064-ap148-legacy=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_qcom_ipq8064-ap148-legacy=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_qcom_ipq8064-ap148=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_qcom_ipq8064-ap148=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_qcom_ipq8064-ap161=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_qcom_ipq8064-ap161=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_qcom_ipq8064-db149=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_qcom_ipq8064-db149=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_ad7200=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_ad7200=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c2600=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_vr2600v=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_vr2600v=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_ubnt_unifi-ac-hd=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_ubnt_unifi-ac-hd=""
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_zyxel_nbg6817=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_zyxel_nbg6817=""
CONFIG_ALL_KMODS=y
CONFIG_ALL_NONSHARED=y
CONFIG_DEVEL=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_TARGET_ALL_PROFILES=y

$ ls -gG bin/targets/ipq806x/generic/
insgesamt 442620
-rw-r--r-- 1 3160 13. Sep 00:11 config.buildinfo
-rw-r--r-- 1  231 13. Sep 00:11 feeds.buildinfo
-rw-r--r-- 1  5892899 13. Sep 00:17 
openwrt-ipq806x-generic-askey_rt4230w-rev6-initramfs-uImage
-rw-r--r-- 1  6564648 13. Sep 00:17 
openwrt-ipq806x-generic-askey_rt4230w-rev6-squashfs-sysupgrade.bin
-rw-r--r-- 1  8314584 13. Sep 00:17 
openwrt-ipq806x-generic-asrock_g10-initramfs-fit-uImage.itb
-rw-r--r-- 1  8388630 13. Sep 00:17 
openwrt-ipq806x-generic-asrock_g10-squashfs-nand-factory.bin
-rw-r--r-- 1  7803672 13. Sep 00:17 
openwrt-ipq806x-generic-asrock_g10-squashfs-nand-sysupgrade.bin
-rw-r--r-- 1  5894107 13. Sep 00:17 
openwrt-ipq806x-generic-buffalo_wxr-2533dhp-initramfs-uImage
-rw-r--r-- 1  6523690 13. Sep 00:17 
openwrt-ipq806x-generic-buffalo_wxr-2533dhp-squashfs-sysupgrade.bin
-rw-r--r-- 1  8317840 13. Sep 00:17 
openwrt-ipq806x-generic-compex_wpq864-initramfs-fit-uImage.itb

[PATCH 4/4] toolchain/musl: Remove extra format attribute patch

2021-09-12 Thread Hauke Mehrtens
This patch never went upstream so remove it. GCC should already add such
a check to the common functions.

Signed-off-by: Hauke Mehrtens 
---
 ...ribute-to-some-function-declarations.patch | 197 --
 1 file changed, 197 deletions(-)
 delete mode 100644 
toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch

diff --git 
a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
 
b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
deleted file mode 100644
index 06aeb34ced02..
--- 
a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From e6683d001a95d7c3d4d992496f00f77e01fcd268 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens 
-Date: Sun, 22 Nov 2015 15:04:23 +0100
-Subject: [PATCH v2] Add format attribute to some function declarations
-
-GCC and Clang are able to check the format arguments given to a
-function and warn the user if there is a error in the format arguments
-or if there is a potential uncontrolled format string security problem
-in the code. GCC does this automatically for some functions like
-printf(), but it is also possible to annotate other functions in a way
-that it will check them too. This feature is used by glibc for many
-functions. This patch adds the attribute to the some functions of musl
-expect for these functions where gcc automatically adds it.
-
-GCC automatically adds checks for these functions: printf, fprintf,
-sprintf, scanf, fscanf, sscanf, strftime, vprintf, vfprintf and
-vsprintf.
-
-The documentation from gcc is here:
-https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
-
-The documentation from Clang is here:
-http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
-
-Signed-off-by: Hauke Mehrtens 

- include/err.h  | 26 +-
- include/monetary.h | 12 ++--
- include/stdio.h| 29 -
- include/syslog.h   | 12 ++--
- 4 files changed, 57 insertions(+), 22 deletions(-)
-
 a/include/err.h
-+++ b/include/err.h
-@@ -8,15 +8,23 @@
- extern "C" {
- #endif
- 
--void warn(const char *, ...);
--void vwarn(const char *, va_list);
--void warnx(const char *, ...);
--void vwarnx(const char *, va_list);
-+#if __GNUC__ >= 3
-+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y)))
-+#else
-+#define __fp(x, y)
-+#endif
-+
-+void warn(const char *, ...) __fp(1, 2);
-+void vwarn(const char *, va_list) __fp(1, 0);
-+void warnx(const char *, ...) __fp(1, 2);
-+void vwarnx(const char *, va_list) __fp(1, 0);
-+
-+_Noreturn void err(int, const char *, ...) __fp(2, 3);
-+_Noreturn void verr(int, const char *, va_list) __fp(2, 0);
-+_Noreturn void errx(int, const char *, ...) __fp(2, 3);
-+_Noreturn void verrx(int, const char *, va_list) __fp(2, 0);
- 
--_Noreturn void err(int, const char *, ...);
--_Noreturn void verr(int, const char *, va_list);
--_Noreturn void errx(int, const char *, ...);
--_Noreturn void verrx(int, const char *, va_list);
-+#undef __fp
- 
- #ifdef __cplusplus
- }
 a/include/monetary.h
-+++ b/include/monetary.h
-@@ -13,8 +13,16 @@ extern "C" {
- 
- #include 
- 
--ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...);
--ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, 
...);
-+#if __GNUC__ >= 3
-+#define __fsfm(x, y) __attribute__ ((__format__ (__strfmon__, x, y)))
-+#else
-+#define __fsfm(x, y)
-+#endif
-+
-+ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...) 
__fsfm(3, 4);
-+ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, 
...) __fsfm(4, 5);
-+
-+#undef __fsfm
- 
- #ifdef __cplusplus
- }
 a/include/stdio.h
-+++ b/include/stdio.h
-@@ -25,6 +25,14 @@ extern "C" {
- 
- #include 
- 
-+#if __GNUC__ >= 3
-+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y)))
-+#define __fs(x, y) __attribute__ ((__format__ (__scanf__, x, y)))
-+#else
-+#define __fp(x, y)
-+#define __fs(x, y)
-+#endif
-+
- #ifdef __cplusplus
- #define NULL 0L
- #else
-@@ -107,19 +115,19 @@ int puts(const char *);
- int printf(const char *__restrict, ...);
- int fprintf(FILE *__restrict, const char *__restrict, ...);
- int sprintf(char *__restrict, const char *__restrict, ...);
--int snprintf(char *__restrict, size_t, const char *__restrict, ...);
-+int snprintf(char *__restrict, size_t, const char *__restrict, ...) __fp(3, 
4);
- 
- int vprintf(const char *__restrict, __isoc_va_list);
- int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list);
- int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list);
--int vsnprintf(char *__restrict, size_t, const char *__restrict, 
__isoc_va_list);
-+int vsnprintf(char *__restrict, size_t, const char *__restrict, 
__isoc_va_list) __fp(3, 0);
- 
- int scanf(const char *__restrict, ...);
- int fscanf(FILE *__restrict, const char 

[PATCH 3/4] bpftools: fix compilation with musl 1.2.x

2021-09-12 Thread Hauke Mehrtens
From: Rosen Penev 

A definition for __maybe_inline is needed.

Refreshed patches.

Signed-off-by: Rosen Penev 
---
 .../utils/bpftools/patches/006-musl-120.patch | 20 +++
 1 file changed, 20 insertions(+)
 create mode 100644 package/network/utils/bpftools/patches/006-musl-120.patch

diff --git a/package/network/utils/bpftools/patches/006-musl-120.patch 
b/package/network/utils/bpftools/patches/006-musl-120.patch
new file mode 100644
index ..53be466f0bb6
--- /dev/null
+++ b/package/network/utils/bpftools/patches/006-musl-120.patch
@@ -0,0 +1,20 @@
+--- a/tools/bpf/bpftool/btf_dumper.c
 b/tools/bpf/bpftool/btf_dumper.c
+@@ -5,6 +5,7 @@
+ #include  /* for (FILE *) used by json_writer */
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/tools/bpf/bpftool/map_perf_ring.c
 b/tools/bpf/bpftool/map_perf_ring.c
+@@ -16,6 +16,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/4] toolchain/musl: remove several GNU headers

2021-09-12 Thread Hauke Mehrtens
From: Rosen Penev 

Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools has been
fixed separately.

Remove woresize.h file. It seems to be for an old version of GCC.

Remove features.h and glibc-types files. Same as above.

Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
that use it have already been patched.

Tested with all packages in the base tree. They all compile.

Signed-off-by: Rosen Penev 
---
 toolchain/musl/include/bits/wordsize.h|   1 -
 toolchain/musl/include/features.h |  56 ---
 toolchain/musl/include/sgidefs.h  |  73 
 toolchain/musl/include/sys/cdefs.h| 378 --
 toolchain/musl/include/sys/glibc-types.h  |  35 --
 .../musl/patches/100-add_glob_onlydir.patch   |  11 -
 6 files changed, 554 deletions(-)
 delete mode 100644 toolchain/musl/include/bits/wordsize.h
 delete mode 100644 toolchain/musl/include/features.h
 delete mode 100644 toolchain/musl/include/sgidefs.h
 delete mode 100644 toolchain/musl/include/sys/cdefs.h
 delete mode 100644 toolchain/musl/include/sys/glibc-types.h
 delete mode 100644 toolchain/musl/patches/100-add_glob_onlydir.patch

diff --git a/toolchain/musl/include/bits/wordsize.h 
b/toolchain/musl/include/bits/wordsize.h
deleted file mode 100644
index 2d4cbe8317fc..
--- a/toolchain/musl/include/bits/wordsize.h
+++ /dev/null
@@ -1 +0,0 @@
-#include 
diff --git a/toolchain/musl/include/features.h 
b/toolchain/musl/include/features.h
deleted file mode 100644
index e801e2299a0d..
--- a/toolchain/musl/include/features.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _FEATURES_H
-#define _FEATURES_H
-
-#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
-#define _GNU_SOURCE 1
-#endif
-
-#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
-#define _BSD_SOURCE 1
-#endif
-
-#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
- && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
- && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
-#define _BSD_SOURCE 1
-#define _XOPEN_SOURCE 700
-#endif
-
-#if __STDC_VERSION__ >= 199901L
-#define __restrict restrict
-#elif !defined(__GNUC__)
-#define __restrict
-#endif
-
-#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
-#define __inline inline
-#elif !defined(__GNUC__)
-#define __inline
-#endif
-
-#if __STDC_VERSION__ >= 201112L
-#elif defined(__GNUC__)
-#define _Noreturn __attribute__((__noreturn__))
-#else
-#define _Noreturn
-#endif
-
-#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
-
-/* Convenience macros to test the versions of glibc and gcc.
-   Use them like this:
-   #if __GNUC_PREREQ (2,8)
-   ... code requiring gcc 2.8 or later ...
-   #endif
-   Note - they won't work for gcc1 or glibc1, since the _MINOR macros
-   were not defined then.  */
-#if defined __GNUC__ && defined __GNUC_MINOR__
-# define __GNUC_PREREQ(maj, min) \
-   ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-#else
-# define __GNUC_PREREQ(maj, min) 0
-#endif
-
-#include 
-
-#endif
diff --git a/toolchain/musl/include/sgidefs.h b/toolchain/musl/include/sgidefs.h
deleted file mode 100644
index 74509fdbd043..
--- a/toolchain/musl/include/sgidefs.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ralf Baechle .
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SGIDEFS_H
-#define _SGIDEFS_H 1
-
-/*
- * A crude hack to stop 
- */
-#undef __ASM_SGIDEFS_H
-#define __ASM_SGIDEFS_H
-
-/*
- * And remove any damage it might have already done
- */
-#undef _MIPS_ISA_MIPS1
-#undef _MIPS_ISA_MIPS2
-#undef _MIPS_ISA_MIPS3
-#undef _MIPS_ISA_MIPS4
-#undef _MIPS_ISA_MIPS5
-#undef _MIPS_ISA_MIPS32
-#undef _MIPS_ISA_MIPS64
-
-#undef _MIPS_SIM_ABI32
-#undef _MIPS_SIM_NABI32
-#undef _MIPS_SIM_ABI64
-
-/*
- * Definitions for the ISA level
- */
-#define _MIPS_ISA_MIPS1 1
-#define _MIPS_ISA_MIPS2 2
-#define _MIPS_ISA_MIPS3 3
-#define _MIPS_ISA_MIPS4 4
-#define _MIPS_ISA_MIPS5 5
-#define _MIPS_ISA_MIPS32 6
-#define _MIPS_ISA_MIPS64 7
-
-/*
- * Subprogram calling convention
- */
-#ifndef _ABIO32
-# define _ABIO32   1
-#endif
-#define _MIPS_SIM_ABI32_ABIO32
-

[PATCH 1/4] toolchain/musl: update to 1.2.2

2021-09-12 Thread Hauke Mehrtens
From: Rosen Penev 

This release introduces 64-bit time_t, which is needed to avoid the
year 2038 problem.

Remove upstream patches. Refreshed others.

Rebased features.h file based on latest musl.

Signed-off-by: Rosen Penev 
---
 toolchain/musl/common.mk  |  6 +-
 toolchain/musl/include/features.h | 10 ++-
 .../patches/110-read_timezone_from_fs.patch   |  4 +-
 .../patches/200-add_libssp_nonshared.patch|  8 +-
 toolchain/musl/patches/300-relative.patch |  2 +-
 ...ist-unlink-in-pthread_exit-after-all.patch | 51 ---
 ...hreads_minus_1-as-relaxed-atomic-for.patch | 69 --
 ...own-size-of-some-libc-struct-members.patch | 25 --
 ...pping-for-processes-that-return-to-s.patch | 90 ---
 ...00-nftw-support-common-gnu-extension.patch | 12 +--
 .../700-wcsnrtombs-cve-2020-28928.diff| 63 -
 .../musl/patches/901-crypt_size_hack.patch|  2 +-
 12 files changed, 26 insertions(+), 316 deletions(-)
 delete mode 100644 
toolchain/musl/patches/500-0001-reorder-thread-list-unlink-in-pthread_exit-after-all.patch
 delete mode 100644 
toolchain/musl/patches/500-0002-don-t-use-libc.threads_minus_1-as-relaxed-atomic-for.patch
 delete mode 100644 
toolchain/musl/patches/500-0003-cut-down-size-of-some-libc-struct-members.patch
 delete mode 100644 
toolchain/musl/patches/500-0004-restore-lock-skipping-for-processes-that-return-to-s.patch
 delete mode 100644 toolchain/musl/patches/700-wcsnrtombs-cve-2020-28928.diff

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 68098f5c6ab7..0f42a9eb603d 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=musl
-PKG_VERSION:=1.1.24
-PKG_RELEASE:=3
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://musl.libc.org/releases/
-PKG_HASH:=1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
+PKG_HASH:=9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd
 
 LIBC_SO_VERSION:=$(PKG_VERSION)
 PATCH_DIR:=$(PATH_PREFIX)/patches
diff --git a/toolchain/musl/include/features.h 
b/toolchain/musl/include/features.h
index edb8cc72d4cd..e801e2299a0d 100644
--- a/toolchain/musl/include/features.h
+++ b/toolchain/musl/include/features.h
@@ -1,10 +1,14 @@
 #ifndef _FEATURES_H
 #define _FEATURES_H
 
-#ifdef _ALL_SOURCE
+#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
 #define _GNU_SOURCE 1
 #endif
 
+#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
+#define _BSD_SOURCE 1
+#endif
+
 #if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
  && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
  && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
@@ -20,6 +24,8 @@
 
 #if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
 #define __inline inline
+#elif !defined(__GNUC__)
+#define __inline
 #endif
 
 #if __STDC_VERSION__ >= 201112L
@@ -29,6 +35,8 @@
 #define _Noreturn
 #endif
 
+#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
+
 /* Convenience macros to test the versions of glibc and gcc.
Use them like this:
#if __GNUC_PREREQ (2,8)
diff --git a/toolchain/musl/patches/110-read_timezone_from_fs.patch 
b/toolchain/musl/patches/110-read_timezone_from_fs.patch
index f92781f7ed8a..a1f54db55199 100644
--- a/toolchain/musl/patches/110-read_timezone_from_fs.patch
+++ b/toolchain/musl/patches/110-read_timezone_from_fs.patch
@@ -1,6 +1,6 @@
 --- a/src/time/__tz.c
 +++ b/src/time/__tz.c
-@@ -25,6 +25,9 @@ static int r0[5], r1[5];
+@@ -31,6 +31,9 @@ static int r0[5], r1[5];
  static const unsigned char *zi, *trans, *index, *types, *abbrevs, 
*abbrevs_end;
  static size_t map_size;
  
@@ -10,7 +10,7 @@
  static char old_tz_buf[32];
  static char *old_tz = old_tz_buf;
  static size_t old_tz_size = sizeof old_tz_buf;
-@@ -125,6 +128,15 @@ static void do_tzset()
+@@ -132,6 +135,15 @@ static void do_tzset()
"/usr/share/zoneinfo/\0/share/zoneinfo/\0/etc/zoneinfo/\0";
  
s = getenv("TZ");
diff --git a/toolchain/musl/patches/200-add_libssp_nonshared.patch 
b/toolchain/musl/patches/200-add_libssp_nonshared.patch
index 05bd2fe54a38..26a9bfebea48 100644
--- a/toolchain/musl/patches/200-add_libssp_nonshared.patch
+++ b/toolchain/musl/patches/200-add_libssp_nonshared.patch
@@ -7,7 +7,7 @@ Signed-off-by: Steven Barth 
 
 --- a/Makefile
 +++ b/Makefile
-@@ -66,7 +66,7 @@ CRT_LIBS = $(addprefix lib/,$(notdir $(C
+@@ -67,7 +67,7 @@ CRT_LIBS = $(addprefix lib/,$(notdir $(C
  STATIC_LIBS = lib/libc.a
  SHARED_LIBS = lib/libc.so
  TOOL_LIBS = lib/musl-gcc.specs
@@ -16,7 +16,7 @@ Signed-off-by: Steven Barth 
  ALL_TOOLS = obj/musl-gcc
  
  WRAPCC_GCC = gcc
-@@ -86,7 +86,7 @@ else
+@@ -88,7 +88,7 @@ else
  
  all: $(ALL_LIBS) $(ALL_TOOLS)
  
@@ -25,7 +25,7 @@ Signed-off-by: Steven Barth 
  
  $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) 
$(GENH_INT): | $(OBJ_DIRS)
  
-@@ -113,6 

[PATCH 0/4] toolchain/musl: update to version 1.2.2

2021-09-12 Thread Hauke Mehrtens
This updates musl to version 1.2.2 and removes some compatibility 
headers which are not needed any more. 
This was prepared by Rosen Penev and most changes for packages are 
already included in master.
musl 1.2 changes time_t from 32 bit to 64 bit also on 32 bit 
architectures. This is needed to prepare for the year 2038 problem when 
the 32 bit time_t will overflow.
We also have to update to continue to get updates.

After applying these changes the toolchain has to get rebuild. When I 
did not rebuild the toolchain my system was crashing with random memory 
problems. I do not know how to enforce a rebuild of the toolchain.

I would like to apply these patches in about 10 days if there are no 
objections.

Thank you Rosen for working on this.


Hauke Mehrtens (1):
  toolchain/musl: Remove extra format attribute patch

Rosen Penev (3):
  toolchain/musl: update to 1.2.2
  toolchain/musl: remove several GNU headers
  bpftools: fix compilation with musl 1.2.x

 .../utils/bpftools/patches/006-musl-120.patch |  20 +
 toolchain/musl/common.mk  |   6 +-
 toolchain/musl/include/bits/wordsize.h|   1 -
 toolchain/musl/include/features.h |  48 ---
 toolchain/musl/include/sgidefs.h  |  73 
 toolchain/musl/include/sys/cdefs.h| 378 --
 toolchain/musl/include/sys/glibc-types.h  |  35 --
 .../musl/patches/100-add_glob_onlydir.patch   |  11 -
 .../patches/110-read_timezone_from_fs.patch   |   4 +-
 .../patches/200-add_libssp_nonshared.patch|   8 +-
 toolchain/musl/patches/300-relative.patch |   2 +-
 ...ribute-to-some-function-declarations.patch | 197 -
 ...ist-unlink-in-pthread_exit-after-all.patch |  51 ---
 ...hreads_minus_1-as-relaxed-atomic-for.patch |  69 
 ...own-size-of-some-libc-struct-members.patch |  25 --
 ...pping-for-processes-that-return-to-s.patch |  90 -
 ...00-nftw-support-common-gnu-extension.patch |  12 +-
 .../700-wcsnrtombs-cve-2020-28928.diff|  63 ---
 .../musl/patches/901-crypt_size_hack.patch|   2 +-
 19 files changed, 37 insertions(+), 1058 deletions(-)
 create mode 100644 package/network/utils/bpftools/patches/006-musl-120.patch
 delete mode 100644 toolchain/musl/include/bits/wordsize.h
 delete mode 100644 toolchain/musl/include/features.h
 delete mode 100644 toolchain/musl/include/sgidefs.h
 delete mode 100644 toolchain/musl/include/sys/cdefs.h
 delete mode 100644 toolchain/musl/include/sys/glibc-types.h
 delete mode 100644 toolchain/musl/patches/100-add_glob_onlydir.patch
 delete mode 100644 
toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
 delete mode 100644 
toolchain/musl/patches/500-0001-reorder-thread-list-unlink-in-pthread_exit-after-all.patch
 delete mode 100644 
toolchain/musl/patches/500-0002-don-t-use-libc.threads_minus_1-as-relaxed-atomic-for.patch
 delete mode 100644 
toolchain/musl/patches/500-0003-cut-down-size-of-some-libc-struct-members.patch
 delete mode 100644 
toolchain/musl/patches/500-0004-restore-lock-skipping-for-processes-that-return-to-s.patch
 delete mode 100644 toolchain/musl/patches/700-wcsnrtombs-cve-2020-28928.diff

-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


RE: Build issues gcc10

2021-09-12 Thread Adrian Schmutzler
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Ansuel Smith
> Sent: Sonntag, 12. September 2021 19:50
> To: Adrian Schmutzler 
> Cc: Rui Salvaterra ; OpenWrt Development List
> 
> Subject: Re: Build issues gcc10
> 
> >
> > > -Original Message-
> > > From: Ansuel Smith [mailto:ansuels...@gmail.com]
> > > Sent: Sonntag, 12. September 2021 19:18
> > > To: Rui Salvaterra 
> > > Cc: Adrian Schmutzler ; OpenWrt
> > > Development List 
> > > Subject: Re: Build issues gcc10
> > >
> > > Il giorno dom 12 set 2021 alle ore 19:16 Rui Salvaterra
> > >  ha scritto:
> > > >
> > > > Hi, Adrian,
> > > >
> > > > On Sun, 12 Sept 2021 at 15:15, Adrian Schmutzler
> > > >  wrote:
> > > > >
> > > > > I'm having build issues with master and (default) gcc10 on ipq 
> > > > > targets.
> > > >
> > > > I don't know about ipq, but I jumped straight to GCC 11.2. Does it
> > > > make sense to bother with 10? That said…
> > > >
> > > > > xgcc: fatal error: cannot execute 'cc1plus': execvp: No such
> > > > > file or directory
> > > >
> > > > … you seem to be missing the C++ compiler.
> > >
> > > A missing dependency for the prereq? Could be that they changed the
> > > default package for debian 10 and 11 and nobody notice that?
> >
> > That was my first suspicion as well, but I didn't really have a good idea
> what's missing ...
> >
> >
> 
> Did you try reinstalling  build-essential ?

Yes, no change. Also tried various other additional apt packages.

Apart from that, the problem seems not to be limited to ipq targets.

In general, gcc 8 and 9 seem to build fine, and gcc 10 and 11 fail.

Best

Adrian

> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[sdwalker/sdwalker.github.io] b4ec28: This week's update

2021-09-12 Thread Stephen Walker via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: b4ec28920907cae310f8100e40c5caea795e6840
  
https://github.com/sdwalker/sdwalker.github.io/commit/b4ec28920907cae310f8100e40c5caea795e6840
  Author: Stephen Walker 
  Date:   2021-09-12 (Sun, 12 Sep 2021)

  Changed paths:
M uscan/index-18.06.html
M uscan/index-19.07.html
M uscan/index-21.02.html
M uscan/index.html

  Log Message:
  ---
  This week's update



--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/2] kernel: Add missing kernel config options

2021-09-12 Thread Hauke Mehrtens
These options are selectable when some of the kernel debug options like
KERNEL_SOFTLOCKUP_DETECTOR are selected.

Signed-off-by: Hauke Mehrtens 
---
 target/linux/archs38/config-5.4  | 1 -
 target/linux/generic/config-5.10 | 3 +++
 target/linux/generic/config-5.4  | 3 +++
 target/linux/layerscape/armv7/config-5.4 | 2 --
 target/linux/layerscape/armv8_64b/config-5.4 | 2 --
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/target/linux/archs38/config-5.4 b/target/linux/archs38/config-5.4
index 7e529f763381..9847daa7692a 100644
--- a/target/linux/archs38/config-5.4
+++ b/target/linux/archs38/config-5.4
@@ -50,7 +50,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_SCSI_REQUEST=y
-# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
 CONFIG_CC_HAS_KASAN_GENERIC=y
diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index a9160ee9b131..69544864804e 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -682,6 +682,8 @@ CONFIG_BLOCK=y
 # CONFIG_BONDING is not set
 # CONFIG_BOOKE_WDT is not set
 CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=3
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 # CONFIG_BOOTTIME_TRACING is not set
 # CONFIG_BOOT_CONFIG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1319,6 +1321,7 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DEFAULT_CUBIC=y
 CONFIG_DEFAULT_DEADLINE=y
 CONFIG_DEFAULT_HOSTNAME="(none)"
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DEFAULT_INIT=""
 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 # CONFIG_DEFAULT_NOOP is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index a568a9ea7f4e..22921379c56f 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -645,6 +645,8 @@ CONFIG_BLOCK=y
 # CONFIG_BONDING is not set
 # CONFIG_BOOKE_WDT is not set
 CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=3
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 CONFIG_BOOT_RAW=y
 CONFIG_BPF=y
@@ -1239,6 +1241,7 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DEFAULT_CUBIC=y
 CONFIG_DEFAULT_DEADLINE=y
 CONFIG_DEFAULT_HOSTNAME="(none)"
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DEFAULT_IOSCHED="deadline"
 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 # CONFIG_DEFAULT_NOOP is not set
diff --git a/target/linux/layerscape/armv7/config-5.4 
b/target/linux/layerscape/armv7/config-5.4
index ed2e318cd632..d1577e9bbe2c 100644
--- a/target/linux/layerscape/armv7/config-5.4
+++ b/target/linux/layerscape/armv7/config-5.4
@@ -72,7 +72,6 @@ CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
 CONFIG_BLK_SCSI_REQUEST=y
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
 CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 CONFIG_BOUNCE=y
 CONFIG_BRCMSTB_GISB_ARB=y
@@ -168,7 +167,6 @@ CONFIG_DECOMPRESS_GZIP=y
 CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DECOMPRESS_LZO=y
 CONFIG_DECOMPRESS_XZ=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEVFREQ_GOV_PASSIVE is not set
 # CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
diff --git a/target/linux/layerscape/armv8_64b/config-5.4 
b/target/linux/layerscape/armv8_64b/config-5.4
index 9214bf9feadb..94a3539b030d 100644
--- a/target/linux/layerscape/armv8_64b/config-5.4
+++ b/target/linux/layerscape/armv8_64b/config-5.4
@@ -88,7 +88,6 @@ CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
 CONFIG_BLK_SCSI_REQUEST=y
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
 CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
@@ -182,7 +181,6 @@ CONFIG_DECOMPRESS_GZIP=y
 CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DECOMPRESS_LZO=y
 CONFIG_DECOMPRESS_XZ=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEVICE_THERMAL is not set
 CONFIG_DEVTMPFS=y
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 1/2] build: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR

2021-09-12 Thread Hauke Mehrtens
The LOCKUP_DETECTOR configuration option split into the
SOFTLOCKUP_DETECTOR and HARDLOCKUP_DETECTOR configuration option some
time ago. The HARDLOCKUP_DETECTOR option is only working on some
architectures, but SOFTLOCKUP_DETECTOR should work everywhere. Replace
KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR.

LOCKUP_DETECTOR will be selected by SOFTLOCKUP_DETECTOR automatically.

Fixes: b951f53fbae3 ("build: Add additional kernel debug options")
Signed-off-by: Hauke Mehrtens 
---
 config/Config-kernel.in | 20 
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index f71114b5daa8..d4648a506444 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -436,34 +436,22 @@ config KERNEL_PROVE_LOCKING
select KERNEL_DEBUG_KERNEL
default n
 
-config KERNEL_LOCKUP_DETECTOR
-   bool "Compile the kernel with detect Hard and Soft Lockups"
+config KERNEL_SOFTLOCKUP_DETECTOR
+   bool "Compile the kernel with detect Soft Lockups"
depends on KERNEL_DEBUG_KERNEL
help
  Say Y here to enable the kernel to act as a watchdog to detect
- hard and soft lockups.
+ soft lockups.
 
  Softlockups are bugs that cause the kernel to loop in kernel
  mode for more than 20 seconds, without giving other tasks a
  chance to run.  The current stack trace is displayed upon
  detection and the system will stay locked up.
 
- Hardlockups are bugs that cause the CPU to loop in kernel mode
- for more than 10 seconds, without letting other interrupts have a
- chance to run.  The current stack trace is displayed upon detection
- and the system will stay locked up.
-
- The overhead should be minimal.  A periodic hrtimer runs to
- generate interrupts and kick the watchdog task every 4 seconds.
- An NMI is generated every 10 seconds or so to check for hardlockups.
-
- The frequency of hrtimer and NMI events and the soft and hard lockup
- thresholds can be controlled through the sysctl watchdog_thresh.
-
 config KERNEL_DETECT_HUNG_TASK
bool "Compile the kernel with detect Hung Tasks"
depends on KERNEL_DEBUG_KERNEL
-   default KERNEL_LOCKUP_DETECTOR
+   default KERNEL_SOFTLOCKUP_DETECTOR
help
  Say Y here to enable the kernel to detect "hung tasks",
  which are bugs that cause the task to be stuck in
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Build issues gcc10

2021-09-12 Thread Ansuel Smith
>
> > -Original Message-
> > From: Ansuel Smith [mailto:ansuels...@gmail.com]
> > Sent: Sonntag, 12. September 2021 19:18
> > To: Rui Salvaterra 
> > Cc: Adrian Schmutzler ; OpenWrt Development
> > List 
> > Subject: Re: Build issues gcc10
> >
> > Il giorno dom 12 set 2021 alle ore 19:16 Rui Salvaterra
> >  ha scritto:
> > >
> > > Hi, Adrian,
> > >
> > > On Sun, 12 Sept 2021 at 15:15, Adrian Schmutzler
> > >  wrote:
> > > >
> > > > I'm having build issues with master and (default) gcc10 on ipq targets.
> > >
> > > I don't know about ipq, but I jumped straight to GCC 11.2. Does it
> > > make sense to bother with 10? That said…
> > >
> > > > xgcc: fatal error: cannot execute 'cc1plus': execvp: No such file or
> > > > directory
> > >
> > > … you seem to be missing the C++ compiler.
> >
> > A missing dependency for the prereq? Could be that they changed the
> > default package for debian 10 and 11 and nobody notice that?
>
> That was my first suspicion as well, but I didn't really have a good idea 
> what's missing ...
>
>

Did you try reinstalling  build-essential ?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


RE: Build issues gcc10

2021-09-12 Thread Adrian Schmutzler
> -Original Message-
> From: Ansuel Smith [mailto:ansuels...@gmail.com]
> Sent: Sonntag, 12. September 2021 19:18
> To: Rui Salvaterra 
> Cc: Adrian Schmutzler ; OpenWrt Development
> List 
> Subject: Re: Build issues gcc10
> 
> Il giorno dom 12 set 2021 alle ore 19:16 Rui Salvaterra
>  ha scritto:
> >
> > Hi, Adrian,
> >
> > On Sun, 12 Sept 2021 at 15:15, Adrian Schmutzler
> >  wrote:
> > >
> > > I'm having build issues with master and (default) gcc10 on ipq targets.
> >
> > I don't know about ipq, but I jumped straight to GCC 11.2. Does it
> > make sense to bother with 10? That said…
> >
> > > xgcc: fatal error: cannot execute 'cc1plus': execvp: No such file or
> > > directory
> >
> > … you seem to be missing the C++ compiler.
> 
> A missing dependency for the prereq? Could be that they changed the
> default package for debian 10 and 11 and nobody notice that?

That was my first suspicion as well, but I didn't really have a good idea 
what's missing ...



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Build issues gcc10

2021-09-12 Thread Ansuel Smith
Il giorno dom 12 set 2021 alle ore 19:16 Rui Salvaterra
 ha scritto:
>
> Hi, Adrian,
>
> On Sun, 12 Sept 2021 at 15:15, Adrian Schmutzler
>  wrote:
> >
> > I'm having build issues with master and (default) gcc10 on ipq targets.
>
> I don't know about ipq, but I jumped straight to GCC 11.2. Does it
> make sense to bother with 10? That said…
>
> > xgcc: fatal error: cannot execute 'cc1plus': execvp: No such file or
> > directory
>
> … you seem to be missing the C++ compiler.

A missing dependency for the prereq? Could be that they changed the default
package for debian 10 and 11 and nobody notice that?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Build issues gcc10

2021-09-12 Thread Rui Salvaterra
Hi, Adrian,

On Sun, 12 Sept 2021 at 15:15, Adrian Schmutzler
 wrote:
>
> I'm having build issues with master and (default) gcc10 on ipq targets.

I don't know about ipq, but I jumped straight to GCC 11.2. Does it
make sense to bother with 10? That said…

> xgcc: fatal error: cannot execute 'cc1plus': execvp: No such file or
> directory

… you seem to be missing the C++ compiler.

Cheers,
Rui

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Build issues gcc10

2021-09-12 Thread Adrian Schmutzler
Hi,

I'm having build issues with master and (default) gcc10 on ipq targets.

Build fails with:

true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-O2
-I/data/openwrt/staging_dir/host/include " "CXXFLAGS=-g -O2"
"CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro" "INSTALL=/data/openwrt/staging_dir/host/bin/install
-c" "INSTALL_DATA=/data/openwrt/staging_dir/host/bin/install -c -m 644"
"INSTALL_PROGRAM=/data/openwrt/staging_dir/host/bin/install -c"
"INSTALL_SCRIPT=/data/openwrt/staging_dir/host/bin/install -c"
"LDFLAGS=-static-libstdc++ -static-libgcc " "LIBCFLAGS=-O2
-I/data/openwrt/staging_dir/host/include " "LIBCFLAGS_FOR_TARGET=-Os -pipe
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector
-D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" "MAKE=make"
"MAKEINFO=/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.
3.0_musl_eabi/gcc-10.3.0/missing makeinfo --split-size=500
--split-size=500 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash"
"EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS="
"exec_prefix=/data/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gc
c-10.3.0_musl_eabi"
"infodir=/data/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10
.3.0_musl_eabi/share/info"
"libdir=/data/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.
3.0_musl_eabi/lib"
"prefix=/data/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.
3.0_musl_eabi"
"tooldir=/data/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10
.3.0_musl_eabi/arm-openwrt-linux-muslgnueabi" "AR=ar" "AS=as" "CC=gcc"
"CXX=g++" "LD=ld" "LIBCFLAGS=-O2 -I/data/openwrt/staging_dir/host/include "
"NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[5]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/zlib'
make[5]: Entering directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libbacktrace'
make  all-am
make[6]: Entering directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libbacktrace'
true  DO=all multi-do # make
make[6]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libbacktrace'
make[5]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libbacktrace'
make[5]: Entering directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[5]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libcpp'
make[5]: Entering directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libdecnumber'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/libdecnumber'
make[5]: Entering directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/gcc'
/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_e
abi/gcc-10.3.0-final/./gcc/xgcc
-B/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl
_eabi/gcc-10.3.0-final/./gcc/ -xc++ -nostdinc /dev/null -S -o /dev/null
-fself-test=/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-1
0.3.0_musl_eabi/gcc-10.3.0/gcc/testsuite/selftests
xgcc: fatal error: cannot execute 'cc1plus': execvp: No such file or
directory
compilation terminated.
make[5]: ***
[/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0/gcc/cp/Make-lang.in:178: s-selftest-c++] Error 1
make[5]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final/gcc'
make[4]: *** [Makefile:4397: all-gcc] Error 2
make[4]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final'
make[3]: *** [Makefile:961: all] Error 2
make[3]: Leaving directory
'/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_
eabi/gcc-10.3.0-final'
make[2]: *** [Makefile:91:
/data/openwrt/build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-10.3.0_musl_e
abi/gcc-10.3.0-final/.built] Error 2
make[2]: Leaving directory '/data/openwrt/toolchain/gcc/final'
time: toolchain/gcc/final/compile#1.29#0.21#1.47
ERROR: toolchain/gcc/final failed to build.
make[1]: *** [toolchain/Makefile:97: toolchain/gcc/final/compile] Error 1

[PATCH v2 2/2] base-files: reduce number of `mkdir` calls

2021-09-12 Thread Paul Spooren
The `mkdir` commands supports passing multiple arguments to batch create
multiple folders, instead of calling the tool every single time.

If the creation of one of the folders fails, all other folder are still
created and therefore doesn't change the error handling.

Also stop creating `/etc/` explicitly after subfolders of `/etc/` were
already created.

Signed-off-by: Paul Spooren 
---
 package/base-files/Makefile | 36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index f87fd0fe6a..af5c0e6b00 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -161,24 +161,27 @@ define Package/base-files/install
$(1)/etc/preinit \
$(1)/etc/profile
 
-   mkdir -p $(1)/CONTROL
-   mkdir -p $(1)/dev
-   mkdir -p $(1)/etc/config
-   mkdir -p $(1)/etc/crontabs
-   mkdir -p $(1)/etc/rc.d
-   mkdir -p $(1)/overlay
-   mkdir -p $(1)/lib/firmware
+   mkdir -p \
+   $(1)/CONTROL \
+   $(1)/dev \
+   $(1)/etc/config \
+   $(1)/etc/crontabs \
+   $(1)/etc/rc.d \
+   $(1)/overlay \
+   $(1)/lib/firmware \
+   $(1)/mnt \
+   $(1)/proc \
+   $(1)/tmp \
+   $(1)/usr/lib \
+   $(1)/usr/bin \
+   $(1)/sys \
+   $(1)/www \
+   $(1)/root
+
+   $(LN) /proc/mounts $(1)/etc/mtab
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/lib$(LIB_SUFFIX))
-   mkdir -p $(1)/mnt
-   mkdir -p $(1)/proc
-   mkdir -p $(1)/tmp
-   mkdir -p $(1)/usr/lib
$(if $(LIB_SUFFIX),-$(LN) lib $(1)/usr/lib$(LIB_SUFFIX))
-   mkdir -p $(1)/usr/bin
-   mkdir -p $(1)/sys
-   mkdir -p $(1)/www
-   mkdir -p $(1)/root
-   $(LN) /proc/mounts $(1)/etc/mtab
+
 ifneq ($(CONFIG_TARGET_ROOTFS_PERSIST_VAR),y)
rm -f $(1)/var
$(LN) tmp $(1)/var
@@ -186,7 +189,6 @@ else
mkdir -p $(1)/var
$(LN) /tmp/run $(1)/var/run
 endif
-   mkdir -p $(1)/etc
$(LN) /tmp/resolv.conf /tmp/TZ /tmp/localtime $(1)/etc/
 
chmod 0600 $(1)/etc/shadow
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 1/2] base-files: reduce `sed` calls

2021-09-12 Thread Paul Spooren
The `sed`-script shouldn't be called multiple times, especially not with
the same files.

This commit merges all files together in a single `sed`-script call.

Signed-off-by: Paul Spooren 
---
 package/base-files/Makefile | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 58ad08c63a..f87fd0fe6a 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -150,13 +150,11 @@ define Package/base-files/install
 
$(VERSION_SED_SCRIPT) \
$(1)/etc/banner \
+   $(1)/etc/device_info \
+   $(1)/etc/openwrt_release \
$(1)/etc/openwrt_version \
$(1)/usr/lib/os-release
 
-   $(VERSION_SED_SCRIPT) \
-   $(1)/etc/openwrt_release \
-   $(1)/etc/device_info \
-   $(1)/usr/lib/os-release
 
$(SED) "s#%PATH%#$(TARGET_INIT_PATH)#g" \
$(1)/sbin/hotplug-call \
-- 
2.30.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel