From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v2 0/2] ISAR SDK image support
Date: Fri, 18 May 2018 13:01:08 +0200 [thread overview]
Message-ID: <6f4de683-906b-7a14-5f87-08d1e51ccf92@ilbers.de> (raw)
In-Reply-To: <20180518103333.5752a6f7@md1pvb1c.ad001.siemens.net>
Hello Henning,
Thank you very much for your feedback.
I'm new in the project and your suggestions
are very welcome.
Let me first describe my understanding of the ISAR SDK image
use case scenario:
We have a team of developers who need to develop application in ISAR
ecosystem. Somebody (let's call him project's leader) has Debian based
PC workstation with installed ISAR ecosystem and he has to quickly pass
ISAR build environment to other developers, which probably have other
Linux distributions like Fedora/Suse etc.
The provided patch solves this problem - team leader just builds
required isar-image-sdk and passes the resulting ISAR image or ISAR
rootfs tarball to developers - they just chroot to this image and may
start developing application.
This works fine for x86, but as you absolutely right
> While it will work for arm(64) on x86 you will end up with a horribly
> slow SDK. Horribly slow is OK for building the image with Isar, not for
> the fast turn-around you are looking for as a developer.
The proposed solution is just to flash ISAR image on the ARM target (as
modern ARM targets are quite powerful) and develop the application
natively on the target (like this is done in raspbian world).
I hope this clarifies the idea behind the patch,
Kind regards,
Maxim.
On 05/18/2018 10:33 AM, Henning Schild wrote:
> Am Wed, 16 May 2018 17:56:51 +0200
> schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:
>
>> Hello everybody,
>>
>> Please ignore previous patch series.
>>
>> This series introduces ISAR SDK image support.
>
> Thanks for looking into that!
>
> As i explained here
> https://groups.google.com/forum/#!topic/isar-users/bxmZQD8sSDQ
> There are two general ways to prepare an SDK. The image+devtools and
> the "--sysroot" of buildchroot way. You have implemented image+devtools
> which is only practical for non qemu-user-static setups ... basically
> just for x86 targets.
>
> While it will work for arm(64) on x86 you will end up with a horribly
> slow SDK. Horribly slow is OK for building the image with Isar, not for
> the fast turn-around you are looking for as a developer.
>
> What should be done instead is extracting the buildchroot and using it
> from the outside with "--sysroot", add example for make, CMake, eclipse
> And maybe creating an x86 Debian rootfs with the cross compiler that
> contains all that.
>
> Henning
>
>> In order to create ISAR SDK image just add package isar-sdk into
>> variable IMAGE_INSTALL in bitbake's conf/local.conf and fireup the
>> ISAR image build.
>>
>> When build is done, perform the following steps:
>>
>> 1) Copy host's hostname and resolv.conf into resulting rootfs:
>>
>> For example,
>>
>> sudo cp /etc/hostname
>> $HOME/isar/src/build/tmp/work/debian-stretch-amd64/isar-image-base/rootfs/etc
>> sudo cp /etc/resolv.conf
>> $HOME/isar/src/build/tmp/work/debian-stretch-amd64/isar-image-base/rootfs/etc
>>
>> 2) Mount the following directories in chroot by passing resulting
>> rootfs as an argument to the script mount_chroot.sh:
>>
>> $ cat mount_chroot.sh
>> #!/bin/bash
>> sudo mount /tmp $1/tmp -o bind
>> sudo mount proc $1/proc -t proc -o nosuid,noexec,nodev
>> sudo mount sysfs $1/sys -t sysfs -o nosuid,noexec,nodev
>> sudo mount devtmpfs $1/dev -t devtmpfs -o mode=0755,nosuid
>> sudo mount devpts $1/dev/pts -t devpts -o gid=5,mode=620
>> sudo mount tmpfs $1/dev/shm -t tmpfs -o rw,seclabel,nosuid,nodev
>>
>> $./mount_chroot.sh
>> $HOME/isar/src/build/tmp/work/debian-stretch-amd64/isar-image-base/rootfs
>
> Should that helper not be part of the patch series?
>
>> 3) chroot to isar SDK rootfs:
>>
>> $sudo chroot
>> $HOME/isar/src/build/tmp/work/debian-stretch-amd64/isar-image-base/rootfs
>>
>> 4) In chroot change user to 'builder', cd to directory isar and start
>> the isar image generation as usual.
>>
>> For example,
>>
>> root@tiberius:/# su - builder
>> builder@tiberius:~$ cd isar/
>> builder@tiberius:~/isar$ . isar-init-build-env ../build/
>> builder@tiberius:~/build$ bitbake
>> multiconfig:qemuamd64-stretch:isar-image-base
>>
>>
>> Kind regards,
>> Maxim.
>>
>> Alexander Smirnov (1):
>> isar-bitbake: Add AUTOREV definition
>>
>> Maxim Yu. Osipov (1):
>> image: Add ISAR SDK package to create SDK from any rootfs image.
>>
>> meta-isar/recipes-core/images/isar-image-sdk.bb | 9 ++++++
>> meta/conf/isar-bitbake.conf | 2 ++
>> meta/recipes-devtools/isar-sdk/files/README | 2 ++
>> meta/recipes-devtools/isar-sdk/files/postinst | 21 +++++++++++++
>> meta/recipes-devtools/isar-sdk/isar-sdk.bb | 42
>> +++++++++++++++++++++++++ 5 files changed, 76 insertions(+)
>> create mode 100644 meta-isar/recipes-core/images/isar-image-sdk.bb
>> create mode 100644 meta/recipes-devtools/isar-sdk/files/README
>> create mode 100644 meta/recipes-devtools/isar-sdk/files/postinst
>> create mode 100644 meta/recipes-devtools/isar-sdk/isar-sdk.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
next prev parent reply other threads:[~2018-05-18 11:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 15:56 Maxim Yu. Osipov
2018-05-16 15:56 ` [PATCH v2 1/2] isar-bitbake: Add AUTOREV definition Maxim Yu. Osipov
2018-05-16 15:56 ` [PATCH v2 2/2] image: Add ISAR SDK package to create SDK from any rootfs image Maxim Yu. Osipov
2018-05-18 8:19 ` Henning Schild
2018-05-18 8:28 ` Henning Schild
2018-05-17 7:47 ` [PATCH v2 0/2] ISAR SDK image support Baurzhan Ismagulov
2018-05-18 8:33 ` Henning Schild
2018-05-18 11:01 ` Maxim Yu. Osipov [this message]
2018-05-22 8:26 ` Henning Schild
2018-05-22 10:43 ` Jan Kiszka
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=6f4de683-906b-7a14-5f87-08d1e51ccf92@ilbers.de \
--to=mosipov@ilbers.de \
--cc=henning.schild@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