From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6569888326546882560 X-Received: by 2002:a1c:bd5:: with SMTP id 204-v6mr89428wml.22.1530277073762; Fri, 29 Jun 2018 05:57:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:4345:: with SMTP id u5-v6ls3841747wrr.1.gmail; Fri, 29 Jun 2018 05:57:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfy8uYOUu4+3CUU+DrAN0FVKxuO88vqr6WfS3EZKolOqsgN0qii0oLF2Z31esc49KF6bqJm X-Received: by 2002:adf:e68a:: with SMTP id r10-v6mr1207627wrm.27.1530277073279; Fri, 29 Jun 2018 05:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530277073; cv=none; d=google.com; s=arc-20160816; b=ZM4sA6uoasbmdEWHk7JHMy+qpU++bJ4LtLbvh+xOWRnP6ZgLFzQ/AJEumtUSPqXYYF O5hPXN/WfnQR5QzLAl2kWEJXXuxFJf+fTIXU+bzr554g3Sb4kdbmnXfjZZwUUcoEmUxd 1bMoiAk6dvRbs41aGhv+S2BLXyvC8QLtiLHp+SVwLRwYflu0oUzmeg7Y/tu7t43XXJ8D ZcdiJqY9MgpZNevMqi0r0wDzc9eDxj2zE6rncnBNttiNr7r/ggHPGDiig6frosOXxj4w 8jYMzmizCLcV0dm3mq7jjdjkt+6iPK2m4VeEqUellk0VBqbq/2pM4L/eUrhP3AK8vbTw D6EA== 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:organization:references:to:from:subject :arc-authentication-results; bh=ebaOvPqB8akTjIsV2Fio0kW8v0JJ5jSuhn+4M6gkvXQ=; b=At0s7ZMPr4utBnlyXDCOFoQsWHk/m9sX0EmdfDGGUvVCKLYmUVdX3PX6anc35zZCeD A2oU6lj4V2MuX7tqsVnzLxJ3u5yyKiuu8yC/vdq+jHfAY/1VGNd+iNINcoNs0XWpsTSd kuxLEGpw7/9O2OirF4b36JbLJhOscWZ+FSoNfUWSJiHunLWm5dyB0+TvofYetQiKN8uI vT7R3zi5jfdBkq6w6eahPh/NCsf7IGfRS53RUJqW+Ys5NgNHK7vBXNuJql5CjtMzF9ar SaxPhrFTjA5bTi+EZJVAcz5aRjhhnUQ0T6Lk8y9NM9XNXmOwXbvqxRNKmEuRKiLqnbC3 ktrA== 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 v124-v6si32839wma.2.2018.06.29.05.57.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 05:57:53 -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 w5TCvoMI027796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 29 Jun 2018 14:57:52 +0200 Subject: Re: [PATCH v2 0/7] Add ISAR SDK support From: "Maxim Yu. Osipov" To: isar-users@googlegroups.com References: <20180622124022.30192-1-mosipov@ilbers.de> Organization: ilbers GmbH Message-ID: <59ff57ac-cf5f-fc0a-eb76-cbebe2699050@ilbers.de> Date: Fri, 29 Jun 2018 14:57:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180622124022.30192-1-mosipov@ilbers.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: x1b2U1NP5Izm Applied to the 'next', Maxim. On 06/22/2018 02:40 PM, Maxim Yu. Osipov wrote: > Hello everybody, > > Changes in v2: > - Patches corrected after review > - Improved isar-bootstrap separation into host and target parts. > - Renamed 'do_isar_task' to 'do_populate_sdk' to harmonize with Deby > > Motivation > > Building applications for targets in ISAR takes a lot of time as they are built under QEMU. > SDK providing crossbuild environment will help to solve this problem. > > Approach > > Create SDK root file system for host with installed cross-toolchain for target architecture and ability to install already prebuilt > target binary artifacts. Developer chroots to sdk rootfs and develops applications for target platform. > > Solution > > User manually triggers creation of SDK root filesystem for his target platform by launching the task `do_populate_sdk` for target image, f.e. > `bitbake -c do_populate_sdk multiconfig:${MACHINE}-${DISTRO}:isar-image-base`. > > The resulting SDK rootfs is located under `tmp/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}/rootfs`. > SDK rootfs directory `/isar-apt` contains the copy of isar-apt repo with locally prebuilt target debian packages (for ). > One may chroot to SDK and install required target packages with the help of `apt-get install :` command. > > Limitation > > Only Debian Stretch for SDK root filesystem is supported as only Stretch provides crossbuild environment by default. > (Debian Jessie requires some additional preconfiguration steps see https://wiki.debian.org/CrossToolchains#Installation for details). > > Example > > - Trigger creation of SDK root filesystem > > bitbake -c do_populate_sdk multiconfig:qemuarm-stretch:isar-image-base > > - Mount the following directories in chroot by passing resulting rootfs as an argument to the script `mount_chroot.sh`: > > cat scripts/mount_chroot.sh > #!/bin/sh > > set -e > > mount /tmp $1/tmp -o bind > mount proc $1/proc -t proc -o nosuid,noexec,nodev > mount sysfs $1/sys -t sysfs -o nosuid,noexec,nodev > mount devtmpfs $1/dev -t devtmpfs -o mode=0755,nosuid > mount devpts $1/dev/pts -t devpts -o gid=5,mode=620 > mount tmpfs $1/dev/shm -t tmpfs -o rw,seclabel,nosuid,nodev > > $ sudo scripts/mount_chroot.sh ../build/tmp/work/debian-stretch-armhf/sdkchroot-debian-stretch-amd64/rootfs > > - chroot to isar SDK rootfs: > > $ sudo chroot ../build/tmp/work/debian-stretch-armhf/sdkchroot-debian-stretch-amd64/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 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 > ~# > > Kind regards, > Maxim. > > > > Alexander Smirnov (2): > isar-bootstrap: Move common part to include. > isar-bootstrap: Add host architecture support > > Maxim Yu. Osipov (5): > isar-bootstrap-helper: Add option --copyisarapt to > setup_root_file_system() > sdkchroot: Added recipe-devel to create SDK root filesystem > meta/class/image: Add populate_sdk task to trigger SDK rootfs creation > scripts: Add helper scripts to mount/umount chroot directory > doc: Add description of ISAR SDK root filesystem creation > > doc/user_manual.md | 95 ++++++++++++++++++++++ > meta/classes/image.bbclass | 17 +++- > meta/classes/isar-bootstrap-helper.bbclass | 27 +++++- > .../isar-bootstrap/isar-bootstrap-host.bb | 75 +++++++++++++++++ > .../isar-bootstrap/isar-bootstrap-target.bb | 74 +++++++++++++++++ > .../{isar-bootstrap.bb => isar-bootstrap.inc} | 83 +++---------------- > meta/recipes-devtools/buildchroot/buildchroot.bb | 2 +- > meta/recipes-devtools/isar-apt/isar-apt-host.bb | 31 +++++++ > .../sdkchroot/files/configscript.sh | 14 ++++ > meta/recipes-devtools/sdkchroot/sdkchroot.bb | 47 +++++++++++ > scripts/mount_chroot.sh | 10 +++ > scripts/umount_chroot.sh | 8 ++ > 12 files changed, 408 insertions(+), 75 deletions(-) > create mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb > create mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb > rename meta/recipes-core/isar-bootstrap/{isar-bootstrap.bb => isar-bootstrap.inc} (68%) > create mode 100644 meta/recipes-devtools/isar-apt/isar-apt-host.bb > create mode 100644 meta/recipes-devtools/sdkchroot/files/configscript.sh > create mode 100644 meta/recipes-devtools/sdkchroot/sdkchroot.bb > create mode 100755 scripts/mount_chroot.sh > create mode 100755 scripts/umount_chroot.sh > -- 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