public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 02/10] linux-custom: honor KERNEL_FILE setting
Date: Thu, 24 Oct 2019 19:57:53 +0200	[thread overview]
Message-ID: <20191024195753.5a22218a@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <1571907744-1121-3-git-send-email-Cedric_Hombourger@mentor.com>

Am Thu, 24 Oct 2019 11:02:16 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:

> vmlinuz was hard-coded in the postinst script generated by the
> build-kernel.sh script. This really needs to be ${KERNEL_FILE}
> to support architectures where a vmlinux file is used instead
> (mipsel in particular).
> 
> As we now have multiple recipes using KERNEL_FILE (image and
> kernel recipes), its default setting (vmlinuz) was moved to
> bitbake.conf
> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>  meta/classes/image.bbclass                      | 1 -
>  meta/conf/bitbake.conf                          | 1 +
>  meta/recipes-kernel/linux/files/build-kernel.sh | 6 +++---
>  meta/recipes-kernel/linux/linux-custom.inc      | 1 +
>  4 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 8384b71..7690bc5 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -16,7 +16,6 @@ IMAGE_INSTALL += "${@ ("linux-image-" +
> d.getVar("KERNEL_NAME", True)) if d.getV IMAGE_FULLNAME =
> "${PN}-${DISTRO}-${MACHINE}" 
>  # These variables are used by wic and start_vm
> -KERNEL_FILE  ?= "vmlinuz"
>  KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}"
>  INITRD_IMAGE ?= "${IMAGE_FULLNAME}-initrd.img"
>  
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index bca1114..6377a94 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -56,6 +56,7 @@ BUILDCHROOT_HOST_DIR =
> "${DEPLOY_DIR_BUILDCHROOT}-host/${HOST_DISTRO}-${HOST_ARC
> BUILDCHROOT_TARGET_DIR =
> "${DEPLOY_DIR_BUILDCHROOT}-target/${DISTRO}-${DISTRO_ARCH}"
> SDKCHROOT_DIR = "${DEPLOY_DIR_SDKCHROOT}/${DISTRO}-${DISTRO_ARCH}"
> CACHE = "${TMPDIR}/cache" +KERNEL_FILE ?= "vmlinuz" 
>  OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable"
>  
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> 7b651af..dcb46f7 100644 ---
> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -90,7 +90,7 @@
> if [ -f /lib/modules/${PV}/.fresh-install ]; then\\ else\\
>  	change=upgrade\\
>  fi\\
> -linux-update-symlinks \$change ${PV} /boot/vmlinuz-${PV}\\
> +linux-update-symlinks \$change ${PV} /boot/${KERNEL_FILE}-${PV}\\
>  rm -f /lib/modules/${PV}/.fresh-install"
>  
>  # Add Debian-like link removal to postrm
> @@ -100,12 +100,12 @@ sed -i
> "${REPACK_LINUX_IMAGE_DIR}/DEBIAN/postrm" \ rm
> -f /lib/modules/${PV}/.fresh-install\\ \\
>  if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks
> >/dev/null; then\\
> -	linux-update-symlinks remove ${PV}  /boot/vmlinuz-${PV}\\
> +	linux-update-symlinks remove
> ${PV}  /boot/${KERNEL_FILE}-${PV}\\ fi"
>  
>  # Make sure arm64 kernels are decompressed
>  if [ "$target_arch" = "arm64" ]; then
> -	vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}"
> +	vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/${KERNEL_FILE}-${PV}"

Please use another name for that local variable.

Henning

>  	mv "$vmlinuz" "$vmlinuz.gz"
>  	gunzip "$vmlinuz.gz"
>  fi
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc index 5a4f5bf..5a34dd1
> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -72,6 +72,7 @@ dpkg_runbuild() {
>  
>  	export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
>  	export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
> +	export KERNEL_FILE="${KERNEL_FILE}"
>  	export
> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}" 
>  	sudo -E chroot --userspec=$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} ${PP}/build-kernel.sh ${PP}/${PPS} ${DISTRO_ARCH}


  reply	other threads:[~2019-10-24 17:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
2019-10-24  9:02 ` [PATCH 01/10] ci_build.sh: delay "set -x" for a clean --help output Cedric Hombourger
2019-10-24  9:02 ` [PATCH 02/10] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
2019-10-24 17:57   ` Henning Schild [this message]
2019-10-24  9:02 ` [PATCH 03/10] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
2019-10-24  9:02 ` [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
2019-10-24 18:02   ` Henning Schild
2019-11-06 16:03     ` Jan Kiszka
2019-11-06 16:17       ` Cedric Hombourger
2019-10-24  9:02 ` [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
2019-11-06 16:04   ` Jan Kiszka
2019-10-24  9:02 ` [PATCH 06/10] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
2019-10-24  9:02 ` [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use Cedric Hombourger
2019-10-24 18:09   ` Henning Schild
2019-11-06 16:08     ` Jan Kiszka
2019-11-06 16:11       ` Cedric Hombourger
2019-11-06 16:16         ` Jan Kiszka
2019-11-06 16:19           ` Cedric Hombourger
2019-11-06 16:32             ` Jan Kiszka
2019-10-24  9:02 ` [PATCH 08/10] linux-custom: add support for kernel config fragments Cedric Hombourger
2019-10-24 18:21   ` Henning Schild
2019-10-24 18:25     ` Cedric Hombourger
2019-10-24 18:29       ` Henning Schild
2019-10-25  9:45     ` Cedric Hombourger
2019-10-24  9:02 ` [PATCH 09/10] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
2019-10-24  9:02 ` [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel) Cedric Hombourger
2019-10-24 18:13   ` Henning Schild
2019-10-24 18:26     ` Henning Schild
2019-11-06 16:11     ` Jan Kiszka
2019-10-24 18:15 ` [PATCH 00/10] add ci40 machine support + new Isar features Henning Schild
2019-10-24 18:17   ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 2/7] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 4/7] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 5/7] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 6/7] linux-custom: add support for kernel config fragments Cedric Hombourger
2019-10-25 17:39   ` [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
2019-11-05 20:25     ` chombourger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024195753.5a22218a@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=Cedric_Hombourger@mentor.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox