-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathdebian.yaml
104 lines (87 loc) · 2.37 KB
/
debian.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
94
95
96
97
98
99
100
101
102
103
104
{{- $board := or .board "pine64_plus" -}}
{{- $suite := or .suite "bullseye" -}}
{{- $mirror := or .mirror "http://deb.debian.org/debian" -}}
{{- $hostname := or .hostname "debian-pine-a64plus" -}}
{{- $image := or .image (printf "debos-debian-%s-%s.img" $suite $board) -}}
architecture: "arm64"
actions:
- action: debootstrap
suite: {{ $suite }}
components:
- main
- contrib
- non-free
mirror: {{ $mirror }}
variant: minbase
- action: apt
description: Install some packages
recommends: false
packages:
- sudo
- openssh-server
- isc-dhcp-client
- iproute2
- ifupdown
# Boot and kernel setup
- action: apt
description: Install kernel, bootloader and init packages
update: false
recommends: false
packages:
- u-boot-menu
- u-boot-sunxi
- linux-image-arm64
- init
- action: overlay
source: overlays/u-boot
- action: run
description: U-Boot menu update
chroot: true
command: /usr/sbin/u-boot-update
# End of kernel and boot setup
- action: run
description: Setup hostname
chroot: true
command: |
echo "{{ $hostname }}" >/etc/hostname
echo "127.0.0.1 localhost {{ $hostname }}" >/etc/hosts
- action: run
description: Setup user
chroot: true
script: scripts/setup-user.sh
- action: overlay
description: Network setup
source: overlays/network-setup
- action: image-partition
imagename: {{ $image }}
imagesize: 1GB
partitiontype: msdos
mountpoints:
- mountpoint: /
partition: root
partitions:
- name: root
fs: ext4
start: 2MB
end: 100%
flags: [ boot ]
- action: filesystem-deploy
description: Deploying filesystem onto image
- action: raw
description: Writing U-Boot SPL image
origin: filesystem
source: /usr/lib/u-boot/{{ $board }}/sunxi-spl.bin
offset: {{ sector 16 }}
- action: raw
description: Writing U-Boot FIT image
origin: filesystem
source: /usr/lib/u-boot/{{ $board }}/u-boot-sunxi-with-spl.fit.itb
offset: {{ sector 80 }}
- action: run
description: Create block map (bmap)
postprocess: true
command: bmaptool create {{ $image }} > {{ $image }}.bmap
- action: run
description: Pack result image
postprocess: true
command: xz -z -v -f -T 0 {{ $image }}