summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-05-14 14:31:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 10:57:51 +0100
commit12f983b66ac00525745d7ad0fb11cba77c431fad (patch)
tree7a20559b363add8d12faa44a35a61d7cbb8cfa1e /meta
parent88d79fee807a763641672ec6d8dce54adb481789 (diff)
downloadpoky-12f983b66ac00525745d7ad0fb11cba77c431fad.tar.gz
kernel: Pull out the linux.bin generation
Pull the generation of linux.bin image, which is then packed into uImage, into a separate function. No functional change. (From OE-Core rev: 2879e5423aff8df5731712b853d71a73047a2fd7) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass40
1 files changed, 23 insertions, 17 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ca1426cd88..ba4bc607b0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -437,26 +437,32 @@ MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz"
437MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" 437MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
438MODULE_TARBALL_DEPLOY ?= "1" 438MODULE_TARBALL_DEPLOY ?= "1"
439 439
440uboot_prep_kimage() {
441 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
442 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
443 linux_suffix=""
444 linux_comp="none"
445 else
446 vmlinux_path="vmlinux"
447 linux_suffix=".gz"
448 linux_comp="gzip"
449 fi
450
451 ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
452
453 if [ "${linux_comp}" != "none" ] ; then
454 rm -f linux.bin
455 gzip -9 linux.bin
456 mv -f "linux.bin${linux_suffix}" linux.bin
457 fi
458
459 echo "${linux_comp}"
460}
461
440do_uboot_mkimage() { 462do_uboot_mkimage() {
441 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 463 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
442 if test "x${KEEPUIMAGE}" != "xyes" ; then 464 if test "x${KEEPUIMAGE}" != "xyes" ; then
443 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then 465 uboot_prep_kimage
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 466
461 ENTRYPOINT=${UBOOT_ENTRYPOINT} 467 ENTRYPOINT=${UBOOT_ENTRYPOINT}
462 if test -n "${UBOOT_ENTRYSYMBOL}"; then 468 if test -n "${UBOOT_ENTRYSYMBOL}"; then