diff options
Diffstat (limited to 'meta-oe/classes/kernel.bbclass')
-rw-r--r-- | meta-oe/classes/kernel.bbclass | 64 |
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 ?= "" | |||
11 | INITRAMFS_TASK ?= "" | 11 | INITRAMFS_TASK ?= "" |
12 | 12 | ||
13 | python __anonymous () { | 13 | python __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 | ||
30 | inherit kernel-arch deploy | 30 | inherit kernel-arch deploy |
@@ -507,34 +507,36 @@ do_sizecheck() { | |||
507 | 507 | ||
508 | addtask sizecheck before do_install after do_compile | 508 | addtask sizecheck before do_install after do_compile |
509 | 509 | ||
510 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | ||
511 | # Don't include the DATETIME variable in the sstate package signatures | ||
512 | KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" | ||
513 | KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" | ||
514 | |||
510 | do_uboot_mkimage() { | 515 | do_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 | ||
531 | addtask uboot_mkimage before do_install after do_compile | 538 | addtask uboot_mkimage before do_install after do_compile |
532 | 539 | ||
533 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | ||
534 | # Don't include the DATETIME variable in the sstate package signatures | ||
535 | KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" | ||
536 | KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" | ||
537 | |||
538 | kernel_do_deploy() { | 540 | kernel_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 |