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'
|
||||
|
||||
PARTITION_NUMBER=1
|
||||
|
||||
function show_help {
|
||||
echo ''
|
||||
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 ' ls /dev/sd*'
|
||||
echo ''
|
||||
echo 'or'
|
||||
echo ''
|
||||
echo ' ls /dev/mmcblk*'
|
||||
echo ''
|
||||
echo 'Then plugging the microSD back in and entering the same command again'
|
||||
exit 1
|
||||
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"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
SUDO=
|
||||
if [ -f /usr/bin/sudo ]; then
|
||||
|
@ -186,15 +196,15 @@ if [ -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then
|
|||
$SUDO rm $MICROSD_MOUNT_POINT/$ROOTFS
|
||||
fi
|
||||
$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
|
||||
|
||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
||||
if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then
|
||||
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
|
||||
if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
||||
echo "microSD drive not found at ${MICROSD_DRIVE}1"
|
||||
if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then
|
||||
echo "microSD drive not found at ${MICROSD_DRIVE}${PARTITION_NUMBER}"
|
||||
exit 5
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue