From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566568349648551936 X-Received: by 2002:a2e:9943:: with SMTP id r3-v6mr81159ljj.13.1528974467937; Thu, 14 Jun 2018 04:07:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8087:: with SMTP id i7-v6ls798702ljg.7.gmail; Thu, 14 Jun 2018 04:07:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIOj8j/nzcCFYWs6LzsqAlHeg1RorwjuOFFX5AIuYTrdNnGBz1E5TeJGktiq0T3oI+1eJUp X-Received: by 2002:a2e:9056:: with SMTP id n22-v6mr93061ljg.41.1528974463781; Thu, 14 Jun 2018 04:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528974463; cv=none; d=google.com; s=arc-20160816; b=sMgvMcPD1Csq7sa52pYPAXD9d8KoiER3E7R/DnPvsFOibDLmE3krgjxbt39H8PMI6N YfJnU61ioC+u2UZo/GmR2/LxxiCFAn4reFBbvq7puD7S/N5ffShP/XRsAOjbJyio4504 U1TFsMZv6Ce7X3zIssz6z0JjlbQ2QY1G/iaiN6RSshpEYLA1/8pw6j2wzIh9a/HZVtA9 VTDq2W97vVPXF8YXWRF1h9CYhjRINfOHVQp3OPPGwPZe1bJ+W8jDf4cB0EhFbTyi19oc f4OhhHAmmmDf6d8nMqPkxfSncC0vIopw/QbKzG2Yf4nq/YP9JJ00sfWE5PxMuArRvdRQ +peg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=mT98M+IzhlCsCulOCogL98V1xyaoeUKCxVPetPn0p4A=; b=Q5VxgZ6ChDjd3VG4UCNz/WpxE3A3ej7sbR8ZJvZE2hZreAV1RcVGooRe3dCicvWjKA CVA7n+WGq2VJWqniBBzKtbXGlpcBEXUbMXvZF7zAo4xttYaxiIa8/+ftLXHe3kLRMvoo G5ywO0nj2XvlbYztVlfq2Z1zFjqzcs8zMaSy/pY34nmcHEXRSQxLTvEmC3BZjOkaOak4 QM5otWScBCtwPqHStKao6QTc7e+LXNF/s0zeK3i27LSj5EDvI6PA67qclWb+wiqwa0ny 0mkmIUrm/IHSLQwHJoyetmYTwLvK8mClyqbFVRzlrrp1CwYQZBQQtqJ7unFSVnJnJqNo DB4g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id t30-v6si175186lfd.0.2018.06.14.04.07.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 04:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w5EB7h6n016434 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jun 2018 13:07:43 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w5EB7glh021229; Thu, 14 Jun 2018 13:07:42 +0200 Date: Thu, 14 Jun 2018 13:07:42 +0200 From: Henning Schild To: "Maxim Yu. Osipov" Cc: Subject: Re: [RFC PATCH 3/6] sdkchroot: Added recipe-devel to create SDK root filesystem Message-ID: <20180614130742.7aef9924@md1pvb1c.ad001.siemens.net> In-Reply-To: References: <20180613135829.3151-1-mosipov@ilbers.de> <20180613135829.3151-4-mosipov@ilbers.de> <20180614111948.7923d149@md1pvb1c.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: OBM2GLpnvYwO Am Thu, 14 Jun 2018 12:46:22 +0200 schrieb "Maxim Yu. Osipov" : > On 06/14/2018 11:19 AM, Henning Schild wrote: > > Am Wed, 13 Jun 2018 15:58:26 +0200 > > schrieb "Maxim Yu. Osipov" : > > > >> 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. > >> > >> 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. > >> > >> Signed-off-by: Maxim Yu. Osipov > >> --- > >> .../sdkchroot/files/configscript.sh | 14 +++++ > >> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 59 > >> ++++++++++++++++++++++ 2 files changed, 73 insertions(+) > >> create mode 100644 > >> meta/recipes-devtools/sdkchroot/files/configscript.sh create mode > >> 100644 meta/recipes-devtools/sdkchroot/sdkchroot.bb > >> > >> diff --git a/meta/recipes-devtools/sdkchroot/files/configscript.sh > >> b/meta/recipes-devtools/sdkchroot/files/configscript.sh new file > >> mode 100644 index 0000000..62c1cf0 > >> --- /dev/null > >> +++ b/meta/recipes-devtools/sdkchroot/files/configscript.sh > >> @@ -0,0 +1,14 @@ > >> +#!/bin/sh > >> +# > >> +# This software is a part of ISAR. > >> +# Copyright (C) 2015-2018 ilbers GmbH > >> + > >> +set -e > >> + > >> +debconf-set-selections < >> +locales locales/locales_to_be_generated multiselect en_US.UTF-8 > >> UTF-8 +locales locales/default_environment_locale select > >> en_US.UTF-8 +END > >> + > >> +dpkg --add-architecture $1 > >> +apt-get update --yes -o Debug::pkgProblemResolver=yes > >> diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb > >> b/meta/recipes-devtools/sdkchroot/sdkchroot.bb new file mode 100644 > >> index 0000000..d884d80 > >> --- /dev/null > >> +++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb > >> @@ -0,0 +1,59 @@ > >> +# SDK Root filesystem > >> +# > >> +# This software is a part of ISAR. > >> +# Copyright (C) 2015-2018 ilbers GmbH > >> + > >> +DESCRIPTION = "Isar SDK Root filesystem" > >> + > >> +LICENSE = "gpl-2.0" > >> +LIC_FILES_CHKSUM = > >> "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" > >> + +FILESPATH_prepend := "${THISDIR}/files:" > > > > Should not be required. > > > >> +SRC_URI := "file://configscript.sh" > >> +PV = "1.0" > > > > Please use proper file naming instead. > > > > sdkchroot_1.0.bb and maybe go for 0.1 ;) > > > >> + > >> +inherit isar-bootstrap-helper > >> + > >> +def get_deb_host_arch(): > >> + import subprocess > >> + arch = subprocess.check_output(['dpkg-architecture', '-q', > >> 'DEB_HOST_ARCH'], universal_newlines=True) > >> + return str.splitlines(arch)[0] > >> + > >> +#SDK Debian Distribution > >> +DISTRO_HOST ?= "debian-stretch" > >> +#Determine SDK host architecture if not explicitly set > >> +DISTRO_HOST_ARCH ?= "${@get_deb_host_arch()}" > >> + > >> + > >> +SDKCHROOT_PREINSTALL := "crossbuild-essential-${DISTRO_ARCH} \ > >> + debhelper \ > >> + autotools-dev \ > >> + dpkg \ > >> + locales \ > >> + docbook-to-man \ > >> + apt \ > >> + automake \ > >> + devscripts \ > >> + equivs" > >> + > >> +WORKDIR := "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" > > > > Why do you set that? Not needed and wrong ... no PV. > > Well...sdkchroot.bb is based on buildchroot.bb. > Does it mean that all your previous notes apply to buildchroot too? That is old code back from the days when there where no reviews, it is likely some notes apply there as well. i.e. versioned recipes could some day help to introduce api modyfing changes If you find that my notes makes sense and decide to apply them, you can double check whether buildchroot would benefit from similar changes. Henning > > > >> +SDKCHROOT_DIR := "${WORKDIR}/rootfs" > > > > Could you just use S and drop SDKCHROOT_DIR? > > Agree (that was inherited from buildchroot.bb as buildchroot's > counterpart - BUILDCHROOT_DIR is used in other recipes). > > Maxim. > > > Henning > > > >> +do_build[stamp-extra-info] = "${DISTRO_HOST}-${DISTRO_HOST_ARCH}" > >> +do_build[root_cleandirs] = "${SDKCHROOT_DIR} \ > >> + ${SDKCHROOT_DIR}/isar-apt" > >> + > >> +do_build[depends] = "isar-apt:do_cache_config > >> isar-bootstrap-host:do_deploy" + > >> +do_build() { > >> + > >> + if [ ${DISTRO_HOST} != "debian-stretch" ]; then > >> + bbfatal "SDK doesn't support ${DISTRO_HOST}" > >> + fi > >> + > >> + setup_host_root_file_system --copyrepo "${SDKCHROOT_DIR}" > >> ${SDKCHROOT_PREINSTALL} + > >> + # Configure root filesystem > >> + sudo install -m 755 ${WORKDIR}/configscript.sh > >> ${SDKCHROOT_DIR} > >> + sudo chroot ${SDKCHROOT_DIR} /configscript.sh ${DISTRO_ARCH} > >> +} > > > >