Update build

Signed-off-by: jayofelony <oudshoorn.jeroen@gmail.com>
This commit is contained in:
jayofelony
2024-07-01 07:51:18 +02:00
parent 087fd9cf09
commit 702d463194
4 changed files with 47 additions and 134 deletions

View File

@ -1,9 +1,9 @@
packer {
required_plugins {
arm = {
version = ">=1.0.0"
source = "github.com/michalfita/cross"
}
#arm = {
# version = ">=1.0.0"
# source = "github.com/michalfita/cross"
#}
ansible = {
source = "github.com/hashicorp/ansible"
version = ">= 1.1.1"
@ -19,41 +19,21 @@ variable "pwn_version" {
type = string
}
source "arm" "rpi32-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../../../pwnagotchi-32bit.img"
qemu_binary_source_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
image_build_method = "resize"
image_size = "9G"
image_type = "dos"
image_partitions {
name = "boot"
type = "c"
start_sector = "8192"
filesystem = "fat"
size = "256M"
mountpoint = "/boot/firmware"
}
image_partitions {
name = "root"
type = "83"
start_sector = "532480"
filesystem = "ext4"
size = "0"
mountpoint = "/"
}
source "arm-image" "rpi32-pwnagotchi" {
image_type = "raspberrypi"
iso_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz"
iso_checksum = "sha256:4fa99737265ac338a9ed0643f502246b97b928e5dfffa92939242e26e290638d"
output_filename = "../../../pwnagotchi-32bit.img"
qemu_binary = "qemu-arm-static"
qemu_args = ["-cpu", "arm1176"]
image_arch = "arm"
image_mounts = ["/boot/firmware","/"]
target_image_size = 9969908736
}
build {
name = "Raspberry Pi 32 Pwnagotchi"
sources = ["source.arm.rpi32-pwnagotchi"]
provisioner "shell" {
inline = ["uname -m"]
}
sources = ["source.arm-image.rpi32-pwnagotchi"]
provisioner "file" {
destination = "/usr/bin/"
sources = [