* [PATCH v3 1/3] isar-apt-host: Remove isar-apt-host
2018-09-06 13:11 [PATCH v3 0/3] Various fixes Maxim Yu. Osipov
@ 2018-09-06 13:11 ` Maxim Yu. Osipov
2018-09-06 13:11 ` [PATCH v3 2/3] sdk: Move deployment to populate_sdk Maxim Yu. Osipov
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-06 13:11 UTC (permalink / raw)
To: isar-users
isar-apt-host repo has no sense, as sdkchroot needs
target arch/distro isar-apt repo.
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
meta/classes/isar-bootstrap-helper.bbclass | 4 ++--
meta/recipes-devtools/isar-apt/isar-apt-host.bb | 31 -------------------------
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 2 +-
3 files changed, 3 insertions(+), 34 deletions(-)
delete mode 100644 meta/recipes-devtools/isar-apt/isar-apt-host.bb
diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index d45cdd7..4ad552f 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -93,9 +93,9 @@ setup_root_file_system() {
sudo tee "$ROOTFSDIR/etc/apt/preferences.d/isar" >/dev/null
if [ ${COPYISARAPT} ]; then
- sudo cp -Trpfx ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} $ROOTFSDIR/isar-apt
+ sudo cp -Trpfx ${DEPLOY_DIR_APT}/${DISTRO} $ROOTFSDIR/isar-apt
else
- sudo mount --bind ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} $ROOTFSDIR/isar-apt
+ sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} $ROOTFSDIR/isar-apt
fi
sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $ROOTFSDIR/dev
sudo mount -t proc none $ROOTFSDIR/proc
diff --git a/meta/recipes-devtools/isar-apt/isar-apt-host.bb b/meta/recipes-devtools/isar-apt/isar-apt-host.bb
deleted file mode 100644
index 0cf5ce1..0000000
--- a/meta/recipes-devtools/isar-apt/isar-apt-host.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) 2015-2018 ilbers GmbH
-
-inherit isar-bootstrap-helper
-
-SRC_URI = "file://distributions.in"
-
-CACHE_CONF_DIR = "${DEPLOY_DIR_APT}/${HOST_DISTRO}/conf"
-do_cache_config[dirs] = "${CACHE_CONF_DIR}"
-do_cache_config[stamp-extra-info] = "${HOST_DISTRO}"
-do_cache_config[lockfiles] = "${DEPLOY_DIR_APT}/isar.lock"
-
-# Generate reprepro config for current host distro if it doesn't exist. Once it's
-# generated, this task should do nothing.
-do_cache_config() {
- if [ ! -e "${CACHE_CONF_DIR}/distributions" ]; then
- sed -e "s#{DISTRO_NAME}#"${DEBDISTRONAME}"#g" \
- ${WORKDIR}/distributions.in > ${CACHE_CONF_DIR}/distributions
- fi
-
- path_cache="${DEPLOY_DIR_APT}/${HOST_DISTRO}"
- path_databases="${DEPLOY_DIR_DB}/${HOST_DISTRO}"
-
- if [ ! -d "${path_databases}" ]; then
- reprepro -b ${path_cache} \
- --dbdir ${path_databases} \
- export ${DEBDISTRONAME}
- fi
-}
-
-addtask cache_config after do_unpack
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index e143ae7..d6c7bdd 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -31,7 +31,7 @@ do_build[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}"
do_build[root_cleandirs] = "${S} \
${S}/isar-apt"
-do_build[depends] = "isar-apt-host:do_cache_config isar-bootstrap-host:do_bootstrap"
+do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-host:do_bootstrap"
do_build() {
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 2/3] sdk: Move deployment to populate_sdk
2018-09-06 13:11 [PATCH v3 0/3] Various fixes Maxim Yu. Osipov
2018-09-06 13:11 ` [PATCH v3 1/3] isar-apt-host: Remove isar-apt-host Maxim Yu. Osipov
@ 2018-09-06 13:11 ` Maxim Yu. Osipov
2018-09-06 13:11 ` [PATCH v3 3/3] cross-compilation: cross build broken with host-distro != target-distro Maxim Yu. Osipov
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-06 13:11 UTC (permalink / raw)
To: isar-users
Deploy SDK after Isar packages get deployed to
local Isar apt repo which is copied afterwards
to sdkchroot.
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
meta/classes/image.bbclass | 12 ++++++++++++
meta/recipes-devtools/sdkchroot/sdkchroot.bb | 8 --------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6a5f0e9..f3efdd7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -97,7 +97,19 @@ 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}"
+
do_populate_sdk() {
+ # Copy isar-apt with deployed Isar packages
+ sudo cp -Trpfx ${DEPLOY_DIR_APT}/${DISTRO} ${SDKCHROOT_DIR}/rootfs/isar-apt
+
+ # Create SDK archive
+ sudo umount ${SDKCHROOT_DIR}/rootfs/dev ${SDKCHROOT_DIR}/rootfs/proc
+ sudo tar -C ${SDKCHROOT_DIR} --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 ${SDKCHROOT_DIR}/rootfs ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}
}
do_populate_sdk[stamp-extra-info] = "${MACHINE}-${DISTRO}"
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index d6c7bdd..ba84d53 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -53,12 +53,4 @@ 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.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/3] cross-compilation: cross build broken with host-distro != target-distro
2018-09-06 13:11 [PATCH v3 0/3] Various fixes Maxim Yu. Osipov
2018-09-06 13:11 ` [PATCH v3 1/3] isar-apt-host: Remove isar-apt-host Maxim Yu. Osipov
2018-09-06 13:11 ` [PATCH v3 2/3] sdk: Move deployment to populate_sdk Maxim Yu. Osipov
@ 2018-09-06 13:11 ` Maxim Yu. Osipov
2018-09-06 17:10 ` [PATCH v3 0/3] Various fixes Jan Kiszka
2018-09-06 20:45 ` Maxim Yu. Osipov
4 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-06 13:11 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Because we were not passing --host-distro to setup_root_file_system,
that helper defaulted to the target distro. And that broke the
crossbuild if the target distro differed from the host one.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-devtools/buildchroot/buildchroot-host.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb b/meta/recipes-devtools/buildchroot/buildchroot-host.bb
index daf92a2..01d426d 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb
@@ -30,5 +30,5 @@ BUILDCHROOT_PREINSTALL_append_arm64 += "binutils-aarch64-linux-gnu \
crossbuild-essential-arm64"
-PARAMS = "--host-arch"
+PARAMS = "--host-arch --host-distro"
do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-host:do_bootstrap"
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] Various fixes
2018-09-06 13:11 [PATCH v3 0/3] Various fixes Maxim Yu. Osipov
` (2 preceding siblings ...)
2018-09-06 13:11 ` [PATCH v3 3/3] cross-compilation: cross build broken with host-distro != target-distro Maxim Yu. Osipov
@ 2018-09-06 17:10 ` Jan Kiszka
2018-09-06 20:45 ` Maxim Yu. Osipov
4 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2018-09-06 17:10 UTC (permalink / raw)
To: Maxim Yu. Osipov, isar-users
On 2018-09-06 15:11, Maxim Yu. Osipov wrote:
> Hello everybody,
>
> This patchset
>
> * Removes isat-apt-host as not needed
> * Corrects sdk generation.
> * fixes broken cross compilation build when host-distro !=
> target-distro
>
> Changes to v2:
> - Removes isat-apt-host
> - Splits patchset to logical parts
>
> Cross compilation and sdk generation were tested
> on host debian-stretch-amd64 for targets
> - debian-stretch-arm64
> - debian-stretch-arm
> - debian-buster-arm
>
> Kind regards,
> Maxim.
>
> Jan Kiszka (1):
> cross-compilation: cross build broken with host-distro !=
> target-distro
>
> Maxim Yu. Osipov (2):
> isar-apt-host: Remove isar-apt-host
> sdk: Move deployment to populate_sdk
>
> meta/classes/image.bbclass | 12 +++++++++
> meta/classes/isar-bootstrap-helper.bbclass | 4 +--
> .../buildchroot/buildchroot-host.bb | 2 +-
> meta/recipes-devtools/isar-apt/isar-apt-host.bb | 31 ----------------------
> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 10 +------
> 5 files changed, 16 insertions(+), 43 deletions(-)
> delete mode 100644 meta/recipes-devtools/isar-apt/isar-apt-host.bb
>
Looks good to me, and I finally understand it. :)
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] Various fixes
2018-09-06 13:11 [PATCH v3 0/3] Various fixes Maxim Yu. Osipov
` (3 preceding siblings ...)
2018-09-06 17:10 ` [PATCH v3 0/3] Various fixes Jan Kiszka
@ 2018-09-06 20:45 ` Maxim Yu. Osipov
4 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-06 20:45 UTC (permalink / raw)
To: isar-users
On 09/06/2018 03:11 PM, Maxim Yu. Osipov wrote:
> Hello everybody,
>
> This patchset
>
> * Removes isat-apt-host as not needed
> * Corrects sdk generation.
> * fixes broken cross compilation build when host-distro !=
> target-distro
>
> Changes to v2:
> - Removes isat-apt-host
> - Splits patchset to logical parts
>
> Cross compilation and sdk generation were tested
> on host debian-stretch-amd64 for targets
> - debian-stretch-arm64
> - debian-stretch-arm
> - debian-buster-arm
Applied to the 'next'.
> Kind regards,
> Maxim.
>
> Jan Kiszka (1):
> cross-compilation: cross build broken with host-distro !=
> target-distro
>
> Maxim Yu. Osipov (2):
> isar-apt-host: Remove isar-apt-host
> sdk: Move deployment to populate_sdk
>
> meta/classes/image.bbclass | 12 +++++++++
> meta/classes/isar-bootstrap-helper.bbclass | 4 +--
> .../buildchroot/buildchroot-host.bb | 2 +-
> meta/recipes-devtools/isar-apt/isar-apt-host.bb | 31 ----------------------
> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 10 +------
> 5 files changed, 16 insertions(+), 43 deletions(-)
> delete mode 100644 meta/recipes-devtools/isar-apt/isar-apt-host.bb
>
--
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] 6+ messages in thread