Skip to content

Commit

Permalink
Add aarch64 support to environment scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Gilligan <sean@msgilligan.com>
  • Loading branch information
msgilligan committed May 29, 2024
1 parent 1a25772 commit 26e0332
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
12 changes: 10 additions & 2 deletions build_optee_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ if [ -z "$TARGET_PATH" ]; then
fi

# set toolchain
export CROSS_COMPILE="aarch64-linux-gnu-"

HOST_ARCH=$(uname -m)

if [ "$HOST_ARCH" == "aarch64" ]; then
export CROSS_COMPILE=""
export CROSS_COMPILE64=""
else
export CROSS_COMPILE="aarch64-linux-gnu-"
export CROSS_COMPILE64="aarch64-linux-gnu-"
fi
export CROSS_COMPILE32="arm-linux-gnueabihf-"
export CROSS_COMPILE64="aarch64-linux-gnu-"

# build optee_os and optee_client for qemu_v8
git clone https://github.com/OP-TEE/optee_os.git -b $OPTEE_VERSION $TARGET_PATH/optee_os
Expand Down
11 changes: 9 additions & 2 deletions environment
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ fi
export OPTEE_OS_DIR="$OPTEE_DIR/optee_os"
export OPTEE_CLIENT_DIR="$OPTEE_DIR/optee_client"

export CROSS_COMPILE="aarch64-linux-gnu-"
HOST_ARCH=$(uname -m)

if [ "$HOST_ARCH" == "aarch64" ]; then
export CROSS_COMPILE=""
export CROSS_COMPILE64=""
else
export CROSS_COMPILE="aarch64-linux-gnu-"
export CROSS_COMPILE64="aarch64-linux-gnu-"
fi
export CROSS_COMPILE32="arm-linux-gnueabihf-"
export CROSS_COMPILE64="aarch64-linux-gnu-"

if [ "$ARCH" = "arm" ]
then
Expand Down

0 comments on commit 26e0332

Please sign in to comment.