Skip to content

Commit

Permalink
Downgrade packer to fix armbian (solo-io/packer-plugin-arm-image#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurii Smetanka committed Oct 19, 2024
1 parent eb9f4d2 commit 9ec0e48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PACKER_VERSION := 1.11.0
PACKER_VERSION := 1.10.3
PWN_HOSTNAME := pwnagotchi
PWN_VERSION := $(shell cut -d"'" -f2 < pwnagotchi/_version.py)

Expand Down Expand Up @@ -26,7 +26,7 @@ UNSHARE := $(UNSHARE) --uts
endif

# sudo apt-get install qemu-user-static qemu-utils
all: packer image
# all: packer image

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

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

# image: packer
# export LC_ALL=en_GB.UTF-8
Expand All @@ -57,7 +60,7 @@ packer:
# export LC_ALL=en_GB.UTF-8
# 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

bpim4: packer
bpim4: clean packer
export LC_ALL=en_GB.UTF-8
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

Expand Down
6 changes: 1 addition & 5 deletions builder/bpim4.json.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
packer {
required_plugins {
arm-image = {
source = "github.com/solo-io/arm-image"
version = ">= 0.0.1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = ">= 1.1.1"
Expand All @@ -20,7 +16,7 @@ variable "pwn_version" {
}

source "arm-image" "bpim4-pwnagotchi" {
// image_type = "armbian"
image_type = "armbian"
image_arch = "arm64"
iso_url = "https://mirrors.dotsrc.org/armbian-dl/bananapim4zero/archive/Armbian_24.8.1_Bananapim4zero_bookworm_current_6.6.44.img.xz"
iso_checksum = "none"
Expand Down

0 comments on commit 9ec0e48

Please sign in to comment.