Merge pull request #2205 from lrusak/bootloader-fix

scripts/image: restore old functionality
This commit is contained in:
MilhouseVH 2017-11-11 20:02:03 +00:00 committed by GitHub
commit 037c9ffd41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,13 +268,23 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ]
# remove n previous created release image # remove n previous created release image
rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz 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 if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release ]; then
echo "Running $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release" echo "Running $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release"
. $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release . $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release
elif [ -f $PROJECT_DIR/$PROJECT/bootloader/release ]; then elif [ -f $PROJECT_DIR/$PROJECT/bootloader/release ]; then
echo "Running $PROJECT_DIR/$PROJECT/bootloader/release" echo "Running $PROJECT_DIR/$PROJECT/bootloader/release"
. $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
fi fi