if [ $part_idx -ne $PART_TABLE_COL ];then
local -r num=${PART_TABLE[${part_idx} * ${PART_TABLE_ROW} + 1]}
- local -r device=/dev/`lsblk ${DEVICE} -o KNAME | grep -G "[a-z]${num}\$"`
+ if [ "${num}" == "" ]; then
+ local -r blktype=disk
+ else
+ local -r blktype=part
+ fi
+ local -r device=/dev/`lsblk ${DEVICE} -o TYPE,KNAME | grep ${blktype} | awk '{ print $2 }' | grep -G "[a-z]${num}\$"`
local -r bs=${PART_TABLE[${part_idx} * ${PART_TABLE_ROW} + 2]}
else
echo "Not supported binary: $fusing_img"
__EOF__
fi
- local -r PART1=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]1\$"`
+ local -r PART1=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]1\$"`
mkfs.vfat -F 16 ${PART1} -n $BOOT
- local -r PART2=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]2\$"`
+ local -r PART2=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]2\$"`
mkfs.ext4 -q ${PART2} -L $ROOTFS -F
- local -r PART3=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]3\$"`
+ local -r PART3=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]3\$"`
mkfs.ext4 -q ${PART3} -L $SYSTEMDATA -F
- local -r PART5=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]5\$"`
+ local -r PART5=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]5\$"`
mkfs.ext4 -q ${PART5} -L $USER -F
- local -r PART6=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]6\$"`
+ local -r PART6=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]6\$"`
mkfs.ext4 -q ${PART6} -L $MODULE -F
- local -r PART7=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]7\$"`
+ local -r PART7=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]7\$"`
mkfs.ext4 -q ${PART7} -L $RAMDISK -F
- local -r PART8=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]8\$"`
+ local -r PART8=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]8\$"`
mkfs.ext4 -q ${PART8} -L $RAMDISK_RECOVERY -F
- local -r PART9=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]9\$"`
+ local -r PART9=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]9\$"`
mkfs.ext4 -q ${PART9} -L $INFORM -F
- local -r PART10=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]10\$"`
+ local -r PART10=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]10\$"`
mkfs.ext4 -q ${PART10} -L $HAL -F
- local -r PART11=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]11\$"`
+ local -r PART11=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]11\$"`
mkfs.ext4 -q ${PART11} -L $RESERVED2 -F
# create "reboot-param.bin" file in inform partition for passing reboot parameter
function print_logo () {
echo ""
- echo "Raspberry Pi downloader, version 2.0.0"
+ echo "Raspberry Pi downloader, version 2.0.1"
echo ""
}
if [ $part_idx -ne $PART_TABLE_ROW ];then
local -r num=${PART_TABLE[${part_idx} * ${PART_TABLE_COL} + 1]}
- local -r device=/dev/`lsblk ${DEVICE} -o KNAME | grep -G "[a-z]${num}\$"`
+ if [ "${num}" == "" ]; then
+ local -r blktype=disk
+ else
+ local -r blktype=part
+ fi
+ local -r device=/dev/`lsblk ${DEVICE} -o TYPE,KNAME | grep ${blktype} | awk '{ print $2 }' | grep -G "[a-z]${num}\$"`
local -r seek=${PART_TABLE[${part_idx} * ${PART_TABLE_COL} + 2]}
local -r bs=${PART_TABLE[${part_idx} * ${PART_TABLE_COL} + 3]}
else
__EOF__
fi
- local -r PART1=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]1\$"`
+ local -r PART1=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]1\$"`
mkfs.vfat -F 16 ${PART1} -n $BOOT
- local -r PART2=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]2\$"`
+ local -r PART2=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]2\$"`
mkfs.ext4 -q ${PART2} -L $ROOTFS -F
- local -r PART3=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]3\$"`
+ local -r PART3=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]3\$"`
mkfs.ext4 -q ${PART3} -L $SYSTEMDATA -F
- local -r PART5=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]5\$"`
+ local -r PART5=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]5\$"`
mkfs.ext4 -q ${PART5} -L $USER -F
- local -r PART6=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]6\$"`
+ local -r PART6=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]6\$"`
mkfs.ext4 -q ${PART6} -L $MODULE -F
- local -r PART7=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]7\$"`
+ local -r PART7=/dev/`lsblk ${DISK} -o TYPE,KNAME | grep part | awk '{ print $2 }' | grep -G "[a-z]7\$"`
mkfs.ext4 -q ${PART7} -L $RAMDISK -F
}
function print_logo () {
echo ""
- echo "[Odroid-XU3/4 downloader version 1.4.0]"
+ echo "[Odroid-XU3/4 downloader version 1.4.1]"
echo "This version also supports Tizen 4.0."
echo ""
}