-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhook-os.yaml
More file actions
256 lines (230 loc) · 5.54 KB
/
hook-os.yaml
File metadata and controls
256 lines (230 loc) · 5.54 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
---
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# Attention, this is a template that is run through envsubst
# but with a specific list of variables to replace. Thus:
# - HOOK_VERSION: ${HOOK_VERSION} (a simple 1.2.3 string, no 'v')
# - HOOK_KERNEL_IMAGE: ${HOOK_KERNEL_IMAGE}
# - HOOK_KERNEL_ID: ${HOOK_KERNEL_ID}
# - HOOK_KERNEL_VERSION: ${HOOK_KERNEL_VERSION}
# - HOOK_CONTAINER_BOOTKIT_IMAGE: ${HOOK_CONTAINER_BOOTKIT_IMAGE}
# - HOOK_CONTAINER_DOCKER_IMAGE: ${HOOK_CONTAINER_DOCKER_IMAGE}
# - HOOK_CONTAINER_MDEV_IMAGE: ${HOOK_CONTAINER_MDEV_IMAGE}
# - HOOK_CONTAINER_CONTAINERD_IMAGE: ${HOOK_CONTAINER_CONTAINERD_IMAGE}
# - HOOK_CONTAINER_RUNC_IMAGE: ${HOOK_CONTAINER_RUNC_IMAGE}
# - HOOK_CONTAINER_EMBEDDED_IMAGE: ${HOOK_CONTAINER_EMBEDDED_IMAGE}
# - Other variables are not replaced: for example this is a
# - literal dollarsign-SOMETHING:$SOMETHING and with braces: ${SOMETHING}
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
kernel:
image: "${HOOK_KERNEL_IMAGE}"
cmdline: "console=tty0 console=ttyS0"
init:
# this init container sha has support for volumes
- linuxkit/init:872d2e1be745f1acb948762562cf31c367303a3b
- "${HOOK_CONTAINER_RUNC_IMAGE}"
- "${HOOK_CONTAINER_CONTAINERD_IMAGE}"
- linuxkit/ca-certificates:v1.0.0
- linuxkit/firmware:24402a25359c7bc290f7fc3cd23b6b5f0feb32a5
- "${HOOK_CONTAINER_EMBEDDED_IMAGE}"
onboot:
- name: rngd1
image: linuxkit/rngd:v1.0.0
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:v1.0.0
- name: sysfs
image: linuxkit/sysfs:v1.0.0
- name: modprobe
image: linuxkit/modprobe:v1.0.0
command: ["modprobe", "cdc_ncm"]
services:
- name: rngd
image: linuxkit/rngd:v1.0.0
- name: mdev
image: "${HOOK_CONTAINER_MDEV_IMAGE}"
command: ["mdev", "-v", "-S", "-df"]
capabilities:
- all
binds:
- /dev/:/dev/
- /lib/modules:lib/modules
rootfsPropagation: shared
devices:
- path: all
type: b
- name: getty
image: linuxkit/getty:v1.0.0
capabilities:
- all
binds.add:
- /etc/securetty:/etc/securetty
- /:/host_root
- /dev:/dev
- /dev/console:/dev/console
env:
- INSECURE=true
devices:
- path: all
type: b
- path: all
type: c
- path: "/dev/console"
type: c
major: 5
minor: 1
mode: "0666"
- path: "/dev/tty0"
type: c
major: 4
minor: 0
mode: "0666"
- path: "/dev/tty1"
type: c
major: 4
minor: 1
mode: "0666"
- path: "/dev/ttyS0"
type: c
major: 4
minor: 64
mode: "0666"
- path: "/dev/ttyS1"
type: c
major: 4
minor: 65
mode: "0666"
- path: "/dev/ttyS2"
type: c
major: 4
minor: 66
mode: "0666"
- path: "/dev/ttyAMA0"
type: c
major: 204
minor: 64
mode: "0666"
- path: "/dev/ttyAMA1"
type: c
major: 204
minor: 65
mode: "0666"
- path: "/dev/ttyAML0"
type: c
major: 243
minor: 0
mode: "0666"
- path: "/dev/ttyAML1"
type: c
major: 243
minor: 1
mode: "0666"
- path: "/dev/ttyUSB0"
type: c
major: 188
minor: 0
mode: "0666"
- path: "/dev/ttyUSB1"
type: c
major: 188
minor: 1
mode: "0666"
- name: dhcpcd-daemon
image: linuxkit/dhcpcd:v1.0.0
command: ["/etc/ip/dhcp.sh", "false"]
capabilities:
- all
binds.add:
- /var/lib/dhcpcd:/var/lib/dhcpcd
- /run:/run
- /etc/ip/dhcp.sh:/etc/ip/dhcp.sh
- /dhcpcd.conf:/dhcpcd.conf
runtime:
mkdir:
- /var/lib/dhcpcd
- name: os-installer
image: debian:12.10
command: ["/bin/bash", "-c", "/etc/scripts/install-os.sh"]
capabilities:
- all
net: host
binds.add:
- /dev:/dev
- /run:/run
- /etc/scripts:/etc/scripts/
- /:/host
- /var/log/os-installer.log:/var/log/os-installer.log
- /etc/scripts/install-os.sh:/etc/scripts/install-os.sh
runtime:
mkdir:
- /var/lib/os-installd
devices:
- path: all
type: b
- path: all
type: c
files:
- path: etc/scripts/install-os.sh
source: "files/install-os.sh"
mode: "0777"
- path: etc/scripts/cloud-init.yaml
source: "files/cloud-init.yaml"
mode: "0777"
- path: etc/scripts/enable-dmv.sh
source: "files/enable-dmv.sh"
mode: "0777"
- path: etc/scripts/collect-logs.sh
source: "files/collect-logs.sh"
mode: "0777"
- path: etc/scripts/rke2-setup-post-reboot.sh
source: "files/rke2-setup-post-reboot.sh"
mode: "0777"
- path: sbin/setup-dns
source: "files/setup-dns.sh"
mode: "0777"
- path: etc/ip/dhcp.sh
source: "files/dhcp.sh"
mode: "0777"
- path: dhcpcd.conf
source: "files/dhcpcd.conf"
mode: "0644"
- path: etc/motd
mode: "0644"
contents: ""
- path: etc/issue
mode: "0644"
contents: ""
- path: etc/securetty
contents: |
console
tty0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
hvc0
ttyS0
ttyS1
ttyS2
ttyAMA0
ttyAMA1
ttyAML0
ttyAML1
ttyUSB0
ttyUSB1
ttyUSB2
- path: etc/hook/env_config
contents: ""
mode: "0644"
trust:
org:
- linuxkit
- library