From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6556209687865327616 X-Received: by 2002:a50:9985:: with SMTP id m5-v6mr387816edb.2.1526985828110; Tue, 22 May 2018 03:43:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:c441:: with SMTP id w1-v6ls9145678edf.1.gmail; Tue, 22 May 2018 03:43:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomWYlRN2u+PVxuznK3qc4wXwc+Y2ATr7+uwiTPEOD1+D2yRHm8VzL+e0X7MTSH2wcsPFZ0 X-Received: by 2002:a50:a5c8:: with SMTP id b8-v6mr385819edc.1.1526985827567; Tue, 22 May 2018 03:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526985827; cv=none; d=google.com; s=arc-20160816; b=cJMLxXlB1kt1cOAGK7Ec4+0JPpaR1v6nlcrJ0tsZLZeK478A6P/Yy3DCEEK5Afx0qE aY0f/7q8gTJktcvPdnnhUuEb7w/LE8bNyKcC5COpXw877iWzflISk0Yv2yBzlqf+BF9P 9nXl9SkGmctzxr5Qwk+XEPnqQ2AosV2c8Ku1hwt0+GHiFSUyJ9YDofXUsWuMZrXDHDlj nX5fF1lUXYJ2LqCxab3I9xLtB74J/cstKca8U2Tm3f0GSCFnTFIczHMQl0CYdjmwSJnp OxcQrj/hL2YtMiKZ+TSFY08k2wnyFXy9xYgk1llfbGIYwRV+nKlZV0ht1bzJISH/HJvr 4WBw== 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:autocrypt:openpgp:from:references:cc:to :subject:arc-authentication-results; bh=XWg7hpQJe2OPdHrNYoDfIsGLxNoyLa2Rs1SibpYHh8E=; b=FdAWvKt1tSJrP1PshPjmC/i+WpZljWE5AEzHG4Ys70hfjqGxwEOwODdXnlIHdMk4fm r86u6fp1B3EJJnVr/Eu+D9n0U0ljU7zUmosrHvZz06lwYu7pjB8+L7XtfNeT5H1vfD6l mJ46lfDypchZ4sdwIYEKYxzpTwqL44TMvOePeko8hn2xkD+f52+/V25AZ+EM42pJXY25 mWqfwGr2x/lVvPaT+9lUChIPCYgQpdQ8UHK5IrubIXdv8DU7ZZQSsQfahu34z+6TS+OW 91ve5Qe3dOu3u5ZZFr8TVrdak0iM/G7qA47krDTqOE3luIXW/pJLzyzptF7Mf/Jrcvym dGLA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id u9-v6si791683edp.3.2018.05.22.03.43.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 03:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w4MAhklq008132 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 May 2018 12:43:47 +0200 Received: from [167.87.31.4] ([167.87.31.4]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w4MAhjMB014995; Tue, 22 May 2018 12:43:46 +0200 Subject: Re: [PATCH v2 0/2] ISAR SDK image support To: "[ext] Henning Schild" , "Maxim Yu. Osipov" Cc: isar-users@googlegroups.com References: <20180516155653.29870-1-mosipov@ilbers.de> <20180518103333.5752a6f7@md1pvb1c.ad001.siemens.net> <6f4de683-906b-7a14-5f87-08d1e51ccf92@ilbers.de> <20180522102636.3aa966d6@md1pvb1c.ad001.siemens.net> From: Jan Kiszka Openpgp: preference=signencrypt Autocrypt: addr=jan.kiszka@siemens.com; prefer-encrypt=mutual; keydata= xsDhBEq0i8QRBAD2wOxlC9m/8t/vqjm1U9yQCT6OJ2Wbv/qys9DYM0CvcOTDMWQwmV1/VsZj KR5YgB5NPt+To7X6x5cjz15AGnx5Fb8Wnrq8EF9ZfHMwb7YMx1LdPYPDnXr37wE3XupFmkHB Mes4htyX7Dz8LvKDLnli4IsAmWG+kV1JI6LWKXLpSwCg8JRq4SWoB4VCQxbH3GjntgvwNc8D /2q5Dj0urJ7s7sdXhrH0hcFkpSFRmU5Yd6MCwcbFHm2paL5gqVjNNUUwDBKAL9eZaQVIHKwC 44BvNGO2gcQ26R3AuCHUQ+pZHg34tok1JCNZ6IEZccb+33Qq0qbcDMJJiDYp7ppp6ozifvc4 YaqJECX48IydxfE9+41oV7T5vNAzA/QL/UMJyTnu5jiOXcyn5iFQw535lXkwKsqeXzCowLho HICZ2jITJPdTT/+9pGWwMQqST/SS35Tx4EnS3z2BWsNMCLuXCPkxF1elaMJqMfMJxFD8rAgS 9GK6zP6fJlsA1wq/UvKSL8v4QPOnTNCVOsyqJVasGV0ZPcDfcj+ClNO4zR5KYW4gS2lzemth IDxqYW4ua2lzemthQHdlYi5kZT7CYwQTEQIAIwIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA BQJOpoNtAhkBAAoJEIrUrG965ecUOPUAoK+Rh12KgCjplHAS0AoiGKwGOuq7AKDEVnBtRAoy VRvp3lOlOx+P2Ay56M7BTQRKtIvEEAgA2/PlX6oyi7dToH0CJCHq0eKmZaa7CmGaVnxyeepK vIfiM8n8Td76AbG64fjREMwgSpb4F/UytF3z/03tj4e49W/zKjbBRB2/wmFRlZBC9crg22Q+ bgvMOsxnC6uHXaWN8fL+jVei/5OoHOoFqaMsX8EvploitlI/BPj+VgW26jksf3YZyk1hncls Z/IYhXzgRmVJo4RiTW/YLQAkwndwc+fKPa/IYLEDW1Jc4kNLoK0P90b45zju0hpl0C00pVOR TOtzFK9G5Ha7qOAWJfAVJORHKAkkvwftf3hkpPdLyvZUWRHXvUexmA61fLvDBAFhRxYGD8t5 gz88SF5Tzq+0ywADBQf/YSkaYrEslPWiCA2wU6EW0yaqBQAobFsOMvsufJ6o2ntq5Ncq37VI 3KCT67eHPE9x+zPcENoZWsRrC9S9PCf1LOsi7ybZsR13AJqDFlRzJZ4klh9QwgwFZxUBzOdI vttwzG1QkzHx06RKZluFYpPF3DRduSMukdIJ2wmWCU+ohB+mYefe65JGjYQfHVs8mgYVFOPx bRea9VJACCMuspoZWpj43UdR1lLLyIUFYz+jqcPW7Hd/GTIw4N67pYl0dwPDmFd4ohJ5g4Zp q61toNysBGEuEm5GCcn0VmGtQpSYnR5cVm5b2yPz4bIuFOSuZUo/l7vitdY0iy0/wvKbBC+N K8JJBBgRAgAJBQJKtIvEAhsMAAoJEIrUrG965ecULvAAoKGvxs5T3IhyQT8I8sMsyAvCE4wH AJ46S16yab+OxNkvOeoOEX0EnHVHaA== Message-ID: Date: Tue, 22 May 2018 12:43:45 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180522102636.3aa966d6@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: L6cfESDr5ZAI On 2018-05-22 10:26, [ext] Henning Schild wrote: > Am Fri, 18 May 2018 13:01:08 +0200 > schrieb "Maxim Yu. Osipov" : > >> 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. > > So far so good, but they might have Windows or MacOS as well. That's a VM topic in the foreseeable future. > >> 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. > > chroot is not available on the OS the developers are used/forced to work > in chroot is specifically problematic on Linux machines where the user lacks the required privileges. > >> 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). Nope, that's not an SDK as we need to provide. A key point of the SDK is speed in the turnaround. And not all ARM targets are 8-core Cortex-A57 or better yet, not to speak of their storage devices. Jan > > And this is exactly the point where i think you are wrong. Developers > do not want to or can not deal with additional hardware. It is > cumbersome and HW might not be available. We need something that works > on one machine (the developers notebook). > So the --sysroot for devs with any Linux + cross toolchain, and for the > Windows guys a whole Linux + cross toolchain to wrap it all into a > VM-image. > >> I hope this clarifies the idea behind the patch, > > The idea was clear but that way has the mentioned limitations. > > Henning > >> 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 >>> >> >> >