Prep script can handle mmcblk type devices #56
This commit is contained in:
parent
f9a5439177
commit
d301ebf72b
|
@ -58,6 +58,8 @@ DOWNLOAD_LINK1="https://rcn-ee.com/rootfs/bb.org/testing/2015-07-12/console/$DEB
|
||||||
|
|
||||||
ROOTFS='bbb'
|
ROOTFS='bbb'
|
||||||
|
|
||||||
|
PARTITION_NUMBER=1
|
||||||
|
|
||||||
function show_help {
|
function show_help {
|
||||||
echo ''
|
echo ''
|
||||||
echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address] --mount [mount directory]'
|
echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address] --mount [mount directory]'
|
||||||
|
@ -143,14 +145,22 @@ if [ ! $MICROSD_DRIVE ]; then
|
||||||
echo ''
|
echo ''
|
||||||
echo ' ls /dev/sd*'
|
echo ' ls /dev/sd*'
|
||||||
echo ''
|
echo ''
|
||||||
|
echo 'or'
|
||||||
|
echo ''
|
||||||
|
echo ' ls /dev/mmcblk*'
|
||||||
|
echo ''
|
||||||
echo 'Then plugging the microSD back in and entering the same command again'
|
echo 'Then plugging the microSD back in and entering the same command again'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then
|
||||||
|
if [ -b ${MICROSD_DRIVE}p${PARTITION_NUMBER} ]; then
|
||||||
|
PARTITION_NUMBER=p${PARTITION_NUMBER}
|
||||||
|
else
|
||||||
echo "The microSD drive could not be found at ${MICROSD_DRIVE}1"
|
echo "The microSD drive could not be found at ${MICROSD_DRIVE}1"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SUDO=
|
SUDO=
|
||||||
if [ -f /usr/bin/sudo ]; then
|
if [ -f /usr/bin/sudo ]; then
|
||||||
|
@ -186,15 +196,15 @@ if [ -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then
|
||||||
$SUDO rm $MICROSD_MOUNT_POINT/$ROOTFS
|
$SUDO rm $MICROSD_MOUNT_POINT/$ROOTFS
|
||||||
fi
|
fi
|
||||||
$SUDO mkdir -p $MICROSD_MOUNT_POINT/$ROOTFS
|
$SUDO mkdir -p $MICROSD_MOUNT_POINT/$ROOTFS
|
||||||
$SUDO mount ${MICROSD_DRIVE}1 $MICROSD_MOUNT_POINT/$ROOTFS
|
$SUDO mount ${MICROSD_DRIVE}${PARTITION_NUMBER} $MICROSD_MOUNT_POINT/$ROOTFS
|
||||||
sync
|
sync
|
||||||
|
|
||||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then
|
||||||
echo ''
|
echo ''
|
||||||
echo "The microSD drive could not be found at ${MICROSD_DRIVE}1"
|
echo "The microSD drive could not be found at ${MICROSD_DRIVE}${PARTITION_NUMBER}"
|
||||||
read -p "Wait for the drive to mount then press any key... " -n1 -s
|
read -p "Wait for the drive to mount then press any key... " -n1 -s
|
||||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then
|
||||||
echo "microSD drive not found at ${MICROSD_DRIVE}1"
|
echo "microSD drive not found at ${MICROSD_DRIVE}${PARTITION_NUMBER}"
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue