public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/3] Improve SDK packaging
@ 2019-02-20 19:43 Maxim Yu. Osipov
  2019-02-20 19:43 ` [PATCH 1/3] classes/image: Remove setup scripts from final sdk image Maxim Yu. Osipov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-02-20 19:43 UTC (permalink / raw)
  To: isar-users

Hi everybody,

This series is inspired by feedback from SDK users.

Regards,
Maxim.

Maxim Yu. Osipov (3):
  classes/image: Remove setup scripts from final sdk image
  classes/image: Add mount_chroot.sh script to the final sdk image
  sdk: Provide README inside sdkchroot

 meta/classes/image.bbclass                       |  6 ++++
 meta/recipes-devtools/sdkchroot/files/README.sdk | 42 ++++++++++++++++++++++++
 meta/recipes-devtools/sdkchroot/sdkchroot.bb     |  5 ++-
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/sdkchroot/files/README.sdk

-- 
2.11.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] classes/image: Remove setup scripts from final sdk image
  2019-02-20 19:43 [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
@ 2019-02-20 19:43 ` Maxim Yu. Osipov
  2019-02-20 19:43 ` [PATCH 2/3] classes/image: Add mount_chroot.sh script to the " Maxim Yu. Osipov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-02-20 19:43 UTC (permalink / raw)
  To: isar-users

Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/image.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3f4b728..d15d946 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -145,6 +145,9 @@ do_populate_sdk() {
     sudo umount ${SDKCHROOT_DIR}/rootfs/proc || true
     sudo umount -R ${SDKCHROOT_DIR}/rootfs/sys || true
 
+    # Remove setup scripts
+    sudo rm -f ${SDKCHROOT_DIR}/rootfs/chroot-setup.sh ${SDKCHROOT_DIR}/rootfs/configscript.sh
+
     # Create SDK archive
     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
-- 
2.11.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] classes/image: Add mount_chroot.sh script to the final sdk image
  2019-02-20 19:43 [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
  2019-02-20 19:43 ` [PATCH 1/3] classes/image: Remove setup scripts from final sdk image Maxim Yu. Osipov
@ 2019-02-20 19:43 ` Maxim Yu. Osipov
  2019-02-21 17:38   ` Henning Schild
  2019-02-20 19:43 ` [PATCH 3/3] sdk: Provide README inside sdkchroot Maxim Yu. Osipov
  2019-02-27  9:35 ` [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
  3 siblings, 1 reply; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-02-20 19:43 UTC (permalink / raw)
  To: isar-users

Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/image.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index d15d946..2514c88 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -148,6 +148,9 @@ do_populate_sdk() {
     # Remove setup scripts
     sudo rm -f ${SDKCHROOT_DIR}/rootfs/chroot-setup.sh ${SDKCHROOT_DIR}/rootfs/configscript.sh
 
+    # Copy mount_chroot.sh for convenience
+    sudo cp ${ISARROOT}/scripts/mount_chroot.sh ${SDKCHROOT_DIR}/rootfs
+
     # Create SDK archive
     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
-- 
2.11.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] sdk: Provide README inside sdkchroot
  2019-02-20 19:43 [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
  2019-02-20 19:43 ` [PATCH 1/3] classes/image: Remove setup scripts from final sdk image Maxim Yu. Osipov
  2019-02-20 19:43 ` [PATCH 2/3] classes/image: Add mount_chroot.sh script to the " Maxim Yu. Osipov
@ 2019-02-20 19:43 ` Maxim Yu. Osipov
  2019-02-27  9:35 ` [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
  3 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-02-20 19:43 UTC (permalink / raw)
  To: isar-users

Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by:  Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/recipes-devtools/sdkchroot/files/README.sdk | 42 ++++++++++++++++++++++++
 meta/recipes-devtools/sdkchroot/sdkchroot.bb     |  5 ++-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/sdkchroot/files/README.sdk

diff --git a/meta/recipes-devtools/sdkchroot/files/README.sdk b/meta/recipes-devtools/sdkchroot/files/README.sdk
new file mode 100644
index 0000000..9c1af6d
--- /dev/null
+++ b/meta/recipes-devtools/sdkchroot/files/README.sdk
@@ -0,0 +1,42 @@
+Building applications for targets in ISAR takes a lot of time as they are built under QEMU.
+SDK helps to develop applications for target platform in crossbuild environment.
+
+SDK contains cross-toolchain for target architecture and a copy of isar-apt repo with
+locally prebuilt target debian packages.
+
+ - First one have to mount the system directories for proper operation in chroot environement.
+Just call supplied with sdk tarball  in  udo rootfs as an argument to the script `mount_chroot.sh`:
+
+$ sudo mount_chroot.sh  <sdk_rootfs>
+
+ - chroot to isar SDK rootfs:
+
+$ sudo chroot <sdk_rootfs>
+
+ - Check that cross toolchains are installed
+
+:~# dpkg -l | grep crossbuild-essential-armhf
+ii  crossbuild-essential-armhf           12.3                   all          Informational list of cross-build-essential packages
+
+ - Install needed prebuilt target packages.
+
+:~# apt-get update
+:~# apt-get install libhello-dev:armhf
+
+ - Check the contents of the installed target package
+
+:~# dpkg -L libhello-dev
+/.
+/usr
+/usr/include
+/usr/include/hello.h
+/usr/lib
+/usr/lib/arm-linux-gnueabihf
+/usr/lib/arm-linux-gnueabihf/libhello.a
+/usr/lib/arm-linux-gnueabihf/libhello.la
+/usr/share
+/usr/share/doc
+/usr/share/doc/libhello-dev
+/usr/share/doc/libhello-dev/changelog.gz
+/usr/share/doc/libhello-dev/copyright
+~#
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
index f6b9cce..895a454 100644
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
@@ -8,7 +8,9 @@ DESCRIPTION = "Isar SDK Root filesystem"
 LICENSE = "gpl-2.0"
 LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "file://configscript.sh"
+SRC_URI = " \
+    file://configscript.sh \
+    file://README.sdk"
 PV = "0.1"
 
 inherit isar-bootstrap-helper
@@ -51,6 +53,7 @@ do_build() {
     setup_root_file_system --copyisarapt --host-arch --host-distro "${S}" $packages
 
     # Configure root filesystem
+    sudo install -m 644 ${WORKDIR}/README.sdk ${S}
     sudo install -m 755 ${WORKDIR}/configscript.sh ${S}
     sudo chroot ${S} /configscript.sh  ${DISTRO_ARCH}
 }
-- 
2.11.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] classes/image: Add mount_chroot.sh script to the final sdk image
  2019-02-20 19:43 ` [PATCH 2/3] classes/image: Add mount_chroot.sh script to the " Maxim Yu. Osipov
@ 2019-02-21 17:38   ` Henning Schild
  0 siblings, 0 replies; 6+ messages in thread
From: Henning Schild @ 2019-02-21 17:38 UTC (permalink / raw)
  To: Maxim Yu. Osipov; +Cc: isar-users

That reminds me that we really need a task like "devshell" that gives
you an interactive shell in the fully mounted/qemued buildchroot to
resolve the complicated issues.

Henning

Am Wed, 20 Feb 2019 20:43:54 +0100
schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:

> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
> ---
>  meta/classes/image.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index d15d946..2514c88 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -148,6 +148,9 @@ do_populate_sdk() {
>      # Remove setup scripts
>      sudo rm -f ${SDKCHROOT_DIR}/rootfs/chroot-setup.sh
> ${SDKCHROOT_DIR}/rootfs/configscript.sh 
> +    # Copy mount_chroot.sh for convenience
> +    sudo cp ${ISARROOT}/scripts/mount_chroot.sh
> ${SDKCHROOT_DIR}/rootfs +
>      # Create SDK archive
>      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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] Improve SDK packaging
  2019-02-20 19:43 [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
                   ` (2 preceding siblings ...)
  2019-02-20 19:43 ` [PATCH 3/3] sdk: Provide README inside sdkchroot Maxim Yu. Osipov
@ 2019-02-27  9:35 ` Maxim Yu. Osipov
  3 siblings, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-02-27  9:35 UTC (permalink / raw)
  To: isar-users

On 2/20/19 8:43 PM, Maxim Yu. Osipov wrote:
> Hi everybody,
> 
> This series is inspired by feedback from SDK users.

Applied to the 'next'.

Maxim.

> Regards,
> Maxim.
> 
> Maxim Yu. Osipov (3):
>    classes/image: Remove setup scripts from final sdk image
>    classes/image: Add mount_chroot.sh script to the final sdk image
>    sdk: Provide README inside sdkchroot
> 
>   meta/classes/image.bbclass                       |  6 ++++
>   meta/recipes-devtools/sdkchroot/files/README.sdk | 42 ++++++++++++++++++++++++
>   meta/recipes-devtools/sdkchroot/sdkchroot.bb     |  5 ++-
>   3 files changed, 52 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-devtools/sdkchroot/files/README.sdk
> 


-- 
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

end of thread, other threads:[~2019-02-27  9:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 19:43 [PATCH 0/3] Improve SDK packaging Maxim Yu. Osipov
2019-02-20 19:43 ` [PATCH 1/3] classes/image: Remove setup scripts from final sdk image Maxim Yu. Osipov
2019-02-20 19:43 ` [PATCH 2/3] classes/image: Add mount_chroot.sh script to the " Maxim Yu. Osipov
2019-02-21 17:38   ` Henning Schild
2019-02-20 19:43 ` [PATCH 3/3] sdk: Provide README inside sdkchroot Maxim Yu. Osipov
2019-02-27  9:35 ` [PATCH 0/3] Improve SDK packaging 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