From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:aa7:959d:: with SMTP id z29mr18171999pfj.208.1573837295852; Fri, 15 Nov 2019 09:01:35 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:be09:: with SMTP id l9ls427328pff.8.gmail; Fri, 15 Nov 2019 09:01:35 -0800 (PST) X-Google-Smtp-Source: APXvYqw3gZO7/JoqM6wkEXFKQTHKsAtxHXS+hJByHNvS2e94wBll9yBZhmrGqQ1Sj+Mdl63vItPI X-Received: by 2002:aa7:868c:: with SMTP id d12mr18801126pfo.189.1573837295380; Fri, 15 Nov 2019 09:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573837295; cv=none; d=google.com; s=arc-20160816; b=yjep3P+KPgH+WMBJ2xapa3Lrh9y8WdMK6Uf5UWUmREK2NcTH2+xDDQ2HTHtpDtr+n2 T+bO/JzlRt4NGhUBcLJrprzM4TabivUd+VcW9wwN/XY9QRUKJI/vaiX9cI1qrcvbkYAq BWEdytPltnidc+wB3QyUNt/cxOqByv2YbxIRMVzd/xkWYWZibn4V2s7iwPkhQDLsskRu XUYALzXx7rBeiIXs754lEdIOzTG8hUPsFBBuDMw8tq1stBqI+hhXE2WHyrTklpfUnJyA 2SIghlU1+TMbeqZiwphFiiwEcssGJz+pQUOne68iPDx8OYUg2urSW1Wg9ikUQtfuyYeu Ce6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=LLVKiiv28QRZSx7srAX+s8ZkqhV1+xMkmj+IYcOB97A=; b=kHo0+yY72UqT9pKiHNgoorHcN9JAC3qCJxbj496n7oW5R1KnyHDsnb0wmgV09aeeyq 7FzyelF/EDUmrRRzLtHPrIDeoAYPcInZ266gOCi98aZwNFML9Mus+OsPQ96Di60DD7ly xkMXIhvko1QRMZ4JKho9/468B596sNwu5YADN6ZAOB/mj8FOBQluQX6GjGmxV5C4hkan t53RQMpJmWnS+0EX2cN+hI66FwLkGPk0t4N+ZmxAdBgGAzc1Pmo4NIIz6sa2DYI7Modt B0ufeuE911yX0rZfuJ5HTtnS8pbzpCmtaht9qkXZfaO4NGpGVzIVkbimmB2oFSkSU7hv HIiA== 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 g15si470624plq.0.2019.11.15.09.01.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2019 09:01:35 -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: x61qJydn1CroZbP9diYa8ycbQSsHU3NM3h5Z2MysCfYqSg6bh5tO6bcyDhaZUOxB1gFH1kKBKV 8nCPxwdLBp0wLncwDZTCcJxIZUUAaeUj2Ff4w7RoDYTaQ/vbY1q2kCZaWqnv7T89wwQgVRnfK5 a8iCFkMvWmeJRgPr+yMSp1dixtnEUhN7dWHdDbWZGRx/KA2gq7WHL7+lvL7aY41D3yMHIkirEo qfbtaJkAlEvORoDr1KBXKR7TFddSR9NRa4STLsD1Jl1UJV9WBY8ndCAGLnD7DqHeMUyDzrJPhM dAw= X-IronPort-AV: E=Sophos;i="5.68,308,1569312000"; d="scan'208";a="45083725" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 15 Nov 2019 09:01:33 -0800 IronPort-SDR: qogTLXR+UjkBKHE303seWvSdtTu5bZZ6c+jfCCrZpbs+qdGKn+94PozYgrZBjMD3rhqhSBQpE8 /ZVVmYqIcoK4QUu7Ex/0iRyI8psInyzeYhjrNHQqTDqGBrnjPcoWc2l/u4V2KT3gj2QvqVErG3 ZL3jS5GTZxr6rR+Y8easVL0QqQjNOt2uv8FLok98kUEvFSoLYlNGgXx4OGLXKyqaTnpS+Wz++j iMPT0GTxtjskz19ssf9GgWXKBKpWIGzrMgGLZzowKbpPndD+Jaq8Yxxhf8Y8R1lu4REekuc306 JjU= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v5 5/6] linux-custom: honor KERNEL_FILE setting Date: Fri, 15 Nov 2019 18:00:14 +0100 Message-ID: <1573837215-324-6-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573837215-324-1-git-send-email-Cedric_Hombourger@mentor.com> References: <26ab6076-157e-7573-919d-dfa7cb273b25@siemens.com> <1573837215-324-1-git-send-email-Cedric_Hombourger@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: EajHsSFX8o60 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). Rename the "vmlinuz" local variable to kernel_file so that it is clear it is derived from KERNEL_FILE. As we now have multiple recipes using KERNEL_FILE (image and kernel recipes), its default setting (vmlinuz) was moved to bitbake.conf (defaults to vmlinuz for all architectures but mipsel where it is set to vmlinux) Signed-off-by: Cedric Hombourger --- meta-isar/conf/machine/qemumipsel.conf | 2 -- meta/classes/image.bbclass | 1 - meta/conf/bitbake.conf | 2 ++ meta/recipes-kernel/linux/files/build-kernel.sh | 10 +++++----- meta/recipes-kernel/linux/linux-custom.inc | 1 + 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meta-isar/conf/machine/qemumipsel.conf b/meta-isar/conf/machine/qemumipsel.conf index 6ca0777..18191fc 100644 --- a/meta-isar/conf/machine/qemumipsel.conf +++ b/meta-isar/conf/machine/qemumipsel.conf @@ -1,8 +1,6 @@ # This software is a part of ISAR. # Copyright (C) 2019 Mentor Graphics, a Siemens business -KERNEL_FILE ?= "vmlinux" - MACHINE_SERIAL ?= "ttyS0" BAUDRATE_TTY ?= "115200" 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 1f20c98..e45284c 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -56,6 +56,8 @@ 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" +KERNEL_FILE_mipsel ?= "vmlinux" OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable" FILESOVERRIDES = "${DISTRO_ARCH}:${MACHINE}" diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh index 7b651af..b46cefa 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,14 +100,14 @@ 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}" - mv "$vmlinuz" "$vmlinuz.gz" - gunzip "$vmlinuz.gz" + kernel_file="${REPACK_LINUX_IMAGE_DIR}/boot/${KERNEL_FILE}-${PV}" + mv "${kernel_file}" "${kernel_file}.gz" + gunzip "${kernel_file}.gz" fi dpkg-gencontrol -crepack/debian/control \ diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index fcbe326..17f8464 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} -- 2.20.1