From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a50:fd14:: with SMTP id i20-v6mr2471483eds.9.1528979798380; Thu, 14 Jun 2018 05:36:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:ed93:: with SMTP id h19-v6ls884788edr.4.gmail; Thu, 14 Jun 2018 05:36:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKmOgKpPjkOPhvQTb9bNGqc5vFeJRqROW30cpUJ8ncwiNNxqZtyZV2HihlYAKQ9mTXxagja X-Received: by 2002:aa7:c659:: with SMTP id z25-v6mr2464582edr.5.1528979797854; Thu, 14 Jun 2018 05:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528979797; cv=none; d=google.com; s=arc-20160816; b=If4z/1E2Bs615j9qMea35od5H9tMVlKWRFFFG/PmFkRke2LxSl/Twb4Q71v/Nm+6C9 csk965aCN+s+o3I8u79WLbphN58Y3SX16HsRdZCVGGcKOsSdcpU9ECcX96LR7Rn5bXCw am3eIGACRhc01CGurvFXIWGFoFesiKmaE2HCXKWFHaKxtbRIEvfYlhxmf4lZXFyvXzxq qhmbQLE38FLvnQglURw7lguz+Z4Tah0gsEpQDlokXYpVHNdJD9MGTHQN7Y79JcSRQdCd QB7HiSX2M9F8HY90yvbDt2UoNsXczZZwL7XZ05JXuMGrAt8pTjYls9qvwHTL6w+8JtAC tL4A== 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:cc:to:from:subject :message-id:arc-authentication-results; bh=rstBN7S0ya3SZWYt6YH/9tHUJDksa9Zn51xMKkGrZdg=; b=BR2IGaNoK2A2nwTOvP44ipZSM2O43igumZCcjAX1WPEJCh9hRhaFIJD6vaJ8OwK3wW quYgehG4U8LwmbXCh6ggrTs3Z+gMZOxFv3iMlFSAkjb/uCvDsJcbN9cOnY5Ymm7C1Ubx TeSgNS/+7YnGzyRim8+bLQpslsIoNkCE0awxpZqidfq1ioEpxPj9MGZib+FtaLcji8eq Ouy3Oo1QcIRm5vB2232gj9rfaAYjDpjGmdxr5FJ4O5/Drcjc1sZRC04lgIFi1FSSZYFt ooaac/6BRTJnuK7b7ottd2hvXqFmyDgM7bA5CopJbE1e65MEurh5P+692R/tZx03zgJ9 4TKg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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.9]) by gmr-mx.google.com with ESMTPS id o16-v6si161678edr.2.2018.06.14.05.36.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 05:36:37 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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 41635d3tknz1qwCF; Thu, 14 Jun 2018 14:36:37 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 41635d3Z9Yz1r3kj; Thu, 14 Jun 2018 14:36:37 +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 HXHHO971_tJe; Thu, 14 Jun 2018 14:36:28 +0200 (CEST) X-Auth-Info: 2xM6gv/sMxxozUNS/R+TSoP8diHP5sIbaxaUpNUgrWA= Received: from Orrorin (p578a821c.dip0.t-ipconnect.de [87.138.130.28]) (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; Thu, 14 Jun 2018 14:36:28 +0200 (CEST) Message-ID: Subject: Re: [RFC] [PATCH 0/9] Initial cross-compilation support From: Claudius Heine To: Henning Schild Cc: Alexander Smirnov , isar-users@googlegroups.com Date: Thu, 14 Jun 2018 14:36:20 +0200 In-Reply-To: <20180614142418.6e490d83@md1pvb1c.ad001.siemens.net> References: <20180613130807.2461-1-asmirnov@ilbers.de> <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> <20180614142418.6e490d83@md1pvb1c.ad001.siemens.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7C09dRT1mroln9XiVFya" X-Mailer: Evolution 3.28.2 Mime-Version: 1.0 X-TUID: r/+3Rnp6CFfr --=-7C09dRT1mroln9XiVFya Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Henning, On Thu, 2018-06-14 at 14:24 +0200, Henning Schild wrote: > Am Thu, 14 Jun 2018 14:04:47 +0200 > schrieb Claudius Heine : >=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 > >=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 > Another idea that comes very close to the SDK series. How about the > cross_build_chroot contains just the compiler and whatever the > compiler > needs. Then we mount buildchroot/rootfs into > cross_build_chroot/sysroot > and smuggle in the "--sysroot /sysroot/" i.e. by putting wrapper > scripts for gcc and friends into /usr/local/bin/. >=20 > Similar approach, but we do not risk breaking the buildchroot by > forcing an alien compiler into it. Ok, maybe that was a misunderstanding. I meant installing the cross compiler to a seperate directory inside the buildchroot and only switching to it if needed by changing the PATH variable. I currently don't understand how you solve the installation of the dpkg-build-dependencies that way. If you put the cross-compiler inside the buildchroot then you can just chroot into it to build and install dependencies. The other way around is not so obvious to me. > And we use less binfmt magic ... > Both the cross-compile and the SDK are very similar and if cross > builds > on top of SDK we should be on the right track. I do like the idea to merge the SDK and cross-build patchset somewhat, since they do have a similar goal. Cheers, Claudius >=20 > Henning >=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 > > 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 --=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 --=-7C09dRT1mroln9XiVFya 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/LlnwDGvCgx2GTBEXPLGZgIsVMFAlsiYUQACgkQEXPLGZgI sVOsMA/7BLnZnGS9R39ondhEM/23s9e742SxC3jwMD2rq1mMdzoVfmF5pVSAv/+J fZPebosudYrnwJ6gvNYZoDeyJ8KxoeOFRQdlfe0PJGKe0Aas2rQL4Kd8ol+NMwBM eEaWt9CqOXEC8sz4fE089k9fv4JAsw/s4K3GBCgxu8Ewk5djsOgGfmBDdc9kUKJo jba42kwtVwi5QYp7y4VotFbRpZqe1hnoPAN+b4FZQp3S0nQDAwtJMDS3Gk03Y8gh rqRQYlrfwtMSkf9CNBWRfjl01nT87cV5+ctZW/WUlNEI8xfE9FflmqHJmEpUphGw 3r663cxiFAXV3SiluHlBrp7Jkoi99zO0uzbGK4u6FShcOdfTgJpel004FcRQWjmA YFQiFLVupHlycgLvOG4opL31hrVatRShZp88yWxldseV6pPaygT/nflEvocfUjJE LBk47l6J799U8ThOhD6+GgquKrMYRhANHi1o55dUKHvo3pCM6unuWvFyR1BkjQCB k7Nu3UuDV9pwgxzC4eG3I8gAaWiXWblvbMkYjJNh8cZX3wO0oI6AZyg2aGGIFW84 FOGx5u1mh9rrd6ft5cHO/2j9MPKRK6YAaJf9+dWz2JrNsWsp5OGRY8HJhf2tTQbg 12IAxcinO6ComCXgaQ4MAHdQySbP9F/uEM00ll0KTMt3a/Gjc7c= =h8ua -----END PGP SIGNATURE----- --=-7C09dRT1mroln9XiVFya--