forked from techcraftco/rpi-usb-gadget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu-server-arm64.json
80 lines (80 loc) · 2.02 KB
/
ubuntu-server-arm64.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
{
"builders": [
{
"type": "arm",
"file_urls": [
"https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04-preinstalled-server-arm64+raspi.img.xz"
],
"file_checksum_url": "https://cdimage.ubuntu.com/releases/22.04/release/SHA256SUMS",
"file_checksum_type": "sha256",
"file_target_extension": "xz",
"file_unarchive_cmd": [
"xz",
"--decompress",
"$ARCHIVE_PATH"
],
"image_build_method": "reuse",
"image_path": "ubuntu-server-arm64-22.04-arm64.img",
"image_size": "2G",
"image_type": "dos",
"image_partitions": [
{
"name": "boot",
"type": "c",
"start_sector": "8192",
"filesystem": "vfat",
"size": "256M",
"mountpoint": "/boot/firmware"
},
{
"name": "root",
"type": "83",
"start_sector": "532480",
"filesystem": "ext4",
"size": "0",
"mountpoint": "/"
}
],
"image_chroot_env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
],
"qemu_binary_source_path": "/usr/bin/qemu-arm-static",
"qemu_binary_destination_path": "/usr/bin/qemu-arm-static"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"rm /etc/resolv.conf",
"echo 'nameserver 1.1.1.1' \u003e /etc/resolv.conf",
"sudo apt update",
"sudo apt install -y dnsmasq avahi-daemon"
]
},
{
"type": "file",
"source": "sources//etc/dnsmasq.d/usb0",
"destination": "/etc/dnsmasq.d/usb0"
},
{
"type": "file",
"source": "sources//etc/netplan/20-rpi-gadget.yaml",
"destination": "/etc/netplan/20-rpi-gadget.yaml"
},
{
"type": "shell",
"inline": [
"echo '\ndtoverlay=dwc2,dr_mode=peripheral' \u003e\u003e /boot/firmware/config.txt",
"sed -i 's/rootwait/modules-load=dwc2,g_ether rootwait/' /boot/firmware/cmdline.txt",
"sed -i 's/#DNSMASQ_EXCEPT/DNSMASQ_EXCEPT/' /etc/default/dnsmasq ",
"echo port=0 \u003e\u003e /etc/dnsmasq.conf",
"echo interface=usb0 \u003e\u003e /etc/dnsmasq.conf"
]
},
{
"type": "shell",
"inline": "echo ::BUILD::SUCCESS"
}
]
}