Exposed RELEASE as a configurable variable and updated README.md. As a
bonus, there is only on place to change the release name when the next
release is stable now.
Demo the new custom export capability with an new export type
'export-swappart-image' that uses a swap partition. Note that it really
only makes sense if one tweaks stage2 to not include dphys-swapfile.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
There are use cases where pi-gen can be useful that need different
image generation that the current defaults. Rather than force such
users to require carrying modified versions of the default exports,
allow users to specify alternate exports (e.g. instead of export-image
and export-noobs, or in addition to these). We do this using a
mechanism similar to STAGE_LIST, except that the lists of images are
per-stage and default to paying attention to the presence of
EXPORT_IMAGE and EXPORT_NOOBS as is currently the case.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
wpa_passphrase writes its error messages to stdout, so this needs to
tee so that errors are visable to user. Also need to enable pipefail
so that the error code still gets caught.
Check that realpath is present. OS X doesn't have realpath. The RPi builds on Docker for Mac if you increase the VM size. I am using 256G for my image. See the Docker for Mac preferences.
Previously, fdisk was used by sending commands into its stdin, which is
not very robust (since it heavily relies on the interactive prompts
offered by fdisk as well as the default values it offers, which seem
prone to changing in future version).
It seems likely that in the past, fdisk was easier than parted since it
provides default values that make it easier to create adjacent
partitions, without precalculating all positions in the script. However
now that partitions are manually being aligned, all data must be
calculated anyway.
This commit changes the partition generation to use parted rather than
fdisk. For this, it rewrites various calculations and renames variables
to be easier to read as well. All values are now in number of bytes,
rather than mixing bytes and sectors.
This commit also makes makes sure that the boot partition and root
partition are always adjacent (previously the root partition was aligned
without also rounding the boot partition size, leaving some empty space
in between).
As a side effect of using parted, this also causes the "bootcode" part
of the MBR to be filled with some default x86 bootcode. This is totally
irrelevant for booting the Raspberry Pi, but it does prevent triggering
a bug in parted. When using parted to change the partition table (e.g.
when resizing the root partition on first boot by raspi-config's
init_resize.sh), the disk identifier would be changed due to this bug,
which would change the PARTUUID of all partitions. The init_resize.sh
script would work around this by updating the PARTUUID in e.g. fstab,
but that's fragile at best. This commit prevents the bug from
triggering and keeps the disk identifier the same.
See https://debbugs.gnu.org/35714 for details about this parted bug.
This commit fixes#284.
The example for enabling IR transmission in `/boot/config.txt` is still using the deprecated `lirc-rpi` overlay.
The documentation in `/boot/overlays/README` indicates that this overlay has been deprecated in favor of `gpio-ir` / `gpio-ir-tx`.
This updates the actual config.txt to suggest `gpio-ir` instead of `lirc-rpi`.