public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-image-base: don't fail on absent qemu-arm-static
@ 2017-11-06 14:46 Christian Storm
  2017-11-06 15:17 ` [PATCH v2] " Christian Storm
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Storm @ 2017-11-06 14:46 UTC (permalink / raw)
  To: isar-users; +Cc: Christian Storm

multistrap fails unobtrusively if the qemu-arm-static binary
is absent. Hence, only copy qemu-arm-static if it's present.
If absent, issue a warning to make diagnosis easier.

Fixes #26

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 meta-isar/recipes-core/images/files/setup.sh     | 6 +++++-
 meta/recipes-devtools/buildchroot/files/setup.sh | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta-isar/recipes-core/images/files/setup.sh b/meta-isar/recipes-core/images/files/setup.sh
index 2898d2c..ca8d7f3 100644
--- a/meta-isar/recipes-core/images/files/setup.sh
+++ b/meta-isar/recipes-core/images/files/setup.sh
@@ -57,7 +57,11 @@ EOF
 fi
 
 # Install QEMU emulator to execute ARM binaries
-sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+if [ ! -x /usr/bin/qemu-arm-static ]; then
+    bbwarn "qemu-arm-static binary not present, unable to execute ARM binaries"
+else
+    sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+fi
 
 # Set hostname
 echo "isar" > $TARGET/etc/hostname
diff --git a/meta/recipes-devtools/buildchroot/files/setup.sh b/meta/recipes-devtools/buildchroot/files/setup.sh
index b3ca81f..29bcbda 100644
--- a/meta/recipes-devtools/buildchroot/files/setup.sh
+++ b/meta/recipes-devtools/buildchroot/files/setup.sh
@@ -55,7 +55,11 @@ EOF
 fi
 
 # Install QEMU emulator to execute ARM binaries
-sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+if [ ! -x /usr/bin/qemu-arm-static ]; then
+    bbwarn "qemu-arm-static binary not present, unable to execute ARM binaries"
+else
+    sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+fi
 
 # Set hostname
 echo "isar" > $TARGET/etc/hostname
-- 
2.15.0


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

* [PATCH v2] isar-image-base: don't fail on absent qemu-arm-static
  2017-11-06 14:46 [PATCH] isar-image-base: don't fail on absent qemu-arm-static Christian Storm
@ 2017-11-06 15:17 ` Christian Storm
  2017-11-09 11:33   ` Alexander Smirnov
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Storm @ 2017-11-06 15:17 UTC (permalink / raw)
  To: isar-users; +Cc: Christian Storm

multistrap fails unobtrusively if the qemu-arm-static binary
is absent. Hence, only copy qemu-arm-static if it's present.
If absent, issue a warning to make diagnosis easier.

Fixes #26

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 meta-isar/recipes-core/images/files/setup.sh     | 6 +++++-
 meta/recipes-devtools/buildchroot/files/setup.sh | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 meta-isar/recipes-core/images/files/setup.sh
 mode change 100644 => 100755 meta/recipes-devtools/buildchroot/files/setup.sh

diff --git a/meta-isar/recipes-core/images/files/setup.sh b/meta-isar/recipes-core/images/files/setup.sh
old mode 100644
new mode 100755
index 2898d2c..39b828c
--- a/meta-isar/recipes-core/images/files/setup.sh
+++ b/meta-isar/recipes-core/images/files/setup.sh
@@ -57,7 +57,11 @@ EOF
 fi
 
 # Install QEMU emulator to execute ARM binaries
-sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+if [ ! -x /usr/bin/qemu-arm-static ]; then
+    echo "qemu-arm-static binary not present, unable to execute ARM binaries"
+else
+    sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+fi
 
 # Set hostname
 echo "isar" > $TARGET/etc/hostname
diff --git a/meta/recipes-devtools/buildchroot/files/setup.sh b/meta/recipes-devtools/buildchroot/files/setup.sh
old mode 100644
new mode 100755
index b3ca81f..21c004e
--- a/meta/recipes-devtools/buildchroot/files/setup.sh
+++ b/meta/recipes-devtools/buildchroot/files/setup.sh
@@ -55,7 +55,11 @@ EOF
 fi
 
 # Install QEMU emulator to execute ARM binaries
-sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+if [ ! -x /usr/bin/qemu-arm-static ]; then
+    echo "qemu-arm-static binary not present, unable to execute ARM binaries"
+else
+    sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+fi
 
 # Set hostname
 echo "isar" > $TARGET/etc/hostname
-- 
2.15.0


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

* Re: [PATCH v2] isar-image-base: don't fail on absent qemu-arm-static
  2017-11-06 15:17 ` [PATCH v2] " Christian Storm
@ 2017-11-09 11:33   ` Alexander Smirnov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Smirnov @ 2017-11-09 11:33 UTC (permalink / raw)
  To: Christian Storm, isar-users

On 11/06/2017 06:17 PM, Christian Storm wrote:
> multistrap fails unobtrusively if the qemu-arm-static binary
> is absent. Hence, only copy qemu-arm-static if it's present.
> If absent, issue a warning to make diagnosis easier.
> 
> Fixes #26

Applied to next, thanks!

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

end of thread, other threads:[~2017-11-09 11:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 14:46 [PATCH] isar-image-base: don't fail on absent qemu-arm-static Christian Storm
2017-11-06 15:17 ` [PATCH v2] " Christian Storm
2017-11-09 11:33   ` Alexander Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox