kernel-uboot.bbclass 654 B

1234567891011121314151617181920212223242526
  1. uboot_prep_kimage() {
  2. if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
  3. vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
  4. linux_suffix=""
  5. linux_comp="none"
  6. elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then
  7. rm -f linux.bin
  8. cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin
  9. vmlinux_path=""
  10. linux_suffix=""
  11. linux_comp="none"
  12. else
  13. vmlinux_path="vmlinux"
  14. linux_suffix=".gz"
  15. linux_comp="gzip"
  16. fi
  17. [ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
  18. if [ "${linux_comp}" != "none" ] ; then
  19. gzip -9 linux.bin
  20. mv -f "linux.bin${linux_suffix}" linux.bin
  21. fi
  22. echo "${linux_comp}"
  23. }