scripts/image: restore old functionality

This commit is contained in:
Lukas Rusak 2017-11-11 11:53:38 -08:00
parent 72db171801
commit 50c0a1d4bb
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -268,13 +268,23 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]
# remove n previous created release image
rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz
if [ "$BOOTLOADER" = "u-boot" ]; then
if [ -n "$BOOTLOADER" ]; then
BOOTLOADER_DIR="$(get_pkg_directory "$BOOTLOADER")"
if [ -d $BOOTLOADER_DIR/files ]; then
cp -R $BOOTLOADER_DIR/files/* $RELEASE_DIR
fi
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release ]; then
echo "Running $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release"
. $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release
elif [ -f $PROJECT_DIR/$PROJECT/bootloader/release ]; then
echo "Running $PROJECT_DIR/$PROJECT/bootloader/release"
. $PROJECT_DIR/$PROJECT/bootloader/release
elif [ -f $BOOTLOADER_DIR/release ]; then
echo "Running $BOOTLOADER_DIR/release"
. $BOOTLOADER_DIR/release
fi
fi