Changes between Version 1 and Version 2 of PibotGoldenImage


Ignore:
Timestamp:
Dec 23, 2016, 2:18:39 PM (8 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PibotGoldenImage

    v1 v2  
    1 GOAL: A master PiBot image that is pre-configured for ease of setup.  The image should be as small as possible for storage and distribution.  The image should be easily installed onto an 8GB or larger uSD card.
     1GOAL: A master !PiBot image that is pre-configured for ease of setup.  The image should be as small as possible for storage and distribution.  The image should be easily installed onto an 8GB or larger uSD card.
    22
    33EQUIPMENT USED:
    44
    5     Windows 10 PC with SD card reader
    6     Sandisk microSDHC UHS-I Card 8GB (any class 10 8GB card should do)
    7     Win32 Disk Imager (https://sourceforge.net/projects/win32diskimager/)
    8     SD Formatter (https://www.sdcard.org/downloads/formatter_4/)
    9     Cygwin with dd and openssh packages installed (https://www.cygwin.com/) (I use the 64-bit version)
    10     Raspbian Jessie with Pixel OS (https://www.raspberrypi.org/downloads/raspbian/)
    11     Apple Bonjour print services for windows (https://support.apple.com/downloads/bonjour_for_windows)
     5   * Windows 10 PC with SD card reader
     6   * Sandisk microSDHC UHS-I Card 8GB (any class 10 8GB card should do)
     7   * Win32 Disk Imager (https://sourceforge.net/projects/win32diskimager/)
     8   * SD Formatter (https://www.sdcard.org/downloads/formatter_4/)
     9   * Cygwin with dd and openssh packages installed (https://www.cygwin.com/) (I use the 64-bit version)
     10   * Raspbian Jessie with Pixel OS (https://www.raspberrypi.org/downloads/raspbian/)
     11   * Apple Bonjour print services for windows (https://support.apple.com/downloads/bonjour_for_windows)
    1212
    1313PROCEDURE:
    1414
    15     Install PC software (sd formatter, disk imager, cygwin, bonjour)
    16     Prepare SD card:
    17         Install Raspbian on SD card (see: https://www.raspberrypi.org/documentation/installation/installing-images/README.md).  This creates two partitions: /boot that is accessible from Windows and /root that is ext4 and cannot (easily) be accessed from Windows.
    18         Edit /boot/config.txt
    19             uncomment framebuffer_width=1280
    20             uncomment framebuffer_height=720
    21             uncomment dtparam=i2c_arm=on
    22             add at end:
    23             gpu_mem=32
    24         Edit /boot/cmdline.txt
    25             Insert after rootwait:
    26             modules-load=dwc2,g_ether g_ether.dev_addr=5a:77:1e:af:8e:9e g_ether.host_addr=72:8d:1f:c4:e8:ca
    27             Remove init=resizefs...   (to prevent automatic expansion to full SD card size)
     15   * Install PC software (sd formatter, disk imager, cygwin, bonjour)
     16   * Prepare SD card:
     17       * Install Raspbian on SD card (see: https://www.raspberrypi.org/documentation/installation/installing-images/README.md).  This creates two partitions: /boot that is accessible from Windows and /root that is ext4 and cannot (easily) be accessed from Windows.
     18       * Edit /boot/config.txt
     19           * uncomment framebuffer_width=1280
     20           * uncomment framebuffer_height=720
     21           * uncomment dtparam=i2c_arm=on
     22           * add at end:
     23             [[[ gpu_mem=32 ]]]
     24       * Edit /boot/cmdline.txt
     25           * Insert after rootwait:
     26            [[[ modules-load=dwc2,g_ether g_ether.dev_addr=5a:77:1e:af:8e:9e g_ether.host_addr=72:8d:1f:c4:e8:ca ]]]
     27           * Remove init=resizefs...   (to prevent automatic expansion to full SD card size)
    2828            (Note: cmdline.txt must be a single line...no linebreaks)
    29         Create an empty file: /boot/ssh   (enables ssh server when started)
    30         Optional: create /boot/wpa_supplicant.conf with your wifi network configuration information (allows Pi to connect to your network on boot)
    31     Boot and configure SD card in Pi
    32         Place uSD card in Pi Zero
    33         Connect USB cable to Pi Zero OTG port
    34         When it finishes booting (LED stops blinking) ssh to pibot.local using putty or cygwin ssh or ...
    35         login as user 'pi' with password 'raspberry'
    36         sudo raspi-config
    37             Setup localisation settings for US, English, EST
    38             Setup interfacing options: enable ssh, vnc, i2c
    39             Setup Advanced options: hostname->pibot
    40             Resize /root partition to 5GB.  See: http://elinux.org/RPi_Resize_Flash_Partitions
    41         Get a network connection for the Pi using one of the following methods:
    42             Bridge your main connection on the windows 10 machine (Ethernet or WiFi) to the NDIS Ethernet connection for the PiBot USB OTG network (select both connections in the Network Connections then right-click and choose Bridge Connections); configure the DNS server as 8.8.8.8
    43             Connect a USB Ethernet dongle to the Pi OTG connector
    44             Configure /etc/wpa_supplicant/wpa_supplicant.conf on the Pi to include your local WiFi network
    45         Update the OS on the Pi:
    46         sudo apt-get update
    47         sudo apt-get upgrade
    48         Install any needed packages
    49             sudo apt-get install subversion ant mercurial
    50             curl -s get.pi4j.com | sudo bash
    51         Install Oracle DIO (see https://www.raspberrypi.org/forums/viewtopic.php?f=81&t=99212)
    52             hg clone http://hg.openjdk.java.net/dio/dev
    53             export PI_TOOLS=/usr
    54             export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
    55             cd dev
    56             make
    57             cd ..
    58             sudo mv ~/dev /opt/dio
    59             sudo chown -R root.root /opt/dio
    60             create /etc/ld.so.conf.d/libdio.conf  containing /opt/dio/build/so
    61             sudo ldconfig   (to refresh the library path cache)
    62         Do WiFi Configuration using hostapd and dnsmasq (see documentation)
    63         Once card is configured, shutdown Pi
    64     Make master image:
    65         Place uSD card in PC
    66         launch cygwin as adminstrator
    67         dd bs=512 ibs=1M count=10491904 if=/dev/sdb of=pibot_x.img
    68         (NOTE: 10491904 is one block past the last block of the /root partition on my setup - could be different in your setup depending on the amount of space you allocated when resizing the /root partition above.
    69         check the partitions in fdisk first.  On the Pi:
    70             sudo fdisk /dev/mmcblk0
    71             p (print partition table)
    72             note End block of /dev/mmcblk0p2
    73             Use that block number + 1 as the count
     29       * Create an empty file: /boot/ssh   (enables ssh server when started)
     30       * Optional: create /boot/wpa_supplicant.conf with your wifi network configuration information (allows Pi to connect to your network on boot)
     31   * Boot and configure SD card in Pi
     32       * Place uSD card in Pi Zero
     33       * Connect USB cable to Pi Zero OTG port
     34       * When it finishes booting (LED stops blinking) ssh to pibot.local using putty or cygwin ssh or ...
     35       * login as user 'pi' with password 'raspberry'
     36       * sudo raspi-config
     37           * Setup localisation settings for US, English, EST
     38           * Setup interfacing options: enable ssh, vnc, i2c
     39           * Setup Advanced options: hostname->pibot
     40           * Resize /root partition to 5GB.  See: http://elinux.org/RPi_Resize_Flash_Partitions
     41       * Get a network connection for the Pi using one of the following methods:
     42           * Bridge your main connection on the windows 10 machine (Ethernet or !WiFi) to the NDIS Ethernet connection for the !PiBot USB OTG network (select both connections in the Network Connections then right-click and choose Bridge Connections); configure the DNS server as 8.8.8.8
     43           * Connect a USB Ethernet dongle to the Pi OTG connector
     44           * Configure /etc/wpa_supplicant/wpa_supplicant.conf on the Pi to include your local !WiFi network
     45       * Update the OS on the Pi:
     46       * sudo apt-get update
     47       * sudo apt-get upgrade
     48       * Install any needed packages
     49           * sudo apt-get install subversion ant mercurial
     50           * curl -s get.pi4j.com | sudo bash
     51       * Install Oracle DIO (see https://www.raspberrypi.org/forums/viewtopic.php?f=81&t=99212)
     52           * hg clone http://hg.openjdk.java.net/dio/dev
     53           * export PI_TOOLS=/usr
     54           * export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
     55           * cd dev
     56           * make
     57           * cd ..
     58           * sudo mv ~/dev /opt/dio
     59           * sudo chown -R root.root /opt/dio
     60           * create /etc/ld.so.conf.d/libdio.conf  containing /opt/dio/build/so
     61           * sudo ldconfig   (to refresh the library path cache)
     62       * Do !WiFi Configuration using hostapd and dnsmasq (see documentation)
     63       * Once card is configured, shutdown Pi
     64   * Make master image:
     65       * Place uSD card in PC
     66       * launch cygwin as adminstrator
     67       * dd bs=512 ibs=1M count=10491904 if=/dev/sdb of=pibot_x.img
     68         * (NOTE: 10491904 is one block past the last block of the /root partition on my setup - could be different in your setup depending on the amount of space you allocated when resizing the /root partition above.
     69       * check the partitions in fdisk first.  On the Pi:
     70          * sudo fdisk /dev/mmcblk0
     71          * p (print partition table)
     72          * note End block of /dev/mmcblk0p2
     73          * Use that block number + 1 as the count