This repository was archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 640
Expand file tree
/
Copy pathsetup-ubuntu.sh
More file actions
67 lines (55 loc) · 1.3 KB
/
setup-ubuntu.sh
File metadata and controls
67 lines (55 loc) · 1.3 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
#!/bin/bash
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo "Please execute with target device and image.
$0 target_device image
Usage:
$0 [arm64 | amd64] [ubuntu-version like 22.04]"
exit 1
fi
arch=$1
UBUNTU_VERSION=$2
apt-get update
apt-get install wget -y
# Add Public microsoft repo keys to the image
wget -q https://packages.microsoft.com/config/ubuntu/${UBUNTU_VERSION}/packages-microsoft-prod.deb -P /tmp
dpkg -i /tmp/packages-microsoft-prod.deb
echo "Setting up for building $arch binaries"
dpkg --add-architecture $arch
apt-get update
packages=(\
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
file \
dpkg-dev \
qemu \
binfmt-support \
qemu-user-static \
pkg-config \
ninja-build \
doxygen \
clang \
python3 \
gcc \
g++ \
git \
git-lfs \
nasm \
cmake \
powershell \
libgl1-mesa-dev:$arch \
libsoundio-dev:$arch \
libjpeg-dev:$arch \
libvulkan-dev:$arch \
libx11-dev:$arch \
libxcursor-dev:$arch \
libxinerama-dev:$arch \
libxrandr-dev:$arch \
libusb-1.0-0-dev:$arch \
libssl-dev:$arch \
libudev-dev:$arch \
mesa-common-dev:$arch \
uuid-dev:$arch )
if [ "$arch" = "amd64" ]; then
packages+=(libopencv-dev:$arch)
fi
apt-get install -y --no-install-recommends ${packages[@]}