From 6001998caa3615f31ae7d9a05269699456629367 Mon Sep 17 00:00:00 2001 From: Sumit Garg Date: Mon, 26 Sep 2022 12:46:05 +0530 Subject: [PATCH] external-arm-toolchain: Enable 11.3.rel1 support Enable support for 11.3.rel1 binary toolchain release. Also, update CI to use it. Signed-off-by: Sumit Garg Signed-off-by: Jon Mason --- ci/get-binary-toolchains | 18 +++++++++--------- .../external-arm-toolchain-versions.inc | 7 +++++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ci/get-binary-toolchains b/ci/get-binary-toolchains index bfdd8c57..ed334bf3 100755 --- a/ci/get-binary-toolchains +++ b/ci/get-binary-toolchains @@ -2,7 +2,7 @@ set -u HOST_ARCH=$(uname -m) -VER="11.2-2022.02" +VER="11.3.rel1" DOWNLOAD_DIR=$1 TOOLCHAIN_DIR=$2 @@ -15,32 +15,32 @@ if [ $HOST_ARCH = "aarch64" ]; then #AArch64 Linux hosted cross compilers #AArch32 target with hard float (arm-none-linux-gnueabihf) - wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz + wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz elif [ $HOST_ARCH = "x86_64" ]; then #x86_64 Linux hosted cross compilers #AArch32 target with hard float (arm-linux-none-gnueabihf) - wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz + wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz #AArch64 GNU/Linux target (aarch64-none-linux-gnu) - wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz + wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz #AArch64 GNU/Linux target (aarch64_be-none-linux-gnu) - wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz + wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz else echo "ERROR - Unknown build arch of $HOST_ARCH" exit 1 fi for i in arm aarch64 aarch64_be; do - if [ ! -d $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then - if [ ! -f $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then + if [ ! -d $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then + if [ ! -f $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then continue fi - tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz + tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz fi # Setup a link for the toolchain to use local to the building machine (e.g., not in a shared location) - ln -s $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i + ln -s $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i done diff --git a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc index 244de26a..92fb038c 100644 --- a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc +++ b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc @@ -23,12 +23,15 @@ def eat_get_version(d): last_line = stderr.splitlines()[-1] return last_line -# Extract the YYYY.MM version +# Extract the YYYY.MM or release version def eat_get_main_version(d): version = eat_get_version(d) bb.debug(2, 'Trying for parse version info from: %s' % version) if version != 'UNKNOWN': - if version.split()[4] == '(GNU': + if version.split()[4] == '(Arm': + # gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1) + return version.split()[7].split(')')[0] + elif version.split()[4] == '(GNU': # gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) # gcc version 8.2.1 20180802 (GNU Toolchain for the A-profile Architecture 8.2-2018.11 (arm-rel-8.26)) return version.split()[10].split('-')[1]