Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | gzip -9 linux.bin |
| 16 | mv -f "linux.bin${linux_suffix}" linux.bin |
| 17 | fi |
| 18 | |
| 19 | echo "${linux_comp}" |
| 20 | } |