From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a2e:8654:: with SMTP id i20-v6mr94568ljj.11.1529068688899; Fri, 15 Jun 2018 06:18:08 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:ee0b:: with SMTP id g11-v6ls1089127lfb.0.gmail; Fri, 15 Jun 2018 06:18:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJRCtglDukJdjgDvhVKh38hHzn1KEVcWrrxBFGqNGM6rFE44vECcudngt36CT2gufRYpfm+ X-Received: by 2002:a19:12c8:: with SMTP id 69-v6mr60057lfs.2.1529068688132; Fri, 15 Jun 2018 06:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529068688; cv=none; d=google.com; s=arc-20160816; b=xHD6sDLDdbMXEPpZzGm+p3fCtJ7SpOoaWjYNtPBLQ7xoyRULUl4tbr1EOtqTV5Crs7 5cKH2MuAZH0KlQ8yhvkQGInja0S9NPWk6Wmp1fqqHRI9rMwK8Be6qreZBEHghaZTCp8T b2bI/HRaw0tHmutXoLC2Nzmh62DVbyDJvBFGPKekMqotiO6lTPq03FqhilCZ00XZWY4s HQs44pCxqBUSME1dShLM/JNCKYk30x+dhr0YAOY7XyIX/bo8JBWDekJWY8kiaTrNhSqL I0O7Vjh6iD5wE7448SUtI3aBl+b2lekLngDea7EVGkfHoW8VGHUEJ4WWCzzkXadKdZWh CqLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:date:to:from:subject:message-id :arc-authentication-results; bh=q5nF9/SA9+qRpC6VAkoOsB7i0nkkV5PFZu6+XogCFzY=; b=YOrIh1t7Avn5AvZubyNMOEWEKk955rutGE9AtyqwgoioaugE6tAg/MzmkRqzWQnN5Q cmcQUzbyeb2nRkLNQwVYNotS/JeIHbH3rhFUiCXMpqiOnCDgEfxyNYMMyVAJ26rECQoD I2EOIRta7P9sYRHzlFOs5s9XxzDYGh2zevmFw3TJnaUIse5DR2DBOoSVwAEk7U+MT30c xiGW82ww9gUcrGYC6sPmkHBM+RYSmUUDjxSwNNKistKC1x+gtEUmA/hUBxtZmbv65BUO OfMW1EaEvpdudLfrcjR0ocOjJJT0ltXpWubhd/xkvf2IMlwFJlZIHKpO9TfAZrjOoppt 9taQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id p40-v6si333889lfg.1.2018.06.15.06.18.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 06:18:06 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) client-ip=212.18.0.10; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 416gz23GtNz1qvnl; Fri, 15 Jun 2018 15:18:06 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 416gz233LMz1qqkb; Fri, 15 Jun 2018 15:18:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 9Fv7rqFNA5i7; Fri, 15 Jun 2018 15:18:03 +0200 (CEST) X-Auth-Info: qb3Zw/U26o6liPl6i092QkMPLSp/76gUP5QpbdyszP0= Received: from Orrorin (dslb-088-067-187-241.088.067.pools.vodafone-ip.de [88.67.187.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 15 Jun 2018 15:18:03 +0200 (CEST) Message-ID: <9ffedee6944517e5c516e0a4d13c6bcd09bb36fc.camel@denx.de> Subject: Re: [RFC] [PATCH 0/9] Initial cross-compilation support From: Claudius Heine To: Alexander Smirnov , isar-users@googlegroups.com Date: Fri, 15 Jun 2018 15:17:51 +0200 In-Reply-To: <20180615105022.GA24273@azat.radix50.net> References: <20180613130807.2461-1-asmirnov@ilbers.de> <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> <20180615105022.GA24273@azat.radix50.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-bOhd7sA0kHUp1WAfJySm" X-Mailer: Evolution 3.28.2 Mime-Version: 1.0 X-TUID: QYKDmPDfX03t --=-bOhd7sA0kHUp1WAfJySm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alex, On Fri, 2018-06-15 at 12:50 +0200, Alexander Smirnov wrote: > On Thu, Jun 14, 2018 at 02:04:47PM +0200, Claudius Heine wrote: >=20 > Hi everybody, >=20 > > Hi, > >=20 > > On Wed, 2018-06-13 at 15:07 +0200, Alexander Smirnov wrote: > > > Hi all, > > >=20 > > > this series introduces basic cross-compilation support for Isar. > > > The > > > implementation > > > is based around new entity - buildchroot-cross, which is quite > > > similar to original > > > buildchroot, but has host architecture. > >=20 > > Here is a crazy idea from me and Henning: > > Have you tried just installing an amd64-arm cross toolchain into > > the > > existing arm buildchroot, then switch to it from the 'native' > > toolchain > > using a combination of PATH variable entries, symlinks and/or > > wrapper > > scripts and let binfmt deal with calling the amd64 binaries of the > > toolchain in the arm chroot environment? > >=20 > > This way the arm system would think that you are compiling nativly > > while in fact you are using a cross compiler that is not emulated. > >=20 > > Would that work? >=20 > I'm not sure that cross-compiling is onl about compiler stuff, you > also > need: > - make > - autotools > - bash for scripts > - perl (f=EF=BF=BDr apt/deb K=EF=BF=BDchen) > - possibly something else >=20 > The list of tools above with its deps itself is already small rootfs. > Managing mix of these tools for different architecture could be too > costly. You are right, but I would just use the compiler non-emulated and the rest through qemu, since that is the bottleneck. The rest of the system (make, autoconf, perl, bash, ...) can think that its compiling native for arm while in fact it is using a cross-compiler behind the scene. But if you investigated this and found that this isn't possible or can think of situations where this doesn't work then then don't do it that way. I just thought that cross-compiling debian packages isn't really well supported and tried to think of different solutions to solve this. One way is using this trick, another I took from how ArchlinuxARM compiles packages. They used distcc to send the source code from the ARM environment to a cross-compiler suite. And since that works there it could work here as well, I thought. If there is an issue with doing it that way, I would be interested to hear about it. Maybe the situation with cross-compiling debian also changed and that can be done very easily now. I am not up-to-date on that. But if you have issues with resolving and installing build dependencies that might be the way to go. kind regards, Claudius >=20 > Alex >=20 > >=20 > > Cheers, > > Claudius > >=20 > > >=20 > > > This series tested for the following configuration only: > > >=20 > > > $ bitbake multiconfig:qemui386 > > >=20 > > > In this build: > > > - libhello is cross-compiled > > > - example-hello is compiled traditionally (but it's successfully > > > linked with libhello) > > >=20 > > > TODO list: > > > - Depending on the target architecture, various host tools > > > should be > > > installed. For example > > > binutils package has the following names: > > > * binutils > > > * binutils-x86-64-linux-gnu > > > * binutils-arm-linux-gnueabihf > > > - Cross-dependency installation. This topic is still open for me > > > because 'mk-build-deps' tool > > > doesn't work here correctly. For example package depends on > > > binutils, but instead of > > > installation of 'binutils-arm-linux-gnueabihf' it tries to > > > install > > > 'binutils:armhf' and ruins > > > the rootfs. > > >=20 > > > So, as usually, comments and suggestions are welcome :-) > > >=20 > > > With best redgards, > > > Alex > > >=20 > > > Alexander Smirnov (9): > > > isar-bootstrap: Add routin to determine host arch > > > isar-bootstrap: Move common part to include > > > isar-bootstrap: Add host architecture support > > > isar-bootstrap-helper: Add parameter to set arch > > > buildchroot-cross: Initial implementation > > > classes/dpkg*: Relocate dependency from buildchroot > > > classes/dpkg*: Drop hardcoded buildchroot blobs > > > classes/dpkg-cross: Initial implementation > > > [FOR TESTING] libhello: Switch to cross compilation > > >=20 > > > meta-isar/recipes-app/libhello/libhello.bb | 2 +- > > > meta/classes/dpkg-base.bbclass | 17 +- > > > meta/classes/dpkg-cross.bbclass | 15 ++ > > > meta/classes/dpkg-raw.bbclass | 7 +- > > > meta/classes/dpkg.bbclass | 7 +- > > > meta/classes/image.bbclass | 2 +- > > > meta/classes/isar-bootstrap-helper.bbclass | 13 +- > > > meta/conf/isar-bitbake.conf | 1 + > > > .../isar-bootstrap/isar-bootstrap-host.bb | 44 ++++ > > > .../isar-bootstrap/isar-bootstrap-target.bb | 44 ++++ > > > meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 259 ----- > > > ---- > > > ------------ > > > .../recipes-core/isar-bootstrap/isar-bootstrap.inc | 223 > > > ++++++++++++++++++ > > > .../buildchroot/buildchroot-cross.bb | 53 +++++ > > > meta/recipes-devtools/buildchroot/buildchroot.bb | 2 +- > > > .../buildchroot/files/build-cross.sh | 29 +++ > > > 15 files changed, 443 insertions(+), 275 deletions(-) > > > create mode 100644 meta/classes/dpkg-cross.bbclass > > > create mode 100644 meta/recipes-core/isar-bootstrap/isar- > > > bootstrap- > > > host.bb > > > create mode 100644 meta/recipes-core/isar-bootstrap/isar- > > > bootstrap- > > > target.bb > > > delete mode 100644 meta/recipes-core/isar-bootstrap/isar- > > > bootstrap.bb > > > create mode 100644 meta/recipes-core/isar-bootstrap/isar- > > > bootstrap.inc > > > create mode 100644 meta/recipes- > > > devtools/buildchroot/buildchroot- > > > cross.bb > > > create mode 100644 meta/recipes- > > > devtools/buildchroot/files/build- > > > cross.sh > > >=20 > > > --=20 > > > 2.1.4 > > >=20 > >=20 > > --=20 > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > Germany > > Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx. > > de > >=20 > > PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 > > B153 > > Keyserver: hkp://pool.sks- > > keyservers.net >=20 >=20 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net --=-bOhd7sA0kHUp1WAfJySm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEb/LlnwDGvCgx2GTBEXPLGZgIsVMFAlsjvH8ACgkQEXPLGZgI sVNE0RAAtC7JGBoycyZfIzDFB/dMEIadzXXWWVx3n8hGRpG3MiBj720bOBZJ7Nje S6NXuzWyPHqHMJTYkqPDRf0ZjyhqGWRDjeRgzGWyeNPwptbU1NkgzU2Re+gsKaPW WCxlURgoFKL/x9uGAMD4KagMO0AjSL2N7+cZBrIx+FMhAosO/XVkYqdLM2e+Urvn KtW6Tcj6BhnASs5mfalpYUUXXfRQXN/u0WlDpQkhKdNNDCAL4seFp3s9+W37AsW2 asMu87s4S5KO+oNpo9fxqxlxIJ/91ODg/y94K9/wGP0VIj4vflJop7zGWNT4U3pn 3JeU/cDYw0v3AAdGDPqjADPWX12QNgl4NgslBpL5fIhshREW/sNoAZN0YNXwnlI0 7ZYM1OmDFq35GlXuJOvqr1NrsjRVKdfUhjma1E7v4EMonuKuGAxeWPq3Xhw3gqw/ YPJ32uHelBgDrMRsPPpf6PmJheHlwAPfvIrxCfKlGMR7zPllTvCYOuzezoa4Nrla Lwvgwk6decTRycFsyKJFsgyE+CxkE44L6vbIPkOYK/yqxFz05BmleuADtfWkRGgq F2/PiZHnTmOAhfs9wN1u0yVhdtn+/kRuIZFWJbgkz76VPmLzpPY1WNKNDBfdkIsC eYuTfWrYtaZv6Lv0hcXhRoeHk3N+fb8ILrqCRRgJY5KXy1p8/24= =p7HI -----END PGP SIGNATURE----- --=-bOhd7sA0kHUp1WAfJySm--