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