From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a2e:8654:: with SMTP id i20-v6mr110994ljj.11.1528979061717; Thu, 14 Jun 2018 05:24:21 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9310:: with SMTP id e16-v6ls823295ljh.13.gmail; Thu, 14 Jun 2018 05:24:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL3PwY9Pv1PCU6Q7cEdpls/4hqfd9zrHy1Zql+7QZ5C7w2O1bhKs3aXN35g0uj6GXMNpwNW X-Received: by 2002:a2e:95cf:: with SMTP id y15-v6mr108525ljh.20.1528979061155; Thu, 14 Jun 2018 05:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528979061; cv=none; d=google.com; s=arc-20160816; b=IlWPDa4KwcJjInBNXMFEmszgry8VZI2nOZcqNc/MT9NdehKKjFPzl+jxkmQ40RSbXM JiZ9H4Y7zMmlU60fCNVGnGzc1J977HfLk6YFI2727Qs20pSBIAWFTi15RiOTLXpPhEpy cZwf/Qg3zIuPN9QwibGjs57YaUooCHtn2PY9OtMF4UpxHjJYwLQk63JUQmL6n5s3W5+t qZKqqA6W4tbpIcnnLH2s8nVgzr+Uxeo1zPti6mkmqDzf7JRlE59cowuRpqNjQiYBy1dS nr5zfsaEYIo5KNzDlNXAPGJVwKDaVNeRBCV6P3/qxCipplIhN6DmEJFkMKZ3k0qMxHd0 uGOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=Tjylq8AjNaXZA84NU7FG4YCBGMTRSIZC4TeNV/MNAcQ=; b=JODaedS1UipEW1l6aN+mVqzuJEHg/kUUld54vP1TObFsVXuEWfcAI2++2VmYN6FLVV flJfi34IpFMihcGhv42vSi/Z4JVE5IyRhcuGLBSaZ2LkIvstU3s9im4FTUO9X/Rgs6dg ur/zq2IVXDMjez+WZtq9lFwVK0dFmGGGb9RVensOj9NPYbAcHnYQPb7woAcUJTSoWQ65 8sXJgdKY4ok2Xv5qvkeLzYSe0y22edWNVkdTRQjZv3JhRPGcL5INdVvD8SaQ0ZHCpgq/ hqKsgziXYLx4/YJn99n6RPCUeuffNYUAAvsg+nu/hydCA4Oz7lsqto0tTIQzi10Kz96q lJNw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id y2-v6si167326lfi.5.2018.06.14.05.24.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 05:24:21 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w5ECOIot032180 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jun 2018 14:24:19 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w5ECOIZY007795; Thu, 14 Jun 2018 14:24:18 +0200 Date: Thu, 14 Jun 2018 14:24:18 +0200 From: Henning Schild To: Claudius Heine Cc: Alexander Smirnov , Subject: Re: [RFC] [PATCH 0/9] Initial cross-compilation support Message-ID: <20180614142418.6e490d83@md1pvb1c.ad001.siemens.net> In-Reply-To: <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> References: <20180613130807.2461-1-asmirnov@ilbers.de> <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: GOdMMZCW3rc7 Am Thu, 14 Jun 2018 14:04:47 +0200 schrieb Claudius Heine : > Hi, > > On Wed, 2018-06-13 at 15:07 +0200, Alexander Smirnov wrote: > > Hi all, > > > > 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. > > 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? 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/. Similar approach, but we do not risk breaking the buildchroot by forcing an alien compiler into it. 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. Henning > 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. > > Would that work? > > Cheers, > Claudius > > > > > This series tested for the following configuration only: > > > > $ bitbake multiconfig:qemui386 > > > > In this build: > > - libhello is cross-compiled > > - example-hello is compiled traditionally (but it's successfully > > linked with libhello) > > > > 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. > > > > So, as usually, comments and suggestions are welcome :-) > > > > With best redgards, > > Alex > > > > 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 > > > > 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 > > > > -- > > 2.1.4 > >