post-image.sh 827 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. BOARD_DIR="$(dirname $0)"
  3. GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
  4. GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
  5. cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
  6. # The bl1.bin.hardkernel file provided by the uboot hardkernel repository is overwritten
  7. # by the bl2.bin.hardkernel in the sd_fusing.sh script because it is too big.
  8. # In order to implement this in genimage, we need to truncate the bl1.bin file
  9. # so that it does not exceed the available place.
  10. # An issue has been filled about this: https://github.com/hardkernel/u-boot/issues/45
  11. truncate -s 15360 ${BINARIES_DIR}/bl1.bin.hardkernel
  12. rm -rf "${GENIMAGE_TMP}"
  13. genimage \
  14. --rootpath "${TARGET_DIR}" \
  15. --tmppath "${GENIMAGE_TMP}" \
  16. --inputpath "${BINARIES_DIR}" \
  17. --outputpath "${BINARIES_DIR}" \
  18. --config "${GENIMAGE_CFG}"