othermod / PSPi-Version-6

https://othermod.com
707 stars 25 forks source link

Add workflow to build drivers #19

Closed CoryManson closed 9 months ago

CoryManson commented 9 months ago

This doesn't add a lot on its own, this would likely be used as a prerequisite workflow before automatically building images. Saves building drivers and manually uploading into the repo. Workflow takes around 4-5mins.

Uses packer to establish a raspios lite chroot environment. Installs prerequisites & builds the driver binaries. Image is then compressed into a tarball and driver files extracted by the host. Not a typical use-case for packer but works nicely here as the drivers must be compiled on a raspberry pi which packer can provide easily enough.

Normally packer would be able to download the files without the tarball but the packer sdk doesn't support the download communicator on a chroot environment: https://github.com/hashicorp/packer-plugin-sdk/issues/89

Example workflow run: https://github.com/CoryManson/PSPi-Version-6/actions/runs/7685722781

CoryManson commented 9 months ago

Suggesting squash merge again to compress commit history to a single commit.