-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-yocto-env.sh
executable file
·36 lines (29 loc) · 1.33 KB
/
setup-yocto-env.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
#!/usr/bin/env bash
source lib/common.sh
display_banner "YOCTO SETUP"
display_banner "Checking Supported OS"
if ! check_build_os; then
echo "Error: Unsupported operating system."
echo "This script is intended to run on the following OS:"
echo "- Ubuntu 20.04 (LTS)"
echo "- Ubuntu 22.04 (LTS)"
exit 1
fi
display_banner "Updating and Upgrading Packages"
sudo apt update || handle_warning "Failed to update packages."
sudo apt upgrade -y || handle_warning "Failed to upgrade packages."
echo "Packages updated and upgraded successfully."
echo
display_banner "Installing Required Packages"
sudo apt install -y gawk wget git diffstat unzip texinfo \
gcc build-essential chrpath socat cpio \
python3 python3-pip python3-pexpect xz-utils \
debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev python3-subunit \
mesa-common-dev zstd liblz4-tool file locales libacl1 || handle_warning "Failed to install packages."
echo "Required packages installed successfully."
echo
display_banner "Installing Required Python Packages"
pip install pipoe
display_banner "Virtual Box Conversion Tools"
sudo apt install -y qemu-utils genisoimage || handle_warning "Failed to install packages."