Refer config file when trigger can't find device path 69/166169/1
authorKichan Kwon <k_c.kwon@samsung.com>
Mon, 8 Jan 2018 11:00:37 +0000 (20:00 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Mon, 8 Jan 2018 11:02:58 +0000 (20:02 +0900)
Change-Id: Idd5b34c0682dd34c53c18f8bb4dd5b2399e873fc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
scripts/upgrade-trigger.sh

index eb5ae09..f9c700d 100755 (executable)
@@ -29,14 +29,14 @@ flash_pre_image() {
                        DEV_NUM=$(/sbin/partx -s $EMMC_DEVICE | grep $PART_NAME_L | \
                                        { read NUM REST; echo $NUM; })
                        if [ -z "$DEV_NUM" ]; then
-                               DEV_NUM=$(/sbin/blkid -L $PART_NAME_L -o device | \
+                               DEV_NUM=$(/sbin/blkid -L $PART_NAME_L -o device | grep $EMMC_DEVICE | \
                                                sed 's/\/dev\/mmcblk0p//')
                        fi
                        if [ -z "$DEV_NUM" ]; then
-                               echo "There is no partition for $PART_NAME"
-                               continue
+                               DEV=${DEV}
+                       else
+                               DEV="${EMMC_DEVICE}p${DEV_NUM}"
                        fi
-                       DEV="${EMMC_DEVICE}p${DEV_NUM}"
 
                        echo "Flashing $DELTA_NAME..."
                        dd if="$FOTA_DIR/$DELTA_NAME" of="$DEV" bs=1024