Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass
Date: Mon,  2 Jul 2018 22:07:44 +0000	[thread overview]
Message-ID: <20180702220744.10881-4-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <20180702220744.10881-1-Martin.Jansa@gmail.com>

* this makes it easier to access these variables from some other bbclass
  e.g. sdcard_image-rpi.bbclass in meta-raspberry where we need to know
  how some files in deploy are named, but we cannot inherit kernel.bbclass
  as it's used in image recipe not kernel recipe
* alternatively we can move these to bitbake.conf like similar image variables are:
  meta/conf/bitbake.conf:IMAGE_BASENAME = "${PN}"
  meta/conf/bitbake.conf:IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
  meta/conf/bitbake.conf:IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel-artifact-names.bbclass | 19 +++++++++++++++++++
 meta/classes/kernel.bbclass                | 18 +-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)
 create mode 100644 meta/classes/kernel-artifact-names.bbclass

diff --git a/meta/classes/kernel-artifact-names.bbclass b/meta/classes/kernel-artifact-names.bbclass
new file mode 100644
index 0000000000..d696888322
--- /dev/null
+++ b/meta/classes/kernel-artifact-names.bbclass
@@ -0,0 +1,19 @@
+KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+# Don't include the DATETIME variable in the sstate package signatures
+KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
+KERNEL_IMAGE_SYMLINK_NAME ?= "${MACHINE}"
+
+KERNEL_DTB_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+KERNEL_DTB_BASE_NAME[vardepsexclude] = "DATETIME"
+KERNEL_DTB_SYMLINK_NAME ?= "${MACHINE}"
+
+MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
+
+MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
+MODULE_TARBALL_DEPLOY ?= "1"
+
+INITRAMFS_BASE_NAME ?= "initramfs-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
+INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}"
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0045cec819..42efa382ad 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -657,23 +657,7 @@ do_sizecheck[dirs] = "${B}"
 
 addtask sizecheck before do_install after do_strip
 
-KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-# Don't include the DATETIME variable in the sstate package signatures
-KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
-KERNEL_IMAGE_SYMLINK_NAME ?= "${MACHINE}"
-KERNEL_DTB_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-KERNEL_DTB_BASE_NAME[vardepsexclude] = "DATETIME"
-KERNEL_DTB_SYMLINK_NAME ?= "${MACHINE}"
-MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
-MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
-# Don't include the DATETIME variable in the sstate package signatures
-MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
-MODULE_TARBALL_DEPLOY ?= "1"
-
-INITRAMFS_BASE_NAME ?= "initramfs-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
-INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
-INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}"
+inherit kernel-artifact-names
 
 kernel_do_deploy() {
 	deployDir="${DEPLOYDIR}"
-- 
2.17.1



  parent reply	other threads:[~2018-07-02 22:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 20:11 [RFC][PATCH 0/5] Kernel artifacts naming changes Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 1/5] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 2/5] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 3/5] kernel-devicetree.bbclass: build DTBs with make dtbs Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 4/5] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 5/5] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2017-11-21 11:58 ` [RFC][PATCH 0/5] Kernel artifacts naming changes Otavio Salvador
2018-07-02 14:16   ` Martin Jansa
2018-07-02 16:56     ` Otavio Salvador
2018-07-02 22:07     ` [PATCHv2 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2018-07-02 22:07       ` [PATCHv2 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-02 22:07       ` [PATCHv2 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-02 22:07       ` Martin Jansa [this message]
2018-07-04  7:59     ` [PATCHv3 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2018-07-04  7:59       ` [PATCHv3 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-04  8:54         ` Paulo Neves
2018-07-04  9:18           ` Martin Jansa
2018-07-04  7:59       ` [PATCHv3 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-04  7:59       ` [PATCHv3 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2018-07-05  8:21       ` [PATCHv3 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Richard Purdie
2018-07-09 15:04         ` Martin Jansa
2018-07-09 15:04           ` [PATCHv4 " Martin Jansa
2018-07-09 15:04             ` [PATCHv4 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-09 15:04             ` [PATCHv4 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-09 15:05             ` [PATCHv4 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2018-07-04 20:06     ` [PATCH] Revert "kernel-devicetree: Corrected normalize_dtb" Martin Jansa
2018-07-05  7:15       ` Nicolas Dechesne
2018-07-05  8:23         ` Richard Purdie
2018-07-05  8:38           ` Martin Jansa
2018-07-05 10:37             ` Richard Purdie

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=20180702220744.10881-4-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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