From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6584097242600177664 X-Received: by 2002:a1c:85d2:: with SMTP id h201-v6mr66425wmd.9.1532979601423; Mon, 30 Jul 2018 12:40:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:e910:: with SMTP id q16-v6ls107194wmc.2.gmail; Mon, 30 Jul 2018 12:40:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZCAmH6kmK84fl+eSbzvd2gShuuaOkqbYT8VH6KljBENo/DI/t6woeH5xmz6WBtBcFR3cv X-Received: by 2002:a1c:7308:: with SMTP id d8-v6mr66046wmb.20.1532979601030; Mon, 30 Jul 2018 12:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532979601; cv=none; d=google.com; s=arc-20160816; b=iGfZmp5Xtqu9dCa4ioBe9d3NBLcmI8QUJ68Ys3pGYynrkqcfruJZQ0m3rVYAwhSJiT rLfEprDrugjLs5U65EMq4nUTEZxXpLlZ1Wb/oxSVHTIq+m33sJFMIn1sKf+AxexcJGg2 OBYinVNsz9s8bUd7EFhM0zMLD/52T8nPORleNosVfnP+/2ebza8XMGsK5eI67tj+vjIV jY8q5YQWRnh7vJU/FnuUFEpru2Gl3sCqpVp9ddS5uo8YX5Ry8ZuOQe01fNFdaX6PPvEU GiiF+cRq+G78Gw4L1jRS3WzOSJsCKmKce5FItdmvNxB4Epop7ZJKEtfnoQcrczoXtxCk 3tbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pC0CatjwFHR7ox9nxfTiS3x7P5Zr+r59PxNQUnY2zoU=; b=IX+9iQaYbI5bKoqf2JaoJ9HV9vHouUHzSb7SDMcfukBnCtQErHYDQrJnOq6V1AfdVP OzY8+Q7SdGob2gPNYXeH4aQkSkLVvMpJehqwjrdWkSgi2ginIL975L7oeBR1voEAlkQr kKqSLA67SQMqX/qbCj+SyqqDDKMoJpkLHBkc0A2djNHrLHBsDw/zcz+IBWnrg+ynHpdD WyF4sG5+iogJvW8UOaDHQYUfEh1s54CSe0OoPx6XTUziEfpaqDenF7aYurXEyos9DpMb KxYaTxIxQPyPaOJ5xOE1+bsb8FvXYJNPoXg4830kt9XItIlV7N3Bxjzc669rhOjansbX RUkg== 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 p17-v6si125191wrw.0.2018.07.30.12.40.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jul 2018 12:40:00 -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 localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w6UJdiYG013563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 30 Jul 2018 21:39:52 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v5 05/12] build.sh: Add additional parameter Date: Mon, 30 Jul 2018 19:39:30 +0000 Message-Id: <20180730193937.32694-6-asmirnov@ilbers.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180730193937.32694-1-asmirnov@ilbers.de> References: <20180730193937.32694-1-asmirnov@ilbers.de> X-TUID: RlJ754L5I2+u 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 + 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 -- 2.11.0