diff --git a/scripts/image b/scripts/image index 30a1dc4673..24cf126c92 100755 --- a/scripts/image +++ b/scripts/image @@ -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