public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
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.
Date: Mon, 18 Jun 2018 11:56:10 +0200	[thread overview]
Message-ID: <20180618095609.GB3893@yssyq.radix50.net> (raw)
In-Reply-To: <20180613135829.3151-5-mosipov@ilbers.de>

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

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.

[-- Attachment #2: environment-setup-armhf-product-linux --]
[-- Type: text/plain, Size: 3138 bytes --]

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

  parent reply	other threads:[~2018-06-18 15:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 13:58 [RFC PATCH 0/6] ISAR SDK root filesystem Maxim Yu. Osipov
2018-06-13 13:58 ` [RFC PATCH 1/6] isar-bootstrap-helper: Add option --copyrepo to setup_root_file_system() Maxim Yu. Osipov
2018-06-14  8:51   ` Henning Schild
2018-06-13 13:58 ` [RFC PATCH 2/6] isar-debootstrap: split into host and target recipes Maxim Yu. Osipov
2018-06-14  8:59   ` Henning Schild
2018-06-13 13:58 ` [RFC PATCH 3/6] sdkchroot: Added recipe-devel to create SDK root filesystem Maxim Yu. Osipov
2018-06-14  9:19   ` Henning Schild
2018-06-14 10:46     ` Maxim Yu. Osipov
2018-06-14 11:07       ` Henning Schild
2018-06-13 13:58 ` [RFC PATCH 4/6] meta/class/image: Add do_isar task to trigger SDK rootfs creation Maxim Yu. Osipov
2018-06-14  9:23   ` Henning Schild
2018-06-14 11:49     ` Maxim Yu. Osipov
2018-06-18  9:56   ` Baurzhan Ismagulov [this message]
2018-06-13 13:58 ` [RFC PATCH 5/6] scripts: Add helper scripts to mount/umount chroot directory Maxim Yu. Osipov
2018-06-14  9:28   ` Henning Schild
2018-06-13 13:58 ` [RFC PATCH 6/6] doc: Add description of ISAR SDK root filesystem creation Maxim Yu. Osipov
2018-06-14  8:48 ` [RFC PATCH 0/6] ISAR SDK root filesystem Henning Schild
2018-06-14  8:51   ` Jan Kiszka
2018-06-14  9:34     ` Henning Schild
2018-06-14  9:46   ` Maxim Yu. Osipov
2018-06-18  7:08     ` Henning Schild
2018-06-19  7:33       ` Maxim Yu. Osipov

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=20180618095609.GB3893@yssyq.radix50.net \
    --to=ibr@radix50.net \
    --cc=isar-users@googlegroups.com \
    --cc=kazuhiro3.hayashi@toshiba.co.jp \
    /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