blob: 345e7f5f3b4f881d6bddbb11fb056f3f97878be1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001uboot_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}