-
Notifications
You must be signed in to change notification settings - Fork 1
/
part_2_install_petalinux_prereqs.sh
79 lines (77 loc) · 2.07 KB
/
part_2_install_petalinux_prereqs.sh
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
#!/bin/bash
#
# Libraries for running called out in ??? (some official Xilinx doc)
# > > Despite some hour of searching, I could not refind this official pdf...
# the packages listed in 000035006 may prove more useful anyhow, as the
# particular versions are called out. The conversion is left as an exercise
# for the reader.
#
# Relevant Documentation (UG):
# UG1144 - Petalinux Tools Reference Guide
# 000035006 - "PetaLinux 2023.1 - Product Update Release Notes and Known Issues" ( [Link](https://support.xilinx.com/s/article/000035006?language=en_US) )
# > > At the page bottom, are an xlsx and txt. Download them, and they will list the required libs for your distro
# 63794 - "Install - What Ubuntu files are required for Vivado to run successfully?" ( [Link](https://support.xilinx.com/s/article/63794?language=en_US) )
# > > A bit old, some of this is taken care of with the installer binary
#
pkgs=(\
"iproute2" \
"gcc" \
"g++" \
"net-tools" \
"libncurses5-dev" \
"zlib1g:i386" \
"libssl-dev" \
"flex" \
"bison" \
"libselinux1" \
"xterm" \
"autoconf" \
"libtool" \
"texinfo" \
"zlib1g-dev" \
"gcc-multilib" \
"build-essential" \
#SDL-devel \
#glibc-devel \
#glibc \
#glib2-devel \
"automake" \
"screen" \
"pax" \
"gawk" \
"python3" \
"python3-pexpect" \
"python3-pip" \
"python3-git" \
"python3-jinja2" \
"perl" \
"patch" \
"diffutils" \
"cpp" \
#perl-Data-Dumper \
#perl-Text-ParseWords \
#perl-Thread-Queue \
"xz-utils" \
#which \
"debianutils" \
"iputils-ping" \
"libegl1-mesa" \
"libsdl1.2-dev" \
"pylint" \
"cpio" )
if [[ "$EUID" = 0 ]]; then
echo "Running as 'root', please run as sudo"
else
sudo -k # make sure to ask for password on next sudo
if sudo true; then
sudo apt install -y "${pkgs[@]}"
sudo apt install -y tftpd-hpa # Needs this or PetaL whines
sudo touch /var/lib/tftpboot
sudo chown -R tftp /var/lib/tftpboot
sudo chown -R tftp /srv/tftp/
sudo dpkg-reconfigure dash # At least Ubuntu uses dash, other distros may skip?
else
echo "Wrong password"
exit 1
fi
fi