chore: simplify gokrazy image creation

This commit is contained in:
andig 2022-10-17 20:07:06 +02:00
parent af5e2cdfa6
commit cf4796d9be

View file

@ -19,7 +19,7 @@ PLATFORM := linux/amd64,linux/arm64,linux/arm/v6
# gokrazy image
IMAGE_FILE := evcc_$(TAG_NAME).image
IMAGE_ROOTFS := evcc_$(TAG_NAME).rootfs
IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybox github.com/gokrazy/breakglass github.com/gokrazy/wifi github.com/evcc-io/evcc
IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybox github.com/gokrazy/breakglass github.com/gokrazy/mkfs github.com/gokrazy/wifi github.com/evcc-io/evcc
# deb
PACKAGES = ./release
@ -105,17 +105,14 @@ apt-release::
)
# gokrazy image
prepare-image::
image::
go install github.com/gokrazy/tools/cmd/gokr-packer@main
mkdir -p flags/github.com/gokrazy/breakglass
echo "-forward=private-network" > flags/github.com/gokrazy/breakglass/flags.txt
mkdir -p buildflags/github.com/evcc-io/evcc
echo "$(BUILD_TAGS),gokrazy" > buildflags/github.com/evcc-io/evcc/buildflags.txt
echo "-ldflags=$(LD_FLAGS)" >> buildflags/github.com/evcc-io/evcc/buildflags.txt
image::
gokr-packer -overwrite=$(IMAGE_FILE) -target_storage_bytes=1258299392 $(IMAGE_OPTIONS)
loop=$$(losetup --find --show -P $(IMAGE_FILE)); mkfs.ext4 $${loop}p4
gzip -f $(IMAGE_FILE)
image-rootfs::