From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755821036247187456 X-Received: by 2002:a62:4e03:: with SMTP id c3mr9974358pfb.114.1573197846759; Thu, 07 Nov 2019 23:24:06 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:1ae6:: with SMTP id p93ls2217893pjp.2.canary-gmail; Thu, 07 Nov 2019 23:24:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxK8dKww3d/9zwSQ9RRkP0bCp/IfEy79SzlrK/rrQO9wfHQDViRznPbvOW2gjyeLXqDztL2 X-Received: by 2002:a17:902:8509:: with SMTP id bj9mr860641plb.328.1573197846132; Thu, 07 Nov 2019 23:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573197846; cv=none; d=google.com; s=arc-20160816; b=PmQ/n8vFvGMu+0OtQ035uRuFzjX2dQelL011xDKqJU2RDS+4aU53caIAYayLnLe9SH wF4pXONrH3ZQMXtmkkPHdOqmbfYq8JX/Na8ARysfzseNMyb3hD1wXRNkDfF1DoXPLVQC FGNb8JucSkQPcwqE1xT+b+juXqc+HpqSiFl0jZyqLNT+NoxF/9+unTw+g62briYQu/WD nE3vvJmPco9fHkEQa8Iy7H/aLqezP8HMIArP2GYeVRvcoqqwk5XouPcYCgkBuamAm0Qv qfT0FfPEqntB0NJ10vrb7RR1cDb7Pl0UR/chnJ5E7mlqh3XBNkrNpZPSgRecRF6L4nN1 jZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject:ironport-sdr :ironport-sdr; bh=s2g45frlBcwB0JEUivA+w78C61yYtZH++WRllH2hawA=; b=CZNmnuH0BrPgngCVepP/vzwZj2SY2Lg1EvpC+DWgjjAH+DaHzntb9avOL5zIeoE/YO Kp2kSLcks2cUkvhNVCt42f5C+ADx03pZkN//RX2R4vdM9A13W2Eljz08AG4tWdhzc+Xx fYbXQiQHC3BSqj8OLCv5Z9WSdiAcj2CZ3KjzIDTwUN1ILqze2Z8my1IlG+hjQ8mhR/OW uET8iyfi3Cp9pqyeRBy3l7T6YY/GR9kQyWFXkejyK36povm7wZ/n+gbQoARksU1ZdWnA KdXQMlv2PTn4UJUbFufQ2p9jO7Dnm+mpMTnDSavcpCFGg5px59nmi68UN03rx63MHEwA lwhA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id c101si226640pje.1.2019.11.07.23.24.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2019 23:24:06 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: lDtveemvBA7vvf9W9vwdAHsOrabRylpc1SmqA+X/KJ6MqItRZZFktDnyRXo6cwLKICNRuEjh5A Wnc6njjcWnP7666zlMy5/LO1Q20nRYGoaFCDCxpbjDkq9RD18Lf3MANnofCQ1LSpPySHjOTmog M1yVA50ioeijEzdk1UxtJUv48D3ElS+S5ow8k+PaFHc4Hd4vG3Sy8AaieaBTqzlmMw8g9LQ7dN z0Acg1m4StY4bJPfD2k3qvUvqGsL+Mbbqf5BRXuyiiP7XX6B6qzBiQnqUZbFMRSNg0ha5tJP/K 4ZM= X-IronPort-AV: E=Sophos;i="5.68,280,1569312000"; d="scan'208";a="44844354" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 07 Nov 2019 23:24:04 -0800 IronPort-SDR: +6uoJ+JnnS4oLLOFSS1JtbNKaCWwVs69BB508EsLRM5A1vKkKPKrzJV3G8jUsV0GkJcISfP+gB tawGcj+m8dKSNL7g0c2k2h3E6JVKovk0gkQwLlgeKiKeecXfnz1R45Day+sdWq935kMrAEWT0e 3lpxfK2CULydNuPTbl56cm0y/CMwvjIShYh/FEn3EJrbMCPBgrsRtdKWHBT6UcRweAbaAtmmGR 04vln/0MEqQvtMW2b3z4xeLTssnryQ8UO8h3kqvnr+HT1IQZ5Wf/AbYyhFoI9W0CxdvhzBm66O P38= Subject: Re: [PATCH L-C v3 6/7] buildchroot-host: install qemu-static to support hybrid cross-compiles To: Jan Kiszka , References: <1573118604-909-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-1-git-send-email-Cedric_Hombourger@mentor.com> <1573196839-1143-7-git-send-email-Cedric_Hombourger@mentor.com> <28a6ef09-18f0-8e82-c464-2d2d530718b2@siemens.com> <5d5193de-de14-9cc9-0eea-b5881581ea91@siemens.com> From: Cedric Hombourger Message-ID: <8bfa1ee7-03ae-1816-5926-7097a56092b8@mentor.com> Date: Fri, 8 Nov 2019 08:23:57 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <5d5193de-de14-9cc9-0eea-b5881581ea91@siemens.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: +PtMJADn+npe On 11/8/19 8:22 AM, Jan Kiszka wrote: > On 08.11.19 08:14, [ext] Jan Kiszka wrote: >> On 08.11.19 08:07, 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. >>> >>> 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 >>> +} >>> >> >> You didn't address my comment on this one. I doubt it's the right >> approach. >> > > IOW: When we cross-compile linux-headers, the output is for the host > architecture only, not for the target. If the resulting package > suggest something different, that must be fixed. see the response I just posted. I am afraid this is incorrect but again feel free to suggest otherwise with a bit more concrete meat and a look upstream... > > Jan >