From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6599908607246991360 X-Received: by 2002:adf:b713:: with SMTP id l19-v6mr1671332wre.8.1536668422711; Tue, 11 Sep 2018 05:20:22 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:5588:: with SMTP id j130-v6ls632873wmb.6.gmail; Tue, 11 Sep 2018 05:20:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYhVqa8bqPboXm3QdsgKdFK1H/2Ez9IFaJ5mdEfrIjoBRSRAHFjb/jexXgdjAQEcSzS4t7P X-Received: by 2002:a1c:f303:: with SMTP id q3-v6mr133603wmq.16.1536668422446; Tue, 11 Sep 2018 05:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536668422; cv=none; d=google.com; s=arc-20160816; b=PSsaauo/Kv2twoqnqKvdvW3sqDc8qkqOubnUvRPqWLWhBp9LDqxCGzguDeAeEVE1VY wfgMypfytCttJSQ1+USCsXbaxH8A89M1LDWw3gKr770k9mmYZKAoTQrDQM1QVfwzDIoV KCuDauq8DlsGHztQ9Ew2+TAhry6o+9tRjHcVn6VwmUSa16PempT/tXjRYyWEMVzuK5D4 4bJv4LVGEBhGi4cjNb1kpfEJdOdp//t8Wo6RbyTD3q4J7+ifgw0AaHsV6xOIgQlLioX/ JcOuJ2j0Lsw5bxc6HE+HC8IqsKKx/7D8T/OSUMC/2idOoitluuVW2SmrepPwZZZKW+DG TDaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=G1n+Kta6fxP2b1D5+ZoLFc8zuaBd5DNzpY5vbvSiGGU=; b=rZ7k1Cnob69ieHuBIR5samaqbK8e7M/DJQyDjkZ8xKPnyJWvb+7HRDedT2bb+sb2fc I5pHcWDF/wIqwr+DfCLnSfz3Fzac2px1f+vJWIjAq7U7menEPbc5xADTv9fKg+eHtcs5 BfpUb4yX87oQr+tb0hlu/Fe94XxZ8icbmmXvyC/vYyxW5ScjfwLckppjPSEOkgcl1n0W 1Ulu3oMa7CAHcgyBTDeSdFsja8jACZ5LD0Z3OGkrPMBezXeoTTB1vLJRlSdX9JDeuIXS ogk5Lq1aMGnIPRklfM094ULnJxL145VYfTURL56yt7pasTgc9oGtGNx9bK9I1QgJxwL7 TBpQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id y139-v6si337152wmc.3.2018.09.11.05.20.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 05:20:22 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id w8BCKLax013868 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 11 Sep 2018 14:20:21 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w8BCKLwd020927; Tue, 11 Sep 2018 14:20:21 +0200 Date: Tue, 11 Sep 2018 14:20:20 +0200 From: Henning Schild To: Jan Kiszka Cc: isar-users Subject: Re: [PATCH 2/2] build-kernel: fix the cross compile arch naming Message-ID: <20180911142020.2b6a31b0@md1pvb1c.ad001.siemens.net> In-Reply-To: <3f2a7ed6-80ff-3df0-a082-6c33b46b690c@siemens.com> References: <20180911101605.21977-1-henning.schild@siemens.com> <20180911101605.21977-3-henning.schild@siemens.com> <3f2a7ed6-80ff-3df0-a082-6c33b46b690c@siemens.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: vo9Za02ZQMKs Am Tue, 11 Sep 2018 14:10:41 +0200 schrieb Jan Kiszka : > On 11.09.18 12:16, [ext] Henning Schild wrote: > > In debian cross building scenarios we have three machines. > > "build" is where we work on, "host" is what we produce binaries > > for, and "target" would be a third arch if we build a cross > > compiler to run on "host". ("target" is not yet relevant on Isar) > > > > We used to call "build" "host" and "host" "target", this patch > > changes the kernel building to the debian/GNU naming. > > Does this have any impact on generated packages, their content or > file names? I'm assuming "no", but it would be good to clarify this, > and also state that it does not change the interface towards recipes > using this include. No it does not. This patch is pure refactoring and changes nothing but names in the code. Henning > Thanks, > Jan > > > > > Signed-off-by: Henning Schild > > --- > > meta/recipes-kernel/linux/files/build-kernel.sh | 18 > > +++++++++--------- meta/recipes-kernel/linux/linux-custom.inc > > | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) > > > > diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh > > b/meta/recipes-kernel/linux/files/build-kernel.sh index > > 2cee28f..d1824db 100644 --- > > a/meta/recipes-kernel/linux/files/build-kernel.sh +++ > > b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -9,11 +9,11 @@ > > > > set -e > > > > -host_arch=$(dpkg --print-architecture) > > -target_arch=$2 > > +build_arch=$(dpkg-architecture -qDEB_BUILD_ARCH) > > +host_arch=$(dpkg-architecture -qDEB_HOST_ARCH) > > > > -if [ "$host_arch" != "$target_arch" ]; then > > - case $target_arch in > > +if [ "$build_arch" != "$host_arch" ]; then > > + case $host_arch in > > armhf) > > export ARCH=arm > > export CROSS_COMPILE="arm-linux-gnueabihf-" > > @@ -23,7 +23,7 @@ if [ "$host_arch" != "$target_arch" ]; then > > export CROSS_COMPILE="aarch64-linux-gnu-" > > ;; > > *) > > - echo "error: unsupported architecture ($target_arch)" > > + echo "error: unsupported architecture ($host_arch)" > > exit 1 > > ;; > > esac > > @@ -44,7 +44,7 @@ if [ "${KV}" != "${PV}" ]; then > > fi > > > > rm -f .version > > -KBUILD_DEBARCH=$target_arch make -j $(($(nproc) * 2)) deb-pkg > > +KBUILD_DEBARCH=$host_arch make -j $(($(nproc) * 2)) deb-pkg > > > > rm -rf ${REPACK_DIR} > > mkdir -p ${REPACK_DIR} > > @@ -65,7 +65,7 @@ dpkg-gencontrol -crepack/debian/control \ > > -DSection=kernel \ > > -DPriority=required \ > > -DDepends="${KERNEL_DEBIAN_DEPENDS}" \ > > - -DArchitecture=$target_arch > > + -DArchitecture=$host_arch > > > > # Add Debian-like link installation to postinst > > touch ${REPACK_LINUX_IMAGE_DIR}/lib/modules/${PV}/.fresh-install > > @@ -91,7 +91,7 @@ if [ \"\$1\" != upgrade ] && command -v > > linux-update-symlinks >/dev/null; then\\ fi" > > > > # Make sure arm64 kernels are decompressed > > -if [ "$target_arch" = "arm64" ]; then > > +if [ "$host_arch" = "arm64" ]; then > > vmlinuz=${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV} > > mv $vmlinuz $vmlinuz.gz > > gunzip $vmlinuz.gz > > @@ -106,7 +106,7 @@ dpkg-gencontrol -crepack/debian/control \ > > -DPackage="linux-headers-${KERNEL_NAME}" \ > > -DSection=kernel \ > > -DDepends="${KERNEL_HEADERS_DEBIAN_DEPENDS}" \ > > - -DArchitecture=$target_arch > > + -DArchitecture=$host_arch > > > > dpkg-deb -b ${REPACK_LINUX_IMAGE_DIR} \ > > linux-image-${KERNEL_NAME}_${PV}-1_${KERNEL_NAME}.deb > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > > b/meta/recipes-kernel/linux/linux-custom.inc index d75346e..7ee2a86 > > 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc > > +++ b/meta/recipes-kernel/linux/linux-custom.inc > > @@ -52,6 +52,6 @@ dpkg_runbuild() { > > export KBUILD_DEPENDS="${KBUILD_DEPENDS}" > > export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}" > > export > > KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}" - > > - sudo -E chroot ${BUILDCHROOT_DIR} /build-kernel.sh > > ${PP}/${PPS} ${DISTRO_ARCH} > > + export DEB_HOST_ARCH="${DISTRO_ARCH}" > > + sudo -E chroot ${BUILDCHROOT_DIR} /build-kernel.sh > > ${PP}/${PPS} } > > > >