summaryrefslogtreecommitdiff
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:40 +0100
commit2879e5423aff8df5731712b853d71a73047a2fd7 (patch)
tree42d050345d62e75dafddcf29075ffbb457e5176e
parent63e3816b161f8659850d6123a53bdf128780e13d (diff)
downloadopenembedded-core-2879e5423aff8df5731712b853d71a73047a2fd7.tar.gz
openembedded-core-2879e5423aff8df5731712b853d71a73047a2fd7.tar.bz2
openembedded-core-2879e5423aff8df5731712b853d71a73047a2fd7.zip
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. 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>
-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"
MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz"
MODULE_TARBALL_DEPLOY ?= "1"
+uboot_prep_kimage() {
+ if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
+ vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
+ linux_suffix=""
+ linux_comp="none"
+ else
+ vmlinux_path="vmlinux"
+ linux_suffix=".gz"
+ linux_comp="gzip"
+ fi
+
+ ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
+
+ if [ "${linux_comp}" != "none" ] ; then
+ rm -f linux.bin
+ gzip -9 linux.bin
+ mv -f "linux.bin${linux_suffix}" linux.bin
+ fi
+
+ echo "${linux_comp}"
+}
+
do_uboot_mkimage() {
if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
if test "x${KEEPUIMAGE}" != "xyes" ; then
- if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
- vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
- linux_suffix=""
- linux_comp="none"
- else
- vmlinux_path="vmlinux"
- linux_suffix=".gz"
- linux_comp="gzip"
- fi
-
- ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
-
- if [ "${linux_comp}" != "none" ] ; then
- rm -f linux.bin
- gzip -9 linux.bin
- mv -f "linux.bin${linux_suffix}" linux.bin
- fi
+ uboot_prep_kimage
ENTRYPOINT=${UBOOT_ENTRYPOINT}
if test -n "${UBOOT_ENTRYSYMBOL}"; then