Damiano Donati
0d3aef012e
add arm64 uefi support, bump systemd third_party ( #36 )
...
- adds the systemd-bootaa64.efi file to support UEFI boot for
arm64 machines that can do UEFI.
- bumps the systemd package from systemd-248.3-2 to systemd-250.5-1 (I
couldn't find the arm64 version for systemd-248.3-2 so I bumped them
both).
The packages come from the arch linux package registries:
- amd64: https://archlinuxarm.org/packages/aarch64/systemd
- arm64: http://mirror.archlinuxarm.org/aarch64/core/systemd-250.5-1-aarch64.pkg.tar.xz
fixes https://github.com/gokrazy/gokrazy/issues/129
2022-05-07 17:24:25 +02:00
Michael Stapelberg
b62909004c
gokr-packer: verify either -update or -overwrite are used, not both
...
fixes https://github.com/gokrazy/tools/issues/35
2022-05-07 14:50:58 +02:00
Joonas Kuorilehto
8579a1abae
gokr-packer: validate certificate matches key ( #34 )
...
Fixes gokrazy/gokrazy#130 .
2022-05-01 13:19:23 +02:00
Michael Stapelberg
49d3ee847d
update flag is called -update in gokr-packer and gok
...
related to https://github.com/gokrazy/breakglass/issues/13
2022-04-30 21:26:27 +02:00
Michael Stapelberg
2ac0100719
gokr-packer: use internal/tlsflag
...
related to https://github.com/gokrazy/breakglass/issues/13
2022-04-30 21:22:21 +02:00
Michael Stapelberg
afe3e5085f
apply default build tags also to init binary build
...
related to https://github.com/stapelberg/scan2drive/issues/18
2022-04-21 21:17:42 +02:00
Michael Stapelberg
4fe1051453
revert GOFLAGS, add buildtags per-package config, add osusergo/netgo
...
The GOFLAGS handling is the opposite of how the Go tool handles it, where
GOFLAGS provides default values that the command line then overwrites. I think
it’s better to match that behavior.
Instead, allow extending gokr-packer’s list of build tags via the buildtags/
per-package config directive.
Also, add osusergo and netgo build tags by default so that even when cgo is
enabled, gokrazy code results in statically linked binaries.
related to https://github.com/stapelberg/scan2drive/issues/18
2022-04-21 21:17:36 +02:00
Michael Stapelberg
32c5136e01
respect GOFLAGS=-tags (don’t set -tags=gokrazy)
...
related to https://github.com/stapelberg/scan2drive/issues/18
2022-04-20 21:13:08 +02:00
Michael Stapelberg
125418d8b3
respect CGO_ENABLED=1 if explicitly specified in environment
...
Our default is still CGO_ENABLED=0
related to https://github.com/stapelberg/scan2drive/issues/18
2022-04-20 21:12:58 +02:00
Michael Stapelberg
8dc754717c
look for architecture-dependent extrafiles tar first
...
related to https://github.com/gokrazy/podman/issues/2
2022-04-14 13:06:12 +02:00
Michael Stapelberg
ec0f87b260
packer: add support for extrafiles.tar
...
This offers a way to get around Go package zip file restrictions,
such as:
• executable modes are lost in a Go package zip file
• files that only differ in casing can’t be stored in a Go package zip file
fixes https://github.com/gokrazy/tools/issues/32
2022-04-05 08:50:03 +02:00
Michael Stapelberg
3e1cf33c58
add /var and /run directories to root file system
...
related to https://github.com/gokrazy/gokrazy/issues/124
2022-04-03 23:11:25 +02:00
oliverpool
07643813fd
packer: fail on small device ( #33 )
2022-03-31 09:10:30 +02:00
Michael Stapelberg
05a69a38cd
gok: read host-specific http-port.txt
2022-03-26 19:39:32 +01:00
Michael Stapelberg
7eae294c96
GitHub Actions: bump to Go 1.18
2022-03-20 16:02:08 +01:00
Michael Stapelberg
e364146e37
switch -serial_console default to serial0 alias
...
This alias resolves to ttyAMA0 currently, but will be rewritten by the Raspberry
Pi firmware to resolve to ttyS0 once we drop our custom dtb patches.
related to https://github.com/gokrazy/gokrazy/issues/49
2022-03-18 09:47:13 +01:00
Michael Stapelberg
d603a85f0b
explicitly set console=tty1 in cmdline.txt
...
This means we no longer need the dtb patch where we change the default kernel
command line to contain console=tty1.
related to https://github.com/gokrazy/gokrazy/issues/49
2022-03-18 09:40:48 +01:00
Michael Stapelberg
e5926c62b2
Introduce -serial_console=off to set enable_uart=0 in config.txt
...
The currently valid values are:
-serial_console=UART0 (see next option)
-serial_console=ttyAMA0,115200 (for example)
-serial_console=disabled (serial available for userspace)
-serial_console=off (serial turned off)
related to https://github.com/gokrazy/gokrazy/issues/49
2022-03-18 09:32:36 +01:00
Michael Stapelberg
c1b172b2f0
bugfix: allow both, $PWD/extrafiles/ and <pkg>/_gokrazy/extrafiles
2022-03-01 22:55:40 +01:00
Michael Stapelberg
0721be4715
move (*os.File).Sync() call into linux-specific packer_linux.go
...
This fixes the following error on macOS:
sync /dev/disk2: inappropriate ioctl for device
related to https://github.com/gokrazy/gokrazy/issues/22
2022-03-01 18:04:43 +01:00
Michael Stapelberg
1938385a69
do not add empty strings to package list with empty -gokrazy_pkgs=
2022-02-26 19:25:54 +01:00
Michael Stapelberg
01fcfcf8fd
packer: remove extra “v” from version
2022-02-26 19:21:42 +01:00
Michael Stapelberg
c64054cdc5
set -mod=mod for now-first go tool invocation
2022-02-24 22:25:00 +01:00
Michael Stapelberg
0fde06653c
packer: pick up _gokrazy/extrafiles/ within package dirs, too
...
This allows e.g. the github.com/gokrazy/wifi package to include firmware files
that end up in the root file system.
related to https://github.com/gokrazy/gokrazy/issues/13
2022-02-24 20:45:22 +01:00
Michael Stapelberg
686d00738e
packer: follow symlinks
2022-02-24 20:37:02 +01:00
Michael Stapelberg
5d79ef259c
packer: include loadable kernel modules from kernel repository
...
related to https://github.com/gokrazy/gokrazy/issues/13
2022-02-22 23:25:04 +01:00
Anup Chenthamarakshan
45e6b6fc6c
Update github.com/gokrazy/internal version ( #30 )
2022-01-30 14:37:02 +01:00
Michael Stapelberg
3d62cd2257
remove branch restriction, enable CI for pull requests
2022-01-13 09:40:32 +01:00
Darshil Chanpura
0dec06d488
packer: implement waitforclock per-package config files ( #29 )
...
This allows wait for the clock to be synced before starting the service
2022-01-13 09:39:42 +01:00
Michael Stapelberg
30e91460ce
errors.As should be errors.Is in this case
...
We’re not comparing a type, but a specific error value.
2022-01-13 09:24:17 +01:00
Anup Chenthamarakshan
8bb7e491ea
packer: allow using MBR partition tables ( #28 )
...
Some ARM devices (like Odroid XU4/HC1/HC2) only support MBR booting.
Allow generating MBR partition table for such devices.
2022-01-13 09:20:34 +01:00
Michael Stapelberg
71af7271f4
packer: do not add empty -eeprom_package to list
2021-12-27 09:34:36 +01:00
Michael Stapelberg
31d26e1e37
increase timeout from 1m to 5m, for slower devices
...
Larger installations can take over a minute to start up.
2021-12-27 08:48:53 +01:00
Michael Stapelberg
3bb6d56203
packer: implement dontstart per-package config files
...
This is useful when including non-service binaries in the image, such as the
tailscale CLI.
2021-12-18 19:51:38 +01:00
Michael Stapelberg
d8eb163b39
packer: poll device until it reports the new build timestamp
2021-12-15 15:28:52 +01:00
Michael Stapelberg
a33ad86c63
gok run: automatically follow logs after uploading
...
related to https://github.com/gokrazy/gokrazy/issues/88
2021-12-15 14:52:22 +01:00
Michael Stapelberg
07d209a9ed
implement gok logs command for streaming logs
...
Log streaming was implemented in https://github.com/gokrazy/gokrazy/pull/100
related to https://github.com/gokrazy/gokrazy/issues/88
2021-12-15 14:32:03 +01:00
Anup Chenthamarakshan
8127d75153
packer: ignore firmware globs if -firmware_package is empty ( #27 )
...
Don't accidentally pick up firmware files from CWD if -firmware_package is unset
2021-12-01 08:54:02 +01:00
Michael Stapelberg
688793dda2
better error message when the binary was not installed
2021-11-21 21:53:20 +01:00
Michael Stapelberg
157ff3011f
refactor into internal
2021-11-21 17:01:03 +01:00
Michael Stapelberg
34f3ddd1ac
introduce gok CLI
...
This is a subcommand based CLI for gokrazy.
Its first subcommand is “run”, to be used like so:
cd ~/scan2drive/cmd/scan2drive
gok run --instance=scan2drive
related to https://github.com/gokrazy/gokrazy/issues/88
2021-11-21 17:01:03 +01:00
Michael Stapelberg
0900ca05de
go.mod: use language version go 1.17
2021-11-21 15:23:47 +01:00
Michael Stapelberg
a99f2c5561
move gotool.go into packer package for upcoming re-use
2021-11-21 09:50:50 +01:00
Michael Stapelberg
21d99992a1
packer: findBins must be called after build
2021-11-20 18:43:13 +01:00
Michael Stapelberg
c8145dc98d
report progress (and rate) while uploading boot/root file system
2021-11-20 18:37:58 +01:00
Michael Stapelberg
7318b6cbe7
interactively report progress for boot/root file system creation
2021-11-20 18:19:06 +01:00
Michael Stapelberg
77f6c75da6
tidy up boot file system summary
2021-11-20 17:48:57 +01:00
Michael Stapelberg
c363800e98
remove .go file name from user-facing messages
2021-11-20 17:48:10 +01:00
Michael Stapelberg
69a3b3932f
packer: tidy up build summary
2021-11-20 17:01:47 +01:00
Michael Stapelberg
9ae769dee0
cacerts: log → fmt
2021-11-20 16:52:01 +01:00