From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6599908607246991360 X-Received: by 2002:a2e:42ce:: with SMTP id h75-v6mr484011ljf.22.1536667844326; Tue, 11 Sep 2018 05:10:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:6802:: with SMTP id c2-v6ls1752425lja.1.gmail; Tue, 11 Sep 2018 05:10:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZffn2db5ItzbtCPOHJJMkB40LG/tKIOx5N+QE8wZABQa1OU0kb5okVCgrtcQ7uTN95S5ne X-Received: by 2002:a2e:6390:: with SMTP id s16-v6mr456211lje.15.1536667843753; Tue, 11 Sep 2018 05:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536667843; cv=none; d=google.com; s=arc-20160816; b=OVNYigTAne2+e+nt7my1B+cncHLn/838EflmnM8Oxv3imXBe12/uiVm760WhRcNYPB GP6MkgeEVgvDXDWS9U3RUj1u8kL8I+GxlV6PtDjYGle/WIHpOJgGLSRJEisg/pHzE9+M K1zVGvkGkHnbZ0qtHhPR0p0tXncQBErsC7xiMUjnsxOWu+Bg1Lc005duOp8Ndp6FnBA8 t2rvGYYoUlgkjaZyTEEYLhd8JURmeVZyct4kWE3VDfpNE4BKojAsISh7tszZZKHAlp+x lxHjHTtqYShynO+AQPmcS2b8T3LmNchbw6rIxNFCfXZS5dNPXdokTMzfmq7TbmpZuqdM w+aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=CPMtPaO7F2M3smgvfpm5TQxagpLsqgo+1VfAhAXOGfM=; b=gKbKHFTZlccPFR1yL0ylUf4xYBefnYgUvaCAB5pwRFYl2yi1nM4anh0DXWNZ9tMckR OjiZPzqTJhbV+GYinQ2oSCXinNPHz5f1CwJe+sNRSbyFVaActyZwKcdZDgfLiVAXuZi4 OG5ULGeY05ho9nTMFfBZmDyxPTo3hPyseeTqUeZzWsFE57feiBaPz52WHZO1vuxnwp0e VQFhMSUZRgWNN14hu+nptEC+e+eORvmTJusgymTWrMZmIyjfsE5W6zTsF+pCn7ZGEDar hP84zyyDqgAsJQtWqfHtuJbknCBDT9zRqEsNkuRXAPCEKTkEi85T1oG7NFRtCYySl155 AVjQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id v16-v6si440087ljg.3.2018.09.11.05.10.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 05:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w8BCAgDR005363 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 11 Sep 2018 14:10:42 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w8BCAgsL018304; Tue, 11 Sep 2018 14:10:42 +0200 Subject: Re: [PATCH 2/2] build-kernel: fix the cross compile arch naming To: "[ext] Henning Schild" , isar-users References: <20180911101605.21977-1-henning.schild@siemens.com> <20180911101605.21977-3-henning.schild@siemens.com> From: Jan Kiszka Message-ID: <3f2a7ed6-80ff-3df0-a082-6c33b46b690c@siemens.com> Date: Tue, 11 Sep 2018 14:10:41 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180911101605.21977-3-henning.schild@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: aMt1W3OeIBsn 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. 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} > } > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux