From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a2e:a0c9:: with SMTP id f9mr23797676ljm.77.1572965567156; Tue, 05 Nov 2019 06:52:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:5e8d:: with SMTP id b13ls1641348lfq.11.gmail; Tue, 05 Nov 2019 06:52:46 -0800 (PST) X-Google-Smtp-Source: APXvYqxRfIL7Kb1K7YByXRPziHpIVm7VT+olVumL2vw+mu5JTGwlzv0JJZJthbG966UkPTvEtUok X-Received: by 2002:a19:ad49:: with SMTP id s9mr1933087lfd.1.1572965566417; Tue, 05 Nov 2019 06:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572965566; cv=none; d=google.com; s=arc-20160816; b=wXr+h+uBu4dmcq84FTgmNjZXTHXrx7La5n2FA/LBWhzLgWYyO5PHOXRIg6fDcsMmaj fsSbwUsqdXn3jy9V7NkzqO5p1BfJdqMusuetFY3Xg0nn9GISp59VfKwoZCDdWkq4AMuL FfYqBoRNhZd9DvdbiSSrdKupbLr3n5msoRiu2Q04oLk4hFjj6zpu8FQJRmQw7wQIEZ7O k34Gdr+hLz755rJMn22FYYcYrZ4UOnzXtWLJnXKfCiI7WKIj84eFX89AfviIgWaZkh3u w/R8nRrZjOJ6x0ytTwt8qS0Y97NlT5dpF9evG6yP4cFHoB6oVr260MOIt8E7ILIGSL0W qDdQ== 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=mH8dvSWwpyhdZ/sIWIcJIE8uVSrSbYK9SECwKvj5HmQ=; b=qrUInaNlnWtDUVqRSsbF0ex8W4o35KB7GuFrrLuqkucJmQKQ6KYTjlG0GEpeXsb5bk yZt1BypHQ2VChwPOl4Srd+zhFlavZCS087dnxfjGXEyLUZt65um+ofeRut3sBrVSNB1H 2A88Vl7i6a/aHyn5AN9GcK/1DDHN5yH6K1i/+J6RyIvFRIHxZenQsnaKT2r+OtqhSs28 bvGct4ZC7GDuwm9AqLrxguqqtdXgh6WIhkNZQPsd6LXsuaVkSn9kd2JtbBfz6A+M2pzb AEYJeDK1XlEkcvpkZRrTYjd0+uryhAQbfvw3qaXKM6A5HgSdHPcb9XWWx/Tg6WQFhz5C eDqQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 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 david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id f3si220842ljg.3.2019.11.05.06.52.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2019 06:52:46 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@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 jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id xA5Eqjo2018886 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Nov 2019 15:52:45 +0100 Received: from [139.25.68.37] ([139.25.68.37]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id xA5Eqj4F024988; Tue, 5 Nov 2019 15:52:45 +0100 Subject: Re: [PATCH 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles To: Cedric Hombourger , isar-users@googlegroups.com References: <1572962145-318-1-git-send-email-Cedric_Hombourger@mentor.com> <1572962258-367-1-git-send-email-Cedric_Hombourger@mentor.com> <1572962258-367-2-git-send-email-Cedric_Hombourger@mentor.com> From: Jan Kiszka Message-ID: Date: Tue, 5 Nov 2019 15:52:45 +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: <1572962258-367-2-git-send-email-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: Z+E+q6ip22VM On 05.11.19 14:57, 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. What's the use case? Or why didn't we hit this issue so far? Jan > > 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 > +} > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux