diff options
author | Marek Vasut <marex@denx.de> | 2015-05-14 14:31:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-26 10:57:41 +0100 |
commit | 2d1f700ad098c942834524891ccc90e3a391a09f (patch) | |
tree | 8626d9ffa6276f7cc3e3d40f9b9e18c84dbbda7a /meta/classes/kernel-uboot.bbclass | |
parent | 086536ac84fcc9350802c09166f600becd52a1f8 (diff) | |
download | openembedded-core-contrib-2d1f700ad098c942834524891ccc90e3a391a09f.tar.gz |
kernel: Separate out uboot_prep_kimage
Separate the function which prepares the kernel for packing into
uImage into separate class, so this function can be reused by the
fitImage class.
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/classes/kernel-uboot.bbclass')
-rw-r--r-- | meta/classes/kernel-uboot.bbclass | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass new file mode 100644 index 0000000000..8ab30b8649 --- /dev/null +++ b/meta/classes/kernel-uboot.bbclass @@ -0,0 +1,21 @@ +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}" +} |