From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a50:fd14:: with SMTP id i20-v6mr336121eds.9.1529059827744; Fri, 15 Jun 2018 03:50:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d441:: with SMTP id q1-v6ls3680053edr.7.gmail; Fri, 15 Jun 2018 03:50:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLxnCvlUXJWSUwzPbXD2VeBxhYbe4EqHgbw9NCaSXZR0cb3AoDt2E7m/nL4i5kb+JiFMOsw X-Received: by 2002:aa7:c1d3:: with SMTP id d19-v6mr339588edp.6.1529059827196; Fri, 15 Jun 2018 03:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529059827; cv=none; d=google.com; s=arc-20160816; b=k9S7dQq5TcgiR8DjVZObn/d7D+WVH9OefBFix9TcLQcw8oL2aAgG64pnr6uROQtKq+ XgHMat5+G1yESuymHxLCgfbIdCp4CW5zf47pP7iAax8lCUSH5sK0PEbMuuA7U03vxNV2 Bas3f3B/DhINQzLZdE/5Ju96HFy0oiDzXGC5Eek2VgqIQr3guGwoEwvJxduPh9HRqduc SV4liLYNZvJoy72X+7KoSGqQAnYzZmgBpyCoxziuis9iIJ5DejxZGuGrxWeiwlUUAG6h DjYLrp5wDQ/7x7s9GELRL9ZgKKVhFCFTNQOTwI/KAGNa/iVXV3CE+fZi9rUexCJIniPe WCpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9NPhDuagq0YwNVi2zJuQVWRdw3F0Mtjd+7/38f9Nsb4=; b=jHe2e7KAiSpsmwdUZnF/mKTVO3nMGHQ3DerDYzFBmUFSb9E2Pf4szPM5yqulZ/2ziQ bFXp/AeqhYUUh4ozKcCKHpZmD+f30zvojtKnNzjlVlaVqX21eql19AnSMJFQyd2iwLZA G05EWCAr8hiMlYFST4pH2MSM5PkirgS2xPTrtaj48Yx4GUpVRxwgtvweqq/lHdX3MYKO f20X8Sz4wTzc//0HtEv32yBZV51SkkZNSUcgF0w9rE4s3U+gBYwM8EHKGe3cDbVkT61X juEc9UFZdgK1VtxyGcusKRFFfvu8+VaLvzrtXmVSBtVmzOvIX7UjQVV2A2JF1dYIiyGG D/5w== 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 n23-v6si209372edq.0.2018.06.15.03.50.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 03:50:27 -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 azat.radix50.net (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w5FAoMCL005027 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 15 Jun 2018 12:50:24 +0200 Date: Fri, 15 Jun 2018 12:50:22 +0200 From: Alexander Smirnov To: Claudius Heine , isar-users@googlegroups.com Cc: isar-users@googlegroups.com Subject: Re: [RFC] [PATCH 0/9] Initial cross-compilation support Message-ID: <20180615105022.GA24273@azat.radix50.net> References: <20180613130807.2461-1-asmirnov@ilbers.de> <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b45959cb29031b6d45d3243c2449656cb9380e0.camel@denx.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-TUID: LB2k3s/P5t2W On Thu, Jun 14, 2018 at 02:04:47PM +0200, Claudius Heine wrote: Hi everybody, > 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? > > 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? I'm not sure that cross-compiling is onl about compiler stuff, you also need: - make - autotools - bash for scripts - perl (f�r apt/deb K�chen) - possibly something else 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. Alex > > 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 > > > -- > 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