All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging
@ 2022-01-29 14:23 Romain Naour
  2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Romain Naour @ 2022-01-29 14:23 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Poke generate a library libpoke.so, so install it to staging.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/poke/poke.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/poke/poke.mk b/package/poke/poke.mk
index fed023e954..ddd03ae3b0 100644
--- a/package/poke/poke.mk
+++ b/package/poke/poke.mk
@@ -13,6 +13,7 @@ POKE_LICENSE_FILES = COPYING jitter/COPYING
 # 0001-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch
 POKE_AUTORECONF = YES
 
+POKE_INSTALL_STAGING = YES
 POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
 
 # poke bundle gnulib that doesn't support the case where
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2
  2022-01-29 14:23 [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Romain Naour
@ 2022-01-29 14:23 ` Romain Naour
  2022-01-30 14:46   ` Thomas Petazzoni via buildroot
  2022-01-29 14:23 ` [Buildroot] [PATCH 3/3] package/poke: bump to version 2.0 Romain Naour
  2022-01-30 14:28 ` [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Thomas Petazzoni via buildroot
  2 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2022-01-29 14:23 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Disable minimal-threading when thumb or thumb2 is enabled due to build and runtime issues.

After fixing the build issue "Error: invalid swi expression" with
upstream, poke fail to run with the following error:

 # poke
 ERROR: specialized instruction beghl/retR (opcode 25) is defective but has no replacement
 [...]

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/2030046871

Reported upstream [1].

[1] https://lists.gnu.org/archive/html/poke-devel/2022-01/msg00162.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/poke/poke.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/poke/poke.mk b/package/poke/poke.mk
index ddd03ae3b0..91518f5854 100644
--- a/package/poke/poke.mk
+++ b/package/poke/poke.mk
@@ -46,6 +46,15 @@ POKE_CONF_OPTS = \
 	--disable-libnbd \
 	--with-libreadline-prefix=$(STAGING_DIR)
 
+# Disable minimal-threading when thumb or thumb2 is enabled
+# due to runtime issue.
+# https://lists.gnu.org/archive/html/poke-devel/2022-01/msg00162.html
+ifeq ($(BR2_ARM_CPU_HAS_THUMB)$(BR2_ARM_CPU_HAS_THUMB2),y)
+POKE_CONF_OPTS += --disable-dispatch-minimal-threading
+else
+POKE_CONF_OPTS += --enable-dispatch-minimal-threading
+endif
+
 ifeq ($(BR2_PACKAGE_JSON_C),y)
 POKE_DEPENDENCIES += json-c
 POKE_CONF_OPTS += --enable-mi
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/3] package/poke: bump to version 2.0
  2022-01-29 14:23 [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Romain Naour
  2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
@ 2022-01-29 14:23 ` Romain Naour
  2022-01-30 14:28 ` [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2022-01-29 14:23 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Tested locally with poke testsuite on aarch64 with Qemu:

         === poke Summary ===
 # of expected passes		6270
 # of unsupported tests		7

See: http://www.jemarch.net/poke-2.0-relnotes.html

Tested:
https://gitlab.com/kubu93/buildroot/-/pipelines/458943718

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
test-pkg config:
BR2_PACKAGE_POKE=y
BR2_PACKAGE_JSON_C=y
---
 ...P2MAN-replace-by-true-when-cross-com.patch |  6 ++--
 ...andom.c-fix-build-with-uclibc-1.0.35.patch | 28 +++++++++----------
 package/poke/poke.hash                        |  2 +-
 package/poke/poke.mk                          |  2 +-
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch b/package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
index c169516153..85a76e068e 100644
--- a/package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
+++ b/package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
@@ -1,4 +1,4 @@
-From b35dadae6371c3727cac46ae5bd348b66aa411fc Mon Sep 17 00:00:00 2001
+From 51fb81264323f01a86dd0bdeaf1c7a044a9cb6dc Mon Sep 17 00:00:00 2001
 From: Romain Naour <romain.naour@gmail.com>
 Date: Fri, 30 Apr 2021 15:43:59 +0200
 Subject: [PATCH] configure.ac: HELP2MAN replace ':' by 'true' when
@@ -17,10 +17,10 @@ Signed-off-by: Romain Naour <romain.naour@gmail.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 2c6f1aef..9c4c9be2 100644
+index a1943b57..c633f719 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -74,7 +74,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5])
+@@ -90,7 +90,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5])
  if test $cross_compiling = no; then
    AM_MISSING_PROG(HELP2MAN, help2man)
  else
diff --git a/package/poke/0002-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch b/package/poke/0002-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch
index 757dc3f760..bd20b5d2c6 100644
--- a/package/poke/0002-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch
+++ b/package/poke/0002-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch
@@ -1,4 +1,4 @@
-From a0594387565e1e6b4a8a8ba04ad13b135cc1f0b5 Mon Sep 17 00:00:00 2001
+From 236b019b83228d2e37fa07635fb6864ed7dc5fad Mon Sep 17 00:00:00 2001
 From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 Date: Thu, 1 Apr 2021 07:49:46 +0200
 Subject: [PATCH] lib/getrandom.c: fix build with uclibc < 1.0.35
@@ -15,7 +15,7 @@ In file included from ./sys/random.h:40,
 /tmp/instance-0/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:8:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
     7 | #include <features.h>
   +++ |+#include <stddef.h>
-    8 | 
+    8 |
 
 This patch is not upstreamable as it is only a workaround for
 uclibc < 1.0.35, upstream uclibc has been patched with
@@ -26,15 +26,15 @@ Fixes:
 
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
- jitter/gnulib-local/getrandom.c | 1 +
- gl/getrandom.c                  | 1 +
  gl-libpoke/getrandom.c          | 1 +
+ gl/getrandom.c                  | 1 +
+ jitter/gnulib-local/getrandom.c | 1 +
  3 files changed, 3 insertions(+)
 
-diff --git a/jitter/gnulib-local/getrandom.c b/jitter/gnulib-local/getrandom.c
-index 41212fb32..0ad3f9648 100644
---- a/jitter/gnulib-local/getrandom.c
-+++ b/jitter/gnulib-local/getrandom.c
+diff --git a/gl-libpoke/getrandom.c b/gl-libpoke/getrandom.c
+index e146873..3948d8d 100644
+--- a/gl-libpoke/getrandom.c
++++ b/gl-libpoke/getrandom.c
 @@ -19,6 +19,7 @@
  
  #include <config.h>
@@ -44,7 +44,7 @@ index 41212fb32..0ad3f9648 100644
  
  #include <errno.h>
 diff --git a/gl/getrandom.c b/gl/getrandom.c
-index 41212fb32..0ad3f9648 100644
+index e146873..3948d8d 100644
 --- a/gl/getrandom.c
 +++ b/gl/getrandom.c
 @@ -19,6 +19,7 @@
@@ -55,10 +55,10 @@ index 41212fb32..0ad3f9648 100644
  #include <sys/random.h>
  
  #include <errno.h>
-diff --git a/gl-libpoke/getrandom.c b/gl-libpoke/getrandom.c
-index 41212fb32..0ad3f9648 100644
---- a/gl-libpoke/getrandom.c
-+++ b/gl-libpoke/getrandom.c
+diff --git a/jitter/gnulib-local/getrandom.c b/jitter/gnulib-local/getrandom.c
+index e146873..3948d8d 100644
+--- a/jitter/gnulib-local/getrandom.c
++++ b/jitter/gnulib-local/getrandom.c
 @@ -19,6 +19,7 @@
  
  #include <config.h>
@@ -68,5 +68,5 @@ index 41212fb32..0ad3f9648 100644
  
  #include <errno.h>
 -- 
-2.30.2
+2.31.1
 
diff --git a/package/poke/poke.hash b/package/poke/poke.hash
index 1367262f54..7bf2204c55 100644
--- a/package/poke/poke.hash
+++ b/package/poke/poke.hash
@@ -1,4 +1,4 @@
 # Locally calculated
-sha256  ce054df29560c921230132703ee449fe130b6e25ab03aa6cc796bb401506aa24  poke-1.4.tar.gz
+sha256  5b822bf3e112c9fb5c0c9ab22a30a45a5d5e4d16e3f7436052bb720aa26b9a58  poke-2.0.tar.gz
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  jitter/COPYING
diff --git a/package/poke/poke.mk b/package/poke/poke.mk
index 91518f5854..e92d9506ce 100644
--- a/package/poke/poke.mk
+++ b/package/poke/poke.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-POKE_VERSION = 1.4
+POKE_VERSION = 2.0
 POKE_SITE = $(BR2_GNU_MIRROR)/poke
 # gnulib license is a mix/mess of public-domain and various GPL and LGPL versions.
 POKE_LICENSE = GPL-3.0+, GPL-3.0+ (jitter), gnulib license (gnulib)
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging
  2022-01-29 14:23 [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Romain Naour
  2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
  2022-01-29 14:23 ` [Buildroot] [PATCH 3/3] package/poke: bump to version 2.0 Romain Naour
@ 2022-01-30 14:28 ` Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-01-30 14:28 UTC (permalink / raw)
  To: Romain Naour; +Cc: buildroot

On Sat, 29 Jan 2022 15:23:50 +0100
Romain Naour <romain.naour@gmail.com> wrote:

> Poke generate a library libpoke.so, so install it to staging.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/poke/poke.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

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] 6+ messages in thread

* Re: [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2
  2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
@ 2022-01-30 14:46   ` Thomas Petazzoni via buildroot
  2022-01-30 17:32     ` Romain Naour
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-01-30 14:46 UTC (permalink / raw)
  To: Romain Naour; +Cc: buildroot

Hello,

On Sat, 29 Jan 2022 15:23:51 +0100
Romain Naour <romain.naour@gmail.com> wrote:

> +# Disable minimal-threading when thumb or thumb2 is enabled
> +# due to runtime issue.
> +# https://lists.gnu.org/archive/html/poke-devel/2022-01/msg00162.html
> +ifeq ($(BR2_ARM_CPU_HAS_THUMB)$(BR2_ARM_CPU_HAS_THUMB2),y)
> +POKE_CONF_OPTS += --disable-dispatch-minimal-threading
> +else
> +POKE_CONF_OPTS += --enable-dispatch-minimal-threading
> +endif

I don't understand this patch, because minimal-threading is already
disabled by default (at least in poke 1.4, I haven't checked in poke
2.0). jitter/configure.ac contains:

# Is the minimal-threading dispatch enabled?  Check the default and the
# configure command-line option.
AC_MSG_CHECKING([if minimal-threading dispatch is enabled])
# FIXME: reenable this when I make defect handling reliable.
#default=$(test "x$JITTER_HAVE_ACTUAL_GCC" = "xyes" && echo yes || echo no)
default=no
AC_ARG_ENABLE([dispatch-minimal-threading],
              AS_HELP_STRING([--enable-dispatch-minimal-threading],
              [enable minimal threading dispatch: default yes if and
only if GCC (not an imitation) is used]),
              jitter_enable_dispatch_minimal_threading="$enableval",
              jitter_enable_dispatch_minimal_threading="$default")
if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
  jitter_best_dispatch_model="minimal-threading"
  jitter_enabled_dispatch_models="$jitter_enabled_dispatch_models minimal-threading"
fi
AC_MSG_RESULT([$jitter_enable_dispatch_minimal_threading$jitter_subpackage_disclaimer])
# FIXME: remove this warning message when I make defect handling reliable.
if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
  AC_MSG_WARN([minimal-threading dispatch is currently unreliable, and should
  not be used in production until defective instruction replacement is fully
  implemented])
fi

See the "default=no" ?

Also, when building with the following defconfig:

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_EABI=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_POKE=y
# BR2_TARGET_ROOTFS_TAR is not set

The minimal threading is already disabled:

checking if switch dispatching is enabled... yes, provisionally (sub-package mode)
checking if direct-threading dispatch is enabled... yes, provisionally (sub-package mode)
checking if minimal-threading dispatch is enabled... no, provisionally (sub-package mode)
checking if no-threading dispatch is enabled... no, provisionally (sub-package mode)
configure: sub-package mode: disabling every dispatch except
direct-threading
configure:   (the following dispatches could have been enabled:
  switch direct-threading)
configure: enabled dispatching models are:
  direct-threading
configure: the best enabled dispatching model is:
  direct-threading

So what this patch is doing is in fact slightly the opposite of what he
says: instead of disabling minimal threading for thumb or thumb2, it
enables it for any other platform.

Are you sure this patch was needed for poke 1.4, and not for poke 2.0 ?

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] 6+ messages in thread

* Re: [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2
  2022-01-30 14:46   ` Thomas Petazzoni via buildroot
@ 2022-01-30 17:32     ` Romain Naour
  0 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2022-01-30 17:32 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hello Thomas,

Le 30/01/2022 à 15:46, Thomas Petazzoni a écrit :
> Hello,
> 
> On Sat, 29 Jan 2022 15:23:51 +0100
> Romain Naour <romain.naour@gmail.com> wrote:
> 
>> +# Disable minimal-threading when thumb or thumb2 is enabled
>> +# due to runtime issue.
>> +# https://lists.gnu.org/archive/html/poke-devel/2022-01/msg00162.html
>> +ifeq ($(BR2_ARM_CPU_HAS_THUMB)$(BR2_ARM_CPU_HAS_THUMB2),y)
>> +POKE_CONF_OPTS += --disable-dispatch-minimal-threading
>> +else
>> +POKE_CONF_OPTS += --enable-dispatch-minimal-threading
>> +endif
> 
> I don't understand this patch, because minimal-threading is already
> disabled by default (at least in poke 1.4, I haven't checked in poke
> 2.0). jitter/configure.ac contains:
> 
> # Is the minimal-threading dispatch enabled?  Check the default and the
> # configure command-line option.
> AC_MSG_CHECKING([if minimal-threading dispatch is enabled])
> # FIXME: reenable this when I make defect handling reliable.
> #default=$(test "x$JITTER_HAVE_ACTUAL_GCC" = "xyes" && echo yes || echo no)
> default=no
> AC_ARG_ENABLE([dispatch-minimal-threading],
>               AS_HELP_STRING([--enable-dispatch-minimal-threading],
>               [enable minimal threading dispatch: default yes if and
> only if GCC (not an imitation) is used]),
>               jitter_enable_dispatch_minimal_threading="$enableval",
>               jitter_enable_dispatch_minimal_threading="$default")
> if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
>   jitter_best_dispatch_model="minimal-threading"
>   jitter_enabled_dispatch_models="$jitter_enabled_dispatch_models minimal-threading"
> fi
> AC_MSG_RESULT([$jitter_enable_dispatch_minimal_threading$jitter_subpackage_disclaimer])
> # FIXME: remove this warning message when I make defect handling reliable.
> if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
>   AC_MSG_WARN([minimal-threading dispatch is currently unreliable, and should
>   not be used in production until defective instruction replacement is fully
>   implemented])
> fi
> 
> See the "default=no" ?
> 
> Also, when building with the following defconfig:
> 
> BR2_arm=y
> BR2_cortex_a8=y
> BR2_ARM_EABI=y
> BR2_ARM_INSTRUCTIONS_THUMB2=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_POKE=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> The minimal threading is already disabled:
> 
> checking if switch dispatching is enabled... yes, provisionally (sub-package mode)
> checking if direct-threading dispatch is enabled... yes, provisionally (sub-package mode)
> checking if minimal-threading dispatch is enabled... no, provisionally (sub-package mode)
> checking if no-threading dispatch is enabled... no, provisionally (sub-package mode)
> configure: sub-package mode: disabling every dispatch except
> direct-threading
> configure:   (the following dispatches could have been enabled:
>   switch direct-threading)
> configure: enabled dispatching models are:
>   direct-threading
> configure: the best enabled dispatching model is:
>   direct-threading
> 
> So what this patch is doing is in fact slightly the opposite of what he
> says: instead of disabling minimal threading for thumb or thumb2, it
> enables it for any other platform.
> 
> Are you sure this patch was needed for poke 1.4, and not for poke 2.0 ?

I overlooked that was disabled by default in poke 1.4.
I only checked if this option was present in poke 1.4.
So this patch must be merged in the poke version bump.

Best regards,
Romain


> 
> Best regards,
> 
> Thomas
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-01-30 17:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29 14:23 [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Romain Naour
2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
2022-01-30 14:46   ` Thomas Petazzoni via buildroot
2022-01-30 17:32     ` Romain Naour
2022-01-29 14:23 ` [Buildroot] [PATCH 3/3] package/poke: bump to version 2.0 Romain Naour
2022-01-30 14:28 ` [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging 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.