From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 3/3] sdk: Properly deploy
Date: Thu, 23 Aug 2018 10:43:43 +0200 [thread overview]
Message-ID: <a44617aebda52a451849c2f5d9fe35f5aa66c85c.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>
Avoid pointing the user into the work directory and rather deploy the
SDK rootfs as archive. This simplifies the handover to other machines.
In addition, we set a link from the deploy directory to the generated
rootfs in case direct use is required.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
doc/user_manual.md | 7 ++++---
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 9 +++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/doc/user_manual.md b/doc/user_manual.md
index d99f1f0..37a422d 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -593,9 +593,10 @@ target binary artifacts. Developer chroots to sdk rootfs and develops applicatio
User manually triggers creation of SDK root filesystem for his target platform by launching the task `do_populate_sdk` for target image, f.e.
`bitbake -c do_populate_sdk multiconfig:${MACHINE}-${DISTRO}:isar-image-base`.
-The resulting SDK rootfs is located under `tmp/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}/rootfs`.
-SDK rootfs directory `/isar-apt` contains the copy of isar-apt repo with locally prebuilt target debian packages (for <HOST_DISTRO>).
-One may chroot to SDK and install required target packages with the help of `apt-get install <package_name>:<DISTRO_ARCH>` command.
+The resulting SDK rootfs is archived into `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`.
+It is additionally available for direct use under `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}/`.
+The SDK rootfs directory `/isar-apt` contains a copy of isar-apt repo with locally prebuilt target debian packages (for <HOST_DISTRO>).
+One may chroot into the SDK and install required target packages with the help of `apt-get install <package_name>:<DISTRO_ARCH>` command.
### Limitation
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index 705a56a..e143ae7 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -26,6 +26,7 @@ SDKCHROOT_PREINSTALL := "debhelper \
WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${HOST_DISTRO}-${HOST_ARCH}"
S = "${WORKDIR}/rootfs"
+do_build[dirs] = "${DEPLOY_DIR_IMAGE}"
do_build[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}"
do_build[root_cleandirs] = "${S} \
${S}/isar-apt"
@@ -52,4 +53,12 @@ do_build() {
# Configure root filesystem
sudo install -m 755 ${WORKDIR}/configscript.sh ${S}
sudo chroot ${S} /configscript.sh ${DISTRO_ARCH}
+
+ # Create SDK archive
+ sudo umount ${S}/dev ${S}/proc
+ sudo tar -C ${WORKDIR} --transform="s|^rootfs|sdk-${DISTRO}-${DISTRO_ARCH}|" \
+ -c rootfs | xz -T0 > ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz
+
+ # Install deployment link for local use
+ ln -Tfsr ${S} ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}
}
--
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 ` [PATCH 1/3] sdkchroot: Handle host-target permutation corner cases Jan Kiszka
2018-08-23 8:43 ` [PATCH 2/3] populate_sdk: Remove redundant logic Jan Kiszka
2018-08-23 8:43 ` Jan Kiszka [this message]
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=a44617aebda52a451849c2f5d9fe35f5aa66c85c.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