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

[SME][Docker] Add Fixed Virtual Platform (FVP) and toolchain install #16755

Merged
merged 1 commit into from
Mar 21, 2024
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
5 changes: 5 additions & 0 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
@@ -149,3 +149,8 @@ RUN bash /install/ubuntu_install_libxsmm.sh
# ONNX and PyTorch
COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
RUN bash /install/ubuntu_install_onnx.sh

# AArch64 Architecture Envelope Model (AEM)
COPY install/ubuntu_install_aprofile_aem.sh /install
RUN bash /install/ubuntu_install_aprofile_aem.sh
ENV PATH $PATH:/opt/arm/fvp/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/:/opt/arm/gcc-aarch64-none-elf/bin
54 changes: 54 additions & 0 deletions docker/install/ubuntu_install_aprofile_aem.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Install the AArch64 Architecture Envelope Model (AEM)

set -e
set -u
set -o pipefail

tmpdir=$(mktemp -d)

cleanup()
{
rm -rf "$tmpdir"
}

trap cleanup 0

pushd "$tmpdir"

# Install GCC toolchain
gcc_install_dir="/opt/arm/gcc-aarch64-none-elf"
gcc_url="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz?rev=28d5199f6db34e5980aae1062e5a6703&hash=D87D4B558F0A2247B255BA15C32A94A9F354E6A8"
gcc_sha="7fe7b8548258f079d6ce9be9144d2a10bd2bf93b551dafbf20fe7f2e44e014b8"
gcc_tar="arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz"
mkdir -p $gcc_install_dir
curl --retry 64 -sSL $gcc_url -o $gcc_tar
echo "$gcc_sha $gcc_tar" | sha256sum --check
tar -xf $gcc_tar -C $gcc_install_dir --strip-components=1

# Download FVP
fvp_dir="/opt/arm/fvp"
fvp_url="https://developer.arm.com/-/media/Files/downloads/ecosystem-models/FVP_Base_RevC-2xAEMvA_11.24_11_Linux64.tgz"
fvp_sha="0f132334834cbc66889a62dd72057c976d7c7dfcfeec21799e9c78fb2ce24720"
curl --retry 64 -sSL $fvp_url -o fvp.tgz
echo "$fvp_sha fvp.tgz" | sha256sum --check
mkdir -p "$fvp_dir"
tar -xzf fvp.tgz -C "$fvp_dir"
rm -rf doc # Remove some documentation bundled with the package