-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimage.yaml
98 lines (86 loc) · 2.38 KB
/
image.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
{{ $architecture := or .architecture "arm64" }}
{{ $suite := or .suite "bullseye" }}
{{ $osinpack := or .osinpack "mediapack" }}
{{ $ospack := or .ospack (printf "%s-%s-%s" $osinpack $suite $architecture) }}
{{ $board := or .board "neu6b-io" }}
{{ $imagesize := or .imagesize "6GB" }}
{{ $buildnr := or .buildnr "b0" }}
{{ $image := or .image (printf "ncm6b-openaia-deb11-%s" $buildnr) }}
architecture: {{ $architecture }}
actions:
- action: unpack
description: Unpack {{ $ospack }}
file: {{ $ospack }}.tar.gz
- action: image-partition
imagename: {{ $image }}.img
imagesize: {{$imagesize}}
partitiontype: gpt
mountpoints:
- mountpoint: /
partition: rootfs
- mountpoint: /boot
partition: boot
options: [ x-systemd.automount ]
partitions:
- name: loader1
fs: none
start: 64s
end: 7168s
- name: loader2
fs: none
start: 16384s
end: 24575s
- name: boot
fs: fat32
start: 32768S
end: 1081343S
flags: [ boot, esp ]
- name: rootfs
fs: ext4
start: 1081344S
end: 100%
partuuid: b921b045-1df0-41c3-af44-4c6f280d3fae
- action: filesystem-deploy
description: Deploying filesystem onto image
setup-fstab: true
setup-kernel-cmdline: true
- action: overlay
description: Copy Image, dtb
source: prebuilt/linux
destination: /boot
- action: overlay
description: Copy extlinux
source: overlay/boot/rockchip
destination: /boot
- action: overlay
description: Packages overlay
source: overlay/packages
destination: /opt
- action: run
description: Resize assistant
chroot: true
command: |
set -e
dpkg -i /opt/resize-assistant_0.2_all.deb
sudo rm -rf /opt/*
- action: raw
description: Flash idbloader.img to loader1
origin: recipe
source: prebuilt/idbloader.img
partition: loader1
offset: 0
- action: raw
description: Flash u-boot.itb to loader2
origin: recipe
source: prebuilt/u-boot.itb
partition: loader2
offset: 0
- action: run
description: Create block map for {{ $image }}.img
chroot: false
postprocess: true
command: bmaptool create {{ $image }}.img > {{ $image }}.bmap
- action: run
description: Compress {{ $image }}.img
postprocess: true
command: pigz -f {{ $image }}.img