public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Christian Storm <christian.storm@siemens.com>
To: isar-users@googlegroups.com
Cc: Christian Storm <christian.storm@siemens.com>
Subject: [PATCH v2] isar-image-base: don't fail on absent qemu-arm-static
Date: Mon,  6 Nov 2017 16:17:59 +0100	[thread overview]
Message-ID: <20171106151759.25269-1-christian.storm@siemens.com> (raw)
In-Reply-To: <20171106144638.15945-1-christian.storm@siemens.com>

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


  reply	other threads:[~2017-11-06 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 14:46 [PATCH] " Christian Storm
2017-11-06 15:17 ` Christian Storm [this message]
2017-11-09 11:33   ` [PATCH v2] " Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171106151759.25269-1-christian.storm@siemens.com \
    --to=christian.storm@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox