public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Evolve SDK to chroot-free usage
@ 2020-03-28 11:24 Jan Kiszka
  2020-03-28 11:24 ` [PATCH v2 1/6] sdk: Add support for adding self-defined sdk packages Jan Kiszka
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Jan Kiszka @ 2020-03-28 11:24 UTC (permalink / raw)
  To: isar-users; +Cc: Chao Zeng, Le Jin, Christopher Larson

Changes in v2:
 - add "restore-chroot" mode to relocation script
 - add help to relocation script
 - update README.sdk

Original cover letter:

Currently, our SDK can primarily be used by chroot'ing into it, taking
the to-be-built project with you (bind mount etc.). This was enough for
a start but we can do better.

This series enhance the SDK to become usage as a normal cross-toolchain
on your host system. For that purpose, we add a script that relocates
the toolchain after installation, adjust binary search paths and
sysroot. So, the only remaining difference to a yocto or buildroot
toolchain is the need to run the relocation script once after unpacking
the SDK.

The series furthermore allows to customize the SDK content via the
image-generating layer.

The series (together with all other pending patching of mine) can also
be found at https://github.com/siemens/isar/commits/jan/queue.

While I already shrunk the SDK a bit by removing the now obsolete
isar-apt repo, I suspect we could further reduce the deployment size by
dropping chroot support completely, only including the compiler and
their library dependencies. OTOH, sdk-debian-buster-arm64.tar.xz is now
142M here, unpacked 680M, while ARM's
gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz has
260M packed and 1.5G(!) unpacked. So we are either not really off or are
still missing something.

Jan

Jan Kiszka (6):
  sdk: Add support for adding self-defined sdk packages
  sdk: Make all links in the SDK chroot relative
  sdk: Add script to relocate SDK
  sdk: Do not ship the isar-apt repo
  sdk: Inject sysroot path when calling relocated toolchain
  sdk: Update README.sdk

 doc/user_manual.md                                 |  1 +
 meta/classes/image-sdk-extension.bbclass           | 28 ++++++++-
 meta/recipes-devtools/sdkchroot/files/README.sdk   | 71 +++++++++++-----------
 .../sdkchroot/files/gcc-sysroot-wrapper.sh         | 16 +++++
 .../sdkchroot/files/relocate-sdk.sh                | 44 ++++++++++++++
 meta/recipes-devtools/sdkchroot/sdkchroot.bb       | 35 ++++++-----
 6 files changed, 141 insertions(+), 54 deletions(-)
 create mode 100755 meta/recipes-devtools/sdkchroot/files/gcc-sysroot-wrapper.sh
 create mode 100755 meta/recipes-devtools/sdkchroot/files/relocate-sdk.sh

-- 
2.16.4


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 0/6] Evolve SDK to chroot-free usage
@ 2020-03-22  8:37 Jan Kiszka
  2020-03-22  8:37 ` [PATCH 5/6] sdk: Inject sysroot path when calling relocated toolchain Jan Kiszka
  0 siblings, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2020-03-22  8:37 UTC (permalink / raw)
  To: isar-users; +Cc: Chao Zeng, Le Jin

Currently, our SDK can primarily be used by chroot'ing into it, taking
the to-be-built project with you (bind mount etc.). This was enough for
a start but we can do better.

This series enhance the SDK to become usage as a normal cross-toolchain
on your host system. For that purpose, we add a script that relocates
the toolchain after installation, adjust binary search paths and
sysroot. So, the only remaining difference to a yocto or buildroot
toolchain is the need to run the relocation script once after unpacking
the SDK.

The series furthermore allows to customize the SDK content via the
image-generating layer.

The series (together with all other pending patching of mine) can also
be found at https://github.com/siemens/isar/commits/jan/queue.

While I already shrunk the SDK a bit by removing the now obsolete
isar-apt repo, I suspect we could further reduce the deployment size by
dropping chroot support completely, only including the compiler and
their library dependencies. OTOH, sdk-debian-buster-arm64.tar.xz is now
142M here, unpacked 680M, while ARM's
gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz has
260M packed and 1.5G(!) unpacked. So we are either not really off or are
still missing something.

Jan

Jan Kiszka (6):
  sdk: Add support for adding self-defined sdk packages
  sdk: Make all links in the SDK chroot relative
  sdk: Add script to relocate SDK
  sdk: Do not ship the isar-apt repo
  sdk: Inject sysroot path when calling relocated toolchain
  sdk: Update README.sdk

 doc/user_manual.md                                 |  1 +
 meta/classes/image-sdk-extension.bbclass           | 28 ++++++++-
 meta/recipes-devtools/sdkchroot/files/README.sdk   | 66 ++++++++++------------
 .../sdkchroot/files/relocate-sdk.sh                | 32 +++++++++++
 meta/recipes-devtools/sdkchroot/sdkchroot.bb       | 35 ++++++------
 5 files changed, 108 insertions(+), 54 deletions(-)
 create mode 100755 meta/recipes-devtools/sdkchroot/files/relocate-sdk.sh

-- 
2.16.4


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

end of thread, other threads:[~2020-09-21 11:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 11:24 [PATCH v2 0/6] Evolve SDK to chroot-free usage Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 1/6] sdk: Add support for adding self-defined sdk packages Jan Kiszka
2020-06-08 10:22   ` Jan Kiszka
2020-06-12  9:34     ` Baurzhan Ismagulov
2020-06-12  9:54       ` Jan Kiszka
2020-06-12 10:05         ` Jan Kiszka
2020-06-12 10:30           ` Jan Kiszka
2020-06-22  8:09           ` Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 2/6] sdk: Make all links in the SDK chroot relative Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 3/6] sdk: Add script to relocate SDK Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 4/6] sdk: Do not ship the isar-apt repo Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 5/6] sdk: Inject sysroot path when calling relocated toolchain Jan Kiszka
2020-07-14 20:22   ` [PATCH v3 " Jan Kiszka
2020-08-31 16:32     ` Jan Kiszka
2020-09-21  9:27       ` Jan Kiszka
2020-09-21 10:05         ` Baurzhan Ismagulov
2020-09-21 11:47           ` Jan Kiszka
2020-03-28 11:24 ` [PATCH v2 6/6] sdk: Update README.sdk Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2020-03-22  8:37 [PATCH 0/6] Evolve SDK to chroot-free usage Jan Kiszka
2020-03-22  8:37 ` [PATCH 5/6] sdk: Inject sysroot path when calling relocated toolchain Jan Kiszka
2020-03-22  8:55   ` [PATCH v2 " Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox