setup-life-display

Instructions and scripts to setup sdl2-life on a Raspberry Pi
git clone https://www.brianlane.com/git/setup-life-display
Log | Files | Refs | README

README.md (2025B)


      1 # Initial setup of SD card for Life Display
      2 
      3 Download Pi OS lite version from
      4 https://www.raspberrypi.com/software/operating-systems/
      5 
      6 unxz the image and use `dd` to write it to a SD card.
      7 
      8 Mount the SD card / and /boot on a directory under /mnt/, eg.
      9 
     10 sudo mkdir -p /mnt/d1/boot /mnt/d1/root
     11 sudo mount /dev/mmcblk0p1 /mnt/d1/boot
     12 sudo mount /dev/mmcblk0p2 /mnt/d1/root
     13 
     14 Run the ./setup.sh script, passing /mnt/d1/
     15 
     16 sudo ./setup.sh /mnt/d1/
     17 
     18 Edit /mnt/d1/boot/wpa_supplicant.conf and change the SSID and password to your AP.
     19 
     20 Optionally change the password of the life user by replacing the default password in
     21 /mnt/d1/boot/userconf with the output from:
     22 openssl passwd -6
     23 
     24 Unmount /mnt/d1/boot and /mnt/d1/root and insert the SD card into the Pi and boot it.
     25 
     26 It is best to do this with a display and keyboard so you can see what IP address is assigned,
     27 or deal with any unexpected errors.
     28 
     29 Now you can reboot, and it should show the IP address at the login prompt, depending on the
     30 timing of bringing up the network.
     31 
     32 Edit the hosts file to set the correct IP address.
     33 Run the setup.yml playbook to setup the life display and change the boot display settings.
     34 
     35 ansible-playbook -v -k ./setup.yml
     36 
     37 the SSH password will be the password you created for the 'life' user. Or the default of
     38 asdasdasd
     39 
     40 # Build sdl2-life
     41 
     42 It is easiest to just build the sdl2-life program on the Pi. The git repo has been checked
     43 out into /opt/sdl2-life/ and it should simply be a matter of running:
     44 
     45     cd /opt/sdl2-life && go build
     46 
     47 to build it.
     48 
     49 # Final Steps
     50 
     51 At this point the system should be ready. You can run /home/life/run-life-server to test, and
     52 then reboot to make sure it starts on its own.
     53 
     54 If everything looks ok you can turn off the boot logo and text by editing /boot/cmdline.txt
     55 and adding:
     56 
     57     logo.nologo console=null quiet
     58 
     59 to the end of the kernel boot cmdline. This does make it much harder to debug problems, but
     60 worst case you can mount the SD card on another system and remove those arguments to turn
     61 them back on.
     62