From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a19:9850:: with SMTP id a77-v6mr93021lfe.15.1528976180363; Thu, 14 Jun 2018 04:36:20 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9d47:: with SMTP id y7-v6ls811870ljj.0.gmail; Thu, 14 Jun 2018 04:36:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJQ0hCyd4VQKyMwpWjB74DJIV23gSXG96h7vYFWveFRUthPHVtvAncEHexR+pPtBDL7m+sB X-Received: by 2002:a2e:6e18:: with SMTP id j24-v6mr96695ljc.0.1528976179932; Thu, 14 Jun 2018 04:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528976179; cv=none; d=google.com; s=arc-20160816; b=J+OKa+MYh7eviLDcN8Yt3nV0x0k3oWDKSnbRETWxuP4Opjdv2JVFueL3ex3oQPkfYO WaNwenkf2t/XNCAFilgMWut4MkT1NC4YAh0Jd5SXcMdfLXrDOMOKrztcGbQ0ApSFxixK 8G3/VQWo/SF+buTZtzdJNW4OzqcYE9yzsgqT1idFl686ZYXovE7H6AyaKKv82jkERzys tOpXI3YInkU9SlcBMHFGYmmQqArVHbOqQ167Fw/4/BPjfPXsKmfoeZYjO4Q5mf2WhpmP svarw7KgwYC1magbWLxvdJW9QD1nGtdSGtbwSE8pgbFzjVN813qOo/K4qFRKEwMNtmF1 QJlw== 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=UNnkSQpfVI2gIIrZPAfHZiWalAfe5i4sIp3EFd36dsQ=; b=M0H0RzK2fmP++nFr9fZju5/oavHWYzNBqgI8NLrjVOAGkJk9GtlIfQjM3xkodvI72Q eq0Hd49rZBiadkR7rZ3i3g3WpoTwPkwtUl1I+RP2Om5RQZiXNFSfhuTD3U2tDf1WlBE4 q4z2sgF2OSRpFoOwVVZHW9FdU9qNRYovYzdwXfAPBmkzmk5GhbTnCo7C51GC+OfQql64 P27skTXUbheTPYj4YwFGrikUy2NnSCYVaHXygL87B9Fc573ZHbanP2cZg1OIxaJ5VYpn DCCz3hPPlSyZrLZdYMNgxmVHskeINXlOzUwdEPlACSLHvw7+LJ83u3pp/E6LlEXGNyXp 4ouA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id t30-v6si176611lfd.0.2018.06.14.04.36.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 04:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w5EBaJeS005824 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jun 2018 13:36:19 +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 w5EBaJXa014335; Thu, 14 Jun 2018 13:36:19 +0200 Date: Thu, 14 Jun 2018 13:36:18 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 5/9] buildchroot-cross: Initial implementation Message-ID: <20180614133618.125af961@md1pvb1c.ad001.siemens.net> In-Reply-To: <20180613130807.2461-6-asmirnov@ilbers.de> References: <20180613130807.2461-1-asmirnov@ilbers.de> <20180613130807.2461-6-asmirnov@ilbers.de> 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: D60mTIKlHzJr 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? > +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? Henning