From 50c0a1d4bb57afb2fdaf677bd5bdc5a4ec475b34 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Sat, 11 Nov 2017 11:53:38 -0800 Subject: [PATCH] scripts/image: restore old functionality --- scripts/image | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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