-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootfs.yml
More file actions
103 lines (90 loc) · 2.94 KB
/
rootfs.yml
File metadata and controls
103 lines (90 loc) · 2.94 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
{{/* T3 Foundation Gemstone Project https://t3gemstone.org */}}
{{/* SPDX-License-Identifier Apache-2.0 */}}
{{/* https://github.com/go-debos/debos */}}
{{/* https://github.com/go-debos/debos-recipes */}}
{{/* https://pkg.go.dev/github.com/go-debos/debos/actions */}}
{{/* https://golang.org/pkg/text/template */}}
{{- $base := or .base "ubuntu" -}}
{{- $suite := or .suite "jammy" -}}
{{- $type := or .type "minimal" -}}
{{- $hostname := or .hostname (printf "%s-%s" $base $suite) -}}
architecture: arm64
actions:
- action: debootstrap
description: Create minimal system
suite: {{ $suite }}
variant: minbase
check-gpg: false
{{ if eq $base "debian" }}
components: [ main, contrib ]
mirror: https://deb.debian.org/debian
{{ else }}
components: [ main, multiverse, universe ]
mirror: 'https://ports.ubuntu.com/ubuntu-ports'
{{ end }}
- action: run
description: Configure system
chroot: true
command: |
# Setup hostname
echo "{{ $hostname }}" >/etc/hostname
echo "127.0.0.1 localhost {{ $hostname }}" >/etc/hosts
# Setup DNS
rm -f /etc/resolv.conf
echo "nameserver 1.1.1.1" >/etc/resolv.conf
echo "nameserver 1.0.0.1" >>/etc/resolv.conf
# Setup login
echo "command -v screenfetch && screenfetch" >> /root/.profile
- action: apt
description: Install tools
recommends: false
packages:
- apt-utils
- bash-completion
- bind9-dnsutils
- file
- iputils-ping
- less
- screenfetch
- sudo
- wget
- action: apt
description: Install essential libs
recommends: false
packages:
- dpkg-dev
- g++
- gcc
- libc-dev
- libc6-dev
- libdpkg-perl
- libssl-dev
- libstdc++6
- action: apt
description: Install other libs
recommends: false
packages:
- libncurses-dev
- libgpiod-dev
{{ if eq $type "qt" }}
- action: apt
description: Install essential qt libs
packages:
- qtbase5-dev
- qt6-base-dev
{{ end }}
- action: run
description: Add symlinks needed for cross compilation
chroot: true
command: |
hostname {{ $hostname }} # needed for sudo
wget --no-clobber --no-verbose -O /usr/local/bin/SSymlinker https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/utils/SSymlinker
chmod +x /usr/local/bin/SSymlinker
SSymlinker -s /usr/include/aarch64-linux-gnu/asm -d /usr/include
SSymlinker -s /usr/include/aarch64-linux-gnu/gnu -d /usr/include
SSymlinker -s /usr/include/aarch64-linux-gnu/bits -d /usr/include
SSymlinker -s /usr/include/aarch64-linux-gnu/sys -d /usr/include
SSymlinker -s /usr/include/aarch64-linux-gnu/openssl -d /usr/include
SSymlinker -s /usr/lib/aarch64-linux-gnu/crtn.o -d /usr/lib/crtn.o
SSymlinker -s /usr/lib/aarch64-linux-gnu/crt1.o -d /usr/lib/crt1.o
SSymlinker -s /usr/lib/aarch64-linux-gnu/crti.o -d /usr/lib/crti.o