diff options
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 @@ | |||
| 1 | uboot_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 | } | ||
