|
@@ -65,24 +65,25 @@ if [[ $NO_OF_ARGS == 0 ]]; then
|
65
|
65
|
exit 0
|
66
|
66
|
fi
|
67
|
67
|
|
68
|
|
-if [ ! -d $MICROSD_MOUNT_POINT ]; then
|
69
|
|
- if [ -d /media ]; then
|
70
|
|
- # different directories for Debian
|
71
|
|
- if [ -d /media/usb1 ]; then
|
72
|
|
- MICROSD_MOUNT_POINT=/media
|
73
|
|
- ROOTFS=usb1
|
74
|
|
- fi
|
75
|
|
- if [ -d /media/usb0 ]; then
|
76
|
|
- MICROSD_MOUNT_POINT=/media
|
77
|
|
- BOOT=usb0
|
78
|
|
- fi
|
|
68
|
+if [ -d /media ]; then
|
|
69
|
+ # different directories for Debian
|
|
70
|
+ if [ -d /media/usb1 ]; then
|
|
71
|
+ MICROSD_MOUNT_POINT=/media
|
|
72
|
+ ROOTFS=usb1
|
79
|
73
|
fi
|
80
|
|
- if [ ! -d $MICROSD_MOUNT_POINT ]; then
|
81
|
|
- echo "The mount directory $MICROSD_MOUNT_POINT does not exist."
|
82
|
|
- echo 'Use the --mount option to specify where the microSD gets mounted to.'
|
83
|
|
- exit 67563
|
|
74
|
+ if [ -d /media/usb0 ]; then
|
|
75
|
+ MICROSD_MOUNT_POINT=/media
|
|
76
|
+ BOOT=usb0
|
84
|
77
|
fi
|
85
|
78
|
fi
|
|
79
|
+if [ ! -d $MICROSD_MOUNT_POINT ]; then
|
|
80
|
+ echo "The mount directory $MICROSD_MOUNT_POINT does not exist."
|
|
81
|
+ echo 'Use the --mount option to specify where the microSD gets mounted to.'
|
|
82
|
+ exit 67563
|
|
83
|
+fi
|
|
84
|
+
|
|
85
|
+echo "MICROSD_MOUNT_POINT=$MICROSD_MOUNT_POINT"
|
|
86
|
+echo "BOOT=$BOOT"
|
86
|
87
|
|
87
|
88
|
while [[ $# > 1 ]]
|
88
|
89
|
do
|
|
@@ -174,6 +175,7 @@ SUDO=
|
174
|
175
|
if [ -f /usr/bin/sudo ]; then
|
175
|
176
|
SUDO='sudo'
|
176
|
177
|
fi
|
|
178
|
+$SUDO apt-get install u-boot-tools dosfstools git-core kpartx wget parted
|
177
|
179
|
$SUDO ./setup_sdcard.sh --mmc $MICROSD_DRIVE --dtb beaglebone
|
178
|
180
|
|
179
|
181
|
echo ''
|
|
@@ -214,7 +216,7 @@ fi
|
214
|
216
|
$SUDO cp $MICROSD_MOUNT_POINT/$BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/$BOOT/uEnv.txt
|
215
|
217
|
|
216
|
218
|
$SUDO sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
217
|
|
-$SUDO sed -i '/iface eth0 inet static/a\ dns-nameservers 213.73.91.35 85.214.20.141' $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
|
219
|
+$SUDO sed -i "/iface eth0 inet static/a\ dns-nameservers $NAMESERVER1 $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
218
|
220
|
$SUDO sed -i "/iface eth0 inet static/a\ gateway $ROUTER_IP_ADDRESS" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
219
|
221
|
$SUDO sed -i '/iface eth0 inet static/a\ netmask 255.255.255.0' $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
220
|
222
|
$SUDO sed -i "/iface eth0 inet static/a\ address $BBB_FIXED_IP_ADDRESS" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|