Skip to contentSkip to conversation

kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME

PATCH New Martin Jansa 3 participants 7 messages Sep 22, 2012 – Nov 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME

* without this you it's harder to see which kernel is newer version
e.g. after branch change LOCALCOUNT in SRCPV is reset to 0, so it needs PE bump for upgrade path but then it's clear why gitr1+HASH has newer DATETIME then gitrN+HASH, so include PE in name
* using PE not EXTENDPE to sort it correctly even for PE == 1
* it will sort alphabetically wrong in deploy dir for a while until old
images are removed

---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index fdef1be..e2e365f 100644
@@ -490,7 +490,7 @@ do_sizecheck() {
 
 addtask sizecheck before do_install after do_compile
 
-KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
Signature · 1 line
1.7.12
#1 lore raw

PATCH 1/1 kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but overwritting the same output file

---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +6 -1
index ee59aaf..9c70e70 100644
@@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"
+# Don't include the DATETIME variable in the sstate package signatures
+MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
 
 do_uboot_mkimage() {
 	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
@@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after do_compile
 kernel_do_deploy() {
 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
+		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+		ln -sf ${MODULE_TARBALL_BASE_NAME}.bin ${MODULE_TARBALL_SYMLINK_NAME}
 	fi
 
 	cd ${DEPLOYDIR}
Signature · 1 line
1.8.0
#2 lore raw

Re: [PATCH] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

Quoted 30 lines · Martin Jansa

* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but overwritting the same output file

---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +0 -0
index ee59aaf..9c70e70 100644
@@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?=

"${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
# Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"

meta/classes/kernel.bbclass +3 -0
+# Don't include the DATETIME variable in the sstate package signatures
+MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
 
 do_uboot_mkimage() {
        if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
@@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after

do_compile

 kernel_do_deploy() {
        install -m 0644 ${KERNEL_OUTPUT}
Quoted 9 lines

${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- tar -cvzf
${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
+ tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D}
lib
+ ln -sf ${MODULE_TARBALL_BASE_NAME}.bin
${MODULE_TARBALL_SYMLINK_NAME}

Just a quick question, are there any concerns about existing users of the old tgz name ? Obviously, if they were in oe-core, we'd know about them and update them, but I have no idea myself how much (if anything) was based on the old name. I'm not sure of the best practices oe-core/oe uses for cases
like this in the past, so I thought I'd ask.

The old shorter name was nice, but I agree that having it different than the image
name makes it non obvious how to associate the image and modules, and that's a nice thing to fix.

Since we are already making a symlink, I guess we could consider a transnational
symlink with the old name ? (but then again, if the link is there, people will continue
to have dependencies on it and not update their own code).

Cheers,

Bruce

Quoted 12 lines
        fi

        cd ${DEPLOYDIR}

--
1.8.0

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
#3 lore raw

Re: [PATCH] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

Quoted 40 lines · Bruce Ashfield
Quoted 38 lines · Martin Jansa

* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but overwritting the same output file

---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +0 -0
index ee59aaf..9c70e70 100644
@@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?=

"${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
# Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"

meta/classes/kernel.bbclass +3 -0
+# Don't include the DATETIME variable in the sstate package signatures
+MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
 
 do_uboot_mkimage() {
        if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
@@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after

do_compile

 kernel_do_deploy() {
        install -m 0644 ${KERNEL_OUTPUT}

${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- tar -cvzf
${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
+ tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D}
lib
+ ln -sf ${MODULE_TARBALL_BASE_NAME}.bin
${MODULE_TARBALL_SYMLINK_NAME}

Quoted 8 lines
Quoted 1 line

Just a quick question, are there any concerns about existing users of the old tgz name ? Obviously, if they were in oe-core, we'd know about them and update them, but I have no idea myself how much (if anything) was based on the old name. I'm not sure of the best practices oe-core/oe uses for cases
like this in the past, so I thought I'd ask.

I remember seeing some thread about making whole modules tarball creation optional and disabled by default, so I guess there is only a few users of this.

Quoted 4 lines

The old shorter name was nice, but I agree that having it different than the image
name makes it non obvious how to associate the image and modules, and that's a nice thing to fix.

True, but since oldname was the same for different kernel images I always found misleading to see 5 different uImages and only one modules tarball (which we know was created during build of latest uImage - but maybe not newest uImage version wise - so quite confusing for someone just trying to download matching uImage and modules).

Quoted 5 lines

Since we are already making a symlink, I guess we could consider a transnational
symlink with the old name ? (but then again, if the link is there, people will continue
to have dependencies on it and not update their own code).

I don't mind having 2 symlinks if there is the need for old name.

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw

Re: [PATCH] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

Quoted 3 lines · Martin Jansa

I remember seeing some thread about making whole modules tarball creation optional and disabled by default, so I guess there is only a few users of this.

That particular patch was apparently rejected, but I think you're right that only one or two people said at the time that they were using the tarball. It does seem to be a slightly fringe interest.

p.

#5 lore raw

Re: [PATCH] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

Quoted 8 lines · Phil Blundell
Quoted 3 lines · Martin Jansa

I remember seeing some thread about making whole modules tarball creation optional and disabled by default, so I guess there is only a few users of this.

That particular patch was apparently rejected, but I think you're right that only one or two people said at the time that they were using the tarball. It does seem to be a slightly fringe interest.

http://patches.openembedded.org/patch/37087/

Was it really rejected? I take RP's comment as rejecting setting KERNEL_DEPLOY_MODULE_TARBALL to 0 as default, but not as rejecting whole patch..

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw

Re: [PATCH] kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest

In reply to Martin Jansa
Quoted 48 lines · Martin Jansa
Quoted 27 lines · Bruce Ashfield
Quoted 24 lines · On Mon, Nov 26, 2012 at 7:37 AM, Martin Jansa <[email protected] wrote:

* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but overwritting the same output file

---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +0 -0
index ee59aaf..9c70e70 100644
@@ -497,6 +497,10 @@ KERNEL_IMAGE_BASE_NAME ?=

"${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DA
# Don't include the DATETIME variable in the sstate package signatures KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
+MODULE_TARBALL_BASE_NAME ?= "modules-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz"

meta/classes/kernel.bbclass +3 -0
+# Don't include the DATETIME variable in the sstate package signatures
+MODULE_TARBALL_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
Quoted 11 lines
Quoted 11 lines
 do_uboot_mkimage() {
        if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
meta/classes/kernel.bbclass +0 -0
@@ -526,7 +530,8 @@ addtask uboot_mkimage before do_install after

do_compile

 kernel_do_deploy() {
        install -m 0644 ${KERNEL_OUTPUT}

${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- tar -cvzf
${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
+ tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C

${D}

Quoted 8 lines
Quoted 4 lines

lib
+ ln -sf ${MODULE_TARBALL_BASE_NAME}.bin
${MODULE_TARBALL_SYMLINK_NAME}

Just a quick question, are there any concerns about existing users of the old tgz name ? Obviously, if they were in oe-core, we'd know about them and update them, but I have no idea myself how much (if anything) was

Quoted 9 lines

based

Quoted 3 lines

on the old name. I'm not sure of the best practices oe-core/oe uses for cases
like this in the past, so I thought I'd ask.

I remember seeing some thread about making whole modules tarball creation optional and disabled by default, so I guess there is only a few users of this.

Agreed. It isn't common, the modules package yes .. the tarball, not that I've
heard much about.

Quoted 4 lines
Quoted 4 lines

The old shorter name was nice, but I agree that having it different than the image
name makes it non obvious how to associate the image and modules, and

Quoted 9 lines

that's

Quoted 1 line

a nice thing to fix.

True, but since oldname was the same for different kernel images I always found misleading to see 5 different uImages and only one modules tarball (which we know was created during build of latest uImage - but maybe not newest uImage version wise - so quite confusing for someone just trying to download matching uImage and modules).

I definitely agree.

Quoted 9 lines
Quoted 6 lines

Since we are already making a symlink, I guess we could consider a transnational
symlink with the old name ? (but then again, if the link is there, people will continue
to have dependencies on it and not update their own code).

I don't mind having 2 symlinks if there is the need for old name.

I'd wait to see if anyone pops up with a strong opinion. I'm all for making the
file names consistent, but having a temporary symlink to catch any outliers might be a good thing too.

So I'm a solid "maybe" :) I'm hoping RP has a stronger opinion on the migration
path from the existing name.

Cheers,

Bruce

Quoted 6 lines

Cheers,

--
Martin 'JaMa' Jansa jabber: [email protected]

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"