gtoal / pitrex

Support for driving Vectrex display from Raspberry Pi Zero WH
30 stars 7 forks source link

Fixes #1 -- Add Vagrant+Packer based automated Pi OS img build #2

Closed mikepea closed 3 years ago

mikepea commented 3 years ago

This PR adds an automated build, steps detailed in README.imgbuild

It's based around https://github.com/solo-io/packer-builder-arm-image

Currently it's more of a time-saving system than an img that's suitable for non-devs, but it should form the basis of that when we're ready.

It sets up:

The process should be pretty straightforward to go through once you have a working Vagrant environment.

You need to specify Wifi details in .packer.d/build-vars.json:

{
  "wifi_name":     "<ssid>",
  "wifi_password": "<password>",
  "ssh_pubkey":    "<your ssh public key, this is optional>"
}

I've also now added the baremetal pitrex.img menu, based on @ComputerNerdKev feedback in pitrex-dev 👍

mikepea commented 3 years ago

@gtoal @ComputerNerdKev could this be merged, so I can continue on additional progress on this in a separate PR?

mikepea commented 3 years ago

@ComputerNerdKev pretty sure this won't work for you wrt WiFi just based on what's in the wpa_supplicant config. However, I've been pondering whether this is the correct approach anyways, i think we may be better served by putting an default/example config into the /boot partition and have Linux pick it up at boot time.

My working theory is that with /boot being Fat32, it makes it pretty easy for 90% of users to edit files in there after the image is burned to SD card

gtoal commented 3 years ago

The 'correct' way to do this is quite complicated and beyond what I'm likely to take on: it's possible to set the Pi up as a wifi access point, so you then connect to that with your PC by switching the PC's SSID to match the Pi Zero AP's SSID. Then you talk to a web page and enter your home wifi SSID and password, at which point the zero would reboot and switch from being an access point to a client, properly logged in to your network.

For people familiar with Linux this is overkill - it's easier to shell in and change it by hand, or edit the file that Noobs uses to set up the initial environment, but for non-linux vectrex users who will not be developing, we may need something like this.

Graham PS Apologies for being a bit slow on noticing the posts - I was highlighting mail from pitrex-dev but didn't notice that people's submissions were coming through as from notifications@github.com... oh well, easy enough to add another filter rule to make sure those aren't missed.

On Tue, Nov 24, 2020 at 4:51 PM Mike Pountney notifications@github.com wrote:

@ComputerNerdKev https://github.com/ComputerNerdKev pretty sure this won't work for you wrt WiFi just based on what's in the wpa_supplicant config. However, I've been pondering whether this is the correct approach anyways, i think we may be better served by putting an default/example config into the /boot partition and have Linux pick it up at boot time.

My working theory is that with /boot being Fat32, it makes it pretty easy for 90% of users to edit files in there after the image is burned to SD card

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gtoal/pitrex/pull/2#issuecomment-733278865, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD4V5X3QLGLY2MZO46SS3DSRQ2HZANCNFSM4T4N43XQ .

gtoal commented 3 years ago

how other projects initialise wifi...

https://retropie.org.uk/forum/topic/4691/solved-feature-request-wifi-key-import-via-boot-wifikeyfile-txt

mikepea commented 3 years ago

Nice find Graham, thanks. That maps well to my thoughts on using a file in /boot - so i'll basically just copy that implementation I think.

For my own reference (or anyone else picking up this work), here's a thread on setting wpa_supplicant up to access an open network (which would be good for Kevin, and others probably): https://www.raspberrypi.org/forums/viewtopic.php?t=43185

On Thu, Nov 26, 2020 at 10:38 AM Graham Toal notifications@github.com wrote:

how other projects initialise wifi...

https://retropie.org.uk/forum/topic/4691/solved-feature-request-wifi-key-import-via-boot-wifikeyfile-txt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gtoal/pitrex/pull/2#issuecomment-734438695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACGTINKJMHNDFIZXTMWGDSR2OCNANCNFSM4T4N43XQ .