Patchwork [[meta-oe,meta-efl] 01/15] kernel.bbclass: resync with oe-core version

login
register
mail settings
Submitter Martin Jansa
Date April 26, 2012, 12:50 p.m.
Message ID <56a34a9e60b825908e84e340b3fb06f6842aa82f.1335444528.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/26441/
State Accepted
Commit 56a34a9e60b825908e84e340b3fb06f6842aa82f
Headers show

Comments

Martin Jansa - April 26, 2012, 12:50 p.m.
* 4 spaces for anonymous python
* don't recreate uImage if it already exists

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/classes/kernel.bbclass |   64 ++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 31 deletions(-)
Koen Kooi - April 27, 2012, 7:33 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 26-04-12 14:50, Martin Jansa schreef:
> * 4 spaces for anonymous python * don't recreate uImage if it already
> exists

Crap. I'll send a follow up patch that *does* recreate uImage. That is the
whole point of that code, to clean up after the kernel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJPmkvNAAoJEHZqAkdh1vT6+KwQAIeJ98cGO0l/nwc3JduPX65x
q2nw/f6mpfGUa0LRFcelCD1/GD7TCrSRKXykvu9iqLR/EE0b9JIdFPFtQvpM4vCg
0BfvJEkA6b6OTVCKyGgE1xVYuurqypXMaaij0aghptVZl5yCUYY3UIAIT9HX46zW
dNYMwjb6Qed8rzMEM/r0cJrM1erRWh6SfdbSJ/D952ZLWg8XH5sZCcLekY9eLAfX
3Itub9oj3ENfvz/APItTNwotGIpFvaVcG8qIeX33sk+V+N9HdCpfBuaXJ4sJwR2X
YnfchX+d2pyPbF9xJBiL9pEl8jVimbLQiKAIRBTdW6Wq2EQsFkRTbkqpPKDTDV8K
timcdV7q3RFjj3OF7YA2WB+4oh9PPeOP2HgELdhMtG8Hje9ma1HPFu7lmWybYt/V
yyqJEFwsjQ3bmAWTzQCPM0BkRhV1Swb1YsGRuQIs72CyVlRjZ+5iL2EMZOWCh97C
4jJIRDhs+CfG9HxHTApUe3haPlvpKM/40QDyRA2eeLUaV8PDvCO6UhPqIl76+hI9
RimwseKgjbJCsN1Flw/ct6OcS8v8zFHa+7F4yEto5OfIipbLIwx/NGrf/bfGXDZK
3bYr2aQUtzmBrRDUTnSYri7tUjMmJ72JkMZ23dJgY1hVZSk0xtq5ZA4c29grbc9d
jlCpEup+Oi20B6dCiXDC
=0Qgb
-----END PGP SIGNATURE-----
Martin Jansa - April 27, 2012, 7:45 a.m.
On Fri, Apr 27, 2012 at 09:33:37AM +0200, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Op 26-04-12 14:50, Martin Jansa schreef:
> > * 4 spaces for anonymous python * don't recreate uImage if it already
> > exists
> 
> Crap. I'll send a follow up patch that *does* recreate uImage. That is the
> whole point of that code, to clean up after the kernel.

Can you send it to oe-core people too?

Or make it configurable as suggested here?
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/020243.html

Cheers,

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBAgAGBQJPmkvNAAoJEHZqAkdh1vT6+KwQAIeJ98cGO0l/nwc3JduPX65x
> q2nw/f6mpfGUa0LRFcelCD1/GD7TCrSRKXykvu9iqLR/EE0b9JIdFPFtQvpM4vCg
> 0BfvJEkA6b6OTVCKyGgE1xVYuurqypXMaaij0aghptVZl5yCUYY3UIAIT9HX46zW
> dNYMwjb6Qed8rzMEM/r0cJrM1erRWh6SfdbSJ/D952ZLWg8XH5sZCcLekY9eLAfX
> 3Itub9oj3ENfvz/APItTNwotGIpFvaVcG8qIeX33sk+V+N9HdCpfBuaXJ4sJwR2X
> YnfchX+d2pyPbF9xJBiL9pEl8jVimbLQiKAIRBTdW6Wq2EQsFkRTbkqpPKDTDV8K
> timcdV7q3RFjj3OF7YA2WB+4oh9PPeOP2HgELdhMtG8Hje9ma1HPFu7lmWybYt/V
> yyqJEFwsjQ3bmAWTzQCPM0BkRhV1Swb1YsGRuQIs72CyVlRjZ+5iL2EMZOWCh97C
> 4jJIRDhs+CfG9HxHTApUe3haPlvpKM/40QDyRA2eeLUaV8PDvCO6UhPqIl76+hI9
> RimwseKgjbJCsN1Flw/ct6OcS8v8zFHa+7F4yEto5OfIipbLIwx/NGrf/bfGXDZK
> 3bYr2aQUtzmBrRDUTnSYri7tUjMmJ72JkMZ23dJgY1hVZSk0xtq5ZA4c29grbc9d
> jlCpEup+Oi20B6dCiXDC
> =0Qgb
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index cfcd5e9..4d394c7 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -11,20 +11,20 @@  INITRAMFS_IMAGE ?= ""
 INITRAMFS_TASK ?= ""
 
 python __anonymous () {
-	kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
-	if kerneltype == 'uImage':
-		depends = d.getVar("DEPENDS", True)
-		depends = "%s u-boot-mkimage-native" % depends
-		d.setVar("DEPENDS", depends)
+    kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
+    if kerneltype == 'uImage':
+        depends = d.getVar("DEPENDS", True)
+        depends = "%s u-boot-mkimage-native" % depends
+        d.setVar("DEPENDS", depends)
 
-	image = d.getVar('INITRAMFS_IMAGE', True)
-	if image:
-		d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
+    image = d.getVar('INITRAMFS_IMAGE', True)
+    if image:
+        d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
 
-	machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
+    machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
 
-	if machine_kernel_pr:
-		d.setVar('PR', machine_kernel_pr)
+    if machine_kernel_pr:
+        d.setVar('PR', machine_kernel_pr)
 }
 
 inherit kernel-arch deploy
@@ -507,34 +507,36 @@  do_sizecheck() {
 
 addtask sizecheck before do_install after do_compile
 
+KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${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}"
+
 do_uboot_mkimage() {
 	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
-		ENTRYPOINT=${UBOOT_ENTRYPOINT}
-		if test -n "${UBOOT_ENTRYSYMBOL}"; then
-			ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
-				awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
-		fi
-		if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
-			${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
-			uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
-			rm -f linux.bin
-		else
-			${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-			rm -f linux.bin.gz
-			gzip -9 linux.bin
-			uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
-			rm -f linux.bin.gz
+		if test ! -e arch/${ARCH}/boot/uImage ; then
+			ENTRYPOINT=${UBOOT_ENTRYPOINT}
+			if test -n "${UBOOT_ENTRYSYMBOL}"; then
+				ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+					awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+			fi
+			if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+				${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+				uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+				rm -f linux.bin
+			else
+				${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+				rm -f linux.bin.gz
+				gzip -9 linux.bin
+				uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+				rm -f linux.bin.gz
+			fi
 		fi
 	fi
 }
 
 addtask uboot_mkimage before do_install after do_compile
 
-KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${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}"
-
 kernel_do_deploy() {
 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then