Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
The symbol is defined in kernel's arch/Kconfig with 'default !64BIT || COMPAT'. Introduce Config.in.compat which has the symbol default to y unless a known 64bit ADK_TARGET_ARCH is enabled. Drop the symbol from all target/*/kernel/* for which the default applies.
On 64bit systems, enabling this symbol is probably useful to provide comaptibility towards 32bit user space. Not sure if this is a possible choice in OpenADK, but just in case the symbol was not removed from:
- target/aarch64/kernel/raspberry-pi4-64 - target/mips64/kernel/qemu-mips64 - target/riscv64/kernel/qemu-riscv64
Another case is targets explicitly having the symbol disabled, namely kvx. Given that the two kernel configs in question are full copies of the kernel-generated one, they are likely not a deliberate choice and thus removed as well.
Signed-off-by: Phil Sutter phil@nwl.cc --- target/arc/kernel/qemu-arc | 1 - target/arc/kernel/synopsys-hsdk | 1 - target/arm/kernel/banana-p2-zero | 1 - target/arm/kernel/qemu-arm-realview-eb-mpcore | 1 - target/arm/kernel/qemu-arm-spitz | 1 - target/arm/kernel/qemu-arm-terrier | 1 - target/arm/kernel/qemu-arm-versatilepb | 1 - target/arm/kernel/qemu-arm-vexpress-a9 | 1 - target/arm/kernel/raspberry-pi4 | 1 - target/arm/kernel/solidrun-imx6 | 1 - target/arm/kernel/st-stm32f746g | 1 - target/csky/kernel/qemu-csky | 1 - target/hppa/kernel/qemu-hppa | 1 - target/kvx/kernel/generic-kvx | 1 - target/kvx/kernel/qemu-kvx | 1 - target/linux/Config.in | 1 + target/linux/config/Config.in.compat | 13 +++++++++++++ target/m68k/kernel/aranym-m68k | 1 - target/m68k/kernel/qemu-m68k-mcf5208 | 1 - target/m68k/kernel/qemu-m68k-q800 | 1 - target/m68k/kernel/qemu-m68k-virt | 1 - target/microblaze/kernel/qemu-microblaze-ml605 | 1 - target/microblaze/kernel/qemu-microblaze-s3adsp1800 | 1 - target/mips/kernel/qemu-mips | 1 - target/nios2/kernel/qemu-nios2 | 1 - target/or1k/kernel/qemu-or1k | 1 - target/ppc/kernel/qemu-ppc-bamboo | 1 - target/ppc/kernel/qemu-ppc-macppc | 1 - target/ppc/kernel/qemu-ppc-mpc8544ds | 1 - target/riscv32/kernel/qemu-riscv32 | 1 - target/sh/kernel/numato-mimasv2 | 1 - target/sparc/kernel/qemu-sparc | 1 - target/x86/kernel/qemu-x86 | 1 - 33 files changed, 14 insertions(+), 31 deletions(-) create mode 100644 target/linux/config/Config.in.compat
diff --git a/target/arc/kernel/qemu-arc b/target/arc/kernel/qemu-arc index d537406d43081..813c00d2ea6f3 100644 --- a/target/arc/kernel/qemu-arc +++ b/target/arc/kernel/qemu-arc @@ -1,3 +1,2 @@ CONFIG_ARC=y CONFIG_ARC_HAS_ACCL_REGS=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arc/kernel/synopsys-hsdk b/target/arc/kernel/synopsys-hsdk index 8deed79efb396..55ae3ccb6d7af 100644 --- a/target/arc/kernel/synopsys-hsdk +++ b/target/arc/kernel/synopsys-hsdk @@ -9,4 +9,3 @@ CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS=y CONFIG_ARC_HAS_LL64=y CONFIG_ARC_HAS_DIV_REM=y CONFIG_ARC_HAS_ACCL_REGS=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arm/kernel/banana-p2-zero b/target/arm/kernel/banana-p2-zero index 586bc605a4afc..acd35737e7520 100644 --- a/target/arm/kernel/banana-p2-zero +++ b/target/arm/kernel/banana-p2-zero @@ -37,7 +37,6 @@ CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_OLD_SIGACTION=y -CONFIG_COMPAT_32BIT_TIME=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y diff --git a/target/arm/kernel/qemu-arm-realview-eb-mpcore b/target/arm/kernel/qemu-arm-realview-eb-mpcore index acd059cc810cd..9f967f4f2a813 100644 --- a/target/arm/kernel/qemu-arm-realview-eb-mpcore +++ b/target/arm/kernel/qemu-arm-realview-eb-mpcore @@ -16,4 +16,3 @@ CONFIG_KUSER_HELPERS=y CONFIG_ATAGS=y CONFIG_CMDLINE="console=ttyAMA0 mem=128M" CONFIG_CMDLINE_FROM_BOOTLOADER=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arm/kernel/qemu-arm-spitz b/target/arm/kernel/qemu-arm-spitz index 259028d952673..09a1d76ff6e7d 100644 --- a/target/arm/kernel/qemu-arm-spitz +++ b/target/arm/kernel/qemu-arm-spitz @@ -44,4 +44,3 @@ CONFIG_SERIAL_PXA_NON8250=y CONFIG_SERIAL_PXA_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arm/kernel/qemu-arm-terrier b/target/arm/kernel/qemu-arm-terrier index 4a947ea14da84..e8a01e232be8b 100644 --- a/target/arm/kernel/qemu-arm-terrier +++ b/target/arm/kernel/qemu-arm-terrier @@ -44,4 +44,3 @@ CONFIG_SERIAL_PXA_NON8250=y CONFIG_SERIAL_PXA_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arm/kernel/qemu-arm-versatilepb b/target/arm/kernel/qemu-arm-versatilepb index 148fda569cc4c..8c08abdc7e3ed 100644 --- a/target/arm/kernel/qemu-arm-versatilepb +++ b/target/arm/kernel/qemu-arm-versatilepb @@ -15,4 +15,3 @@ CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y CONFIG_PLAT_VERSATILE=y CONFIG_VECTORS_BASE=0x00000000 CONFIG_PHYS_OFFSET=0x00000000 -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/arm/kernel/qemu-arm-vexpress-a9 b/target/arm/kernel/qemu-arm-vexpress-a9 index b3953ad10836c..170965e9b0675 100644 --- a/target/arm/kernel/qemu-arm-vexpress-a9 +++ b/target/arm/kernel/qemu-arm-vexpress-a9 @@ -13,7 +13,6 @@ CONFIG_ARM_THUMB=y CONFIG_ARM_VIRT_EXT=y CONFIG_SWP_EMULATE=y CONFIG_KUSER_HELPERS=y -CONFIG_COMPAT_32BIT_TIME=y CONFIG_ARM_AMBA=y CONFIG_MFD_CORE=y CONFIG_MFD_SYSCON=y diff --git a/target/arm/kernel/raspberry-pi4 b/target/arm/kernel/raspberry-pi4 index 77c23a9971898..04b7aadffae61 100644 --- a/target/arm/kernel/raspberry-pi4 +++ b/target/arm/kernel/raspberry-pi4 @@ -25,7 +25,6 @@ CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CLK_BCM2711_DVP=y CONFIG_CLK_BCM2835=y CONFIG_CLK_RASPBERRYPI=y -CONFIG_COMPAT_32BIT_TIME=y CONFIG_SERIAL_DEV_BUS=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_CDEV_V1=y diff --git a/target/arm/kernel/solidrun-imx6 b/target/arm/kernel/solidrun-imx6 index 801f1d1b7581c..3289ef4e7899f 100644 --- a/target/arm/kernel/solidrun-imx6 +++ b/target/arm/kernel/solidrun-imx6 @@ -21,7 +21,6 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ATAGS_PROC=y CONFIG_AUTO_ZRELADDR=y -CONFIG_COMPAT_32BIT_TIME=y
CONFIG_MXC_TZIC=y CONFIG_MXC_AVIC=y diff --git a/target/arm/kernel/st-stm32f746g b/target/arm/kernel/st-stm32f746g index 7c8375059b1cf..a156d2bff5419 100644 --- a/target/arm/kernel/st-stm32f746g +++ b/target/arm/kernel/st-stm32f746g @@ -25,4 +25,3 @@ CONFIG_DMADEVICES=y CONFIG_STM32_DMA=y CONFIG_STM32_DMAMUX=y CONFIG_STM32_MDMA=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/csky/kernel/qemu-csky b/target/csky/kernel/qemu-csky index 876d5a87f25f8..1d06909b6702f 100644 --- a/target/csky/kernel/qemu-csky +++ b/target/csky/kernel/qemu-csky @@ -5,4 +5,3 @@ CONFIG_NATIONALCHIP_IRQ=y CONFIG_NATIONALCHIP_TIMER=y CONFIG_CSKYMAC=y CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/hppa/kernel/qemu-hppa b/target/hppa/kernel/qemu-hppa index e0d0e95a3281a..e16c3f4665455 100644 --- a/target/hppa/kernel/qemu-hppa +++ b/target/hppa/kernel/qemu-hppa @@ -6,4 +6,3 @@ CONFIG_GSC_WAX=y CONFIG_GSC_DINO=y CONFIG_SERIAL_MUX=y CONFIG_SERIAL_MUX_CONSOLE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/kvx/kernel/generic-kvx b/target/kvx/kernel/generic-kvx index 1d953b12ebdda..484a43d3aa798 100644 --- a/target/kvx/kernel/generic-kvx +++ b/target/kvx/kernel/generic-kvx @@ -247,7 +247,6 @@ CONFIG_STACKPROTECTOR_STRONG=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_MODULES_USE_ELF_RELA=y -# CONFIG_COMPAT_32BIT_TIME is not set CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y diff --git a/target/kvx/kernel/qemu-kvx b/target/kvx/kernel/qemu-kvx index 1d953b12ebdda..484a43d3aa798 100644 --- a/target/kvx/kernel/qemu-kvx +++ b/target/kvx/kernel/qemu-kvx @@ -247,7 +247,6 @@ CONFIG_STACKPROTECTOR_STRONG=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_MODULES_USE_ELF_RELA=y -# CONFIG_COMPAT_32BIT_TIME is not set CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y diff --git a/target/linux/Config.in b/target/linux/Config.in index 42e4efcbbe165..fb9d1810eea11 100644 --- a/target/linux/Config.in +++ b/target/linux/Config.in @@ -28,3 +28,4 @@ source target/linux/config/Config.in.pm source target/linux/config/Config.in.kvm source target/linux/config/Config.in.virtio source target/linux/config/Config.in.debug +source target/linux/config/Config.in.compat diff --git a/target/linux/config/Config.in.compat b/target/linux/config/Config.in.compat new file mode 100644 index 0000000000000..f255088ab043e --- /dev/null +++ b/target/linux/config/Config.in.compat @@ -0,0 +1,13 @@ +config ADK_LINUX_KERNEL_COMPAT_32BIT_TIME + bool + default n if ADK_TARGET_ARCH_AARCH64 + default n if ADK_TARGET_ARCH_ALPHA + default n if ADK_TARGET_ARCH_IA64 + default n if ADK_TARGET_ARCH_LOONGARCH + default n if ADK_TARGET_ARCH_MIPS64 + default n if ADK_TARGET_ARCH_PPC64 + default n if ADK_TARGET_ARCH_RISCV64 + default n if ADK_TARGET_ARCH_S390 + default n if ADK_TARGET_ARCH_SPARC64 + default n if ADK_TARGET_ARCH_X86_64 + default y diff --git a/target/m68k/kernel/aranym-m68k b/target/m68k/kernel/aranym-m68k index 9a4db207af2ca..fb084e4b98941 100644 --- a/target/m68k/kernel/aranym-m68k +++ b/target/m68k/kernel/aranym-m68k @@ -6,4 +6,3 @@ CONFIG_FPU=y CONFIG_ATARI=y CONFIG_NATFEAT=y CONFIG_NFETH=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/m68k/kernel/qemu-m68k-mcf5208 b/target/m68k/kernel/qemu-m68k-mcf5208 index 9cfa4b601eac6..42497f9faa3bb 100644 --- a/target/m68k/kernel/qemu-m68k-mcf5208 +++ b/target/m68k/kernel/qemu-m68k-mcf5208 @@ -16,4 +16,3 @@ CONFIG_RAMKERNEL=y CONFIG_BOOTPARAM=y CONFIG_BOOTPARAM_STRING="console=ttyS0,115200" CONFIG_CRC32=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/m68k/kernel/qemu-m68k-q800 b/target/m68k/kernel/qemu-m68k-q800 index 69cac7e515e58..05324c42bdb64 100644 --- a/target/m68k/kernel/qemu-m68k-q800 +++ b/target/m68k/kernel/qemu-m68k-q800 @@ -7,4 +7,3 @@ CONFIG_ADB=y CONFIG_ADB_MACII=y CONFIG_BOOTPARAM=y CONFIG_BOOTPARAM_STRING="" -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/m68k/kernel/qemu-m68k-virt b/target/m68k/kernel/qemu-m68k-virt index 47e9200d467a2..db5f51c8e0598 100644 --- a/target/m68k/kernel/qemu-m68k-virt +++ b/target/m68k/kernel/qemu-m68k-virt @@ -1,3 +1,2 @@ CONFIG_M68K=y CONFIG_VIRT=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/microblaze/kernel/qemu-microblaze-ml605 b/target/microblaze/kernel/qemu-microblaze-ml605 index 9749c22fa570a..932843c131018 100644 --- a/target/microblaze/kernel/qemu-microblaze-ml605 +++ b/target/microblaze/kernel/qemu-microblaze-ml605 @@ -13,4 +13,3 @@ CONFIG_XILINX_MICROBLAZE0_HW_VER="8.10.a" CONFIG_PCI_XILINX=y CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE_FORCE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/microblaze/kernel/qemu-microblaze-s3adsp1800 b/target/microblaze/kernel/qemu-microblaze-s3adsp1800 index 91a7dc577c0c0..cf8c3a91c8665 100644 --- a/target/microblaze/kernel/qemu-microblaze-s3adsp1800 +++ b/target/microblaze/kernel/qemu-microblaze-s3adsp1800 @@ -13,4 +13,3 @@ CONFIG_XILINX_MICROBLAZE0_HW_VER="7.10.d" CONFIG_PCI_XILINX=y CONFIG_CMDLINE_FORCE=y CONFIG_CMDLINE_BOOL=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/mips/kernel/qemu-mips b/target/mips/kernel/qemu-mips index 85ad371b61dae..94a0a01754ee3 100644 --- a/target/mips/kernel/qemu-mips +++ b/target/mips/kernel/qemu-mips @@ -3,4 +3,3 @@ CONFIG_MIPS_MALTA=y CONFIG_MIPS_BONITO64=y CONFIG_MIPS_MSC=y CONFIG_CMDLINE_BOOL=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/nios2/kernel/qemu-nios2 b/target/nios2/kernel/qemu-nios2 index 19e0ac7534a4d..8b354e8a8372b 100644 --- a/target/nios2/kernel/qemu-nios2 +++ b/target/nios2/kernel/qemu-nios2 @@ -10,5 +10,4 @@ CONFIG_NIOS2_DTB_SOURCE_BOOL=y CONFIG_NIOS2_DTB_SOURCE="10m50_devboard.dts" CONFIG_CMDLINE_BOOL=y CONFIG_NIOS2_PASS_CMDLINE=y -CONFIG_COMPAT_32BIT_TIME=y CONFIG_NIOS2_ALIGNMENT_TRAP=y diff --git a/target/or1k/kernel/qemu-or1k b/target/or1k/kernel/qemu-or1k index e96067748453c..ee4d9d55cdedd 100644 --- a/target/or1k/kernel/qemu-or1k +++ b/target/or1k/kernel/qemu-or1k @@ -6,4 +6,3 @@ CONFIG_OPENRISC_HAVE_INST_FL1=y CONFIG_OPENRISC_HAVE_INST_MUL=y CONFIG_OPENRISC_HAVE_INST_DIV=y CONFIG_OPENRISC_NO_SPR_SR_DSX=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/ppc/kernel/qemu-ppc-bamboo b/target/ppc/kernel/qemu-ppc-bamboo index 424addb14de15..b12292b7bfd5f 100644 --- a/target/ppc/kernel/qemu-ppc-bamboo +++ b/target/ppc/kernel/qemu-ppc-bamboo @@ -3,4 +3,3 @@ CONFIG_PPC32=y CONFIG_44x=y CONFIG_BAMBOO=y CONFIG_PRINTK=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/ppc/kernel/qemu-ppc-macppc b/target/ppc/kernel/qemu-ppc-macppc index b873a30968b5c..b68a484c03886 100644 --- a/target/ppc/kernel/qemu-ppc-macppc +++ b/target/ppc/kernel/qemu-ppc-macppc @@ -23,4 +23,3 @@ CONFIG_ADB_CUDA=y CONFIG_INPUT_ADBHID=y CONFIG_CMDLINE_BOOL=y CONFIG_PRINTK=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/ppc/kernel/qemu-ppc-mpc8544ds b/target/ppc/kernel/qemu-ppc-mpc8544ds index 515cf400ce9ba..1e51d4b07f286 100644 --- a/target/ppc/kernel/qemu-ppc-mpc8544ds +++ b/target/ppc/kernel/qemu-ppc-mpc8544ds @@ -9,4 +9,3 @@ CONFIG_PHYS_64BIT=y CONFIG_SPE=y CONFIG_PPC_UDBG_16550=y CONFIG_DEFAULT_UIMAGE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/riscv32/kernel/qemu-riscv32 b/target/riscv32/kernel/qemu-riscv32 index 0aab147656c63..e49c3ab0d8459 100644 --- a/target/riscv32/kernel/qemu-riscv32 +++ b/target/riscv32/kernel/qemu-riscv32 @@ -1,7 +1,6 @@ CONFIG_RISCV=y CONFIG_32BIT=y CONFIG_FPU=y -CONFIG_COMPAT_32BIT_TIME=y CONFIG_ARCH_RV32I=y CONFIG_SOC_VIRT=y CONFIG_NONPORTABLE=y diff --git a/target/sh/kernel/numato-mimasv2 b/target/sh/kernel/numato-mimasv2 index faa0ff5588239..ca290f15dc124 100644 --- a/target/sh/kernel/numato-mimasv2 +++ b/target/sh/kernel/numato-mimasv2 @@ -15,4 +15,3 @@ CONFIG_MMC_SPI=y CONFIG_CLKSRC_JCORE_PIT=y CONFIG_JCORE_AIC=y CONFIG_SERIAL_EARLYCON=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/sparc/kernel/qemu-sparc b/target/sparc/kernel/qemu-sparc index 1ee79ef31befa..ffa9bb9f8668e 100644 --- a/target/sparc/kernel/qemu-sparc +++ b/target/sparc/kernel/qemu-sparc @@ -7,4 +7,3 @@ CONFIG_SERIAL_CONSOLE=y CONFIG_SERIAL_SUNCORE=y CONFIG_SERIAL_SUNZILOG=y CONFIG_SERIAL_SUNZILOG_CONSOLE=y -CONFIG_COMPAT_32BIT_TIME=y diff --git a/target/x86/kernel/qemu-x86 b/target/x86/kernel/qemu-x86 index 41a00164c6b95..1049b23d83495 100644 --- a/target/x86/kernel/qemu-x86 +++ b/target/x86/kernel/qemu-x86 @@ -1,4 +1,3 @@ CONFIG_X86=y CONFIG_X86_32=y CONFIG_CMDLINE_BOOL=y -CONFIG_COMPAT_32BIT_TIME=y
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
What you think?
best regards Waldemar
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for cleaning it up.
committed and pushed, best regards Waldemar
Hi Waldemar,
On Tue, Jan 07, 2025 at 10:57:00AM +0100, Waldemar Brodkorb wrote:
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I'm using uClibc-ng version 1.0.50. B-)
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
While your point is valid regarding 64bit time_t, the problem here seems to be io_getevents syscall which expects a 32bit time_t in parameters. I guess this can't change due for compatibility reasons and one had to introduce a new syscall which accepts the larger time_t. Or is this just covered by the libc wrappers?
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for validating!
BTW: Does gcc-14 work for you? It built fine for me but I got compile errors building packages. Went with gcc-12 for now.
Cheers, Phil
Hi, Phil Sutter wrote,
Hi Waldemar,
On Tue, Jan 07, 2025 at 10:57:00AM +0100, Waldemar Brodkorb wrote:
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I'm using uClibc-ng version 1.0.50. B-)
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
While your point is valid regarding 64bit time_t, the problem here seems to be io_getevents syscall which expects a 32bit time_t in parameters. I guess this can't change due for compatibility reasons and one had to introduce a new syscall which accepts the larger time_t. Or is this just covered by the libc wrappers?
Good question, I don't know :-/
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for validating!
BTW: Does gcc-14 work for you? It built fine for me but I got compile errors building packages. Went with gcc-12 for now.
I use the default gcc-13 for now, which compiles all packages I use fine. Yes, gcc-14 will break a lot of packages.
Do you have any issue with gcc-13?
best regards Waldemar
On Tue, Jan 07, 2025 at 12:13:42PM +0100, Waldemar Brodkorb wrote:
Hi, Phil Sutter wrote,
Hi Waldemar,
On Tue, Jan 07, 2025 at 10:57:00AM +0100, Waldemar Brodkorb wrote:
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I'm using uClibc-ng version 1.0.50. B-)
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
While your point is valid regarding 64bit time_t, the problem here seems to be io_getevents syscall which expects a 32bit time_t in parameters. I guess this can't change due for compatibility reasons and one had to introduce a new syscall which accepts the larger time_t. Or is this just covered by the libc wrappers?
Good question, I don't know :-/
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for validating!
BTW: Does gcc-14 work for you? It built fine for me but I got compile errors building packages. Went with gcc-12 for now.
I use the default gcc-13 for now, which compiles all packages I use fine. Yes, gcc-14 will break a lot of packages.
Do you have any issue with gcc-13?
apcupsd linker stage fails:
| /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/bin/arm-openadk-linux-uclibceabi-gcc -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/lib -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib .obj/options.o .obj/device.o .obj/reports.o .obj/action.o .obj/apctest.o /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/libdrivers.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/apcsmart/libapcsmartdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/dumb/libdumbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/usb/libusbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/net/libnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/snmplite/libsnmplitedrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/pcnet/libpcnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/modbus/libmodbusdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/lib/libapc.a -o apctest -lsupc++ -lpthread | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)' | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
Cheers, Phil
Hi Phil,
Phil Sutter wrote,
On Tue, Jan 07, 2025 at 12:13:42PM +0100, Waldemar Brodkorb wrote:
Hi, Phil Sutter wrote,
Hi Waldemar,
On Tue, Jan 07, 2025 at 10:57:00AM +0100, Waldemar Brodkorb wrote:
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
Without it, on these architectures 'lvm pvscan' will busy-loop printing:
| io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I'm using uClibc-ng version 1.0.50. B-)
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
While your point is valid regarding 64bit time_t, the problem here seems to be io_getevents syscall which expects a 32bit time_t in parameters. I guess this can't change due for compatibility reasons and one had to introduce a new syscall which accepts the larger time_t. Or is this just covered by the libc wrappers?
Good question, I don't know :-/
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for validating!
BTW: Does gcc-14 work for you? It built fine for me but I got compile errors building packages. Went with gcc-12 for now.
I use the default gcc-13 for now, which compiles all packages I use fine. Yes, gcc-14 will break a lot of packages.
Do you have any issue with gcc-13?
apcupsd linker stage fails:
| /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/bin/arm-openadk-linux-uclibceabi-gcc -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/lib -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib .obj/options.o .obj/device.o .obj/reports.o .obj/action.o .obj/apctest.o /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/libdrivers.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/apcsmart/libapcsmartdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/dumb/libdumbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/usb/libusbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/net/libnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/snmplite/libsnmplitedrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/pcnet/libpcnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/modbus/libmodbusdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/lib/libapc.a -o apctest -lsupc++ -lpthread | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)' | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
It seems following fix works for us, too: https://lore.kernel.org/buildroot/87wmsbk386.fsf@48ers.dk/T/
Setting LD="$(TARGET_CXX)" in XAKE_FLAGS helps.
best regards Waldemar
Hi Waldemar,
On Tue, Jan 07, 2025 at 04:09:09PM +0100, Waldemar Brodkorb wrote:
Hi Phil,
Phil Sutter wrote,
On Tue, Jan 07, 2025 at 12:13:42PM +0100, Waldemar Brodkorb wrote:
Hi, Phil Sutter wrote,
Hi Waldemar,
On Tue, Jan 07, 2025 at 10:57:00AM +0100, Waldemar Brodkorb wrote:
Hi Phil, Waldemar Brodkorb wrote,
Hi Phil, Phil Sutter wrote,
> Without it, on these architectures 'lvm pvscan' will busy-loop printing: > > | io_getevents failed: No such file or directory
What C library you are using? Nowadays glibc/uClibc-ng and musl have 64 Bit time_t on all supported 32 Bit architectures with a recent enough kernel (=>5.1.0).
I'm using uClibc-ng version 1.0.50. B-)
I think using this kernel symbol is only required for C libraries not having 64 Bit time_t. So we could remove the symbol entirely in OpenADK.
While your point is valid regarding 64bit time_t, the problem here seems to be io_getevents syscall which expects a 32bit time_t in parameters. I guess this can't change due for compatibility reasons and one had to introduce a new syscall which accepts the larger time_t. Or is this just covered by the libc wrappers?
Good question, I don't know :-/
I checked this on my Cubox-i (ARM 32 Bit) and your patch is valid. It seems this kernel symbol is even required for time64 enabled userland.
Thanks for validating!
BTW: Does gcc-14 work for you? It built fine for me but I got compile errors building packages. Went with gcc-12 for now.
I use the default gcc-13 for now, which compiles all packages I use fine. Yes, gcc-14 will break a lot of packages.
Do you have any issue with gcc-13?
apcupsd linker stage fails:
| /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/bin/arm-openadk-linux-uclibceabi-gcc -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/lib -L/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib .obj/options.o .obj/device.o .obj/reports.o .obj/action.o .obj/apctest.o /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/libdrivers.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/apcsmart/libapcsmartdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/dumb/libdumbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/usb/libusbdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/net/libnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/snmplite/libsnmplitedrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/pcnet/libpcnetdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/drivers/modbus/libmodbusdrv.a /home/n0-1/git/openadk-ds414/build_synology-ds414_uclibc-ng_softfp_eabi_arm/w-apcupsd-3.14.14-1/apcupsd-3.14.14/src/lib/libapc.a -o apctest -lsupc++ -lpthread | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)' | /home/n0-1/git/openadk-ds414/toolchain_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/gcc/arm-openadk-linux-uclibceabi/13.3.0/../../../../arm-openadk-linux-uclibceabi/bin/ld: /home/n0-1/git/openadk-ds414/target_synology-ds414_uclibc-ng_softfp_eabi_arm/usr/lib/libsupc++.a(eh_alloc.o): in function `std::basic_string_view<char, std::char_traits<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const': | (.text._ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj[_ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEjjPKcj]+0x30): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
It seems following fix works for us, too: https://lore.kernel.org/buildroot/87wmsbk386.fsf@48ers.dk/T/
Setting LD="$(TARGET_CXX)" in XAKE_FLAGS helps.
Oh, thanks for digging this up! It works indeed. I'll give gcc-14 a try now. (:
Cheers, Phil