All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains
@ 2017-03-04  9:17 Francois Perrad
  2017-03-04 10:54 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Francois Perrad @ 2017-03-04  9:17 UTC (permalink / raw)
  To: buildroot

fixes:
http://autobuild.buildroot.org/results/69c/69c66f1876f0d8dba1bd71ee109df371577d8dda
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/qemu/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index f4a75fc..3036743 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -72,13 +72,15 @@ config BR2_PACKAGE_QEMU_LINUX_USER
 	bool "Enable all Linux user-land emulation"
 	# Incompatible "struct sigevent" definition on musl
 	depends on !BR2_TOOLCHAIN_USES_MUSL
+	# Incompatible "struct sigcontext" definition on uClibc
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC
 	help
 	  Say 'y' to build all Linux user-land emulators that QEMU supports.
 
 # Note: bsd-user can not be build on Linux
 
-comment "Linux user-land emulation needs a glibc or uClibc toolchain"
-	depends on BR2_TOOLCHAIN_USES_MUSL
+comment "Linux user-land emulation needs a glibc toolchain"
+	depends on BR2_TOOLCHAIN_USES_MUSL ||?BR2_TOOLCHAIN_USES_UCLIBC
 
 endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains
  2017-03-04  9:17 [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains Francois Perrad
@ 2017-03-04 10:54 ` Thomas Petazzoni
  2017-03-04 12:48   ` François Perrad
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-03-04 10:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  4 Mar 2017 10:17:39 +0100, Francois Perrad wrote:
> fixes:
> http://autobuild.buildroot.org/results/69c/69c66f1876f0d8dba1bd71ee109df371577d8dda

This error happens in ARM only code, so I believe disabling it on all
architectures is probably a bit too much. In addition, the fix is most
likely trivial, and probably looks like this:

diff --git a/user-exec.c b/user-exec.c
index 6db0758..2b3d116 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -409,7 +409,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 
 #if defined(__NetBSD__)
     pc = uc->uc_mcontext.__gregs[_REG_R15];
-#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
+#elif defined(__GLIBC__) && !defined(__UCLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
     pc = uc->uc_mcontext.gregs[R15];
 #else
     pc = uc->uc_mcontext.arm_pc;

Could you have a try with this?

Adding Waldemar in Cc: since it's a uClibc related issue.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains
  2017-03-04 10:54 ` Thomas Petazzoni
@ 2017-03-04 12:48   ` François Perrad
  2017-03-04 13:01     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: François Perrad @ 2017-03-04 12:48 UTC (permalink / raw)
  To: buildroot

2017-03-04 11:54 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Hello,
>
> On Sat,  4 Mar 2017 10:17:39 +0100, Francois Perrad wrote:
>> fixes:
>> http://autobuild.buildroot.org/results/69c/69c66f1876f0d8dba1bd71ee109df371577d8dda
>
> This error happens in ARM only code, so I believe disabling it on all
> architectures is probably a bit too much. In addition, the fix is most
> likely trivial, and probably looks like this:
>
> diff --git a/user-exec.c b/user-exec.c
> index 6db0758..2b3d116 100644
> --- a/user-exec.c
> +++ b/user-exec.c
> @@ -409,7 +409,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
>
>  #if defined(__NetBSD__)
>      pc = uc->uc_mcontext.__gregs[_REG_R15];
> -#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
> +#elif defined(__GLIBC__) && !defined(__UCLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
>      pc = uc->uc_mcontext.gregs[R15];
>  #else
>      pc = uc->uc_mcontext.arm_pc;
>
> Could you have a try with this?
>
> Adding Waldemar in Cc: since it's a uClibc related issue.
>

When the issue with 'struct sigcontext' is fixed, another one occurs:
build/qemu-2.8.0/linux-user/syscall.c:6865:23: error: 'struct timex'
has no member named 'tai'
     __put_user(host_tx->tai, &target_tx->tai);
                       ^
The member 'tai' exists in linux/timex.h but not in sys/timex.h
with the toolchain from
http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2017.02-rc1-70-g7612a7d.tar.bz2

Fran?ois

> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains
  2017-03-04 12:48   ` François Perrad
@ 2017-03-04 13:01     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-03-04 13:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 4 Mar 2017 13:48:13 +0100, Fran?ois Perrad wrote:

> When the issue with 'struct sigcontext' is fixed, another one occurs:
> build/qemu-2.8.0/linux-user/syscall.c:6865:23: error: 'struct timex'
> has no member named 'tai'
>      __put_user(host_tx->tai, &target_tx->tai);
>                        ^
> The member 'tai' exists in linux/timex.h but not in sys/timex.h
> with the toolchain from
> http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2017.02-rc1-70-g7612a7d.tar.bz2

Thanks for testing. This one is indeed a uClibc issue, where the
'struct timex' in uClibc-ng is not completely in sync with the one from
the kernel.

I'm sure this is something that Waldemar can fix up :)

Thanks for testing!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-04 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-04  9:17 [Buildroot] [PATCH] qemu: disable Qemu user-land emulation for uClibc toolchains Francois Perrad
2017-03-04 10:54 ` Thomas Petazzoni
2017-03-04 12:48   ` François Perrad
2017-03-04 13:01     ` Thomas Petazzoni

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.