Skip to content

Commit

Permalink
Convert all boards from json to hcl
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast committed Jan 2, 2024
1 parent a42d6e2 commit c6ea1a0
Show file tree
Hide file tree
Showing 38 changed files with 753 additions and 860 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,27 @@ jobs:
fail-fast: false
matrix:
boards:
#- bananapi-r1/archlinuxarm.json
- beaglebone-black/angstrom.json
- beaglebone-black/archlinuxarm.json
- beaglebone-black/debian.json
#- bananapi-r1/archlinuxarm.pkr.hcl
- beaglebone-black/angstrom.pkr.hcl
- beaglebone-black/archlinuxarm.pkr.hcl
- beaglebone-black/debian.pkr.hcl
- beaglebone-black/ubuntu.pkr.hcl
#- jetson-nano/ubuntu.json
- odroid-u3/archlinuxarm.json
- odroid-xu4/archlinuxarm.json
- odroid-xu4/ubuntu.json
- parallella/archlinuxarm.json
- parallella/ubuntu.json
- raspberry-pi/archlinuxarm.json
- raspberry-pi/raspbian.json
- raspberry-pi/raspbian-resize.json
- raspberry-pi/raspios-lite-arm.json
- raspberry-pi-3/archlinuxarm.json
- raspberry-pi-3/raspios-lite-arm64.json
- raspberry-pi-4/ubuntu_server_20.04_arm64.json
#- jetson-nano/ubuntu.pkr.hcl
- odroid-u3/archlinuxarm.pkr.hcl
- odroid-xu4/archlinuxarm.pkr.hcl
- odroid-xu4/ubuntu.pkr.hcl
- parallella/archlinuxarm.pkr.hcl
- parallella/ubuntu.pkr.hcl
- raspberry-pi/archlinuxarm.pkr.hcl
- raspberry-pi/raspbian.pkr.hcl
- raspberry-pi/raspbian-resize.pkr.hcl
- raspberry-pi/raspios-lite-arm.pkr.hcl
- raspberry-pi-3/archlinuxarm.pkr.hcl
- raspberry-pi-3/raspios-lite-arm64.pkr.hcl
- raspberry-pi-4/ubuntu_server_20.04_arm64.pkr.hcl
- raspberry-pi-4/archlinuxarm.pkr.hcl
- rock-4b/debos-radxa.pkr.hcl
- wandboard/archlinuxarm.json
- wandboard/archlinuxarm.pkr.hcl
name: Build ${{ matrix.boards }} image
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -166,7 +165,7 @@ jobs:
run: |
vagrant ssh -c " \
cd packer-plugin-cross && \
sudo PACKER_LOG=1 packer build boards/raspberry-pi-3/archlinuxarm.json \
sudo PACKER_LOG=1 packer build boards/raspberry-pi-3/archlinuxarm.pkr.hcl \
"
- name: Check result
Expand Down
38 changes: 0 additions & 38 deletions boards/armv7/alpine.json

This file was deleted.

35 changes: 35 additions & 0 deletions boards/armv7/alpine.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

source "cross" "alpine" {
file_checksum_type = "sha256"
file_checksum_url = "http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/armhf/alpine-minirootfs-3.12.0-armhf.tar.gz.sha256"
file_target_extension = "tar.gz"
file_unarchive_cmd = ["bsdtar", "-xpf", "$ARCHIVE_PATH", "-C", "$MOUNTPOINT"]
file_urls = ["http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/armhf/alpine-minirootfs-3.12.0-armhf.tar.gz"]
image_build_method = "new"
image_chroot_env = ["PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:/usr/sbin"]
image_partitions {
filesystem = "ext4"
mountpoint = "/"
name = "root"
size = "0"
start_sector = "4096"
type = "83"
}
image_path = "alpine.img"
image_size = "4G"
image_type = "dos"
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
}

build {
sources = ["source.cross.alpine"]

provisioner "shell" {
inline = [
"echo 'nameserver 8.8.8.8' > /etc/resolv.conf",
"apk update"
]
}

}
44 changes: 0 additions & 44 deletions boards/bananapi-r1/archlinuxarm.json

This file was deleted.

41 changes: 41 additions & 0 deletions boards/bananapi-r1/archlinuxarm.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

source "cross" "archlinux" {
file_checksum_type = "md5"
file_checksum_url = "http://mkaczanowski.com/files/archlinux-bpi-r1-2017-28-2017-4.6.5-sunxi-mainline.img.gz.md5"
file_target_extension = "gz"
file_unarchive_cmd = ["gunzip", "$ARCHIVE_PATH"]
file_urls = ["http://mkaczanowski.com/files/archlinux-bpi-r1-2017-28-2017-4.6.5-sunxi-mainline.img.gz"]
image_build_method = "reuse"
image_partitions {
filesystem = "vfat"
mountpoint = "/boot"
name = "boot"
size = "56M"
start_sector = "8192"
type = "c"
}
image_partitions {
filesystem = "ext4"
mountpoint = "/"
name = "root"
size = "3.7G"
start_sector = "122880"
type = "83"
}
image_path = "bananapi-r1.img"
image_size = "4G"
image_type = "dos"
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
}

build {
sources = ["source.cross.archlinux"]

provisioner "shell" {
inline = [
"touch /tmp/test"
]
}

}
45 changes: 0 additions & 45 deletions boards/beaglebone-black/angstrom.json

This file was deleted.

42 changes: 42 additions & 0 deletions boards/beaglebone-black/angstrom.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

source "cross" "angstrom" {
file_checksum = "6de3e854014d5b69381043f6d40fc24feb3a478577db3e2915e3b55871ae1cf4"
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["xz", "-d", "$ARCHIVE_PATH"]
file_urls = ["https://s3.amazonaws.com/angstrom/demo/beaglebone/Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.06.20.img.xz"]
image_build_method = "reuse"
image_chroot_env = ["PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:/usr/sbin"]
image_partitions {
filesystem = "vfat"
mountpoint = "/boot"
name = "boot"
size = "79.6M"
start_sector = "63"
type = "c"
}
image_partitions {
filesystem = "ext4"
mountpoint = "/"
name = "root"
size = "0"
start_sector = "147456"
type = "83"
}
image_path = "beaglebone-black.img"
image_size = "4G"
image_type = "dos"
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
}

build {
sources = ["source.cross.angstrom"]

provisioner "shell" {
inline = [
"touch /tmp/test"
]
}

}
37 changes: 0 additions & 37 deletions boards/beaglebone-black/archlinuxarm.json

This file was deleted.

34 changes: 34 additions & 0 deletions boards/beaglebone-black/archlinuxarm.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

source "cross" "archlinux" {
file_checksum_type = "md5"
file_checksum_url = "http://de4.mirror.archlinuxarm.org/os/ArchLinuxARM-am33x-latest.tar.gz.md5"
file_target_extension = "tar.gz"
file_unarchive_cmd = ["bsdtar", "-xpf", "$ARCHIVE_PATH", "-C", "$MOUNTPOINT"]
file_urls = ["http://os.archlinuxarm.org/os/ArchLinuxARM-am33x-latest.tar.gz"]
image_build_method = "new"
image_partitions {
filesystem = "ext4"
mountpoint = "/"
name = "root"
size = "0"
start_sector = "2048"
type = "83"
}
image_path = "beaglebone-black.img"
image_size = "2G"
image_type = "dos"
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
}

build {
sources = ["source.cross.archlinux"]

provisioner "shell" {
inline = [
"pacman-key --init",
"pacman-key --populate archlinuxarm"
]
}

}
Loading

0 comments on commit c6ea1a0

Please sign in to comment.