From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6584097242600177664 X-Received: by 2002:aa7:c914:: with SMTP id b20-v6mr1122112edt.3.1533233835050; Thu, 02 Aug 2018 11:17:15 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:f281:: with SMTP id f1-v6ls1255273edm.6.gmail; Thu, 02 Aug 2018 11:17:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcBe0bSTpi8k2GTtZfP8mEgxFMGqpELzrl+wVgNu+CPg51kZb+8tGY8CbtpbwkohNPgPqve X-Received: by 2002:aa7:d29a:: with SMTP id w26-v6mr1118307edq.9.1533233834311; Thu, 02 Aug 2018 11:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533233834; cv=none; d=google.com; s=arc-20160816; b=hEnM5o3RIvbZvZ0qW3Eihj89S6UCPqw4QUtg/I6S6pltV4cH99x+Y2CCpGpVTtEr7J tCbFHWwBJ4svqC5mFn0USuGF5C/i+vwJvN+0Q3QNArH2b8wMnkg9gX228Kavgq524uaM KSameRseNMOe8VLzG7BZez1fRq5RyKU/VVJNdA/uOuyZG1VjPPV5AJxr1W/LZoIp/QqW IJja8zJstWy3DJLj0PnssXVUUbtUOXSiAkAsxjge2ZfTsWHpigTeP707hxBt3Z2qQktP 0EVUQWXB0X8G5WgF7skMo1EPookviKKShTBKWyV6fvrWqwIlnxzD/ABIWk6ByZxYMp8v mNiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=HK4Moe//gQA+oyk4p7GgyBlL851kuU263fV4ZJMKzgA=; b=y7B1HA7aQcSo29G21T/8wrLf8smwyIU4Gekr/eIE3b69dOT5k127btBf4fH0yjoq5l 1fy8Eza6q7bbK4/AU0hr2Gq6q3EmYtnOheZy93mcq0Dghl8W4HqBpiLKUnp+JaCUoY2d cVSlEQPLvTaZK1lgpJqlKOZPx95OZMrxjB2ihxP0IOpkR2/18Arz6/RMohl1Z+CdytFa k3oiGMzgsEIr6H+cAqPCQj01PiGH7dlVNEVuDMC1FZJXXaCV7kZsrvaBDjzHkiifBJd1 y2xkA0k7Q0BB84MCvMHy4D02rSpyiGeGk7BP5HTxhwPD/rrhhjs6m54+V2xsKgCkpOKg jY4g== 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 n23-v6si94814edq.0.2018.08.02.11.17.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 11:17:14 -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 [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w72IH99k027098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 2 Aug 2018 20:17:12 +0200 Subject: Re: [PATCH v5 05/12] build.sh: Add additional parameter To: Henning Schild Cc: isar-users@googlegroups.com References: <20180730193937.32694-1-asmirnov@ilbers.de> <20180730193937.32694-6-asmirnov@ilbers.de> <45fa7d47-7eed-fd86-ecd2-dbc3c41ca92c@ilbers.de> <20180802095631.7e18b817@md1pvb1c.ad001.siemens.net> <20180802190524.3ee62b68@md1pvb1c.ad001.siemens.net> From: Alexander Smirnov Message-ID: <495be0e7-bd1b-63d5-ccae-8732d562ccfc@ilbers.de> Date: Thu, 2 Aug 2018 21:16:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180802190524.3ee62b68@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: EBDdqT/KiLDk Hi Henning, On 02.08.2018 20:05, Henning Schild wrote: > Am Thu, 2 Aug 2018 14:05:12 +0300 > schrieb Alexander Smirnov : > >> Hi everybody, >> >> On 02.08.2018 10:56, Henning Schild wrote: >>> Am Wed, 1 Aug 2018 17:51:57 +0300 >>> schrieb Alexander Smirnov : >>> >>>> On 30.07.2018 22:39, Alexander Smirnov wrote: >>>>> Pass target architecture as a parameter for build. >>>>> >>>>> Signed-off-by: Alexander Smirnov >>>>> --- >>>>> meta/recipes-devtools/buildchroot/files/build.sh | 17 >>>>> +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh >>>>> b/meta/recipes-devtools/buildchroot/files/build.sh index >>>>> 73c0889..c2967d2 100644 --- >>>>> a/meta/recipes-devtools/buildchroot/files/build.sh +++ >>>>> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -6,6 +6,19 >>>>> @@ >>>>> set -e >>>>> >>>>> +# Create human-readable names >>>>> +target_arch=$2 >>>>> + >>>>> +# Notes: >>>>> +# mk-build-deps for jessie and jtretch has different parameter >>>>> name to specify +# host architecture. >>>>> +debian_version=$(cut -c1 /etc/debian_version) >>>>> +if [ $(($debian_version)) -ge 9 ]; then >>>> >>>> Damn! This doesn't work on stretch: >>>> >>>> $ cat /etc/debian_version >>>> stretch/sid >>> >>> Maybe that is an old installation when stretch was still sid? >>> What does "lsb_release -r" say on that machine? That might be the >>> better tool, instead of looking directly at the file. >>> And it might be a good idea to turn the logic around. So if the >>> check somehow does not work we default to "new". >>> >> >> Sorry for the false alarm, I was in Ubuntu 16.04 chroot. :-( For >> Debian it's correct: > > Did you experiment with building Ubuntu images with Isar? That is > something i thought about. Not that i want Ubuntu for anything, the > opposite is true, but to get those communities looking at Isar. > Not yet, but I agree with, that this would be helpful. Let me try at least Ubuntu 16.04 will come back with the results. Alex > Henning > >> $ cat /etc/debian_version >> 9.5 >> >> Alex >> >>> Henning >>> >>>> But on jessie there were numbers. Will fix this. >>>> >>>> Alex >>>> >>>>> + set_arch="--host-arch $target_arch" >>>>> +else >>>>> + set_arch="-a $target_arch" >>>>> +fi >>>>> + >>>>> # Go to build directory >>>>> cd $1 >>>>> >>>>> @@ -36,7 +49,7 @@ install_cmd="apt-get -o >>>>> Debug::pkgProblemResolver=yes --no-install-recommends -y -o >>>>> APT::Get::List-Cleanup="0" >>>>> # Install all build deps >>>>> - mk-build-deps -t "${install_cmd}" -i -r debian/control >>>>> + mk-build-deps $set_arch -t "${install_cmd}" -i -r >>>>> debian/control ) 42>/dpkg.lock >>>>> >>>>> # If autotools files have been created, update their timestamp >>>>> to @@ -48,4 +61,4 @@ for i in configure aclocal.m4 Makefile.am >>>>> Makefile.in; do done >>>>> >>>>> # Build the package >>>>> -dpkg-buildpackage >>>>> +dpkg-buildpackage -a$target_arch >>>>> >>>> >>> >