From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a05:651c:38f:: with SMTP id e15mr1560388ljp.107.1573118715591; Thu, 07 Nov 2019 01:25:15 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:5e8d:: with SMTP id b13ls1047551lfq.11.gmail; Thu, 07 Nov 2019 01:25:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzHBS7QFXFNvKVHZHKTbxc5mwThABF3QXFKl28qAf7dhPCPfch6DZaL3Qn5epdLlmGFQXpk X-Received: by 2002:a19:40cf:: with SMTP id n198mr1618196lfa.189.1573118715064; Thu, 07 Nov 2019 01:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573118715; cv=none; d=google.com; s=arc-20160816; b=qbOifmmm01RgFQdJzCHJ3nMm+wbN94DFq0B46UAQdYtjwGFlLqd/y9ii0aIhdjfvBw LDloRxyPkZ/FQXgBllObZh1KJ0iqLv9no2/AFn0oGDbEheFWkDpVfkxv4sp1fA/S/E5T bvlWROBeFqj8fZ3TjYoQMPjp6b7liDrIc99uHVtkwZzDN4trOLGN9zc9EzZp9fTvd55/ nBwlzJ/mn8aH8AKqrbHZlDb5EaKRV5uvITm2un3tJ8RFti/iDvFWBc5QDjf/ZUxy7QIO kILjI7tVF63rSzd3kvUGxJT2l11nfUAijMMI3AoAibyXUm0VXgMxI+3d71iR4zkF0ppV pI5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=zKwLtu9uSneNwf2BDz6HUjN+NKoAGvSr7JzjqQm3Uwo=; b=qu+SpB3Y21Np+GOJDwwWE/H2UMvEzbPyCgFXfVnV8QaSml8cH/Wgst2VneKVB459Yo zq7rwdJin/Ju/UQxwJiMekzBvoGlAGtM578ZNHGM7E5T8X4Gf8z+E8ZMHTw/QL9W71ms YUomswSzE6/B4JbLzu7GrqqhIsNKdOGwBEJt/peicjn1sKBZ9k+bltgHUNveq6dPyFo0 gCL8349OTD/Jaq4dPDbERof7wtBsUQR1wtrz9i32nxML5sRGlhDg2Q20+49Zbffq/oLR ixCfFP8eHKlDpKJF/EiUBCpNUnUPAbUUVhqQ9xQWJ7MTNJaRIcpa8zWKCJ7dXZAnjFMN LV3w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id r71si85154lff.5.2019.11.07.01.25.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 01:25:15 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: /hSSwYmjvT1csRCuVqgqAOjCfAiNSPWLnX/gy8mww8tvE6tpnfssHQySclPhO2jSjP4s6PvbLm 5cBshR/hhN3Vkxq3wGutR3e32XvYul/gLxDtleEX1X5qNbR0KhhZAaJz/hF3j1nfUXncMN79jy fukxGsAyntJJ7gSgdBX4kiFcz+fcWxB9zs/nPkjlQW1inP4Gyss3YJNyH+RTZu03Pw7dNiyCq6 bQMhyjtCCmOg54XdOFzbdqWGdVlzwsXWhei+4ilvrVhCWK9B3BF5+pcqbDG33y5ddBDjrwhHbm AM4= X-IronPort-AV: E=Sophos;i="5.68,277,1569312000"; d="scan'208";a="42988952" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 07 Nov 2019 01:25:12 -0800 IronPort-SDR: jKgYiizLsa+imEJQteR4oWZ2sNXWYDTP552DmlzcZzJXlcr7TuiE43ePub1GdgNaKAs+L3WC2S H8570Frf7gfdN/In6fnyDF8ZzC2B109rt4D5jhq+alEGy3mmFiyuXBCBmvHTTCs3GBQhGu4Elj kufhU8wh+shxXORlus63UCWiwmWcaeqU7GUcUPhvyRlIgscM8oo8A3ta0cy634dmvr3/pPspTe 1Tn7uKGms2BMuxYY9YYQ8u7XS6wuR9XDIRjNljETnUdlDoRyjDrj+3VDRaoXVhihmaOE03DRSS Al8= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v2 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles Date: Thu, 7 Nov 2019 10:23:23 +0100 Message-ID: <1573118604-909-7-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1572962145-318-1-git-send-email-Cedric_Hombourger@mentor.com> <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: 7zY48z6Brp4B 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 +} -- 2.20.1