Browse Source

Image target for the Beaglebone Black Wireless

Bob Mottram 8 years ago
parent
commit
d8d8ba5b0f

+ 5
- 5
doc/EN/beaglebone.org View File

16
 </center>
16
 </center>
17
 #+END_EXPORT
17
 #+END_EXPORT
18
 
18
 
19
-The Beaglebone Black is small, cheap, a fully open hardware design, has a hardware random number generator and consumes very little electrical power, making it suitable for all kinds of uses.
19
+The Beaglebone Black is small, cheap, a fully open hardware design, has a hardware random number generator and consumes very little electrical power, making it suitable for all kinds of uses. There is also a wireless version.
20
 
20
 
21
 You can easily use one to run your own internet services from home.
21
 You can easily use one to run your own internet services from home.
22
 
22
 
28
 
28
 
29
  * A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.
29
  * A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.
30
  * Optionally a plastic or metal case to protect the electronics.
30
  * Optionally a plastic or metal case to protect the electronics.
31
- * An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do.
31
+ * An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do. If you're using the Wireless version of the Beaglebone Black then you don't need this.
32
  * Either a 5v power supply with 5.5mm barrel plug, or a miniUSB type B cable (typically supplied with the Beaglebone) and USB to mains adaptor.
32
  * Either a 5v power supply with 5.5mm barrel plug, or a miniUSB type B cable (typically supplied with the Beaglebone) and USB to mains adaptor.
33
  * A microSD card at least 8 gigabytes in size. In tests Sandisk class 10 works well. Prefer smaller but faster I/O rating to larger but slower.
33
  * A microSD card at least 8 gigabytes in size. In tests Sandisk class 10 works well. Prefer smaller but faster I/O rating to larger but slower.
34
  * A microSD card adaptor for your laptop or desktop system, so that you can copy the disk image to the card.
34
  * A microSD card adaptor for your laptop or desktop system, so that you can copy the disk image to the card.
73
 
73
 
74
 Onion addresses have the advantage of being difficult to censor and you don't need to buy a domain or have a dynamic DNS account. An onion based system also means you don't need to think about NAT traversal type issues.
74
 Onion addresses have the advantage of being difficult to censor and you don't need to buy a domain or have a dynamic DNS account. An onion based system also means you don't need to think about NAT traversal type issues.
75
 
75
 
76
-Connect the power and ethernet cable and plug it into your internet router.
77
-
78
 #+BEGIN_CENTER
76
 #+BEGIN_CENTER
79
 [[file:images/bbb_back.jpg]]
77
 [[file:images/bbb_back.jpg]]
80
 #+END_CENTER
78
 #+END_CENTER
85
 [[file:images/bbb_front.jpg]]
83
 [[file:images/bbb_front.jpg]]
86
 #+END_CENTER
84
 #+END_CENTER
87
 
85
 
86
+Connect the power and for the non-wireless versions of the Beaglebone Black also connect the ethernet cable and plug it into your internet router.
87
+
88
 Now power cycle by removing the power plug and then inserting it again. It should boot from the microSD drive and you should see the blue LEDs on the board flashing. If they don't fash at all for a few minutes then try copying the image to the microSD card again.
88
 Now power cycle by removing the power plug and then inserting it again. It should boot from the microSD drive and you should see the blue LEDs on the board flashing. If they don't fash at all for a few minutes then try copying the image to the microSD card again.
89
 
89
 
90
-Follow the rest of the [[./homeserver.html][instructions given here]] to log in via ssh and install the system. The microSD drive /should remain inside the Beaglebone/ and not be removed. This will be its main drive, with the internal EMMC not being used at all.
90
+Follow the rest of the [[./homeserver.html][instructions given here]] to log in via ssh and install the system. The microSD drive /should remain inside the Beaglebone/ and not be removed. This will be its main drive, with the internal EMMC not being used at all. For the Beaglebone Black Wireless ssh back in on the usual 192.168.7.2 address with the USB cable connected so that your wifi login parameters can be set.
91
 
91
 
92
 There are many apps available within the Freedombone system and trying to install them all is probably not a good idea, since this hardware is very resource constrained on CPU and especially on RAM. If the system seems to be becoming unstable and crashing then the most likely cause is running out of RAM, in which case you can try uninstalling some apps. It is possible to monitor RAM usage by logging in with ssh, exiting to the command line and then running the /top/ command.
92
 There are many apps available within the Freedombone system and trying to install them all is probably not a good idea, since this hardware is very resource constrained on CPU and especially on RAM. If the system seems to be becoming unstable and crashing then the most likely cause is running out of RAM, in which case you can try uninstalling some apps. It is possible to monitor RAM usage by logging in with ssh, exiting to the command line and then running the /top/ command.

BIN
man/freedombone.1.gz View File


+ 27
- 1
src/freedombone-image-customise View File

174
 }
174
 }
175
 
175
 
176
 configure_networking() {
176
 configure_networking() {
177
+    if [[ "$MACHINE" == "beaglebonewifi" ]]; then
178
+        # Allow networking over USB in order to configure the
179
+        # wifi login settings
180
+        echo 'auto lo' > $rootdir/etc/network/interfaces
181
+        echo 'iface lo inet loopback' >> $rootdir/etc/network/interfaces
182
+        echo '' >> $rootdir/etc/network/interfaces
183
+        echo 'iface usb0 inet static' >> $rootdir/etc/network/interfaces
184
+        echo '    address 192.168.7.2' >> $rootdir/etc/network/interfaces
185
+        echo '    netmask 255.255.255.252' >> $rootdir/etc/network/interfaces
186
+        echo '    network 192.168.7.0' >> $rootdir/etc/network/interfaces
187
+        echo '    gateway 192.168.7.1' >> $rootdir/etc/network/interfaces
188
+        return
189
+    fi
190
+
177
     if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
191
     if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
178
         return
192
         return
179
     fi
193
     fi
459
 }
473
 }
460
 
474
 
461
 atheros_wifi() {
475
 atheros_wifi() {
476
+    if [[ "$MACHINE" == "beaglebonewifi" ]]; then
477
+        return
478
+    fi
479
+
462
     firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
480
     firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
463
     firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
481
     firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
464
 
482
 
1036
 
1054
 
1037
 # Set up HRNG for systems known to have one
1055
 # Set up HRNG for systems known to have one
1038
 # Otherwise install haveged
1056
 # Otherwise install haveged
1039
-if [[ "$MACHINE" != "beaglebone" ]]; then
1057
+if [[ "$MACHINE" != "beaglebone"* ]]; then
1040
     chroot $rootdir apt-get -yq install haveged
1058
     chroot $rootdir apt-get -yq install haveged
1041
 else
1059
 else
1042
     chroot $rootdir apt-get -yq install rng-tools
1060
     chroot $rootdir apt-get -yq install rng-tools
1043
     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' $rootdir/etc/default/rng-tools
1061
     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' $rootdir/etc/default/rng-tools
1062
+
1044
 fi
1063
 fi
1045
 
1064
 
1046
 # copy u-boot to beginning of image
1065
 # copy u-boot to beginning of image
1051
         dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
1070
         dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
1052
            count=2 seek=1 conv=notrunc bs=384k
1071
            count=2 seek=1 conv=notrunc bs=384k
1053
         ;;
1072
         ;;
1073
+    beaglebonewifi)
1074
+        touch $rootdir/root/.wifi-only
1075
+        dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/MLO of="$image" \
1076
+           count=1 seek=1 conv=notrunc bs=128k
1077
+        dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
1078
+           count=2 seek=1 conv=notrunc bs=384k
1079
+        ;;
1054
     cubieboard2)
1080
     cubieboard2)
1055
         dd if=$rootdir/usr/lib/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin of="$image" \
1081
         dd if=$rootdir/usr/lib/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin of="$image" \
1056
            seek=8 conv=notrunc bs=1k
1082
            seek=8 conv=notrunc bs=1k

+ 11
- 4
src/freedombone-image-hardware-setup View File

190
     echo "rtc_sunxi" >> /etc/initramfs-tools/modules
190
     echo "rtc_sunxi" >> /etc/initramfs-tools/modules
191
 }
191
 }
192
 
192
 
193
+function generic_beaglebone_steup {
194
+    beaglebone_setup_boot
195
+    beaglebone_flash
196
+    beaglebone_repack_kernel
197
+    enable_serial_console ttyO0
198
+}
199
+
193
 case "$MACHINE" in
200
 case "$MACHINE" in
194
     beaglebone)
201
     beaglebone)
195
-        beaglebone_setup_boot
196
-        beaglebone_flash
197
-        beaglebone_repack_kernel
198
-        enable_serial_console ttyO0
202
+        generic_beaglebone_steup
203
+        ;;
204
+    beaglebonewifi)
205
+        generic_beaglebone_steup
199
         ;;
206
         ;;
200
     cubietruck)
207
     cubietruck)
201
         a20_setup_boot sun7i-a20-cubietruck.dtb
208
         a20_setup_boot sun7i-a20-cubietruck.dtb

+ 13
- 0
src/freedombone-image-make View File

117
  --roottype btrfs \
117
  --roottype btrfs \
118
 "
118
 "
119
         ;;
119
         ;;
120
+    beaglebonewifi)
121
+        extra_pkgs="$beaglebone_pkgs"
122
+        extra_opts="\
123
+ --variant minbase \
124
+ --bootoffset=2mib \
125
+ --bootsize 128M \
126
+ --boottype ext2 \
127
+ --no-kernel \
128
+ --no-extlinux \
129
+ --foreign /usr/bin/qemu-arm-static \
130
+ --roottype btrfs \
131
+"
132
+        ;;
120
     cubietruck | a20-olinuxino-lime | a20-olinuxino-lime2 | a20-olinuxino-micro | cubieboard2)
133
     cubietruck | a20-olinuxino-lime | a20-olinuxino-lime2 | a20-olinuxino-micro | cubieboard2)
121
         extra_pkgs="$a20_pkgs"
134
         extra_pkgs="$a20_pkgs"
122
         extra_opts="\
135
         extra_opts="\

+ 11
- 0
src/freedombone-image-makefile View File

97
 	$(SIGN)
97
 	$(SIGN)
98
 	@echo "Build complete."
98
 	@echo "Build complete."
99
 
99
 
100
+# build Beaglebone Black Wireless SD card image
101
+beaglebonewifi: prep
102
+	$(eval ARCHITECTURE = armhf)
103
+	$(eval MACHINE = beaglebonewifi)
104
+	$(MAKE_IMAGE)
105
+	@rm -f $(ARCHIVE)
106
+	$(XZ) $(IMAGE)
107
+	@echo ""
108
+	$(SIGN)
109
+	@echo "Build complete."
110
+
100
 # build Cubieboard2 SD card image
111
 # build Cubieboard2 SD card image
101
 cubieboard2: prep
112
 cubieboard2: prep
102
 	$(eval ARCHITECTURE = armhf)
113
 	$(eval ARCHITECTURE = armhf)

+ 13
- 8
src/freedombone-utils-wifi View File

482
 
482
 
483
     wifi_ctr=0
483
     wifi_ctr=0
484
     wifi_networks_done=
484
     wifi_networks_done=
485
+    wifi_settings_defined=
485
     while [ ! $wifi_networks_done ]
486
     while [ ! $wifi_networks_done ]
486
     do
487
     do
487
         data=$(tempfile 2>/dev/null)
488
         data=$(tempfile 2>/dev/null)
502
         WIFI_TYPE=$(cat $data | sed -n 2p)
503
         WIFI_TYPE=$(cat $data | sed -n 2p)
503
         WIFI_PASSPHRASE=$(cat $data | sed -n 3p)
504
         WIFI_PASSPHRASE=$(cat $data | sed -n 3p)
504
 
505
 
505
-        # if these fields are empty then there are no more wifi networks
506
-        if [ ${#WIFI_SSID} -lt 2 ]; then
507
-            wifi_networks_done='yes'
508
-            continue
509
-        fi
510
-        if [ ${#WIFI_TYPE} -lt 2 ]; then
511
-            wifi_networks_done='yes'
512
-            continue
506
+        # If the wifi-only indicator is present then wifi details must
507
+        # be specified, otherwise they're optional
508
+        if [ ! -f /root/.wifi-only ]; then
509
+            # if these fields are empty then there are no more wifi networks
510
+            if [ ${#WIFI_SSID} -lt 2 ]; then
511
+                wifi_networks_done='yes'
512
+                continue
513
+            fi
514
+            if [ ${#WIFI_TYPE} -lt 2 ]; then
515
+                wifi_networks_done='yes'
516
+                continue
517
+            fi
513
         fi
518
         fi
514
 
519
 
515
         if [ ! -f $WIFI_NETWORKS_FILE ]; then
520
         if [ ! -f $WIFI_NETWORKS_FILE ]; then

+ 8
- 8
website/EN/beaglebone.html View File

3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
-<!-- 2016-11-29 Tue 10:39 -->
6
+<!-- 2017-01-05 Thu 14:11 -->
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9
 <title></title>
9
 <title></title>
248
 </center>
248
 </center>
249
 
249
 
250
 <p>
250
 <p>
251
-The Beaglebone Black is small, cheap, a fully open hardware design, has a hardware random number generator and consumes very little electrical power, making it suitable for all kinds of uses.
251
+The Beaglebone Black is small, cheap, a fully open hardware design, has a hardware random number generator and consumes very little electrical power, making it suitable for all kinds of uses. There is also a wireless version.
252
 </p>
252
 </p>
253
 
253
 
254
 <p>
254
 <p>
270
 <ul class="org-ul">
270
 <ul class="org-ul">
271
 <li>A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.</li>
271
 <li>A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.</li>
272
 <li>Optionally a plastic or metal case to protect the electronics.</li>
272
 <li>Optionally a plastic or metal case to protect the electronics.</li>
273
-<li>An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do.</li>
273
+<li>An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do. If you're using the Wireless version of the Beaglebone Black then you don't need this.</li>
274
 <li>Either a 5v power supply with 5.5mm barrel plug, or a miniUSB type B cable (typically supplied with the Beaglebone) and USB to mains adaptor.</li>
274
 <li>Either a 5v power supply with 5.5mm barrel plug, or a miniUSB type B cable (typically supplied with the Beaglebone) and USB to mains adaptor.</li>
275
 <li>A microSD card at least 8 gigabytes in size. In tests Sandisk class 10 works well. Prefer smaller but faster I/O rating to larger but slower.</li>
275
 <li>A microSD card at least 8 gigabytes in size. In tests Sandisk class 10 works well. Prefer smaller but faster I/O rating to larger but slower.</li>
276
 <li>A microSD card adaptor for your laptop or desktop system, so that you can copy the disk image to the card.</li>
276
 <li>A microSD card adaptor for your laptop or desktop system, so that you can copy the disk image to the card.</li>
334
 Onion addresses have the advantage of being difficult to censor and you don't need to buy a domain or have a dynamic DNS account. An onion based system also means you don't need to think about NAT traversal type issues.
334
 Onion addresses have the advantage of being difficult to censor and you don't need to buy a domain or have a dynamic DNS account. An onion based system also means you don't need to think about NAT traversal type issues.
335
 </p>
335
 </p>
336
 
336
 
337
-<p>
338
-Connect the power and ethernet cable and plug it into your internet router.
339
-</p>
340
-
341
 <div class="org-center">
337
 <div class="org-center">
342
 
338
 
343
 <div class="figure">
339
 <div class="figure">
359
 </div>
355
 </div>
360
 
356
 
361
 <p>
357
 <p>
358
+Connect the power and for the non-wireless versions of the Beaglebone Black also connect the ethernet cable and plug it into your internet router.
359
+</p>
360
+
361
+<p>
362
 Now power cycle by removing the power plug and then inserting it again. It should boot from the microSD drive and you should see the blue LEDs on the board flashing. If they don't fash at all for a few minutes then try copying the image to the microSD card again.
362
 Now power cycle by removing the power plug and then inserting it again. It should boot from the microSD drive and you should see the blue LEDs on the board flashing. If they don't fash at all for a few minutes then try copying the image to the microSD card again.
363
 </p>
363
 </p>
364
 
364
 
365
 <p>
365
 <p>
366
-Follow the rest of the <a href="./homeserver.html">instructions given here</a> to log in via ssh and install the system. The microSD drive <i>should remain inside the Beaglebone</i> and not be removed. This will be its main drive, with the internal EMMC not being used at all.
366
+Follow the rest of the <a href="./homeserver.html">instructions given here</a> to log in via ssh and install the system. The microSD drive <i>should remain inside the Beaglebone</i> and not be removed. This will be its main drive, with the internal EMMC not being used at all. For the Beaglebone Black Wireless ssh back in on the usual 192.168.7.2 address with the USB cable connected so that your wifi login parameters can be set.
367
 </p>
367
 </p>
368
 
368
 
369
 <p>
369
 <p>