This configuration works similar to https://gokrazy.org/userguide/package-config/ and can be used to include data files that are not easy to embed into the package itself, nor appropriate to go on the `/perm` partition (i.e. should be versioned/distributed with the gokrazy image).
This returns MSG_CMSG_CLOEXEC since https://github.com/golang/go/issues/42765
(for Go 1.17).
I don’t recall why we should need to check the flags in the first place. Perhaps
that was a mistake when the code was first introduced.
This is useful for running gokrazy on PC platforms (e.g. for
https://router7.org/), where the first systems without legacy BIOS support are
starting to ship.
The existing boot methods (Legacy BIOS MBR boot, Raspberry Pi) are unaffected by
this change and keep working.
Regardless of the bootloader (BIOS, UEFI, Raspberry Pi), we now use a GPT
partition table with hybrid MBR (= protective MBR + FAT32 /boot partition
which the Raspberry Pi bootloader requires).
This change should have no effect on existing installations.
To switch to GPT, you’ll need to use the -overwrite= flag to partition the
device (e.g. SD card). If you want to keep your /perm partition, you’ll need to
shrink the file system (using resize2fs) by 1 MB to make space for the secondary
GPT partition table copy at the end of the device.
Previously, the partition *table* contained a UUID that we used as root=
parameter for the Linux kernel, e.g. root=PARTUUID=471cad93-03
Now, individual partitions (not the partition *table*) have a UUID that begins
with 60c24cc1-f3f9-427a-8199,
e.g. root=PARTUUID=60c24cc1-f3f9-427a-8199-2e18c40c0004
fixes https://github.com/gokrazy/gokrazy/issues/87
The file format is one key=val pair per line (\n-separated).
Preparation example:
mkdir -p env/github.com/gokrazy/timestamps
echo 'FOO=bar' > env/github.com/gokrazy/timestamps/env.txt
Packer example:
gokr-packer -update=yes -hostname=gokrazy \
github.com/gokrazy/breakglass \
github.com/gokrazy/timestamps \
github.com/gokrazy/serial-busybox
You can check the effect locally by adding -overwrite_init=/tmp/init.go to your
gokr-packer invocation and examining /tmp/init.go afterwards.
related to https://github.com/gokrazy/gokrazy/issues/65
The file format is one flag per line (\n-separated).
Preparation example:
mkdir -p flags/github.com/gokrazy/timestamps
echo '--ohai' > flags/github.com/gokrazy/timestamps/flags.txt
Packer example:
gokr-packer -update=yes -hostname=gokrazy \
github.com/gokrazy/breakglass \
github.com/gokrazy/timestamps \
github.com/gokrazy/serial-busybox
Resulting stderr:
1970/01/01 01:00:09 gokrazy: attempt 0, starting [/user/timestamps --ohai]
You can check the effect locally by adding -overwrite_init=/tmp/init.go to your
gokr-packer invocation and examining /tmp/init.go afterwards.
related to https://github.com/gokrazy/gokrazy/issues/65