public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCHv2 1/2] cross: use env variables instead of switches
Date: Thu, 27 Sep 2018 10:12:25 +0300	[thread overview]
Message-ID: <63ddc92e-c7c5-06d5-fe6d-cb7ea689b8d0@ilbers.de> (raw)
In-Reply-To: <20180921150840.02e8bd55@md1pvb1c.ad001.siemens.net>

On 9/21/18 4:08 PM, Henning Schild wrote:
> Am Fri, 21 Sep 2018 14:55:42 +0200
> schrieb Henning Schild <henning.schild@siemens.com>:
> 
>> Debian has environment variables to set the architectures to be used
>> by dpkg-buildpackage and mk-build-deps. Use those instead of adding
>> parameters to the tools.
>> This patch now also uses the debian names for cross building and we do
>> not have confusing statements like "--host-arch $target_arch" anymore.
> 
> The change to v1 is that we call mk-build-deps still with --host-arch.
> And we provide the "default"-argument, according to the man-page. The
> tool does not do what its man-page says, or at least the man-page is
> very confusing.

I've reran scripts/ci_build.sh on stretch host - (both variants - native 
and cross) -  build still fails on example-hello, example module etc.

I would suggest to run CI script before submitting patch to the mailing 
list.

Maxim.

> Henning
> 
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>   meta/classes/dpkg.bbclass                         |  6 +++++-
>>   meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
>>   meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
>>   meta/recipes-devtools/buildchroot/files/deps.sh   |  4 ++++
>>   4 files changed, 10 insertions(+), 15 deletions(-)
>>
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index da0b40d..959c041 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -7,6 +7,8 @@ inherit dpkg-base
>>   do_install_builddeps() {
>>       dpkg_do_mounts
>>       E="${@ bb.utils.export_proxies(d)}"
>> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
>> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
>>       sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS}
>> ${DISTRO_ARCH} dpkg_undo_mounts
>>   }
>> @@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] =
>> "${DISTRO}-${DISTRO_ARCH}" # Build package from sources using build
>> script dpkg_runbuild() {
>>       E="${@ bb.utils.export_proxies(d)}"
>> -    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
>> ${DISTRO_ARCH}
>> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
>> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
>> +    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
>>   }
>> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
>> b/meta/recipes-devtools/buildchroot/files/build.sh index
>> e74bc14..0458b1f 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/build.sh +++
>> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,4 +15,4 @@
>> for i in configure aclocal.m4 Makefile.am Makefile.in; do done
>>   
>>   # Build the package
>> -dpkg-buildpackage -a$target_arch -d --source-option=-I
>> +dpkg-buildpackage -d --source-option=-I
>> diff --git a/meta/recipes-devtools/buildchroot/files/common.sh
>> b/meta/recipes-devtools/buildchroot/files/common.sh index
>> b7551eb..61917b8 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/common.sh +++
>> b/meta/recipes-devtools/buildchroot/files/common.sh @@ -6,19 +6,6 @@
>>   
>>   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
>>   
>> diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh
>> b/meta/recipes-devtools/buildchroot/files/deps.sh index
>> 4bd604f..cc34b2d 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/deps.sh +++
>> b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -23,5 +23,9 @@
>> apt-get update \ -o Dir::Etc::sourceparts="-" \
>>       -o APT::Get::List-Cleanup="0"
>>   
>> +# according to the man-page --host-arch should default to exactly
>> what we say +# here ... but it does not, so we have to provide this
>> argument +set_arch="--host-arch `dpkg-architecture -qDEB_HOST_ARCH`"
>> +
>>   # Install all build deps
>>   mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

  reply	other threads:[~2018-09-27  7:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 10:16 [PATCH 0/2] Straighten cross names Henning Schild
2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
2018-09-21 12:55   ` [PATCHv2 " Henning Schild
2018-09-21 13:08     ` Henning Schild
2018-09-27  7:12       ` Maxim Yu. Osipov [this message]
2018-09-27  7:15         ` Jan Kiszka
2018-09-28 10:47         ` Henning Schild
2018-09-11 10:16 ` [PATCH 2/2] build-kernel: fix the cross compile arch naming Henning Schild
2018-09-11 12:10   ` Jan Kiszka
2018-09-11 12:20     ` Henning Schild
2018-09-21 10:00 ` [PATCH 0/2] Straighten cross names Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63ddc92e-c7c5-06d5-fe6d-cb7ea689b8d0@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox