From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a50:fb0e:: with SMTP id d14-v6mr355449edq.1.1529061406922; Fri, 15 Jun 2018 04:16:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d441:: with SMTP id q1-v6ls3693321edr.7.gmail; Fri, 15 Jun 2018 04:16:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJhgh1/j/MuV74LeM5vTztPsE3Xsc2vcEH8uH0o0KkogBRZAuLqzTwJTJexqRnnnFcvhG3U X-Received: by 2002:aa7:d486:: with SMTP id b6-v6mr352169edr.7.1529061406588; Fri, 15 Jun 2018 04:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529061406; cv=none; d=google.com; s=arc-20160816; b=uYuCSohnNds8bAVxwsd/iA9HfxsX7/+QF/pQ7ymPp07dMCZwDOm0830rS5lVg9kntp wpte81A89aR022g63jVJsipgPfjVojXpuLJZN+el544SPLDB8SMUmR0NTTt0h7v3QLrr sszyNmb8XkmcGeuYuBLJq5RzIVpuqAapztwv5feXUQmjHO7Qk7lphQBgmt/5aTcDxvGs zGo+1mYkkyIj1hpl2odeQOy9z+Re5kG6KBE9vzTY8kXoG+Y/uJQWXAfuqGRJWv+Ntbd2 l05aFAas5cv+82M8Uti9PH+DMaUNed0tT3CsywtY2phzOuWvBXv9zBElemN3SiuiwoyQ X0Sw== 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 :message-id:subject:cc:to:from:date:arc-authentication-results; bh=WSLPT9N4OphXWtO/aDUj0FxEsQwPoQg6cVBM5cnODlo=; b=c//kFAMk+1JGq8EPJMNlDaCEG9JjGe7ZJzvDViaBLaH+15mOg42LaloSg/8eev9uJh RxYs3ky3fK0sJijHrWt0E9rdDXCRsGEB1cfAExcVmkDwXr7VrmXWbnJYseAbk7Ta512w eFZtStG8rss9mOdQW1YIje5YHaMR8vUgS3IRTJtD4oztukOgrwDgRn7kChTUBWjVsDR7 1Ti51uaRPMSEqDOo/1oBgi9NgbOdE2SpOnj/GhXTlictQu+KHJJMH2gb0Vf6hQt0wFfB rQUuZSDh9tCpBBCFWxoht/dNDPQ3XyfO6YVF6GvZD9XpPOd0RyB6SqDslSWdKjg9iHX0 +Riw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id k6-v6si290664edn.1.2018.06.15.04.16.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 04:16:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@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 asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from azat.radix50.net (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w5FBGhJW005097 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 15 Jun 2018 13:16:45 +0200 Date: Fri, 15 Jun 2018 13:16:43 +0200 From: Alexander Smirnov To: Henning Schild Cc: isar-users@googlegroups.com Subject: Re: [PATCH 5/9] buildchroot-cross: Initial implementation Message-ID: <20180615111643.GF24273@azat.radix50.net> References: <20180613130807.2461-1-asmirnov@ilbers.de> <20180613130807.2461-6-asmirnov@ilbers.de> <20180614133618.125af961@md1pvb1c.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180614133618.125af961@md1pvb1c.ad001.siemens.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-TUID: RXYhHWlz+dXj Hi Henning, > Am Wed, 13 Jun 2018 15:08:03 +0200 > schrieb Alexander Smirnov : > > > Add initial generation of buildchroot for cross-compilation. > > > > Signed-off-by: Alexander Smirnov > > --- > > meta/conf/isar-bitbake.conf | 1 + > > .../buildchroot/buildchroot-cross.bb | 53 > > ++++++++++++++++++++++ .../buildchroot/files/build-cross.sh > > | 29 ++++++++++++ 3 files changed, 83 insertions(+) > > create mode 100644 > > meta/recipes-devtools/buildchroot/buildchroot-cross.bb create mode > > 100644 meta/recipes-devtools/buildchroot/files/build-cross.sh > > > > diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf > > index ead7798..1412508 100644 > > --- a/meta/conf/isar-bitbake.conf > > +++ b/meta/conf/isar-bitbake.conf > > @@ -22,6 +22,7 @@ WORKDIR = > > "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}" DL_DIR = > > "${TOPDIR}/downloads" SSTATE_DIR ?= "${TMPDIR}/sstate-cache" > > BUILDCHROOT_DIR = > > "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot/rootfs" > > +BUILDCHROOT_CROSS_DIR = > > "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-cross/rootfs" > > CACHE = "${TMPDIR}/cache" OVERRIDES_append = > > ":${DISTRO}:${DISTRO_ARCH}" diff --git > > a/meta/recipes-devtools/buildchroot/buildchroot-cross.bb > > b/meta/recipes-devtools/buildchroot/buildchroot-cross.bb new file > > mode 100644 index 0000000..935a626 --- /dev/null > > +++ b/meta/recipes-devtools/buildchroot/buildchroot-cross.bb > > @@ -0,0 +1,53 @@ > > +# Root filesystem for packages cross-building > > +# > > +# This software is a part of ISAR. > > +# Copyright (C) 2015-2016 ilbers GmbH > > + > > +DESCRIPTION = "Isar development cross-filesystem" > > + > > +LICENSE = "gpl-2.0" > > +LIC_FILES_CHKSUM = > > "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" > > + +FILESPATH_prepend := "${THISDIR}/files:" > > Same as seen in Maxims patches. > No need to prepend FILESPATH, set PV with proper filename > > I guess here some "hacks" are required because other recipes will need > to find that and can not know PV and stuff. > > > +SRC_URI = "file://configscript.sh \ > > + file://build-cross.sh" > > +PV = "1.0" > > + > > +inherit isar-bootstrap-helper > > + > > +BUILDCHROOT_CROSS_PREINSTALL ?= "gcc-multilib \ > > + make \ > > + build-essential \ > > + debhelper \ > > + autotools-dev \ > > + dpkg \ > > + locales \ > > + docbook-to-man \ > > + apt \ > > + automake \ > > + devscripts \ > > + equivs" > > + > > +# TODO: make this inclusion depending on the target arch > > +BUILDCHROOT_CROSS_PREINSTALL += "binutils" > > + > > +WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" > > WORKDIR = ${BUILDCHROOT_CROSS_DIR}/../ > > maybe? > For me - no problem :-) > > +do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" > > +do_build[root_cleandirs] = "${BUILDCHROOT_CROSS_DIR} \ > > + ${BUILDCHROOT_CROSS_DIR}/isar-apt \ > > + ${BUILDCHROOT_CROSS_DIR}/downloads \ > > + ${BUILDCHROOT_CROSS_DIR}/home/builder" > > +do_build[depends] = "isar-apt:do_cache_config > > isar-bootstrap-host:do_deploy" + > > +do_build() { > > + setup_root_file_system --host-arch "${BUILDCHROOT_CROSS_DIR}" > > ${BUILDCHROOT_CROSS_PREINSTALL} + > > + # Install package builder script > > + sudo chmod -R a+rw "${BUILDCHROOT_CROSS_DIR}/home/builder" > > + sudo install -m 755 ${WORKDIR}/build-cross.sh > > ${BUILDCHROOT_CROSS_DIR}/build.sh + > > + # Configure root filesystem > > + sudo install -m 755 ${WORKDIR}/configscript.sh > > ${BUILDCHROOT_CROSS_DIR} > > + sudo chroot ${BUILDCHROOT_CROSS_DIR} /configscript.sh > > +} > > diff --git a/meta/recipes-devtools/buildchroot/files/build-cross.sh > > b/meta/recipes-devtools/buildchroot/files/build-cross.sh new file > > mode 100644 index 0000000..8c3ddaf > > --- /dev/null > > +++ b/meta/recipes-devtools/buildchroot/files/build-cross.sh > > @@ -0,0 +1,29 @@ > > +#!/bin/bash > > +# > > +# This software is a part of ISAR. > > +# Copyright (C) 2015-2017 ilbers GmbH > > +# Copyright (c) 2018 Siemens AG > > + > > +set -e > > + > > +# Go to build directory > > +cd $1 > > + > > +# Add target architecture > > +dpkg --add-architecture $2 > > + > > +# To avoid Perl locale warnings: > > +export LC_ALL=C > > +export LANG=C > > +export LANGUAGE=C > > + > > +# If autotools files have been created, update their timestamp to > > +# prevent them from being regenerated > > +for i in configure aclocal.m4 Makefile.am Makefile.in; do > > + if [ -f "${i}" ]; then > > + touch "${i}" > > + fi > > +done > > + > > +# Build the package > > +dpkg-buildpackage -a$2 > > Can that be done with changing/extending build.sh and not introducing a > copy? At the moment I'm in stuck with the deps installation. When I'll find the clue how to process them - I hope there will be the only one build.sh. Alex > > Henning