-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpinball.yaml
93 lines (80 loc) · 2.5 KB
/
pinball.yaml
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
{{- $architecture := or .architecture "i386" -}}
{{- $cmdline := or .cmdline "root=LABEL=root rootwait ro fsck.mode=auto fsck.repair=yes console=ttyS1,115200" -}}
{{- $machine := or .machine "generic" -}}
{{- $mirror := or .mirror "https://deb.debian.org/debian" -}}
{{- $project := or .project "pinball" -}}
{{- $suite := or .suite "bookworm" -}}
{{- $bootloader := or .bootloader "grub-pc" -}}
{{- $partitiontype := or .partitiontype "msdos" -}}
{{- $uboot_machine := or .uboot_machine "generic" -}}
{{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}}
architecture: {{$architecture}}
actions:
- action: debootstrap
suite: {{$suite}}
components:
- main
- non-free
- non-free-firmware
mirror: {{$mirror}}
variant: minbase
- action: run
chroot: true
command: |
cat /etc/os-release
cat<<EOF
URL: https://purl.org/rzr/pinball#
architecture: {{$architecture}}
image: {{$image}}
machine: {{$machine}}
suite: {{$suite}}
uboot_machine: {{$uboot_machine}}
EOF > /README.md
- action: run
chroot: true
command: apt-cache search linux-image
- action: apt
packages: [systemd-sysv,
adduser,
sudo,
]
- action: recipe
recipe: machine/{{$machine}}/actions.yaml
variables:
architecture: {{$architecture}}
image: {{$image}}
machine: {{$machine}}
uboot_machine: {{$uboot_machine}}
bootloader: {{$bootloader}}
partitiontype: {{$partitiontype}}
- action: run
chroot: true
command: echo {{$project}} > /etc/hostname
- action: run
description: Set up user
chroot: true
command: >
/sbin/adduser --gecos user --disabled-password --shell /bin/bash user
&& /sbin/adduser user sudo
&& sh -c "echo 'user:user' | chpasswd"
- action: overlay
source: ../../extra/profile/pinball/etc/pinball/
destination: /etc/pinball/
- action: overlay
source: ../../extra/profile/pincab/etc/pinball/
destination: /etc/pinball/
- action: run
chroot: true
script: ../../extra/profile/pinball/etc/pinball/setup.sh
- action: filesystem-deploy
description: Deploying filesystem onto image
setup-kernel-cmdline: true
append-kernel-cmdline: {{$cmdline}}
- action: recipe
recipe: machine/{{$machine}}/image.yaml
variables:
architecture: {{$architecture}}
bootloader: {{$bootloader}}
image: {{$image}}
machine: {{$machine}}
uboot_machine: {{$uboot_machine}}