Skip to content

Commit 9ec0e48

Browse files
author
Yurii Smetanka
committed
Downgrade packer to fix armbian (solo-io/packer-plugin-arm-image#171)
1 parent eb9f4d2 commit 9ec0e48

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PACKER_VERSION := 1.11.0
1+
PACKER_VERSION := 1.10.3
22
PWN_HOSTNAME := pwnagotchi
33
PWN_VERSION := $(shell cut -d"'" -f2 < pwnagotchi/_version.py)
44

@@ -26,7 +26,7 @@ UNSHARE := $(UNSHARE) --uts
2626
endif
2727

2828
# sudo apt-get install qemu-user-static qemu-utils
29-
all: packer image
29+
# all: packer image
3030

3131
update_langs:
3232
@for lang in pwnagotchi/locale/*/; do\
@@ -40,10 +40,13 @@ compile_langs:
4040
./scripts/language.sh compile $$(basename $$lang); \
4141
done
4242

43-
packer:
43+
packer: clean
4444
curl https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_amd64.zip -o /tmp/packer.zip
4545
unzip -o /tmp/packer.zip -d /tmp
4646
sudo mv /tmp/packer /usr/bin/packer
47+
git clone https://github.com/solo-io/packer-builder-arm-image /tmp/packer-builder-arm-image
48+
cd /tmp/packer-builder-arm-image && go mod download && go build
49+
sudo cp /tmp/packer-builder-arm-image/packer-plugin-arm-image /usr/bin
4750

4851
# image: packer
4952
# export LC_ALL=en_GB.UTF-8
@@ -57,7 +60,7 @@ packer:
5760
# export LC_ALL=en_GB.UTF-8
5861
# cd builder && sudo /usr/bin/packer init raspberrypi64.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" raspberrypi64.json.pkr.hcl
5962

60-
bpim4: packer
63+
bpim4: clean packer
6164
export LC_ALL=en_GB.UTF-8
6265
cd builder && sudo /usr/bin/packer init bpim4.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" bpim4.json.pkr.hcl
6366

builder/bpim4.json.pkr.hcl

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
packer {
22
required_plugins {
3-
arm-image = {
4-
source = "github.com/solo-io/arm-image"
5-
version = ">= 0.0.1"
6-
}
73
ansible = {
84
source = "github.com/hashicorp/ansible"
95
version = ">= 1.1.1"
@@ -20,7 +16,7 @@ variable "pwn_version" {
2016
}
2117

2218
source "arm-image" "bpim4-pwnagotchi" {
23-
// image_type = "armbian"
19+
image_type = "armbian"
2420
image_arch = "arm64"
2521
iso_url = "https://mirrors.dotsrc.org/armbian-dl/bananapim4zero/archive/Armbian_24.8.1_Bananapim4zero_bookworm_current_6.6.44.img.xz"
2622
iso_checksum = "none"

0 commit comments

Comments
 (0)