Bladeren bron

Image target for the Beaglebone Black Wireless

Bob Mottram 8 jaren geleden
bovenliggende
commit
d8d8ba5b0f

+ 5
- 5
doc/EN/beaglebone.org Bestand weergeven

@@ -16,7 +16,7 @@
16 16
 </center>
17 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 21
 You can easily use one to run your own internet services from home.
22 22
 
@@ -28,7 +28,7 @@ You will need:
28 28
 
29 29
  * A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.
30 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 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 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 34
  * A microSD card adaptor for your laptop or desktop system, so that you can copy the disk image to the card.
@@ -73,8 +73,6 @@ freedombone-image -t beaglebone --onion yes
73 73
 
74 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 76
 #+BEGIN_CENTER
79 77
 [[file:images/bbb_back.jpg]]
80 78
 #+END_CENTER
@@ -85,8 +83,10 @@ Now follow the [[./homeserver.html][instructions given here to copy the image to
85 83
 [[file:images/bbb_front.jpg]]
86 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 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 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 Bestand weergeven


+ 27
- 1
src/freedombone-image-customise Bestand weergeven

@@ -174,6 +174,20 @@ EOF
174 174
 }
175 175
 
176 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 191
     if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
178 192
         return
179 193
     fi
@@ -459,6 +473,10 @@ continue_installation() {
459 473
 }
460 474
 
461 475
 atheros_wifi() {
476
+    if [[ "$MACHINE" == "beaglebonewifi" ]]; then
477
+        return
478
+    fi
479
+
462 480
     firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
463 481
     firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
464 482
 
@@ -1036,11 +1054,12 @@ rm $rootdir/usr/sbin/policy-rc.d
1036 1054
 
1037 1055
 # Set up HRNG for systems known to have one
1038 1056
 # Otherwise install haveged
1039
-if [[ "$MACHINE" != "beaglebone" ]]; then
1057
+if [[ "$MACHINE" != "beaglebone"* ]]; then
1040 1058
     chroot $rootdir apt-get -yq install haveged
1041 1059
 else
1042 1060
     chroot $rootdir apt-get -yq install rng-tools
1043 1061
     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' $rootdir/etc/default/rng-tools
1062
+
1044 1063
 fi
1045 1064
 
1046 1065
 # copy u-boot to beginning of image
@@ -1051,6 +1070,13 @@ case "$MACHINE" in
1051 1070
         dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
1052 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 1080
     cubieboard2)
1055 1081
         dd if=$rootdir/usr/lib/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin of="$image" \
1056 1082
            seek=8 conv=notrunc bs=1k

+ 11
- 4
src/freedombone-image-hardware-setup Bestand weergeven

@@ -190,12 +190,19 @@ EOF
190 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 200
 case "$MACHINE" in
194 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 207
     cubietruck)
201 208
         a20_setup_boot sun7i-a20-cubietruck.dtb

+ 13
- 0
src/freedombone-image-make Bestand weergeven

@@ -117,6 +117,19 @@ case "$MACHINE" in
117 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 133
     cubietruck | a20-olinuxino-lime | a20-olinuxino-lime2 | a20-olinuxino-micro | cubieboard2)
121 134
         extra_pkgs="$a20_pkgs"
122 135
         extra_opts="\

+ 11
- 0
src/freedombone-image-makefile Bestand weergeven

@@ -97,6 +97,17 @@ beaglebone: prep
97 97
 	$(SIGN)
98 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 111
 # build Cubieboard2 SD card image
101 112
 cubieboard2: prep
102 113
 	$(eval ARCHITECTURE = armhf)

+ 13
- 8
src/freedombone-utils-wifi Bestand weergeven

@@ -482,6 +482,7 @@ function create_networks_interactive {
482 482
 
483 483
     wifi_ctr=0
484 484
     wifi_networks_done=
485
+    wifi_settings_defined=
485 486
     while [ ! $wifi_networks_done ]
486 487
     do
487 488
         data=$(tempfile 2>/dev/null)
@@ -502,14 +503,18 @@ function create_networks_interactive {
502 503
         WIFI_TYPE=$(cat $data | sed -n 2p)
503 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 518
         fi
514 519
 
515 520
         if [ ! -f $WIFI_NETWORKS_FILE ]; then

+ 8
- 8
website/EN/beaglebone.html Bestand weergeven

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2016-11-29 Tue 10:39 -->
6
+<!-- 2017-01-05 Thu 14:11 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title></title>
@@ -248,7 +248,7 @@ for the JavaScript code in this tag.
248 248
 </center>
249 249
 
250 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 252
 </p>
253 253
 
254 254
 <p>
@@ -270,7 +270,7 @@ You will need:
270 270
 <ul class="org-ul">
271 271
 <li>A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.</li>
272 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 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 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 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,10 +334,6 @@ freedombone-image -t beaglebone --onion yes
334 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 335
 </p>
336 336
 
337
-<p>
338
-Connect the power and ethernet cable and plug it into your internet router.
339
-</p>
340
-
341 337
 <div class="org-center">
342 338
 
343 339
 <div class="figure">
@@ -359,11 +355,15 @@ Now follow the <a href="./homeserver.html">instructions given here to copy the i
359 355
 </div>
360 356
 
361 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 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 363
 </p>
364 364
 
365 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 367
 </p>
368 368
 
369 369
 <p>