From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:aa7:d60e:: with SMTP id c14mr19422911edr.174.1574697931943; Mon, 25 Nov 2019 08:05:31 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:edc6:: with SMTP id sb6ls5827524ejb.1.gmail; Mon, 25 Nov 2019 08:05:31 -0800 (PST) X-Google-Smtp-Source: APXvYqy8j/K3KGTfaVT9RX+bLaXh97hQRah4qNCa83vHMpCYdlC0jIbhNyeoWJ3apZm2GehrRXUa X-Received: by 2002:a17:906:70e:: with SMTP id y14mr37564244ejb.70.1574697931477; Mon, 25 Nov 2019 08:05:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574697931; cv=none; d=google.com; s=arc-20160816; b=WncCmsHqjKJSySMpfqtYbCf7PT4A9KGEQ/hOpUOWBdo8OQQeVoARTDFXe6ezli5Qqd Zdtbz1nyO/cVAbVX++WJmIl5yjpfFbtzX77TZZNh2m4ZIM+5DU0yb/iMR++ivlivjRU5 L1NybZYUV6PHcbOvghLO8pjteKSWxBdyPvFXIr1GSv+SNIhfVAEFLWyXViM9VCkwSOCy cH+KHLj5pL+aP2/PE289MsU8F3M6rI0y3IryoIRnX9GPnq0Tgx5p2XyzC6nDH/DOuNoE eeo8LgkwJBnMRX3HBdd/Nat1zuYWAwb4A1s4RVGCZnGsfZk7J8R6KVoZT8QXAjox7vxW H0Ew== 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=oIZO3QWi1ntvDAetTvVDXr1dU0p+Ij95gcqaQshwFq01DsMX5eM4hZdY4E0jdj0KU2 WZSLshpA5lPcXR2cmcRu5ACY+a4kUVkVd3h1niIpXZlvtBvv23YoHdpY44mdkVxXGoIl azDvNjxrcHLver7WYGkM3hGqL6EHQtqWppd/3LPE6PU6wI/UBf8XYE4VysnR9q5S9puN RG/x/fizwKw94bonj2GF5zYb2HSXnEwyUY3w9DpSvO3cmsVsyrhWnv5HvOJpvXdfVo1A 2AHD15tKTIhUoyQskf/5LQCcmHR2tEsogmw0ZmGYtr/1/uP311iDOu2zrWbPiDviX31v c5Cg== 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 n21si347614eja.0.2019.11.25.08.05.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2019 08:05:31 -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: UFFC7ezQd1aQSDhNkTNV9Bkd0noknGrcqSGOo/NEArWbzl7Nt+Er0Ly9aOTjE3IAQAlL9kGcq2 yXM+QRsG/RiDddbQOc8d66ZfKNOV4LuOxQaapSp4FnLIwSlhjKpHZF2FjaPLXLi/60HFjQgOtH nGTfdF3GmmFHdwPts/WE444OLpLf4sArs1z5g2w+ZJ4/IgoQG5bGy0gfzy54V2m+fcARHz/fmK SJSWa3am7fcQUDJbfA5SlxGhYC9KH93PMFoZaw+SgtanaJcZ9ElV3q+VbfhRuE+yIXYJg8//x4 et8= X-IronPort-AV: E=Sophos;i="5.69,242,1571731200"; d="scan'208";a="43486771" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 25 Nov 2019 08:05:30 -0800 IronPort-SDR: QH1XoLjKdyC9Qc1JLgm0ureMXI9NPleMg0o9spjsqLX/FindsVv1xhpa2EwuL4F0Drv8JZXmo/ Q2Xu/GGmWBC48RdnzWKRBd5HzI3GrNqtSlmx3Jp/dZ6aKDvtXOYMH5GoSK+VwJn7VDLagAmZe8 aQQrOjKXta9TfWgBsj/4JQNHwE2mjG9ti8ycpuMSUf/qm4+NWnT02kFcq5Asu5dIazHn2p5Xce vYdwXfxAloR+6a8YGNODuBLTucHIq5B40lKGI5hu5hu9U5DCUWKCe6rCIgolL5/2io7d/0QyzU j78= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH L-C v4 4/5] buildchroot-host: install qemu-static to support hybrid cross-compiles Date: Mon, 25 Nov 2019 17:04:53 +0100 Message-ID: <1574697894-825-5-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574697894-825-1-git-send-email-Cedric_Hombourger@mentor.com> References: <3c232836-fc03-b784-33e2-cc21393dfad7@siemens.com> <1574697894-825-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-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: LSOhD6LsQjCn 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