From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566568349648551936 X-Received: by 2002:a50:fb0e:: with SMTP id d14-v6mr2565389edq.1.1529335710683; Mon, 18 Jun 2018 08:28:30 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d68a:: with SMTP id d10-v6ls5455875edr.8.gmail; Mon, 18 Jun 2018 08:28:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL8NcA/qTDpvda5CZIRoktdMYEwVL8D3JwaMSXzs9Oz3muVVyL8+ZFh+Hq2hymxhf8j5XYA X-Received: by 2002:aa7:d806:: with SMTP id v6-v6mr2571423edq.3.1529335710272; Mon, 18 Jun 2018 08:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335710; cv=none; d=google.com; s=arc-20160816; b=jblrhGvATihgJ5JinrrM+A14Flx6GHaWIIQRLRuaHOf/ynvn5/fgcSkWykyJL+/1qZ nGKsf8d1Pzhqc7qCI0083YOYW66ASJBQZlKXPc/z64OJOmvzKUfoE0x9nWOBda0h0k6n 91dBeUhC5om+7DnfhRP7NB8FUKppj3RhV/UpoKslAQqNdTx6Gat8xqp8cmIBPXN6SS6v N9DuOd2kNwddVbO0DfwI9DYg7AW7l2Prf/2iPnLk7DYdEYWqwNV/lCP8SRzG3z5H8pcz lDlNvSL80RkJK+QZiy8PCa2G8zoK+5XXW8LkKsxf70mO9phFEKRe5tBmoUYkDWFcyR/9 zsng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=vBgeRloXv2W9j4IOQgXUkt6iyHc9lF/0FujAT7mOWUc=; b=qNO+hx2c5fD2WuXbwZOx7oIkaEBTG8/xLCm1ySmOEMWBZTCULjVJKlv2LUzkZ/Gl5i J0voK5L17Q66MG0SWWtbkbGNz5krhKY7RSK+thadfpZjovS7wB0hihd9BqbZ1VsZ6x37 tNgNG3mczs45Vp6H07/htYo08oIJ2Rq3h5HyA+E0mZT9M3Cs1UcRcHcFmAFk0d3pcL4B nJ/2UsdTUYrB8rGEXkeyZOGH60lfrGPtmCIKSpC0arJf+S5L5NClFzCgbEOIP+hKqHJ1 JhzfpgC7l2uJoHeF7OS7qBy1yVucpD7WTrwJYPZ1EtC7qkv6GX84MgaoLm7Gd6VgD9Ql 2QMw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id l17-v6si502582edq.3.2018.06.18.08.28.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 08:28:30 -0700 (PDT) Received-SPF: neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.62.211 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.radix50.net (OFScd-05p9-223.ppp11.odn.ad.jp [182.158.75.223]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w5IFSIGi016515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Jun 2018 17:28:23 +0200 Received: from yssyq.radix50.net (localhost [127.0.0.1]) by yssyq.radix50.net (8.14.4/8.14.4/Debian-8) with ESMTP id w5I9uBLA013747 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Jun 2018 11:56:11 +0200 Received: (from ibr@localhost) by yssyq.radix50.net (8.14.4/8.14.4/Submit) id w5I9uA2A013746; Mon, 18 Jun 2018 11:56:10 +0200 Date: Mon, 18 Jun 2018 11:56:10 +0200 From: Baurzhan Ismagulov To: isar-users@googlegroups.com Cc: kazuhiro3.hayashi@toshiba.co.jp Subject: Re: [RFC PATCH 4/6] meta/class/image: Add do_isar task to trigger SDK rootfs creation. Message-ID: <20180618095609.GB3893@yssyq.radix50.net> Mail-Followup-To: isar-users@googlegroups.com, kazuhiro3.hayashi@toshiba.co.jp References: <20180613135829.3151-1-mosipov@ilbers.de> <20180613135829.3151-5-mosipov@ilbers.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="hwvH6HDNit2nSK4j" Content-Disposition: inline In-Reply-To: <20180613135829.3151-5-mosipov@ilbers.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-TUID: 0eVFFEbojGIe --hwvH6HDNit2nSK4j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 13, 2018 at 03:58:27PM +0200, Maxim Yu. Osipov wrote: > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -71,3 +71,11 @@ do_copy_boot_files() { > addtask copy_boot_files before do_build after do_rootfs > do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}" > do_copy_boot_files[stamp-extra-info] = "${DISTRO}-${MACHINE}" > + > +do_isar_sdk() { > +} > + > +do_isar_sdk[stamp-extra-info] = "${MACHINE}-${DISTRO}" > +do_isar_sdk[depends] = "sdkchroot:do_build" Yocto SDK is generated as follows [1]: bitbake -c populate_sdk core-image-base or in the older way [2]: bitbake meta-toolchain The latter doesn't include local target stuff like libhello-dev in the sysroot. The SDK is provided as a self-extracting script under build/tmp/deploy/sdk (e.g., product-glibc-i686-meta-toolchain-armhf-toolchain-2.0.sh). Executed with a directory as an argument, it extracts the files there. In the directory, there is an environment setup script (e.g., environment-setup-armhf-product-linux) that sets the vars used for building (attached). We could use populate_sdk and meta-toolchain as user-visible task and recipe names (keeping the sdkchroot directory name to follow buildchroot and buildchroot-cross). Advantages: * Pick up developers familiar with Yocto. * UX harmonization with Deby and ELBE using poky as base layer. Disadvantages: * People coming from Yocto might be surprised to find a chroot tarball instead of a self-extractor and environment setup script. What do you think? Possible future extensions: * Generate environment-setup for using without chrooting. * Generate complete VM images for specific virtualization environments. That would eliminate the sudo requirement for users. References: 1. https://www.yoctoproject.org/docs/2.5/adt-manual/adt-manual.html#sdk-building-an-sdk-installer 2. https://www.yoctoproject.org/docs/1.6.1/adt-manual/adt-manual.html#optionally-building-a-toolchain-installer With kind regards, Baurzhan. --hwvH6HDNit2nSK4j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=environment-setup-armhf-product-linux export SDKTARGETSYSROOT=/opt/product/2.0/sysroots/armhf-product-linux export PATH=/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/sbin:/opt/product/2.0/sysroots/i686-productsdk-linux/bin:/opt/product/2.0/sysroots/i686-productsdk-linux/sbin:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/../i686-productsdk-linux/bin:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux-uclibc:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux-musl:$PATH export CCACHE_PATH=/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/../i686-productsdk-linux/bin:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux-uclibc:/opt/product/2.0/sysroots/i686-productsdk-linux/usr/bin/i686-product-linux-musl:$CCACHE_PATH export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfig export CONFIG_SITE=/opt/product/2.0/site-config-armhf-product-linux export OECORE_NATIVE_SYSROOT="/opt/product/2.0/sysroots/i686-productsdk-linux" export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT" export OECORE_ACLOCAL_OPTS="-I /opt/product/2.0/sysroots/i686-productsdk-linux/usr/share/aclocal" unset command_not_found_handle export CC="i686-product-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=$SDKTARGETSYSROOT" export CXX="i686-product-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=$SDKTARGETSYSROOT" export CPP="i686-product-linux-gcc -E -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=$SDKTARGETSYSROOT" export AS="i686-product-linux-as " export LD="i686-product-linux-ld --sysroot=$SDKTARGETSYSROOT" export GDB=i686-product-linux-gdb export STRIP=i686-product-linux-strip export RANLIB=i686-product-linux-ranlib export OBJCOPY=i686-product-linux-objcopy export OBJDUMP=i686-product-linux-objdump export AR=i686-product-linux-ar export NM=i686-product-linux-nm export M4=m4 export TARGET_PREFIX=i686-product-linux- export CONFIGURE_FLAGS="--target=i686-product-linux --host=i686-product-linux --build=i686-linux --with-libtool-sysroot=$SDKTARGETSYSROOT" export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types " export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types " export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu" export CPPFLAGS="" export KCFLAGS="--sysroot=$SDKTARGETSYSROOT" export OECORE_DISTRO_VERSION="2.0" export OECORE_SDK_VERSION="2.0" export ARCH=x86 export CROSS_COMPILE=i686-product-linux- # Append environment subscripts if [ -d "$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then for envfile in $OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do . $envfile done fi if [ -d "$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then for envfile in $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do . $envfile done fi --hwvH6HDNit2nSK4j--