-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathandroid9-generic.yaml
69 lines (59 loc) · 2.7 KB
/
android9-generic.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
{{- $architecture := or .architecture "armhf" -}}
{{- $image := or .image (printf "ubuntu-touch-android9-%s.tar.gz" $architecture) -}}
{{- $output_type := "tarball" -}}
{{- $channel := or .channel "devel" -}}
architecture: {{ $architecture }}
actions:
- action: download
description: Download latest ubuntu touch rootfs from CI
{{ if eq $channel "devel" }}
{{ if eq $architecture "arm64" }}
url: "https://ci.ubports.com/job/xenial-hybris-rootfs-{{ $architecture }}/lastSuccessfulBuild/artifact/out/ubuntu-touch-hybris-xenial-{{ $architecture }}-rootfs.tar.gz"
{{ end }}{{ if eq $architecture "armhf" }}
url: "https://ci.ubports.com/job/xenial-rootfs-{{ $architecture }}/lastSuccessfulBuild/artifact/out/ubports-touch.rootfs-xenial-{{ $architecture }}.tar.gz"
{{ end }}{{ end }}
{{ if eq $channel "edge" }}
url: "https://ci.ubports.com/job/xenial-hybris-edge-rootfs-{{ $architecture }}/lastSuccessfulBuild/artifact/out/ubuntu-touch-hybris-xenial-edge-{{ $architecture }}-rootfs.tar.gz"
{{ end }}
unpack: false
filename: ut-rootfs.tar.gz
name: ut-rootfs.tar.gz
- action: unpack
description: Unpacking rootfs
origin: ut-rootfs.tar.gz
compression: gz
- action: run
chroot: true
description: Adding Android 9 packages
script: scripts/add-android9-repos.sh {{ $channel }} {{ $architecture }}
- action: overlay
source: android9/overlay
description: Adding Android 9 base specific overlay
destination: /
- action: run
chroot: true
description: Create directories for Android mounts
command: mkdir -p /android /mnt/vendor/persist /mnt/vendor/efs /userdata && ln -s /android/data /data && ln -s /android/system /system && ln -s /android/vendor /vendor && ln -s /android/cache /cache && ln -s /android/persist /persist && ln -s /android/product /product && ln -s /android/metadata /metadata && ln -s /android/efs /efs
- action: run
chroot: true
description: Remove udev override used in Halium setup
command: rm /etc/init/udev.override
- action: run
chroot: true
description: Enable SSH and USB network
command: sed -i 's/PasswordAuthentication=no/PasswordAuthentication=yes/g' /etc/init/ssh.override && sed -i 's/manual/start on startup/g' /etc/init/ssh.override && sed -i 's/manual/start on startup/g' /etc/init/usb-tethering.conf
- action: run
chroot: true
description: Setting password on phablet user
command: echo phablet:phablet | chpasswd
- action: recipe
description: Polish the image
recipe: polish.yaml
variables:
architecture: {{ $architecture }}
image: {{ $image }}
output_type: {{ $output_type }}
- action: pack
description: Compressing image
file: {{ $image }}
compression: gz