public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 4/8] Add Debian arm64 support to the core
Date: Fri, 16 Feb 2018 09:52:20 +0100	[thread overview]
Message-ID: <5ed4dc5f337965002693714ea640d241e25f2674.1518771143.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1518771143.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1518771143.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

Required changes for the meta layer to build arm64 targets.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/buildchroot/files/setup.sh      | 18 ++++++++++++++----
 meta/recipes-devtools/isar-apt/files/distributions.in |  2 +-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/buildchroot/files/setup.sh b/meta/recipes-devtools/buildchroot/files/setup.sh
index 21c004e..1257739 100755
--- a/meta/recipes-devtools/buildchroot/files/setup.sh
+++ b/meta/recipes-devtools/buildchroot/files/setup.sh
@@ -14,6 +14,7 @@ set -e
 # setup.sh needs to be executable.
 
 TARGET=$1
+ARCH=$2
 
 # Prevent daemons from starting in buildchroot
 if [ -x "$TARGET/sbin/start-stop-daemon" ]; then
@@ -54,11 +55,20 @@ EOF
     chmod a+x $TARGET/usr/sbin/policy-rc.d
 fi
 
-# Install QEMU emulator to execute ARM binaries
-if [ ! -x /usr/bin/qemu-arm-static ]; then
-    echo "qemu-arm-static binary not present, unable to execute ARM binaries"
+case $ARCH in
+    armel|armhf)
+        qemu_arch=arm
+        ;;
+    arm64)
+        qemu_arch=aarch64
+        ;;
+esac
+
+# Install QEMU emulator to execute foreign binaries
+if [ ! -x /usr/bin/qemu-${qemu_arch}-static ]; then
+    echo "qemu-${qemu_arch}-static binary not present, unable to execute target binaries"
 else
-    sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
+    sudo cp /usr/bin/qemu-${qemu_arch}-static ${TARGET}/usr/bin
 fi
 
 # Set hostname
diff --git a/meta/recipes-devtools/isar-apt/files/distributions.in b/meta/recipes-devtools/isar-apt/files/distributions.in
index cd214c6..cc82c57 100644
--- a/meta/recipes-devtools/isar-apt/files/distributions.in
+++ b/meta/recipes-devtools/isar-apt/files/distributions.in
@@ -1,3 +1,3 @@
 Codename: {DISTRO_NAME}
-Architectures: i386 armhf amd64 source
+Architectures: i386 armhf arm64 amd64 source
 Components: main
-- 
2.13.6


  parent reply	other threads:[~2018-02-16  8:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16  8:52 [PATCH 0/8] Assorted patches Jan Kiszka
2018-02-16  8:52 ` [PATCH 1/8] Mount devtmpfs read-only into chroot Jan Kiszka
2018-02-19 10:09   ` Consolidate mounting in tasks (was Re: [PATCH 1/8] Mount devtmpfs read-only into chroot) Claudius Heine
2018-02-20  6:38   ` [PATCH 1/8] Mount devtmpfs read-only into chroot Alexander Smirnov
2018-02-20  7:02     ` Alexander Smirnov
2018-02-20  7:03     ` Jan Kiszka
2018-02-20  8:18       ` Claudius Heine
2018-02-16  8:52 ` [PATCH 2/8] isar-events: Wait for failing umounts Jan Kiszka
2018-02-19  9:45   ` Alexander Smirnov
2018-02-19  9:48     ` Jan Kiszka
2018-02-19 10:03       ` Alexander Smirnov
2018-02-19 11:10         ` Jan Kiszka
2018-02-16  8:52 ` [PATCH 3/8] isar-events: Do not match on distro and arch Jan Kiszka
2018-02-19  9:54   ` Alexander Smirnov
2018-02-19 11:08     ` Jan Kiszka
2018-02-16  8:52 ` Jan Kiszka [this message]
2018-02-16  8:52 ` [PATCH 5/8] Add qemuarm64-stretch multiconfig Jan Kiszka
2018-02-19 10:23   ` Alexander Smirnov
2018-02-19 11:15     ` Jan Kiszka
2018-02-19 12:19       ` Alexander Smirnov
2018-02-19 12:36         ` Jan Kiszka
2018-02-16  8:52 ` [PATCH 6/8] Add qemuarm64-stretch to CI Jan Kiszka
2018-02-16  8:52 ` [PATCH 7/8] build-kernel.sh: Add copyright header Jan Kiszka
2018-02-16  8:52 ` [PATCH 8/8] Enhance credits Jan Kiszka
2018-02-19 13:56 ` [PATCH 0/8] Assorted patches Alexander Smirnov
2018-02-19 14:08   ` Jan Kiszka
2018-02-19 14:19     ` Alexander Smirnov
2018-02-20 11:19 ` 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=5ed4dc5f337965002693714ea640d241e25f2674.1518771143.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@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