Files
domo/projects/rpi_minimal/post-build.sh
NADAL Jean-Baptiste 36af1b0874 Add toolchain rules
2019-10-25 18:35:14 +02:00

30 lines
682 B
Bash
Executable File

#!/bin/bash
# Catch Postbuild Error
function error {
echo "Postbuild Failed."
exit 1;
}
set -e
trap error ERR
echo "==> POSTBUILD:"
echo "BR_STAGING: ${BR_STAGING}"
echo "BR_PROJECT: " ${BR_PROJECT}
cp -a ${BR_PROJECT}/configs/config.txt ${BR_STAGING}/buildroot/images/
if [ ! -f ${AW_STAGING}/buildroot/images/data.ext2 ];
then
echo "generate data image (10M)."
dd if=/dev/zero of=${BR_STAGING}/buildroot/images/data.ext2 bs=1k count=10000
${BR_STAGING}/cross/usr/sbin/mkfs.ext2 -i 1024 -b 1024 -F ${BR_STAGING}/buildroot/images/data.ext2
fi
cp -a ${BR_STAGING}/buildroot/images/uboot-env.bin ${BR_STAGING}/buildroot/images/uboot.env
make -C ${BR_PROJECT} dtb