From eeb8134247ba00047aacde30c2add31c6db907c5 Mon Sep 17 00:00:00 2001 From: joeman155 Date: Mon, 17 Feb 2014 16:33:34 +1000 Subject: [PATCH] Update to install_kernel.sh This allows me to use loop devices for installing my kernel. I did however in addition to running losetup, run partx to create the device files for the partitions. --- tools/install_kernel.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/install_kernel.sh b/tools/install_kernel.sh index e26f2ede7..1aaf252e0 100755 --- a/tools/install_kernel.sh +++ b/tools/install_kernel.sh @@ -150,10 +150,10 @@ mmc_unmount () { mmc_detect_n_mount () { echo "Starting Partition Search" echo "-----------------------------" - num_partitions=$(LC_ALL=C sudo fdisk -l 2>/dev/null | grep "^${MMC}" | grep -v "DM6" | grep -v "Extended" | grep -v "swap" | wc -l) + num_partitions=$(LC_ALL=C sudo fdisk ${MMC} -l 2>/dev/null | grep "^${MMC}" | grep -v "DM6" | grep -v "Extended" | grep -v "swap" | wc -l) i=0 ; while test $i -le ${num_partitions} ; do - partition=$(LC_ALL=C sudo fdisk -l 2>/dev/null | grep "^${MMC}" | grep -v "DM6" | grep -v "Extended" | grep -v "swap" | head -${i} | tail -1 | awk '{print $1}') + partition=$(LC_ALL=C sudo fdisk ${MMC} -l 2>/dev/null | grep "^${MMC}" | grep -v "DM6" | grep -v "Extended" | grep -v "swap" | head -${i} | tail -1 | awk '{print $1}') if [ ! "x${partition}" = "x" ] ; then echo "Trying: [${partition}]" @@ -214,7 +214,7 @@ list_mmc () { } check_mmc () { - FDISK=$(LC_ALL=C sudo fdisk -l 2>/dev/null | grep "Disk ${MMC}" | awk '{print $2}') + FDISK=$(LC_ALL=C sudo fdisk ${MMC} -l 2>/dev/null | grep "Disk ${MMC}" | awk '{print $2}') if [ "x${FDISK}" = "x${MMC}:" ] ; then echo ""