| 9 | == Write Raspbian-Jessie Lite to SD Card using PiBakery |
| 10 | * Be sure to use a PiBakery release with Jessie |
| 11 | * Set "On First Boot" options: |
| 12 | 1. Setup WiFi for team's router settings: |
| 13 | 2. Set Hostname to team2537-pi (it will be customized later...) |
| 14 | 3. Set Pi Zero OTG Mode to Ethernet, with IP 192.168.137.80 (it will be customized later) |
| 15 | 4. Shutdown |
| 16 | |
| 17 | == USB/Networking Setup |
| 18 | |
| 19 | * PiBakery provides "OTG Mode to Ethernet with Static IP" configuration, which we can use in lieu of the blog link referenced by the wiki. (If we choose not to use PiBakery for this, then insert instructions here to edit two files in the /boot partition of the SD Card.) |
| 20 | |
| 21 | == Assign static MAC addresses |
| 22 | |
| 23 | * Described on the wiki. Involves editing a file in the /boot partition of the SD Card. |
| 24 | * IMPORTANT: There are several methods for setting fixed MAC addresses in the discussion section of the blog referenced by the wiki. |
| 25 | 1. One is to add the fixed addresses into the file /etc/modprobe.d/g_ether.conf. |
| 26 | 2. Another is to add them to /boot/cmdline.txt using a different syntax. |
| 27 | 3. A third is to only add the Pi Zero device's address to /etc/cmdline.txt. It isn't clear from these discussions whether or not these fixed addresses need to match the random addresses obtained by establishing a USB connection to the Pi and querying the current random MAC addresses for the host and the Pi device (as explained in one of the responses using dmesg -T | grep MAC), or if any legally formatted MAC address is acceptable (e.g., 11:22:33:44:55:66 as shown in another response.) |
| 28 | |
| 29 | == Setup DNS |
| 30 | |
| 31 | * NOTE: Having problems with this -- /etc/resolv.conf gets overwritten at boot (by resolveconf), so the settings are not maintained. This step is in our wiki procedures. What's its origin? Do we need it, and why? And if so, how do we fix it? We need some way to configure the Pi to access a nameserver when networking over USB. Maybe avahi, mdns, /etc/network/interfaces entries, etc.??? |
| 32 | |
| 33 | == Update to the Raspbian packages (Pi Zero must have internet access with hostname resolution for this step): |
| 34 | |
| 35 | {{{ |
| 36 | #! |
| 37 | sudo apt-get update |
| 38 | sudo apt-get upgrade |
| 39 | }}} |
| 40 | |
| 41 | == Install Oracle Java JDK 80 |
| 42 | |
| 43 | == Install Pi4J (?) |
| 44 | |
| 45 | == Skip Nano (included in Jessie Lite) |
| 46 | |
| 47 | == Skip Avahi (included in Jessie Lite) |
| 48 | |
| 49 | == Skip Raspbian Configuration, rasps-config |
| 50 | |
| 51 | * Expanding partition to use entire SD Card handled with Jessie Lite since 5/10/16 |
| 52 | * Hostname customization handled using PiBakery |
| 53 | * I2C enabling gets handled using PiBakery |
| 54 | |
| 55 | == Skip WiFi Setup |
| 56 | |
| 57 | * Handled using PiBakery |
| 58 | |
| 59 | ---- |
| 60 | |
| 61 | = Notes/Resources |
| 62 | |
| 63 | == Links for imaging a Pi uSD card: |
| 64 | |
| 65 | * http://www.aoakley.com/articles/2015-10-09-resizing-sd-images.php |
| 66 | * http://softwarebakery.com/shrinking-images-on-linux |
| 67 | * http://www.htpcguides.com/easy-resize-and-back-up-raspberry-pi-sd-card-with-ubuntu/ |
| 68 | |
| 69 | == PiBakery |
| 70 | |
| 71 | * http://www.pibakery.org/index.html |
| 72 | |
| 73 | == Writing PiBot Base Image to uSD card and Customizing it: |
| 74 | |
| 75 | From a LINUX system with uSD card access... |
| 76 | |
| 77 | dd base image to uSD |
| 78 | |
| 79 | sudo su |
| 80 | cd /media/alan/boot |
| 81 | cp -p cmdline.txt cmdline.txt.orig |
| 82 | cp -p config.txt config.txt.orig |
| 83 | |
| 84 | edit cmdline.txt to add: |
| 85 | modules-load=dwc2,g_ether |
| 86 | and |
| 87 | g_ether.dev_addr=5a:77:1e:af:8e:9e g_ether.host_addr=72:8d:1f:c4:e8:ca |
| 88 | (change last field of each MAC addr to match last octet of assigned IP addr in hex) |
| 89 | |
| 90 | edit config.txt to add: |
| 91 | # Enable network-over-USB |
| 92 | dtoverlay=dwc2 |
| 93 | |
| 94 | cd /media/alan/2.../etc/wpa_supplicant |
| 95 | sudo rm wpa_supplicant.conf (to get rid of my home FiOS ssid/key) |
| 96 | |
| 97 | Switch to a Windows system with PiBakery and uSD card access... |
| 98 | |
| 99 | Open PiBakery and edit uSD card's "On Next Boot" |
| 100 | |
| 101 | * Setup WiFi for team's router settings |
| 102 | * Set Hostname (to morty-pi, summer-pi, etc) |
| 103 | * Set Pi Zero OTG Mode to Ethernet (with IP 192.168.137.ddd, last octet matches assigned IP) |
| 104 | * Shutdown |
| 105 | |
| 106 | ... and write to uSD card |
| 107 | |
| 108 | |
| 109 | |
| 110 | ---- |