* [PATCH 0/3] SDK-related fixes and enhancements
@ 2018-08-23 8:43 Jan Kiszka
2018-08-23 8:43 ` [PATCH 1/3] sdkchroot: Handle host-target permutation corner cases Jan Kiszka
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jan Kiszka @ 2018-08-23 8:43 UTC (permalink / raw)
To: isar-users
See patches for details.
Jan
Jan Kiszka (3):
sdkchroot: Handle host-target permutation corner cases
populate_sdk: Remove redundant logic
sdk: Properly deploy
doc/user_manual.md | 7 ++++---
meta/classes/image.bbclass | 7 -------
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 25 +++++++++++++++++++++----
3 files changed, 25 insertions(+), 14 deletions(-)
--
2.16.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] sdkchroot: Handle host-target permutation corner cases
2018-08-23 8:43 [PATCH 0/3] SDK-related fixes and enhancements Jan Kiszka
@ 2018-08-23 8:43 ` Jan Kiszka
2018-08-23 8:43 ` [PATCH 2/3] populate_sdk: Remove redundant logic Jan Kiszka
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2018-08-23 8:43 UTC (permalink / raw)
To: isar-users
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] populate_sdk: Remove redundant logic
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 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2018-08-23 8:43 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
All of this is already done by sdkchroot:do_build which this task
depends on.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/image.bbclass | 7 -------
1 file changed, 7 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 990aff3..6a5f0e9 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -97,14 +97,7 @@ addtask copy_boot_files before do_build after do_rootfs
do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
do_copy_boot_files[stamp-extra-info] = "${DISTRO}-${MACHINE}"
-
-SDKCHROOT_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}/rootfs"
-
do_populate_sdk() {
- if [ ${HOST_DISTRO} != "debian-stretch" ]; then
- bbfatal "SDK doesn't support ${HOST_DISTRO}"
- fi
- sudo cp -Trpfx ${DEPLOY_DIR_APT}/${HOST_DISTRO} ${SDKCHROOT_DIR}/isar-apt
}
do_populate_sdk[stamp-extra-info] = "${MACHINE}-${DISTRO}"
--
2.16.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] sdk: Properly deploy
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
2018-08-27 22:13 ` [PATCH 0/3] SDK-related fixes and enhancements Maxim Yu. Osipov
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2018-08-23 8:43 UTC (permalink / raw)
To: isar-users
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] SDK-related fixes and enhancements
2018-08-23 8:43 [PATCH 0/3] SDK-related fixes and enhancements Jan Kiszka
` (2 preceding siblings ...)
2018-08-23 8:43 ` [PATCH 3/3] sdk: Properly deploy Jan Kiszka
@ 2018-08-27 22:13 ` Maxim Yu. Osipov
3 siblings, 0 replies; 5+ messages in thread
From: Maxim Yu. Osipov @ 2018-08-27 22:13 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On 08/23/2018 11:43 AM, Jan Kiszka wrote:
> See patches for details.
Applied to the 'next',
Thanks,
Maxim.
> Jan
>
> Jan Kiszka (3):
> sdkchroot: Handle host-target permutation corner cases
> populate_sdk: Remove redundant logic
> sdk: Properly deploy
>
> doc/user_manual.md | 7 ++++---
> meta/classes/image.bbclass | 7 -------
> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 25 +++++++++++++++++++++----
> 3 files changed, 25 insertions(+), 14 deletions(-)
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-27 22:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/3] sdk: Properly deploy Jan Kiszka
2018-08-27 22:13 ` [PATCH 0/3] SDK-related fixes and enhancements Maxim Yu. Osipov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox