* [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
@ 2024-07-28 11:58 Dmitry Chestnykh
2024-07-28 16:00 ` Thomas Petazzoni via buildroot
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Dmitry Chestnykh @ 2024-07-28 11:58 UTC (permalink / raw)
To: buildroot; +Cc: Dmitry Chestnykh
Provide correct grouping for preprocessor
conditions to avoid building ld.so with
undefined macroses which are in use
Fixes
package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
Upstream:
https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240728115224.725666-1-dm.chestnykh@gmail.com/
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
---
| 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
--git a/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch b/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
new file mode 100644
index 0000000000..359d1e98c6
--- /dev/null
+++ b/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
@@ -0,0 +1,34 @@
+From 1afc19eb6a7948afbcf3dd19091ce127a355ebcb Mon Sep 17 00:00:00 2001
+From: Dmitry Chestnykh <dm.chestnykh@gmail.com>
+Date: Sun, 28 Jul 2024 14:12:39 +0300
+Subject: [PATCH] [ldso] Group conditions after `&&`
+
+If the conditions are not grouped we can reach
+this block even if `__NR_stat` is not defined.
+
+`defined __NR_stat && ((!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))`
+gives us false but `LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0))`
+may give us true. So if linux headers version is below 5.1.0 and
+__NR_stat is not defined we can have compilation error
+
+Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
+---
+ ldso/include/dl-syscall.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
+index 9ec0eac60..180d03012 100644
+--- a/ldso/include/dl-syscall.h
++++ b/ldso/include/dl-syscall.h
+@@ -141,7 +141,7 @@ static __always_inline int _dl_stat(const char *file_name,
+ {
+ return _dl_newfstatat(AT_FDCWD, file_name, buf, 0);
+ }
+-#elif defined __NR_stat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__)) || (LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0))
++#elif defined __NR_stat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__) || (LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0)))
+ # define __NR__dl_stat __NR_stat
+ static __always_inline _syscall2(int, _dl_stat, const char *, file_name,
+ struct stat *, buf)
+--
+2.45.2
+
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 11:58 [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Dmitry Chestnykh
@ 2024-07-28 16:00 ` Thomas Petazzoni via buildroot
2024-07-28 16:21 ` Dmitriy Chestnykh
2024-08-03 6:34 ` [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Waldemar Brodkorb
2024-08-12 19:27 ` Thomas Petazzoni via buildroot
2 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-28 16:00 UTC (permalink / raw)
To: Dmitry Chestnykh; +Cc: buildroot
Hello Dmitry,
On Sun, 28 Jul 2024 14:58:17 +0300
Dmitry Chestnykh <dm.chestnykh@gmail.com> wrote:
> Provide correct grouping for preprocessor
> conditions to avoid building ld.so with
> undefined macroses which are in use
>
> Fixes
> package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
> Upstream:
> https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240728115224.725666-1-dm.chestnykh@gmail.com/
>
> Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
Thanks for this patch!
I also encountered a SuperH 4 build issue with uClibc-ng:
/builds/buildroot.org/toolchains-builder/build/sh-sh4--uclibc--stable-2024.05-1/lib/gcc/sh4-buildroot-linux-uclibc/13.3.0/../../../../sh4-buildroot-linux-uclibc/bin/ld: ldso/ldso/ld-uClibc_so.a(ldso.oS): in function `add_ldso.isra.0':
ldso.c:(.text+0x1f28): undefined reference to `_dl_stat'
More details at:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/7378437145
Could this be fixed by your patch?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 16:00 ` Thomas Petazzoni via buildroot
@ 2024-07-28 16:21 ` Dmitriy Chestnykh
2024-07-28 20:11 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 13+ messages in thread
From: Dmitriy Chestnykh @ 2024-07-28 16:21 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1481 bytes --]
Hello Thomas
The SuperH4 issue has already been fixed by patch number 0002 (
https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
)
вс, 28 июл. 2024 г. в 19:00, Thomas Petazzoni <thomas.petazzoni@bootlin.com
>:
> Hello Dmitry,
>
> On Sun, 28 Jul 2024 14:58:17 +0300
> Dmitry Chestnykh <dm.chestnykh@gmail.com> wrote:
>
> > Provide correct grouping for preprocessor
> > conditions to avoid building ld.so with
> > undefined macroses which are in use
> >
> > Fixes
> > package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
> > Upstream:
> >
> https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240728115224.725666-1-dm.chestnykh@gmail.com/
> >
> > Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
>
> Thanks for this patch!
>
> I also encountered a SuperH 4 build issue with uClibc-ng:
>
> /builds/
> buildroot.org/toolchains-builder/build/sh-sh4--uclibc--stable-2024.05-1/lib/gcc/sh4-buildroot-linux-uclibc/13.3.0/../../../../sh4-buildroot-linux-uclibc/bin/ld:
> ldso/ldso/ld-uClibc_so.a(ldso.oS): in function `add_ldso.isra.0':
> ldso.c:(.text+0x1f28): undefined reference to `_dl_stat'
>
> More details at:
>
> https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/7378437145
>
> Could this be fixed by your patch?
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
[-- Attachment #1.2: Type: text/html, Size: 2670 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 16:21 ` Dmitriy Chestnykh
@ 2024-07-28 20:11 ` Thomas Petazzoni via buildroot
2024-07-29 4:00 ` Dmitriy Chestnykh
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-28 20:11 UTC (permalink / raw)
To: Dmitriy Chestnykh; +Cc: buildroot
Hello,
On Sun, 28 Jul 2024 19:21:20 +0300
Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
> Hello Thomas
> The SuperH4 issue has already been fixed by patch number 0002 (
> https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
> )
Indeed, thanks!
I still have an issue with SuperH 4 though.. it doesn't boot in Qemu:
https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/1391146782
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 20:11 ` Thomas Petazzoni via buildroot
@ 2024-07-29 4:00 ` Dmitriy Chestnykh
2024-07-29 4:38 ` Dmitriy Chestnykh
2024-07-29 4:51 ` Waldemar Brodkorb
2 siblings, 0 replies; 13+ messages in thread
From: Dmitriy Chestnykh @ 2024-07-29 4:00 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 742 bytes --]
I will take a look :)
вс, 28 июл. 2024 г., 23:11 Thomas Petazzoni <thomas.petazzoni@bootlin.com>:
> Hello,
>
> On Sun, 28 Jul 2024 19:21:20 +0300
> Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
>
> > Hello Thomas
> > The SuperH4 issue has already been fixed by patch number 0002 (
> >
> https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
> > )
>
> Indeed, thanks!
>
> I still have an issue with SuperH 4 though.. it doesn't boot in Qemu:
>
>
> https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/1391146782
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
[-- Attachment #1.2: Type: text/html, Size: 1512 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 20:11 ` Thomas Petazzoni via buildroot
2024-07-29 4:00 ` Dmitriy Chestnykh
@ 2024-07-29 4:38 ` Dmitriy Chestnykh
2024-07-30 20:17 ` Thomas Petazzoni via buildroot
2024-07-29 4:51 ` Waldemar Brodkorb
2 siblings, 1 reply; 13+ messages in thread
From: Dmitriy Chestnykh @ 2024-07-29 4:38 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 883 bytes --]
Which version of QEMU do you use? Recently Waldemar sent a patch where he
noticed that QEMU 9.x has an issue with SH4 emulation and the system
doesn't boot
вс, 28 июл. 2024 г. в 23:11, Thomas Petazzoni <thomas.petazzoni@bootlin.com
>:
> Hello,
>
> On Sun, 28 Jul 2024 19:21:20 +0300
> Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
>
> > Hello Thomas
> > The SuperH4 issue has already been fixed by patch number 0002 (
> >
> https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
> > )
>
> Indeed, thanks!
>
> I still have an issue with SuperH 4 though.. it doesn't boot in Qemu:
>
>
> https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/1391146782
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
[-- Attachment #1.2: Type: text/html, Size: 1625 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-29 4:38 ` Dmitriy Chestnykh
@ 2024-07-30 20:17 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-30 20:17 UTC (permalink / raw)
To: Dmitriy Chestnykh; +Cc: buildroot
On Mon, 29 Jul 2024 07:38:12 +0300
Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
> Which version of QEMU do you use? Recently Waldemar sent a patch where he
> noticed that QEMU 9.x has an issue with SH4 emulation and the system
> doesn't boot
I do have the fix from Waldemar that brings the rootfs as an initramfs
in SuperH configurations, to workaround the Qemu 9.x bug.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 20:11 ` Thomas Petazzoni via buildroot
2024-07-29 4:00 ` Dmitriy Chestnykh
2024-07-29 4:38 ` Dmitriy Chestnykh
@ 2024-07-29 4:51 ` Waldemar Brodkorb
2024-07-29 5:00 ` Dmitriy Chestnykh
2024-07-30 20:16 ` Thomas Petazzoni via buildroot
2 siblings, 2 replies; 13+ messages in thread
From: Waldemar Brodkorb @ 2024-07-29 4:51 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Dmitriy Chestnykh
Hi,
Thomas Petazzoni wrote,
> Hello,
>
> On Sun, 28 Jul 2024 19:21:20 +0300
> Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
>
> > Hello Thomas
> > The SuperH4 issue has already been fixed by patch number 0002 (
> > https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
> > )
>
> Indeed, thanks!
>
> I still have an issue with SuperH 4 though.. it doesn't boot in Qemu:
>
> https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/1391146782
That is strange. I cloned buildroot-toolchains,
make qemu_sh4_r2d_defconfig && make
For me it works with the included Qemu 9.0.0.
Strange thing is my zImage is smaller then the artefact which can be
downloaded and did not work.
$ ls -l Downloads/zImage
-rw-r--r-- 1 6037536 Jul 29 06:06 Downloads/zImage
$ ls -l buildroot-toolchains/output/images/zImage
-rw-r--r-- 1 4530208 Jul 29 05:57 buildroot-toolchains/output/images/zImage
Are the toolchain checks are running some tests inside the image?
best regards
Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-29 4:51 ` Waldemar Brodkorb
@ 2024-07-29 5:00 ` Dmitriy Chestnykh
2024-07-30 20:16 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 13+ messages in thread
From: Dmitriy Chestnykh @ 2024-07-29 5:00 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: Thomas Petazzoni, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1323 bytes --]
Also checked qemu_sh4_r2d_defconfig just now, everything works, qemu (my
host qemu is 9.0.2) boots the system
пн, 29 июл. 2024 г. в 07:51, Waldemar Brodkorb <wbx@openadk.org>:
> Hi,
> Thomas Petazzoni wrote,
>
> > Hello,
> >
> > On Sun, 28 Jul 2024 19:21:20 +0300
> > Dmitriy Chestnykh <dm.chestnykh@gmail.com> wrote:
> >
> > > Hello Thomas
> > > The SuperH4 issue has already been fixed by patch number 0002 (
> > >
> https://gitlab.com/buildroot.org/buildroot/-/commit/f463a4953534df13397ce113bfbbc03d4b8e4df7
> > > )
> >
> > Indeed, thanks!
> >
> > I still have an issue with SuperH 4 though.. it doesn't boot in Qemu:
> >
> >
> https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/1391146782
>
> That is strange. I cloned buildroot-toolchains,
> make qemu_sh4_r2d_defconfig && make
>
> For me it works with the included Qemu 9.0.0.
> Strange thing is my zImage is smaller then the artefact which can be
> downloaded and did not work.
>
> $ ls -l Downloads/zImage
> -rw-r--r-- 1 6037536 Jul 29 06:06 Downloads/zImage
> $ ls -l buildroot-toolchains/output/images/zImage
> -rw-r--r-- 1 4530208 Jul 29 05:57
> buildroot-toolchains/output/images/zImage
>
> Are the toolchain checks are running some tests inside the image?
>
> best regards
> Waldemar
>
[-- Attachment #1.2: Type: text/html, Size: 2073 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-29 4:51 ` Waldemar Brodkorb
2024-07-29 5:00 ` Dmitriy Chestnykh
@ 2024-07-30 20:16 ` Thomas Petazzoni via buildroot
2024-07-30 20:38 ` [Buildroot] [PATCH] SuperH qemu issues Thomas Petazzoni via buildroot
1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-30 20:16 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: buildroot, Dmitriy Chestnykh
Hello Waldemar,
On Mon, 29 Jul 2024 06:51:43 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:
> That is strange. I cloned buildroot-toolchains,
> make qemu_sh4_r2d_defconfig && make
Indeed, I agree as well.
> For me it works with the included Qemu 9.0.0.
> Strange thing is my zImage is smaller then the artefact which can be
> downloaded and did not work.
>
> $ ls -l Downloads/zImage
> -rw-r--r-- 1 6037536 Jul 29 06:06 Downloads/zImage
> $ ls -l buildroot-toolchains/output/images/zImage
> -rw-r--r-- 1 4530208 Jul 29 05:57 buildroot-toolchains/output/images/zImage
>
> Are the toolchain checks are running some tests inside the image?
You probably built "just" qemu_sh4_r2d_defconfig, but the toolchains we
built are more featureful: they have C++ support, Fortran support,
OpenMP support. This means additional GCC runtime libraries installed
in /lib, and therefore a bigger rootfs, which in the SH4 defconfigs is
built into zImage as an initramfs. So not too surprising to have a
bigger zImage.
The SH4 glibc stable toolchain is built using this configuration:
BR2_sh=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_GLIBC_KERNEL_COMPAT=y
BR2_KERNEL_HEADERS_4_19=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON3=y
BR2_PACKAGE_GDB=y
BR2_GCC_ENABLE_OPENMP=y
So I am right building the concatenation of this +
qemu_sh4_r2d_defconfig to see what is the result.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] SuperH qemu issues
2024-07-30 20:16 ` Thomas Petazzoni via buildroot
@ 2024-07-30 20:38 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-30 20:38 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: buildroot, Dmitriy Chestnykh
Hello Waldemar,
On Tue, 30 Jul 2024 22:16:30 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> So I am right building the concatenation of this +
> qemu_sh4_r2d_defconfig to see what is the result.
I can confirm that:
BR2_sh=y
BR2_KERNEL_HEADERS_4_19=y
BR2_PACKAGE_GLIBC_KERNEL_COMPAT=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_GCC_ENABLE_OPENMP=y
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON3=y
BR2_TARGET_GENERIC_GETTY_PORT="ttySC1"
BR2_SYSTEM_DHCP="eth0"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux.config"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_GDB=y
BR2_TARGET_ROOTFS_INITRAMFS=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_QEMU=y
BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
generates a system that doesn't boot:
$ ./host/bin/qemu-system-sh4 -M r2d -kernel images/zImage -append "console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user
VNC server running on 127.0.0.1:5900
and then nothing.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 11:58 [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Dmitry Chestnykh
2024-07-28 16:00 ` Thomas Petazzoni via buildroot
@ 2024-08-03 6:34 ` Waldemar Brodkorb
2024-08-12 19:27 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 13+ messages in thread
From: Waldemar Brodkorb @ 2024-08-03 6:34 UTC (permalink / raw)
To: Dmitry Chestnykh; +Cc: buildroot
Hi Dmitry,
Dmitry Chestnykh wrote,
> Provide correct grouping for preprocessor
> conditions to avoid building ld.so with
> undefined macroses which are in use
>
> Fixes
> package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
Here you have to add the autobuild failure.
> Upstream:
> https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240728115224.725666-1-dm.chestnykh@gmail.com/
You can update Upstream to the uClibc-ng commit:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=841d0729883ee0de606de161c1d6a5c37cedf575
Your Subject is wrong, too.
Can you respin your patch?
best regards
Waldemar
> Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
> ---
> ...ix-arc-build-with-4.x-kernel-headers.patch | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
> create mode 100644 package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
>
> diff --git a/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch b/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
> new file mode 100644
> index 0000000000..359d1e98c6
> --- /dev/null
> +++ b/package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
> @@ -0,0 +1,34 @@
> +From 1afc19eb6a7948afbcf3dd19091ce127a355ebcb Mon Sep 17 00:00:00 2001
> +From: Dmitry Chestnykh <dm.chestnykh@gmail.com>
> +Date: Sun, 28 Jul 2024 14:12:39 +0300
> +Subject: [PATCH] [ldso] Group conditions after `&&`
> +
> +If the conditions are not grouped we can reach
> +this block even if `__NR_stat` is not defined.
> +
> +`defined __NR_stat && ((!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))`
> +gives us false but `LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0))`
> +may give us true. So if linux headers version is below 5.1.0 and
> +__NR_stat is not defined we can have compilation error
> +
> +Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
> +---
> + ldso/include/dl-syscall.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
> +index 9ec0eac60..180d03012 100644
> +--- a/ldso/include/dl-syscall.h
> ++++ b/ldso/include/dl-syscall.h
> +@@ -141,7 +141,7 @@ static __always_inline int _dl_stat(const char *file_name,
> + {
> + return _dl_newfstatat(AT_FDCWD, file_name, buf, 0);
> + }
> +-#elif defined __NR_stat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__)) || (LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0))
> ++#elif defined __NR_stat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__) || (LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0)))
> + # define __NR__dl_stat __NR_stat
> + static __always_inline _syscall2(int, _dl_stat, const char *, file_name,
> + struct stat *, buf)
> +--
> +2.45.2
> +
> --
> 2.45.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers
2024-07-28 11:58 [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Dmitry Chestnykh
2024-07-28 16:00 ` Thomas Petazzoni via buildroot
2024-08-03 6:34 ` [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Waldemar Brodkorb
@ 2024-08-12 19:27 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-12 19:27 UTC (permalink / raw)
To: Dmitry Chestnykh; +Cc: buildroot
Hello Dmitry,
On Sun, 28 Jul 2024 14:58:17 +0300
Dmitry Chestnykh <dm.chestnykh@gmail.com> wrote:
> Provide correct grouping for preprocessor
> conditions to avoid building ld.so with
> undefined macroses which are in use
>
> Fixes
> package/uclibc/0003-Fix-arc-build-with-4.x-kernel-headers.patch
This patch is 0002, not 0003.
> Upstream:
> https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240728115224.725666-1-dm.chestnykh@gmail.com/
This upstream link had to go within the patch itself.
I fixed both minor issues, and applied to master. Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-08-12 19:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-28 11:58 [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Dmitry Chestnykh
2024-07-28 16:00 ` Thomas Petazzoni via buildroot
2024-07-28 16:21 ` Dmitriy Chestnykh
2024-07-28 20:11 ` Thomas Petazzoni via buildroot
2024-07-29 4:00 ` Dmitriy Chestnykh
2024-07-29 4:38 ` Dmitriy Chestnykh
2024-07-30 20:17 ` Thomas Petazzoni via buildroot
2024-07-29 4:51 ` Waldemar Brodkorb
2024-07-29 5:00 ` Dmitriy Chestnykh
2024-07-30 20:16 ` Thomas Petazzoni via buildroot
2024-07-30 20:38 ` [Buildroot] [PATCH] SuperH qemu issues Thomas Petazzoni via buildroot
2024-08-03 6:34 ` [Buildroot] [PATCH] package/uclibc: Fix ARC build with 4.x kernel headers Waldemar Brodkorb
2024-08-12 19:27 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.