Image target for the Beaglebone Black Wireless

This commit is contained in:
Bob Mottram 2017-01-05 14:12:08 +00:00
parent fffc1cfbe7
commit d8d8ba5b0f
8 changed files with 88 additions and 26 deletions

View File

@ -16,7 +16,7 @@
</center>
#+END_EXPORT
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.
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.
You can easily use one to run your own internet services from home.
@ -28,7 +28,7 @@ You will need:
* A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.
* Optionally a plastic or metal case to protect the electronics.
* An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do.
* 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.
* 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.
* 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.
* 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
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.
Connect the power and ethernet cable and plug it into your internet router.
#+BEGIN_CENTER
[[file:images/bbb_back.jpg]]
#+END_CENTER
@ -85,8 +83,10 @@ Now follow the [[./homeserver.html][instructions given here to copy the image to
[[file:images/bbb_front.jpg]]
#+END_CENTER
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.
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.
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.
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.
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.

Binary file not shown.

View File

@ -174,6 +174,20 @@ EOF
}
configure_networking() {
if [[ "$MACHINE" == "beaglebonewifi" ]]; then
# Allow networking over USB in order to configure the
# wifi login settings
echo 'auto lo' > $rootdir/etc/network/interfaces
echo 'iface lo inet loopback' >> $rootdir/etc/network/interfaces
echo '' >> $rootdir/etc/network/interfaces
echo 'iface usb0 inet static' >> $rootdir/etc/network/interfaces
echo ' address 192.168.7.2' >> $rootdir/etc/network/interfaces
echo ' netmask 255.255.255.252' >> $rootdir/etc/network/interfaces
echo ' network 192.168.7.0' >> $rootdir/etc/network/interfaces
echo ' gateway 192.168.7.1' >> $rootdir/etc/network/interfaces
return
fi
if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
return
fi
@ -459,6 +473,10 @@ continue_installation() {
}
atheros_wifi() {
if [[ "$MACHINE" == "beaglebonewifi" ]]; then
return
fi
firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
@ -1036,11 +1054,12 @@ rm $rootdir/usr/sbin/policy-rc.d
# Set up HRNG for systems known to have one
# Otherwise install haveged
if [[ "$MACHINE" != "beaglebone" ]]; then
if [[ "$MACHINE" != "beaglebone"* ]]; then
chroot $rootdir apt-get -yq install haveged
else
chroot $rootdir apt-get -yq install rng-tools
sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' $rootdir/etc/default/rng-tools
fi
# copy u-boot to beginning of image
@ -1051,6 +1070,13 @@ case "$MACHINE" in
dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
count=2 seek=1 conv=notrunc bs=384k
;;
beaglebonewifi)
touch $rootdir/root/.wifi-only
dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/MLO of="$image" \
count=1 seek=1 conv=notrunc bs=128k
dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
count=2 seek=1 conv=notrunc bs=384k
;;
cubieboard2)
dd if=$rootdir/usr/lib/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin of="$image" \
seek=8 conv=notrunc bs=1k

View File

@ -190,12 +190,19 @@ EOF
echo "rtc_sunxi" >> /etc/initramfs-tools/modules
}
case "$MACHINE" in
beaglebone)
function generic_beaglebone_steup {
beaglebone_setup_boot
beaglebone_flash
beaglebone_repack_kernel
enable_serial_console ttyO0
}
case "$MACHINE" in
beaglebone)
generic_beaglebone_steup
;;
beaglebonewifi)
generic_beaglebone_steup
;;
cubietruck)
a20_setup_boot sun7i-a20-cubietruck.dtb

View File

@ -115,6 +115,19 @@ case "$MACHINE" in
--no-extlinux \
--foreign /usr/bin/qemu-arm-static \
--roottype btrfs \
"
;;
beaglebonewifi)
extra_pkgs="$beaglebone_pkgs"
extra_opts="\
--variant minbase \
--bootoffset=2mib \
--bootsize 128M \
--boottype ext2 \
--no-kernel \
--no-extlinux \
--foreign /usr/bin/qemu-arm-static \
--roottype btrfs \
"
;;
cubietruck | a20-olinuxino-lime | a20-olinuxino-lime2 | a20-olinuxino-micro | cubieboard2)

View File

@ -97,6 +97,17 @@ beaglebone: prep
$(SIGN)
@echo "Build complete."
# build Beaglebone Black Wireless SD card image
beaglebonewifi: prep
$(eval ARCHITECTURE = armhf)
$(eval MACHINE = beaglebonewifi)
$(MAKE_IMAGE)
@rm -f $(ARCHIVE)
$(XZ) $(IMAGE)
@echo ""
$(SIGN)
@echo "Build complete."
# build Cubieboard2 SD card image
cubieboard2: prep
$(eval ARCHITECTURE = armhf)

View File

@ -482,6 +482,7 @@ function create_networks_interactive {
wifi_ctr=0
wifi_networks_done=
wifi_settings_defined=
while [ ! $wifi_networks_done ]
do
data=$(tempfile 2>/dev/null)
@ -502,6 +503,9 @@ function create_networks_interactive {
WIFI_TYPE=$(cat $data | sed -n 2p)
WIFI_PASSPHRASE=$(cat $data | sed -n 3p)
# If the wifi-only indicator is present then wifi details must
# be specified, otherwise they're optional
if [ ! -f /root/.wifi-only ]; then
# if these fields are empty then there are no more wifi networks
if [ ${#WIFI_SSID} -lt 2 ]; then
wifi_networks_done='yes'
@ -511,6 +515,7 @@ function create_networks_interactive {
wifi_networks_done='yes'
continue
fi
fi
if [ ! -f $WIFI_NETWORKS_FILE ]; then
wifi_networks_file_header

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2016-11-29 Tue 10:39 -->
<!-- 2017-01-05 Thu 14:11 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
@ -248,7 +248,7 @@ for the JavaScript code in this tag.
</center>
<p>
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.
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.
</p>
<p>
@ -270,7 +270,7 @@ You will need:
<ul class="org-ul">
<li>A Beaglebone Black. The exact revision of the hardware isn't very important, but it should have an ethernet socket.</li>
<li>Optionally a plastic or metal case to protect the electronics.</li>
<li>An ethernet cable. Typically these are colour coded either blue or yellow. Either colour will do.</li>
<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>
<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>
<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>
<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
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.
</p>
<p>
Connect the power and ethernet cable and plug it into your internet router.
</p>
<div class="org-center">
<div class="figure">
@ -358,12 +354,16 @@ Now follow the <a href="./homeserver.html">instructions given here to copy the i
</div>
</div>
<p>
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.
</p>
<p>
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.
</p>
<p>
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.
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.
</p>
<p>