From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 1/3] sdkchroot: Handle host-target permutation corner cases
Date: Thu, 23 Aug 2018 10:43:41 +0200 [thread overview]
Message-ID: <18f4166404625e01a674dfa124e99ddeba3743c6.1535013823.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1535013823.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1535013823.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
This fixes the case host==target and also reports unsupported host
architectures.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index cfec95c..705a56a 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -13,8 +13,7 @@ PV = "0.1"
inherit isar-bootstrap-helper
-SDKCHROOT_PREINSTALL := "crossbuild-essential-${DISTRO_ARCH} \
- debhelper \
+SDKCHROOT_PREINSTALL := "debhelper \
autotools-dev \
dpkg \
locales \
@@ -36,10 +35,19 @@ do_build[depends] = "isar-apt-host:do_cache_config isar-bootstrap-host:do_bootst
do_build() {
if [ ${HOST_DISTRO} != "debian-stretch" ]; then
- bbfatal "SDK doesn't support ${HOST_DISTRO}"
+ bbfatal "SDK doesn't support ${HOST_DISTRO}"
+ fi
+ if [ ${HOST_ARCH} != "i386" -a ${HOST_ARCH} != "amd64" ]; then
+ bbfatal "SDK doesn't support ${HOST_ARCH} as host"
+ fi
+
+ if [ ${HOST_ARCH} = ${DISTRO_ARCH} -o ${DISTRO_ARCH} = "i386" ]; then
+ packages="${SDKCHROOT_PREINSTALL} build-essential"
+ else
+ packages="${SDKCHROOT_PREINSTALL} crossbuild-essential-${DISTRO_ARCH}"
fi
- setup_root_file_system --copyisarapt --host-arch --host-distro "${S}" ${SDKCHROOT_PREINSTALL}
+ setup_root_file_system --copyisarapt --host-arch --host-distro "${S}" $packages
# Configure root filesystem
sudo install -m 755 ${WORKDIR}/configscript.sh ${S}
--
2.16.4
next prev parent reply other threads:[~2018-08-23 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 8:43 [PATCH 0/3] SDK-related fixes and enhancements Jan Kiszka
2018-08-23 8:43 ` Jan Kiszka [this message]
2018-08-23 8:43 ` [PATCH 2/3] populate_sdk: Remove redundant logic Jan Kiszka
2018-08-23 8:43 ` [PATCH 3/3] sdk: Properly deploy Jan Kiszka
2018-08-27 22:13 ` [PATCH 0/3] SDK-related fixes and enhancements Maxim Yu. Osipov
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=18f4166404625e01a674dfa124e99ddeba3743c6.1535013823.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