xref: /OK3568_Linux_fs/buildroot/board/beaglev/post-build.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2BOARD_DIR=$(dirname $0)
3
4# Bring the extlinux.conf file in.
5install -D -m 0644 ${BOARD_DIR}/extlinux.conf \
6	${TARGET_DIR}/boot/extlinux/extlinux.conf
7
8# To be reflashed through Xmodem, the bootloader needs to be prepended
9# with a 4-byte header that contains the total size of the file.
10perl -e 'print pack("l", (stat @ARGV[0])[7])' ${BINARIES_DIR}/fw_payload.bin > ${BINARIES_DIR}/fw_payload.bin.out
11cat ${BINARIES_DIR}/fw_payload.bin >> ${BINARIES_DIR}/fw_payload.bin.out
12