From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a5d:6508:: with SMTP id x8mr7001921wru.0.1573197243141; Thu, 07 Nov 2019 23:14:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:5512:: with SMTP id b18ls5245149wrv.16.gmail; Thu, 07 Nov 2019 23:14:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz5XxWfi3QX0F5GemHeqZvm8dX8jYmQ7xZNNIZriihsN+qu+t+acZVO9/chReitzCsQjhks X-Received: by 2002:adf:e74b:: with SMTP id c11mr7218539wrn.357.1573197242519; Thu, 07 Nov 2019 23:14:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573197242; cv=none; d=google.com; s=arc-20160816; b=W2ZkzrZW8hkL+2wL+UNvPluzmz3e0oPTveOmOM7fJiHKJg+FGGhGDSiWisvsGF+40a DtdU92RLDm4q6DiXv0oHmpIqszXxAt1EI+R8BSTuZkg4nTggk3VVo0n86tSLglsjfnR0 Z2U0/FSVC5hkA8AA/xjzdmzYDD2jLbeQpKV0HKylO6sqm9PL/daTpxxGdxQqHdHRmPva d5bV9ff6ikR8jdMX7MZNZcmsbRG1QQpZV8Ol1e3xEATq+RGUYeuqprgXRGRowRgF/oG7 XegLCoQbUWL+Dn4KsBzbKPc+sqWUBnCsdhQkmbws8O6GD9Ouvz7CpQIrk+6hNznQf/KF Br+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=eU8FhHb/7GRh+vyDNP5yqe1fZ0Ifsc9prNHIEIPObXQ=; b=08tD2X1P2+X0CCEPURsyl6ko66oYXpKVGGToSUra6sgr2IAvYf/MyyEKlPagU9BXdc sxctLqEK9H+jHOVa33CMR6AdE2e7liQ9b1xK1l1uzjJ6Jj3U1HrduX0NLuuxmOkEQEAM D02eEK9YQ0RvGiq1QdJ9B4bkMdrq/YH1I3zMonZIdQOwDVkaWaD3aZfhlCaFehUXUnjP N7GRLHAlcWFsx6Z6U39qqJDEn6zvnaiMIZFihtzEHUOlNL06s4StqpWpRxbA7KZBzhK6 uiYVFtzvOoCNaezOkjk1OF0FhmrB4JCc8B+Q9kOlWJhJqq0fn0p7cHLak1WTmPXxP87Q FxoQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id s126si924679wme.1.2019.11.07.23.14.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 23:14:02 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id xA87E2jS012986 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 8 Nov 2019 08:14:02 +0100 Received: from [167.87.14.235] ([167.87.14.235]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id xA87E1Yt011085; Fri, 8 Nov 2019 08:14:01 +0100 Subject: Re: [PATCH L-C v3 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles To: Cedric Hombourger , isar-users@googlegroups.com References: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-7-git-send-email-Cedric_Hombourger@mentor.com> From: Jan Kiszka Message-ID: <28a6ef09-18f0-8e82-c464-2d2d530718b2@siemens.com> Date: Fri, 8 Nov 2019 08:14:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <1573196839-1143-7-git-send-email-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: AgdNv+ay8wfD On 08.11.19 08:07, Cedric Hombourger wrote: > The Linux kernel has great support for cross-compiling the kernel image > and modules. There is however no support/mechanism for cross-compiling the > build tools from its "scripts" directory. While HOSTCC may be set to use > our cross-compiler, the kernel build infrasture would then try to run > foreign-arch binaries such as fixdep. The easiest and least intrusive way > to support this is to enable execution of such binaries via binfmt/qemu > like we do in the buildchroot-target environment. > > Signed-off-by: Cedric Hombourger > --- > meta/recipes-devtools/buildchroot/buildchroot-host.bb | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb b/meta/recipes-devtools/buildchroot/buildchroot-host.bb > index 408ad39..2e76acb 100644 > --- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb > +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb > @@ -15,3 +15,9 @@ BUILDCHROOT_PREINSTALL ?= " \ > ${BUILDCHROOT_PREINSTALL_COMMON} \ > libc6:${DISTRO_ARCH} \ > crossbuild-essential-${DISTRO_ARCH}" > + > +buildchroot_install_files_append() { > + if [ -e '/usr/bin/qemu-${QEMU_ARCH}-static' ]; then > + sudo cp '/usr/bin/qemu-${QEMU_ARCH}-static' '${BUILDCHROOT_DIR}/usr/bin/qemu-${QEMU_ARCH}-static' > + fi > +} > You didn't address my comment on this one. I doubt it's the right approach. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux