-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default version for targets qemu and panda
- Loading branch information
Showing
6 changed files
with
61 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,39 @@ | ||
#!/bin/bash | ||
source /etc/os-release | ||
# Usage ./build_panda.sh [architectures] | ||
# example: ./build_panda.sh arm-softmmu,mips-softmmu | ||
# | ||
|
||
repo="deb-src http://archive.ubuntu.com/ubuntu/ $UBUNTU_CODENAME-security main restricted" | ||
apt_src="/etc/apt/sources.list" | ||
TARGET_LIST="arm-softmmu,mips-softmmu,i386-softmmu" | ||
PANDA_NPROC=${PANDA_NPROC:-$(nproc)} | ||
|
||
set -e | ||
|
||
if [[ "$ID" == "ubuntu" ]] | ||
set -ex | ||
|
||
source /etc/os-release | ||
if [[ "$ID" != "ubuntu" ]] | ||
then | ||
if ! grep -q '^deb-src .*'$UBUNTU_CODENAME'-security main restricted' $apt_src; | ||
then | ||
echo "[WARNING] This script is about to add '$repo' to $apt_src" | ||
read -p "Do you want to continue? (Yes/No) " cont | ||
case $cont in | ||
Yes|yes|Y|y ) | ||
sudo bash -c "echo '$repo' >> $apt_src" | ||
echo "Continuing installation..." | ||
;; | ||
* ) echo "Aborting..." | ||
exit -1 | ||
;; | ||
esac | ||
fi | ||
|
||
# Use the panda install_ubuntu.sh script | ||
cd `dirname "$BASH_SOURCE"`/src/ | ||
git submodule update --init avatar-panda | ||
|
||
cd .. | ||
src/avatar-panda/panda/scripts/install_ubuntu.sh --disable-sdl --target-list=arm-softmmu | ||
|
||
mkdir -p build/ | ||
mv src/avatar-panda/build/ build/panda/ | ||
|
||
else | ||
echo "[Warning] Attempting to run installation on a non-ubuntu system." | ||
echo "You may have to install dependencies manually" | ||
|
||
cd `dirname "$BASH_SOURCE"`/src/ | ||
git submodule update --init avatar-panda | ||
|
||
cd avatar-panda | ||
git submodule update --init dtc | ||
|
||
mkdir -p ../../build/panda/panda | ||
cd ../../build/panda/panda | ||
../../../src/avatar-panda/configure --disable-sdl --target-list=arm-softmmu | ||
make -j ${PANDA_NPROC} | ||
echo "[ERROR] This script only supports Ubuntu systems" | ||
exit -1 | ||
fi | ||
|
||
|
||
if [[ $# -ge 1 ]] | ||
then | ||
TARGET_LIST="$1" | ||
fi | ||
echo "Building for targets: $TARGET_LIST" | ||
echo "" | ||
|
||
|
||
# Use the panda install_ubuntu.sh script | ||
cd `dirname "$BASH_SOURCE"`/src/ | ||
#git submodule update --init avatar-panda | ||
|
||
cd avatar-panda | ||
./panda/scripts/install_ubuntu.sh \ | ||
--disable-sdl \ | ||
--target-list=$TARGET_LIST | ||
|
||
echo "" | ||
echo "Export the following env variable:" | ||
echo "export AVATAR2_PANDA_EXECUTABLE=$PWD/arm-softmmu/panda-system-arm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule avatar-panda
updated
426 files
Submodule avatar-qemu
updated
6591 files