Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QEMU] Add number of cores, target list for build #8156

Merged
merged 10 commits into from
Jun 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions docker/install/ubuntu_install_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,32 @@
# specific language governing permissions and limitations
# under the License.

#
# Install QEMU on Ubuntu.
#
# Usage: ubuntu_install_qemu.sh [--target-list target0,target1,...]
# --target-list is list of target for QEMU comma seperated. e.g. aarch64-softmmu,arm-softmmu,...
#

set -e
set -u
set -o pipefail

# Get number of cores for build
if [ -n "${TVM_CI_NUM_CORES}" ]; then
num_cores=${TVM_CI_NUM_CORES}
else
num_cores=2
fi

# Set target list for QEMU
if [ "$1" == "--target-list" ]; then
shift
target_list=$1
else
# Build these by defualt for microtvm reference virtual machine and ci_qemu.
target_list="aarch64-softmmu,arm-softmmu,i386-softmmu,riscv32-softmmu,riscv64-softmmu,x86_64-softmmu"
mehrdadh marked this conversation as resolved.
Show resolved Hide resolved
fi

sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list
apt update
apt-get -y build-dep qemu
Expand All @@ -44,8 +66,8 @@ gpg --verify qemu-5.1.0.tar.xz.sig

tar -xf qemu-5.1.0.tar.xz
cd qemu-5.1.0
./configure --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,riscv32-softmmu,riscv64-softmmu,x86_64-softmmu
make -j2
./configure --target-list=${target_list}
mehrdadh marked this conversation as resolved.
Show resolved Hide resolved
make -j${num_cores}
sudo make install

# For debugging with qemu
Expand Down