public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Straighten cross names
@ 2018-09-11 10:16 Henning Schild
  2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Henning Schild @ 2018-09-11 10:16 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

With the recent introduction of cross building we introduced confusing
names in Isar. The following article describes how the names should be
in Debian, which is probably what we should follow.

https://wiki.debian.org/CrossCompiling#Nomenclature

This series partially fixes the names. Applying it without changing the
rest would probably just increase the confusion. I am still posting it
as a starting point and to point out that there currently is a naming
issue in Isar.

Henning Schild (2):
  cross: use env variables instead of switches
  build-kernel: fix the cross compile arch naming

 meta/classes/dpkg.bbclass                         |  8 ++++++--
 meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
 meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
 meta/recipes-devtools/buildchroot/files/deps.sh   |  2 +-
 meta/recipes-kernel/linux/files/build-kernel.sh   | 18 +++++++++---------
 meta/recipes-kernel/linux/linux-custom.inc        |  4 ++--
 6 files changed, 19 insertions(+), 28 deletions(-)

-- 
2.16.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] cross: use env variables instead of switches
  2018-09-11 10:16 [PATCH 0/2] Straighten cross names Henning Schild
@ 2018-09-11 10:16 ` Henning Schild
  2018-09-21 12:55   ` [PATCHv2 " Henning Schild
  2018-09-11 10:16 ` [PATCH 2/2] build-kernel: fix the cross compile arch naming Henning Schild
  2018-09-21 10:00 ` [PATCH 0/2] Straighten cross names Maxim Yu. Osipov
  2 siblings, 1 reply; 11+ messages in thread
From: Henning Schild @ 2018-09-11 10:16 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Debian has environment variables to set the architectures to be used by
dpkg-buildpackage and mk-build-deps. Use those instead of adding
parameters to the tools.
This patch now also uses the debian names for cross building and we do
not have confusing statements like "--host-arch $target_arch" anymore.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass                         |  8 ++++++--
 meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
 meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
 meta/recipes-devtools/buildchroot/files/deps.sh   |  2 +-
 4 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 2e53c1b..4a04fc6 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -6,7 +6,9 @@ inherit dpkg-base
 # Install build dependencies for package
 dpkg_prepare() {
     E="${@ bb.utils.export_proxies(d)}"
-    sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS} ${DISTRO_ARCH}
+    export DEB_HOST_ARCH="${DISTRO_ARCH}"
+    export DEB_BUILD_ARCH="${HOST_ARCH}"
+    sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS}
 }
 
 # apt and reprepro may not run in parallel, acquire the Isar lock
@@ -15,5 +17,7 @@ do_prepare[lockfiles] += "${DEPLOY_DIR_APT}/isar.lock"
 # Build package from sources using build script
 dpkg_runbuild() {
     E="${@ bb.utils.export_proxies(d)}"
-    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS} ${DISTRO_ARCH}
+    export DEB_HOST_ARCH="${DISTRO_ARCH}"
+    export DEB_BUILD_ARCH="${HOST_ARCH}"
+    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
 }
diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index e74bc14..0458b1f 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -15,4 +15,4 @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do
 done
 
 # Build the package
-dpkg-buildpackage -a$target_arch -d --source-option=-I
+dpkg-buildpackage -d --source-option=-I
diff --git a/meta/recipes-devtools/buildchroot/files/common.sh b/meta/recipes-devtools/buildchroot/files/common.sh
index b7551eb..61917b8 100644
--- a/meta/recipes-devtools/buildchroot/files/common.sh
+++ b/meta/recipes-devtools/buildchroot/files/common.sh
@@ -6,19 +6,6 @@
 
 set -e
 
-# Create human-readable names
-target_arch=$2
-
-# Notes:
-#   mk-build-deps for jessie and jtretch has different parameter name to specify
-#   host architecture.
-debian_version=$(cut -c1 /etc/debian_version)
-if [ $(($debian_version)) -ge 9 ]; then
-    set_arch="--host-arch $target_arch"
-else
-    set_arch="-a $target_arch"
-fi
-
 # Go to build directory
 cd $1
 
diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh b/meta/recipes-devtools/buildchroot/files/deps.sh
index 4bd604f..5c247f0 100644
--- a/meta/recipes-devtools/buildchroot/files/deps.sh
+++ b/meta/recipes-devtools/buildchroot/files/deps.sh
@@ -24,4 +24,4 @@ apt-get update \
     -o APT::Get::List-Cleanup="0"
 
 # Install all build deps
-mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
+mk-build-deps -t "${install_cmd}" -i -r debian/control
-- 
2.16.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/2] build-kernel: fix the cross compile arch naming
  2018-09-11 10:16 [PATCH 0/2] Straighten cross names Henning Schild
  2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
@ 2018-09-11 10:16 ` Henning Schild
  2018-09-11 12:10   ` Jan Kiszka
  2018-09-21 10:00 ` [PATCH 0/2] Straighten cross names Maxim Yu. Osipov
  2 siblings, 1 reply; 11+ messages in thread
From: Henning Schild @ 2018-09-11 10:16 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

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.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 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}
 }
-- 
2.16.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] build-kernel: fix the cross compile arch naming
  2018-09-11 10:16 ` [PATCH 2/2] build-kernel: fix the cross compile arch naming Henning Schild
@ 2018-09-11 12:10   ` Jan Kiszka
  2018-09-11 12:20     ` Henning Schild
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2018-09-11 12:10 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users

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 <henning.schild@siemens.com>
> ---
>   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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] build-kernel: fix the cross compile arch naming
  2018-09-11 12:10   ` Jan Kiszka
@ 2018-09-11 12:20     ` Henning Schild
  0 siblings, 0 replies; 11+ messages in thread
From: Henning Schild @ 2018-09-11 12:20 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: isar-users

Am Tue, 11 Sep 2018 14:10:41 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> 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 <henning.schild@siemens.com>
> > ---
> >   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} }
> >   
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] Straighten cross names
  2018-09-11 10:16 [PATCH 0/2] Straighten cross names Henning Schild
  2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
  2018-09-11 10:16 ` [PATCH 2/2] build-kernel: fix the cross compile arch naming Henning Schild
@ 2018-09-21 10:00 ` Maxim Yu. Osipov
  2 siblings, 0 replies; 11+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-21 10:00 UTC (permalink / raw)
  To: Henning Schild, isar-users

Hi Henning,

I've rebased your series to the current 'next',
enabled CROSS_COMPILATION in local.conf and tried to build on my 
debian-stretch-amd64 host and ran
'bitbake multiconfig:qemuarm-stretch:isar-image-base'.

It failed with error log:

Log data follows:
| DEBUG: Executing shell function do_install_builddeps
| Get:1 file:/isar-apt isar InRelease
| Ign:1 file:/isar-apt isar InRelease
| Get:2 file:/isar-apt isar Release [3554 B]
| Get:2 file:/isar-apt isar Release [3554 B]
| Get:3 file:/isar-apt isar Release.gpg
| Ign:3 file:/isar-apt isar Release.gpg
| Reading package lists...
| build architecture "amd64" is unequal host architecture "armhf" in 
which case the package architecture must not be "all" (but "armhf" instead)
| WARNING: exit code 255 from a shell command.
| ERROR: Function failed: do_install_builddeps (log file is located at 
/home/myo/work/isar/src/isar/build/tmp/work/debian-stretch-armhf/libhello-0.1-98f2e41-r0/temp/log.do_install_builddeps.8379)

Could you please have a look on that?

Maxim.

On 9/11/18 1:16 PM, Henning Schild wrote:
> With the recent introduction of cross building we introduced confusing
> names in Isar. The following article describes how the names should be
> in Debian, which is probably what we should follow.
> 
> https://wiki.debian.org/CrossCompiling#Nomenclature
> 
> This series partially fixes the names. Applying it without changing the
> rest would probably just increase the confusion. I am still posting it
> as a starting point and to point out that there currently is a naming
> issue in Isar.
> 
> Henning Schild (2):
>    cross: use env variables instead of switches
>    build-kernel: fix the cross compile arch naming
> 
>   meta/classes/dpkg.bbclass                         |  8 ++++++--
>   meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
>   meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
>   meta/recipes-devtools/buildchroot/files/deps.sh   |  2 +-
>   meta/recipes-kernel/linux/files/build-kernel.sh   | 18 +++++++++---------
>   meta/recipes-kernel/linux/linux-custom.inc        |  4 ++--
>   6 files changed, 19 insertions(+), 28 deletions(-)
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCHv2 1/2] cross: use env variables instead of switches
  2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
@ 2018-09-21 12:55   ` Henning Schild
  2018-09-21 13:08     ` Henning Schild
  0 siblings, 1 reply; 11+ messages in thread
From: Henning Schild @ 2018-09-21 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Debian has environment variables to set the architectures to be used by
dpkg-buildpackage and mk-build-deps. Use those instead of adding
parameters to the tools.
This patch now also uses the debian names for cross building and we do
not have confusing statements like "--host-arch $target_arch" anymore.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass                         |  6 +++++-
 meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
 meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
 meta/recipes-devtools/buildchroot/files/deps.sh   |  4 ++++
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index da0b40d..959c041 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -7,6 +7,8 @@ inherit dpkg-base
 do_install_builddeps() {
     dpkg_do_mounts
     E="${@ bb.utils.export_proxies(d)}"
+    export DEB_HOST_ARCH="${DISTRO_ARCH}"
+    export DEB_BUILD_ARCH="${HOST_ARCH}"
     sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS} ${DISTRO_ARCH}
     dpkg_undo_mounts
 }
@@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 # Build package from sources using build script
 dpkg_runbuild() {
     E="${@ bb.utils.export_proxies(d)}"
-    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS} ${DISTRO_ARCH}
+    export DEB_HOST_ARCH="${DISTRO_ARCH}"
+    export DEB_BUILD_ARCH="${HOST_ARCH}"
+    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
 }
diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index e74bc14..0458b1f 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -15,4 +15,4 @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do
 done
 
 # Build the package
-dpkg-buildpackage -a$target_arch -d --source-option=-I
+dpkg-buildpackage -d --source-option=-I
diff --git a/meta/recipes-devtools/buildchroot/files/common.sh b/meta/recipes-devtools/buildchroot/files/common.sh
index b7551eb..61917b8 100644
--- a/meta/recipes-devtools/buildchroot/files/common.sh
+++ b/meta/recipes-devtools/buildchroot/files/common.sh
@@ -6,19 +6,6 @@
 
 set -e
 
-# Create human-readable names
-target_arch=$2
-
-# Notes:
-#   mk-build-deps for jessie and jtretch has different parameter name to specify
-#   host architecture.
-debian_version=$(cut -c1 /etc/debian_version)
-if [ $(($debian_version)) -ge 9 ]; then
-    set_arch="--host-arch $target_arch"
-else
-    set_arch="-a $target_arch"
-fi
-
 # Go to build directory
 cd $1
 
diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh b/meta/recipes-devtools/buildchroot/files/deps.sh
index 4bd604f..cc34b2d 100644
--- a/meta/recipes-devtools/buildchroot/files/deps.sh
+++ b/meta/recipes-devtools/buildchroot/files/deps.sh
@@ -23,5 +23,9 @@ apt-get update \
     -o Dir::Etc::sourceparts="-" \
     -o APT::Get::List-Cleanup="0"
 
+# according to the man-page --host-arch should default to exactly what we say
+# here ... but it does not, so we have to provide this argument
+set_arch="--host-arch `dpkg-architecture -qDEB_HOST_ARCH`" 
+
 # Install all build deps
 mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
-- 
2.19.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 1/2] cross: use env variables instead of switches
  2018-09-21 12:55   ` [PATCHv2 " Henning Schild
@ 2018-09-21 13:08     ` Henning Schild
  2018-09-27  7:12       ` Maxim Yu. Osipov
  0 siblings, 1 reply; 11+ messages in thread
From: Henning Schild @ 2018-09-21 13:08 UTC (permalink / raw)
  To: isar-users

Am Fri, 21 Sep 2018 14:55:42 +0200
schrieb Henning Schild <henning.schild@siemens.com>:

> Debian has environment variables to set the architectures to be used
> by dpkg-buildpackage and mk-build-deps. Use those instead of adding
> parameters to the tools.
> This patch now also uses the debian names for cross building and we do
> not have confusing statements like "--host-arch $target_arch" anymore.

The change to v1 is that we call mk-build-deps still with --host-arch.
And we provide the "default"-argument, according to the man-page. The
tool does not do what its man-page says, or at least the man-page is
very confusing.

Henning

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/dpkg.bbclass                         |  6 +++++-
>  meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
>  meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
>  meta/recipes-devtools/buildchroot/files/deps.sh   |  4 ++++
>  4 files changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index da0b40d..959c041 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -7,6 +7,8 @@ inherit dpkg-base
>  do_install_builddeps() {
>      dpkg_do_mounts
>      E="${@ bb.utils.export_proxies(d)}"
> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
>      sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS}
> ${DISTRO_ARCH} dpkg_undo_mounts
>  }
> @@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] =
> "${DISTRO}-${DISTRO_ARCH}" # Build package from sources using build
> script dpkg_runbuild() {
>      E="${@ bb.utils.export_proxies(d)}"
> -    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
> ${DISTRO_ARCH}
> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
> +    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
>  }
> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> b/meta/recipes-devtools/buildchroot/files/build.sh index
> e74bc14..0458b1f 100644 ---
> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,4 +15,4 @@
> for i in configure aclocal.m4 Makefile.am Makefile.in; do done
>  
>  # Build the package
> -dpkg-buildpackage -a$target_arch -d --source-option=-I
> +dpkg-buildpackage -d --source-option=-I
> diff --git a/meta/recipes-devtools/buildchroot/files/common.sh
> b/meta/recipes-devtools/buildchroot/files/common.sh index
> b7551eb..61917b8 100644 ---
> a/meta/recipes-devtools/buildchroot/files/common.sh +++
> b/meta/recipes-devtools/buildchroot/files/common.sh @@ -6,19 +6,6 @@
>  
>  set -e
>  
> -# Create human-readable names
> -target_arch=$2
> -
> -# Notes:
> -#   mk-build-deps for jessie and jtretch has different parameter
> name to specify -#   host architecture.
> -debian_version=$(cut -c1 /etc/debian_version)
> -if [ $(($debian_version)) -ge 9 ]; then
> -    set_arch="--host-arch $target_arch"
> -else
> -    set_arch="-a $target_arch"
> -fi
> -
>  # Go to build directory
>  cd $1
>  
> diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh
> b/meta/recipes-devtools/buildchroot/files/deps.sh index
> 4bd604f..cc34b2d 100644 ---
> a/meta/recipes-devtools/buildchroot/files/deps.sh +++
> b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -23,5 +23,9 @@
> apt-get update \ -o Dir::Etc::sourceparts="-" \
>      -o APT::Get::List-Cleanup="0"
>  
> +# according to the man-page --host-arch should default to exactly
> what we say +# here ... but it does not, so we have to provide this
> argument +set_arch="--host-arch `dpkg-architecture -qDEB_HOST_ARCH`" 
> +
>  # Install all build deps
>  mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 1/2] cross: use env variables instead of switches
  2018-09-21 13:08     ` Henning Schild
@ 2018-09-27  7:12       ` Maxim Yu. Osipov
  2018-09-27  7:15         ` Jan Kiszka
  2018-09-28 10:47         ` Henning Schild
  0 siblings, 2 replies; 11+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-27  7:12 UTC (permalink / raw)
  To: Henning Schild, isar-users

On 9/21/18 4:08 PM, Henning Schild wrote:
> Am Fri, 21 Sep 2018 14:55:42 +0200
> schrieb Henning Schild <henning.schild@siemens.com>:
> 
>> Debian has environment variables to set the architectures to be used
>> by dpkg-buildpackage and mk-build-deps. Use those instead of adding
>> parameters to the tools.
>> This patch now also uses the debian names for cross building and we do
>> not have confusing statements like "--host-arch $target_arch" anymore.
> 
> The change to v1 is that we call mk-build-deps still with --host-arch.
> And we provide the "default"-argument, according to the man-page. The
> tool does not do what its man-page says, or at least the man-page is
> very confusing.

I've reran scripts/ci_build.sh on stretch host - (both variants - native 
and cross) -  build still fails on example-hello, example module etc.

I would suggest to run CI script before submitting patch to the mailing 
list.

Maxim.

> Henning
> 
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>   meta/classes/dpkg.bbclass                         |  6 +++++-
>>   meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
>>   meta/recipes-devtools/buildchroot/files/common.sh | 13 -------------
>>   meta/recipes-devtools/buildchroot/files/deps.sh   |  4 ++++
>>   4 files changed, 10 insertions(+), 15 deletions(-)
>>
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index da0b40d..959c041 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -7,6 +7,8 @@ inherit dpkg-base
>>   do_install_builddeps() {
>>       dpkg_do_mounts
>>       E="${@ bb.utils.export_proxies(d)}"
>> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
>> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
>>       sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS}
>> ${DISTRO_ARCH} dpkg_undo_mounts
>>   }
>> @@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] =
>> "${DISTRO}-${DISTRO_ARCH}" # Build package from sources using build
>> script dpkg_runbuild() {
>>       E="${@ bb.utils.export_proxies(d)}"
>> -    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
>> ${DISTRO_ARCH}
>> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
>> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
>> +    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
>>   }
>> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
>> b/meta/recipes-devtools/buildchroot/files/build.sh index
>> e74bc14..0458b1f 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/build.sh +++
>> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,4 +15,4 @@
>> for i in configure aclocal.m4 Makefile.am Makefile.in; do done
>>   
>>   # Build the package
>> -dpkg-buildpackage -a$target_arch -d --source-option=-I
>> +dpkg-buildpackage -d --source-option=-I
>> diff --git a/meta/recipes-devtools/buildchroot/files/common.sh
>> b/meta/recipes-devtools/buildchroot/files/common.sh index
>> b7551eb..61917b8 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/common.sh +++
>> b/meta/recipes-devtools/buildchroot/files/common.sh @@ -6,19 +6,6 @@
>>   
>>   set -e
>>   
>> -# Create human-readable names
>> -target_arch=$2
>> -
>> -# Notes:
>> -#   mk-build-deps for jessie and jtretch has different parameter
>> name to specify -#   host architecture.
>> -debian_version=$(cut -c1 /etc/debian_version)
>> -if [ $(($debian_version)) -ge 9 ]; then
>> -    set_arch="--host-arch $target_arch"
>> -else
>> -    set_arch="-a $target_arch"
>> -fi
>> -
>>   # Go to build directory
>>   cd $1
>>   
>> diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh
>> b/meta/recipes-devtools/buildchroot/files/deps.sh index
>> 4bd604f..cc34b2d 100644 ---
>> a/meta/recipes-devtools/buildchroot/files/deps.sh +++
>> b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -23,5 +23,9 @@
>> apt-get update \ -o Dir::Etc::sourceparts="-" \
>>       -o APT::Get::List-Cleanup="0"
>>   
>> +# according to the man-page --host-arch should default to exactly
>> what we say +# here ... but it does not, so we have to provide this
>> argument +set_arch="--host-arch `dpkg-architecture -qDEB_HOST_ARCH`"
>> +
>>   # Install all build deps
>>   mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 1/2] cross: use env variables instead of switches
  2018-09-27  7:12       ` Maxim Yu. Osipov
@ 2018-09-27  7:15         ` Jan Kiszka
  2018-09-28 10:47         ` Henning Schild
  1 sibling, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2018-09-27  7:15 UTC (permalink / raw)
  To: Maxim Yu. Osipov, Henning Schild, isar-users

On 27.09.18 09:12, Maxim Yu. Osipov wrote:
> On 9/21/18 4:08 PM, Henning Schild wrote:
>> Am Fri, 21 Sep 2018 14:55:42 +0200
>> schrieb Henning Schild <henning.schild@siemens.com>:
>>
>>> Debian has environment variables to set the architectures to be used
>>> by dpkg-buildpackage and mk-build-deps. Use those instead of adding
>>> parameters to the tools.
>>> This patch now also uses the debian names for cross building and we do
>>> not have confusing statements like "--host-arch $target_arch" anymore.
>>
>> The change to v1 is that we call mk-build-deps still with --host-arch.
>> And we provide the "default"-argument, according to the man-page. The
>> tool does not do what its man-page says, or at least the man-page is
>> very confusing.
> 
> I've reran scripts/ci_build.sh on stretch host - (both variants - native and 
> cross) -  build still fails on example-hello, example module etc.
> 
> I would suggest to run CI script before submitting patch to the mailing list.


Henning, you can also push to our internal CI project for that purpose. It runs 
gitlab-ci.yml.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCHv2 1/2] cross: use env variables instead of switches
  2018-09-27  7:12       ` Maxim Yu. Osipov
  2018-09-27  7:15         ` Jan Kiszka
@ 2018-09-28 10:47         ` Henning Schild
  1 sibling, 0 replies; 11+ messages in thread
From: Henning Schild @ 2018-09-28 10:47 UTC (permalink / raw)
  To: Maxim Yu. Osipov; +Cc: isar-users

Am Thu, 27 Sep 2018 10:12:25 +0300
schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:

> On 9/21/18 4:08 PM, Henning Schild wrote:
> > Am Fri, 21 Sep 2018 14:55:42 +0200
> > schrieb Henning Schild <henning.schild@siemens.com>:
> >   
> >> Debian has environment variables to set the architectures to be
> >> used by dpkg-buildpackage and mk-build-deps. Use those instead of
> >> adding parameters to the tools.
> >> This patch now also uses the debian names for cross building and
> >> we do not have confusing statements like "--host-arch
> >> $target_arch" anymore.  
> > 
> > The change to v1 is that we call mk-build-deps still with
> > --host-arch. And we provide the "default"-argument, according to
> > the man-page. The tool does not do what its man-page says, or at
> > least the man-page is very confusing.  
> 
> I've reran scripts/ci_build.sh on stretch host - (both variants -
> native and cross) -  build still fails on example-hello, example
> module etc.
> 
> I would suggest to run CI script before submitting patch to the
> mailing list.

The cover letter says that this series is not ready to be merged, but
more like raising the issue that the names are mixed up.

Sorry if that was not clear.

Henning

> Maxim.
> 
> > Henning
> >   
> >> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> >> ---
> >>   meta/classes/dpkg.bbclass                         |  6 +++++-
> >>   meta/recipes-devtools/buildchroot/files/build.sh  |  2 +-
> >>   meta/recipes-devtools/buildchroot/files/common.sh | 13
> >> ------------- meta/recipes-devtools/buildchroot/files/deps.sh   |
> >> 4 ++++ 4 files changed, 10 insertions(+), 15 deletions(-)
> >>
> >> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> >> index da0b40d..959c041 100644
> >> --- a/meta/classes/dpkg.bbclass
> >> +++ b/meta/classes/dpkg.bbclass
> >> @@ -7,6 +7,8 @@ inherit dpkg-base
> >>   do_install_builddeps() {
> >>       dpkg_do_mounts
> >>       E="${@ bb.utils.export_proxies(d)}"
> >> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
> >> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
> >>       sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS}
> >> ${DISTRO_ARCH} dpkg_undo_mounts
> >>   }
> >> @@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] =
> >> "${DISTRO}-${DISTRO_ARCH}" # Build package from sources using build
> >> script dpkg_runbuild() {
> >>       E="${@ bb.utils.export_proxies(d)}"
> >> -    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
> >> ${DISTRO_ARCH}
> >> +    export DEB_HOST_ARCH="${DISTRO_ARCH}"
> >> +    export DEB_BUILD_ARCH="${HOST_ARCH}"
> >> +    sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS}
> >>   }
> >> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> >> b/meta/recipes-devtools/buildchroot/files/build.sh index
> >> e74bc14..0458b1f 100644 ---
> >> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> >> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,4 +15,4
> >> @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do done
> >>   
> >>   # Build the package
> >> -dpkg-buildpackage -a$target_arch -d --source-option=-I
> >> +dpkg-buildpackage -d --source-option=-I
> >> diff --git a/meta/recipes-devtools/buildchroot/files/common.sh
> >> b/meta/recipes-devtools/buildchroot/files/common.sh index
> >> b7551eb..61917b8 100644 ---
> >> a/meta/recipes-devtools/buildchroot/files/common.sh +++
> >> b/meta/recipes-devtools/buildchroot/files/common.sh @@ -6,19 +6,6
> >> @@ 
> >>   set -e
> >>   
> >> -# Create human-readable names
> >> -target_arch=$2
> >> -
> >> -# Notes:
> >> -#   mk-build-deps for jessie and jtretch has different parameter
> >> name to specify -#   host architecture.
> >> -debian_version=$(cut -c1 /etc/debian_version)
> >> -if [ $(($debian_version)) -ge 9 ]; then
> >> -    set_arch="--host-arch $target_arch"
> >> -else
> >> -    set_arch="-a $target_arch"
> >> -fi
> >> -
> >>   # Go to build directory
> >>   cd $1
> >>   
> >> diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh
> >> b/meta/recipes-devtools/buildchroot/files/deps.sh index
> >> 4bd604f..cc34b2d 100644 ---
> >> a/meta/recipes-devtools/buildchroot/files/deps.sh +++
> >> b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -23,5 +23,9 @@
> >> apt-get update \ -o Dir::Etc::sourceparts="-" \
> >>       -o APT::Get::List-Cleanup="0"
> >>   
> >> +# according to the man-page --host-arch should default to exactly
> >> what we say +# here ... but it does not, so we have to provide this
> >> argument +set_arch="--host-arch `dpkg-architecture
> >> -qDEB_HOST_ARCH`" +
> >>   # Install all build deps
> >>   mk-build-deps $set_arch -t "${install_cmd}" -i -r
> >> debian/control  
> >   
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-09-28 10:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 10:16 [PATCH 0/2] Straighten cross names Henning Schild
2018-09-11 10:16 ` [PATCH 1/2] cross: use env variables instead of switches Henning Schild
2018-09-21 12:55   ` [PATCHv2 " Henning Schild
2018-09-21 13:08     ` Henning Schild
2018-09-27  7:12       ` Maxim Yu. Osipov
2018-09-27  7:15         ` Jan Kiszka
2018-09-28 10:47         ` Henning Schild
2018-09-11 10:16 ` [PATCH 2/2] build-kernel: fix the cross compile arch naming Henning Schild
2018-09-11 12:10   ` Jan Kiszka
2018-09-11 12:20     ` Henning Schild
2018-09-21 10:00 ` [PATCH 0/2] Straighten cross names Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox