diff options
| -rw-r--r-- | meta/classes/kernel.bbclass | 40 |
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" | |||
| 437 | MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" | 437 | MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" |
| 438 | MODULE_TARBALL_DEPLOY ?= "1" | 438 | MODULE_TARBALL_DEPLOY ?= "1" |
| 439 | 439 | ||
| 440 | uboot_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 | |||
| 440 | do_uboot_mkimage() { | 462 | do_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 |
