summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass32
1 files changed, 21 insertions, 11 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 1782473181..ca1426cd88 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -440,22 +440,32 @@ MODULE_TARBALL_DEPLOY ?= "1"
440do_uboot_mkimage() { 440do_uboot_mkimage() {
441 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 441 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
442 if test "x${KEEPUIMAGE}" != "xyes" ; then 442 if test "x${KEEPUIMAGE}" != "xyes" ; then
443 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
444 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
445 linux_suffix=""
446 linux_comp="none"
447 else
448 vmlinux_path="vmlinux"
449 linux_suffix=".gz"
450 linux_comp="gzip"
451 fi
452
453 ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
454
455 if [ "${linux_comp}" != "none" ] ; then
456 rm -f linux.bin
457 gzip -9 linux.bin
458 mv -f "linux.bin${linux_suffix}" linux.bin
459 fi
460
443 ENTRYPOINT=${UBOOT_ENTRYPOINT} 461 ENTRYPOINT=${UBOOT_ENTRYPOINT}
444 if test -n "${UBOOT_ENTRYSYMBOL}"; then 462 if test -n "${UBOOT_ENTRYSYMBOL}"; then
445 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ 463 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
446 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` 464 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
447 fi 465 fi
448 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then 466
449 ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin 467 uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
450 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 468 rm -f linux.bin
451 rm -f linux.bin
452 else
453 ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
454 rm -f linux.bin.gz
455 gzip -9 linux.bin
456 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
457 rm -f linux.bin.gz
458 fi
459 fi 469 fi
460 fi 470 fi
461} 471}