From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6556209687865327616 X-Received: by 2002:a37:4b8f:: with SMTP id y137-v6mr6284409qka.36.1526642546936; Fri, 18 May 2018 04:22:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0c:f643:: with SMTP id s3-v6ls2956330qvm.6.gmail; Fri, 18 May 2018 04:22:26 -0700 (PDT) X-Received: by 2002:a0c:d6cb:: with SMTP id l11-v6mr5955593qvi.46.1526642546647; Fri, 18 May 2018 04:22:26 -0700 (PDT) Received: by 2002:a37:47cb:0:0:0:0:0 with SMTP id u194-v6msqka; Fri, 18 May 2018 04:01:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZptDMfzNKZzEWyZNd1S0W+KhjvWIeu4EHU9zSsThWf0fDBPmEI44hhjCCimQfoOJ/WQoX7H X-Received: by 2002:a1c:ec42:: with SMTP id k63-v6mr543167wmh.29.1526641271415; Fri, 18 May 2018 04:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526641271; cv=none; d=google.com; s=arc-20160816; b=Hy5AGC4PVeB/kvHcAclIq0zUwN197pYz9jNM6e377cmD8hEE7rzfwd+bTQ1IGFJyM2 j6qiHWkbWghUr8iwylGYFBfdb7j7Q+hqeXHZzp/umt4AXxxSdB5pxvk+jNn8w/0U5kqg Zt4g0UOFZtcHkk/ankE0XVUcf36LU4we5ulRBuYQM68Lh4EjccH9xKrK+J9P2o4lkRpd +G2DG/NipVh/lF3uIDf/EQfOBlPTMWTNDvhrBVC53cIacYADg+poWTYiwJMgzbEpx4Zz 2yszk6cf++OfgyDRkSBeXa+y4Q4Lz12c9tuVukB14Q4bD5+8YtKsdyQX3/CH+CXluWTd 7ERQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:cc:to:organization:from:references :subject:arc-authentication-results; bh=E2IkZP/fJwkdHSs8mVe5z8Y5M3ERvq575yb1f4X7rMY=; b=a5D0P3gNclizS3pwerTQDmweEQzzvVlB5WiExIDIblNARE1Jze32gldlmOJ6S/OkxE uUvpjC/epS4JrjfiH2BjLXyVB03XAOFmBM6mKwu67w8Rb8UTv5tyGhUBOxMOpOMm5Hmd ONZVdNWYNXakrkEImFUFoLuumqKqpiPQMLodFqgifcqfAdXFb58WVG91PIykWoRJn2TN Yeg9tHQwCkcsCKiL+r/niT+iIc9prHIyPyFwEWL8TUC2PJsziFFtEIPt25DjcAIEgn/u AdTVQmHv93JDyYenvZfspGaaHYggUOtHQHbpOCF/rV3J4seOsnPLbfOlhVXUmvZXEIu9 sCCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id g18-v6si55556wmc.4.2018.05.18.04.01.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 04:01:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.163] (d51A48A80.access.telenet.be [81.164.138.128]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w4IB19K2023417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 May 2018 13:01:10 +0200 Subject: Re: [PATCH v2 0/2] ISAR SDK image support References: <20180516155653.29870-1-mosipov@ilbers.de> <20180518103333.5752a6f7@md1pvb1c.ad001.siemens.net> From: "Maxim Yu. Osipov" Organization: ilbers GmbH To: Henning Schild Cc: isar-users@googlegroups.com Message-ID: <6f4de683-906b-7a14-5f87-08d1e51ccf92@ilbers.de> Date: Fri, 18 May 2018 13:01:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180518103333.5752a6f7@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: GTQ5ItaeF4c0 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" : > >> 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