summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-05-14 14:31:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 10:57:51 +0100
commitbb68c7c9f05a6c2f0a8e724caefb843870d4100c (patch)
tree0265f77415990715358b5185217bcd8efeaaec0e /meta
parent7f131b88631223df342148e54811a2b125b73819 (diff)
downloadpoky-bb68c7c9f05a6c2f0a8e724caefb843870d4100c.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. (From OE-Core rev: 2d1f700ad098c942834524891ccc90e3a391a09f) 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-uboot.bbclass21
-rw-r--r--meta/classes/kernel-uimage.bbclass24
2 files changed, 23 insertions, 22 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 @@
1uboot_prep_kimage() {
2 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
3 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
4 linux_suffix=""
5 linux_comp="none"
6 else
7 vmlinux_path="vmlinux"
8 linux_suffix=".gz"
9 linux_comp="gzip"
10 fi
11
12 ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
13
14 if [ "${linux_comp}" != "none" ] ; then
15 rm -f linux.bin
16 gzip -9 linux.bin
17 mv -f "linux.bin${linux_suffix}" linux.bin
18 fi
19
20 echo "${linux_comp}"
21}
diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index 8a3efc6835..ce8f96f65b 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -1,3 +1,5 @@
1inherit kernel-uboot
2
1python __anonymous () { 3python __anonymous () {
2 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) 4 kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
3 if kerneltype == 'uImage': 5 if kerneltype == 'uImage':
@@ -6,28 +8,6 @@ python __anonymous () {
6 d.setVar("DEPENDS", depends) 8 d.setVar("DEPENDS", depends)
7} 9}
8 10
9uboot_prep_kimage() {
10 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then
11 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
12 linux_suffix=""
13 linux_comp="none"
14 else
15 vmlinux_path="vmlinux"
16 linux_suffix=".gz"
17 linux_comp="gzip"
18 fi
19
20 ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
21
22 if [ "${linux_comp}" != "none" ] ; then
23 rm -f linux.bin
24 gzip -9 linux.bin
25 mv -f "linux.bin${linux_suffix}" linux.bin
26 fi
27
28 echo "${linux_comp}"
29}
30
31do_uboot_mkimage() { 11do_uboot_mkimage() {
32 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 12 if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
33 if test "x${KEEPUIMAGE}" != "xyes" ; then 13 if test "x${KEEPUIMAGE}" != "xyes" ; then