forked from bcomnes/raspi-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
95 lines (95 loc) · 2.69 KB
/
packer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"variables": {
"hostname": "deathstar",
"username": "shin",
"github_keys": "https://github.com/TryhardPickles.keys",
"git_user_email": "pickstryhard143@gmail.com",
"git_user_name": "Shin",
"size": "2G",
"img_url": "http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz",
"file_unarchive_bin": "bsdtar",
"file_unarchive_flags": "-xpvf",
"img_name": "raspberry-pi4.img",
"qemu_binary": "/usr/bin/qemu-aarch64-static",
"pi4_alt_fstab": "true",
"lockdown_root": "false",
"pi4_bootloader": "true",
"pi5_bootloader": "false",
"cm4_usb": "false"
},
"builders": [{
"type": "arm",
"file_urls" : ["{{user `img_url`}}"],
"file_checksum_url": "{{user `img_url`}}.md5",
"file_checksum_type": "md5",
"file_unarchive_cmd": ["{{user `file_unarchive_bin`}}", "{{user `file_unarchive_flags`}}", "$ARCHIVE_PATH", "-C", "$MOUNTPOINT"],
"file_target_extension": "tar.gz",
"image_build_method": "new",
"image_path": "{{user `img_name`}}",
"image_size": "{{user `size`}}",
"image_type": "dos",
"image_partitions": [
{
"name": "boot",
"type": "b",
"start_sector": "2048",
"filesystem": "vfat",
"size": "256M",
"mountpoint": "/boot"
},
{
"name": "root",
"type": "83",
"start_sector": "526336",
"filesystem": "ext4",
"size": "0",
"mountpoint": "/"
}
],
"qemu_binary_source_path": "{{user `qemu_binary`}}",
"qemu_binary_destination_path": "{{user `qemu_binary`}}"
}],
"provisioners": [
{
"type": "file",
"source": "resizerootfs",
"destination": "/tmp/resizerootfs"
},
{
"type": "file",
"source": "resizerootfs.service",
"destination": "/tmp/resizerootfs.service"
},
{
"type": "file",
"source": "mac-host",
"destination": "/tmp/mac-host"
},
{
"type": "file",
"source": "mac-host.service",
"destination": "/tmp/mac-host.service"
},
{
"type": "file",
"source": "throttle.sh",
"destination": "/tmp/throttle.sh"
},
{
"type": "shell",
"script": "bootstrap.sh",
"environment_vars": [
"HOSTNAME={{user `hostname`}}",
"USERNAME={{user `username`}}",
"GITHUB_KEYS={{user `github_keys`}}",
"GIT_USER_NAME={{user `git_user_name`}}",
"GIT_USER_EMAIL={{user `git_user_email`}}",
"PI4_ALT_FSTAB={{user `pi4_alt_fstab`}}",
"LOCKDOWN_ROOT={{user `lockdown_root`}}",
"PI4_BOOTLOADER={{user `pi4_bootloader`}}",
"PI5_BOOTLOADER={{user `pi5_bootloader`}}",
"CM4_USB={{user `cm4_usb`}}"
]
}
]
}