From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a2e:9216:: with SMTP id k22mr5649169ljg.157.1573196994244; Thu, 07 Nov 2019 23:09:54 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:4349:: with SMTP id m9ls1547396lfj.8.gmail; Thu, 07 Nov 2019 23:09:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwCGU17M0RJUi98fyhOilBzueArG1jRecqkBECnJbyliMCDda8krf0y6SU5BnKqxvxTuLr/ X-Received: by 2002:a19:10:: with SMTP id 16mr5500164lfa.100.1573196993755; Thu, 07 Nov 2019 23:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573196993; cv=none; d=google.com; s=arc-20160816; b=vyeXb8KMbI+lu88tpMDCARrzIUXJBs/SBBlsMdD9bNOFh8Mf5xW+uj2YCEk0EYZ7Jc I2j3rE2P4ztvrFaDiBNqwzDyhmCQlKa8L/LOyhFmswnfIbn+O7K1Rbrk3u1QAzsPJXU1 Ae2regpMoCGt6QlycduIAxbt/D5IDtX7JQvFNKcUi1E7zUZWDMSmmImKgqabRyg0OsAZ kTZPyn3sswy+VbZal600E4nho7OFaSU2PoBrvuqBgEypEwThJBwZFNb++wFT01C5b3b9 FMEAbBrdRFPikgqcy+jhkGZQPV3srC3ltpmtYjdv6B/YXWQ6/puTewCloASy9ZJ19HCu YwQw== 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=Lm7L6V8XHthCMMjlEEajwzDL6K/XmhtLwx/Ncg4/vdkSNVGm7X3JJcvbA0AeD7bOfq yjVnEE8KnuZlntVj1xP6Opm2YNJMVJjxqpPjHbO5O2ypabf/k7s/yE9PbbHQsq7/zWUf aOBvCEgTFzBZ37eZiy30ozJzRU8D6YNCiGLiy9tcTZun+2wLGLJ3zRLM90A7CUsjjkaY vmu1R0eooWUE0nv1cKk+c1feETaWMUkLuz/EetM+D76/WtsV47H/JEhpYXYKtAHNEQef VQaJHPfhUyapBU+XSCxMUOevg4moGY2dHV+Pa++R1sm6WIWDK8e10oAsicEI6K3ONNxW sVNQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v82si314411lfa.3.2019.11.07.23.09.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 23:09:53 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: CMHIZUaEls1XivtOxVfw8LjTrWvV8VjJ2pturiUQfq9Axyqzre+nQnGSsHf+19Y4sUf/ZWwUnB 4ECFXOptv/ZBePh7ro3OAmImr1WwkkI4Yj8mXNAiZpCkZWdf39V8ir8AMSpApF5z3IaCMDix1b V4MWEopDy35dMu3C/VU3HASx852QcYzPJ6/ZCDhde3yoLWRPIiAnKec/fA89ZSMMTOGpy01Aze 5ZQsgCXMTR6+zk0HAfvzqsVeOGMg2TOBxj2FzpV6eeQxhFYECkX8PY/t8+YoohjxUiZjrbFHZV LMU= X-IronPort-AV: E=Sophos;i="5.68,280,1569312000"; d="scan'208";a="42990030" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 07 Nov 2019 23:09:51 -0800 IronPort-SDR: psTFOfVu2aKKa4SlB1p+aQzUQ97XLjKWqx1WzLBf05s2VuvaQaDyfxL21OsdQOpJP5AFKcA5gr 2V/QB2gj6BP2Zps/EJvBAuof3J12uF7LJTpqx33upJS9jjfL1d4aAXWJYOuqMVp9wC9KnWDiom aIu9/X/R2hXSR62ugZ7up8moIFP9OMIBwumutVStxV3c7a1ohVuhPjaEox16hfyushrKX5zan3 jkdXBGm8ESxhn6s3ewrrojG1iPDdsN0wSJqyz4XKtp8cWh55xvxHdypCUOLLJzF9mcLby2vUbv RGc= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v3 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles Date: Fri, 8 Nov 2019 08:07:18 +0100 Message-ID: <1573196839-1143-7-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573196839-1143-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-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: P9uDTiPqJA7E 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