summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-03-30 00:43:05 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-04-26 09:17:27 +0200
commit56a34a9e60b825908e84e340b3fb06f6842aa82f (patch)
tree9f7e3c393203759ff1ce0c5ed43b375434e8706a /meta-oe/classes
parent1c2e52a30e7714931bb40a3812eff3cfd36def8a (diff)
downloadmeta-openembedded-56a34a9e60b825908e84e340b3fb06f6842aa82f.tar.gz
kernel.bbclass: resync with oe-core version
* 4 spaces for anonymous python * don't recreate uImage if it already exists Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r--meta-oe/classes/kernel.bbclass64
1 files changed, 33 insertions, 31 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index cfcd5e969..4d394c7d6 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -11,20 +11,20 @@ INITRAMFS_IMAGE ?= ""
11INITRAMFS_TASK ?= "" 11INITRAMFS_TASK ?= ""
12 12
13python __anonymous () { 13python __anonymous () {
14 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' 14 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
15 if kerneltype == 'uImage': 15 if kerneltype == 'uImage':
16 depends = d.getVar("DEPENDS", True) 16 depends = d.getVar("DEPENDS", True)
17 depends = "%s u-boot-mkimage-native" % depends 17 depends = "%s u-boot-mkimage-native" % depends
18 d.setVar("DEPENDS", depends) 18 d.setVar("DEPENDS", depends)
19 19
20 image = d.getVar('INITRAMFS_IMAGE', True) 20 image = d.getVar('INITRAMFS_IMAGE', True)
21 if image: 21 if image:
22 d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') 22 d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
23 23
24 machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True) 24 machine_kernel_pr = d.getVar('MACHINE_KERNEL_PR', True)
25 25
26 if machine_kernel_pr: 26 if machine_kernel_pr:
27 d.setVar('PR', machine_kernel_pr) 27 d.setVar('PR', machine_kernel_pr)
28} 28}
29 29
30inherit kernel-arch deploy 30inherit kernel-arch deploy
@@ -507,34 +507,36 @@ do_sizecheck() {
507 507
508addtask sizecheck before do_install after do_compile 508addtask sizecheck before do_install after do_compile
509 509
510KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
511# Don't include the DATETIME variable in the sstate package signatures
512KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
513KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
514
510do_uboot_mkimage() { 515do_uboot_mkimage() {
511 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 516 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
512 ENTRYPOINT=${UBOOT_ENTRYPOINT} 517 if test ! -e arch/${ARCH}/boot/uImage ; then
513 if test -n "${UBOOT_ENTRYSYMBOL}"; then 518 ENTRYPOINT=${UBOOT_ENTRYPOINT}
514 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ 519 if test -n "${UBOOT_ENTRYSYMBOL}"; then
515 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` 520 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
516 fi 521 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
517 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then 522 fi
518 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin 523 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
519 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 524 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
520 rm -f linux.bin 525 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
521 else 526 rm -f linux.bin
522 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin 527 else
523 rm -f linux.bin.gz 528 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
524 gzip -9 linux.bin 529 rm -f linux.bin.gz
525 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 530 gzip -9 linux.bin
526 rm -f linux.bin.gz 531 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
532 rm -f linux.bin.gz
533 fi
527 fi 534 fi
528 fi 535 fi
529} 536}
530 537
531addtask uboot_mkimage before do_install after do_compile 538addtask uboot_mkimage before do_install after do_compile
532 539
533KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
534# Don't include the DATETIME variable in the sstate package signatures
535KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
536KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
537
538kernel_do_deploy() { 540kernel_do_deploy() {
539 install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin 541 install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
540 if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then 542 if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then