From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a05:620a:133b:: with SMTP id p27mr17176132qkj.363.1572962283799; Tue, 05 Nov 2019 05:58:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:4347:: with SMTP id a7ls5321213qtn.11.gmail; Tue, 05 Nov 2019 05:58:03 -0800 (PST) X-Google-Smtp-Source: APXvYqywwaIYhTl21r+1FgOCmo/grigq/G9KrYGeKogoDCyOjX3YtkjI8VycpTIRet4Rqq3JWGVK X-Received: by 2002:ac8:f6a:: with SMTP id l39mr6716740qtk.145.1572962283338; Tue, 05 Nov 2019 05:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572962283; cv=none; d=google.com; s=arc-20160816; b=qXA15DqQ8FV8uO9rGwfs/9NiBOlB1lO4SPVmr4/zROhow3sKdQwmdtV36rqgl2jdVl hoTYRTcaE+0bDpEOzftibFQsXtvDhoK70APYB/brKZYzwFYA/ISiNa35CP/W4P+ioZnr y1XyOP6OpN5h8n8sQtJvUW3SWkweTVVgjLeRMwid+x79h0tBdTxrotkv/4I2vxAQjpZ5 fodtHfOGG8yT4I+iwIzoAXG7d5jkZUZxrwCvs5M/Lq0OWdwwVwEBMHvnYbYXfhb5II7u pwqJ8w1e3OG6VM0XhnPBpgvGN3Z+b1H0PhsZajZ3RoEAI82L0ExBDBRfS3Xk5kJ2ANTZ Q/dg== 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=Ed8oRwxd0qJ89wDi8PoEHrlBlrOFJ1NVpLV+Z8rCjDRUO1xDye4eDaaPR4ZNqHrToW T+4f6oCTTK7ph68rgqofOUe/R25TiX5b1tVEWDf1NKOMzst1lJ7gipn7v2oL4Ml1/58d +ZPySjZA7xr7fuOLnSP1Ums8H+/raItTLb1M711mpmWFTSU0sG4M7hA4jFu0kKIZr2hs sVu9YXNBgThtr+UrH6ft1bmCCxO3emFurPPwQt+It9UCNfOGITT4ifnPDnuDd3myjK82 L+zjl9++kdbtU+P3g5em1gInz2otYQ7gdjRAxBGISPXC7GgyeoIuvogi/wb/v/CNTBq6 1vnw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id y199si422919qka.3.2019.11.05.05.58.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2019 05:58:03 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: jQJmR0dC37pEkYEznhXfqcxiUOQT0Bu6e6h86rZAAWLUSQlETMizdmP637kCXNvTivnPkwKpv4 MgOXZ3tZgsETZ/mXxy4cGpXVCUldj2poangbiQhYR6UHeWIAmiwY9T9MdvFfTaWvJnetC2pIYM oITMg4rDonrl1LfNf0a4EcbdEPfID/DJVbPfBWLlmYQ+kyBSRRSPYZm10uzGtm050x+DVEgnTn XQhRfeisO5Ctt2QhtWd6tXVN5a+X9XkWE0i3Cmzq5TKf81JKaS91FT2R/SHtfGqm35jGSRssx/ 0AY= X-IronPort-AV: E=Sophos;i="5.68,271,1569312000"; d="scan'208";a="42818037" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 05 Nov 2019 05:58:01 -0800 IronPort-SDR: awXfg0rQDFQaNGeWkgxqjR4gIWGQ5atV5fmN/EVR0vbmEMvwDyHCn6qxDZfQ0hG8jy5v4AWoBv nCDjvjjUcuiooS+wsHIksooZeDcmz0yfVoD3NdzDvAvNUCA0/smufSCNafXT8GjZsYQC1KAFt6 yE+rjFGXq4LWsShv1DdXm6ERdULpvjtJqgsZDC+yPX8WNfqvnM2kM7O6Iwe4JycBUFStgf+pi5 gBUcInzPtxWnrBINt6NQgTgruTZFoEipMEEt9M+S4VfYfdHkUGOuMFvLIw+0Nf6Xav9rJw5p0e 6K8= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles Date: Tue, 5 Nov 2019 14:57:37 +0100 Message-ID: <1572962258-367-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572962258-367-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1572962145-318-1-git-send-email-Cedric_Hombourger@mentor.com> <1572962258-367-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-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: xqN4NlKuvne7 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