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