Skip to contentSkip to conversation

arm-toolchain: gcc-arm-none-eabi-native: Add recipe

PATCH In review Jon Mason 5 participants 9 messages May 14, 2020

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 arm-toolchain: gcc-arm-none-eabi-native: Add recipe

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +37 -0
new file mode 100644
index 0000000..a0c832d
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"
+
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Signature · 1 line
2.20.1
#1 lore raw
Quoted 11 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb

Why does it have "major" in the version? I know we (TI) previosuly had "update" there, but if we are trying to unify, let's do it properly.

Another issue - one of our recipes had native and nativesdk support. This seems to be only native.

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 1

Quoted 7 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +1 -0
new file mode 100644
index 0000000..a0c832d
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries

Ouch!

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 11

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +10 -0
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"

This doesn't seem like a final release, does it?

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 18

Quoted 6 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +6 -0
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native

BBCLASSEXTEND?

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 29

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +10 -0
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)

What the hell is "lnr"? :) What am I missing?

Quoted 13 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +8 -0
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Signature · 1 line
2.20.1
#2 lore raw
Quoted 1 line · Denys Dmytriyenko

What the hell is "lnr"? :) What am I missing?

It's a script in oe-core/scripts that is basically a clone of 'ln --relative', as it's a really useful feature that isn't available on some old but supported build hosts.

Old but supported at the time that is, I do wonder if those hosts are no longer supported.

Ross

#3 lore raw
Quoted 9 lines · Ross Burton
Quoted 1 line · Denys Dmytriyenko

What the hell is "lnr"? :) What am I missing?

It's a script in oe-core/scripts that is basically a clone of 'ln --relative', as it's a really useful feature that isn't available on some old but supported build hosts.

Old but supported at the time that is, I do wonder if those hosts are no longer supported.

Ah, interesting! Thanks for the info!

Signature · 1 line
Denys
author
#4 lore raw
In reply to Denys Dmytriyenko
Quoted 20 lines · Denys Dmytriyenko
Quoted 11 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb

Why does it have "major" in the version? I know we (TI) previosuly had "update" there, but if we are trying to unify, let's do it properly.

Another issue - one of our recipes had native and nativesdk support. This seems to be only native.

Quoted 9 lines

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 1

Quoted 7 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +1 -0
new file mode 100644
index 0000000..a0c832d
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries

Ouch!

This is a 100% copy of what is in meta-rockchip. See
https://git.yoctoproject.org/cgit/cgit.cgi/meta-rockchip/tree/recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi-native_9-2019-q4-major.bb

So, they should get the credit for actually doing the work. I'll modify to incorporate the suggestions, assuming JPEW is in agreement.

Quoted 14 lines

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 11

Quoted 12 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +10 -0
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"

This doesn't seem like a final release, does it?

Looks like it should be (based on the website)
https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2

I'll come out with a v2 shortly. Thanks for the feedback.

Thanks,
Jon

Quoted 40 lines

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 18

Quoted 8 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +6 -0
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native

BBCLASSEXTEND?

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb line 29

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +10 -0
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)

What the hell is "lnr"? :) What am I missing?

Quoted 13 lines
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +8 -0
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Signature · 1 line
2.20.1
#5 lore raw
In reply to Jon Mason

Hi Jon,

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb

Quoted 14 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb +0 -0

This recipe seems to install the pre-built (external) GCC tool-set for Cortex-R and Cortex-M. So I would suggest you to import it under "meta-arm-toolchain/recipes-devtools/external-arm-toolchain/" directory rather than "meta-arm-toolchain/recipes-devtools/gcc/" directory as it is meant for recipes used to build ARM GCC tool-set from source.

-Sumit

Quoted 46 lines

new file mode 100644
index 0000000..a0c832d

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +37 -1
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"
+
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
--

2.20.1

#6 lore raw

Hi Sumit / all

<replying inline>
________________________________
From: [email protected] <[email protected]> on behalf of Sumit Garg via lists.yoctoproject.org <[email protected]>
Sent: Thursday, May 14, 2020 10:33 AM
To: Jon Mason <[email protected]>
Cc: [email protected] <[email protected]>; Joshua Watt <[email protected]>
Subject: Re: [meta-arm] [PATCH] arm-toolchain: gcc-arm-none-eabi-native: Add recipe

Hi Jon,

Quoted 15 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb +0 -0
Quoted 6 lines

This recipe seems to install the pre-built (external) GCC tool-set for Cortex-R and Cortex-M. So I would suggest you to import it under "meta-arm-toolchain/recipes-devtools/external-arm-toolchain/" directory rather than "meta-arm-toolchain/recipes-devtools/gcc/" directory as it is meant for recipes used to build ARM GCC tool-set from source.

Isn't the external folder importing meta-linaro which is again building from source ? Please correct me if I am wrong here.

So, should we introduce another folder to differentiate the bb recipes that are pulling prebuilt toolchains released by ARM ?

arm-embedded-gcc-arm-none-eabi < include bb recipes to fetch ARM prebuilt toolchains>
external-arm-toolchain <include recipes for toolchains built by third parties>
gcc <include recipes for building toolchain from source >

-Sumit

Regards,
Khasim

Quoted 43 lines

new file mode 100644
index 0000000..a0c832d

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +37 -1
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"
+
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
--
Quoted 3 lines

2.20.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#7 lore raw

Hi Khasim,

Quoted 29 lines · Khasim Mohammed

Hi Sumit / all

<replying inline>
________________________________
From: [email protected] <[email protected]> on behalf of Sumit Garg via lists.yoctoproject.org <[email protected]>
Sent: Thursday, May 14, 2020 10:33 AM
To: Jon Mason <[email protected]>
Cc: [email protected] <[email protected]>; Joshua Watt <[email protected]>
Subject: Re: [meta-arm] [PATCH] arm-toolchain: gcc-arm-none-eabi-native: Add recipe

Hi Jon,

Quoted 14 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb +0 -0
Quoted 8 lines
Quoted 6 lines

This recipe seems to install the pre-built (external) GCC tool-set for Cortex-R and Cortex-M. So I would suggest you to import it under "meta-arm-toolchain/recipes-devtools/external-arm-toolchain/" directory rather than "meta-arm-toolchain/recipes-devtools/gcc/" directory as it is meant for recipes used to build ARM GCC tool-set from source.

Isn't the external folder importing meta-linaro which is again building from source ? Please correct me if I am wrong here.

external-arm-toolchain folder is only meant to support prebuilt toolchains from ARM only. Currently it supports toolchains for Cortex-A and we can easily extend it to support Cortex-M and Cortex-R.

In case people are interested in using Linaro toolchains then they should use meta-linaro rather than meta-arm.

Quoted 2 lines

So, should we introduce another folder to differentiate the bb recipes that are pulling prebuilt toolchains released by ARM ?

I don't think we need any new folder. But while at it and looking at various other conversations regarding embed toolchain version compatibility problems. I would suggest to follow how this has already been addressed with Cortex-A toolchains. Following is brief description how prebuilt toolchains are used for Cortex-A:

- A user just downloads a particular version of prebuilt toolset, say
GCC 9.2-2019.12 and simply installs it in "/opt/toolchain/".
- Configures EXTERNAL_TOOLCHAIN=/opt/toolchain/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/ in local.conf file.

So using the "EXTERNAL_TOOLCHAIN" variable, we don't have to bind the user to use a particular version of a prebuilt toolchain but the user is free to choose a prebuilt ARM toolset based on requirement.

I think in similar manner we can depend on "EXTERNAL_EMBED_TOOLCHAIN" variable to provide embed toolchain path and use that in a common recipe named "external-arm-embed-toolchain.bb". And relative paths within this directory are generally fixed which can be used to install toolchain components to relevant destination folders.

I hope above proposal makes sense and useful.

-Sumit

Quoted 59 lines

arm-embedded-gcc-arm-none-eabi < include bb recipes to fetch ARM prebuilt toolchains>
external-arm-toolchain <include recipes for toolchains built by third parties>
gcc <include recipes for building toolchain from source >

-Sumit

Regards,
Khasim

Quoted 43 lines

new file mode 100644
index 0000000..a0c832d

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +37 -1
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"
+
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
--
Quoted 3 lines

2.20.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

author
#8 lore raw
In reply to Sumit Garg
Quoted 16 lines · Sumit Garg

Hi Jon,

Quoted 13 lines · Jon Mason

Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R and Cortex-M processors from ARM. This toolchain is required to build Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile some firmware for the M0 coprocessor.

---
 ...cc-arm-none-eabi-native_9-2019-q4-major.bb | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb
Quoted 8 lines

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb

Quoted 1 line
meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb +0 -0

This recipe seems to install the pre-built (external) GCC tool-set for Cortex-R and Cortex-M. So I would suggest you to import it under "meta-arm-toolchain/recipes-devtools/external-arm-toolchain/" directory rather than "meta-arm-toolchain/recipes-devtools/gcc/" directory as it is meant for recipes used to build ARM GCC tool-set from source.

Will move to the suggested location in v2.

Thanks,
Jon

Quoted 49 lines

-Sumit

Quoted 46 lines

new file mode 100644
index 0000000..a0c832d

meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-none-eabi-native_9-2019-q4-major.bb new file +37 -1
@@ -0,0 +1,37 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Baremetal GCC for ARM-R and ARM-M processors"
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/${BPN}-${PV}-x86_64-linux.tar.bz2"
+
+SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc"
+SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+inherit native
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+do_install() {
+    install -d ${D}${datadir}/arm-none-eabi/
+    cp -r ${S}/. ${D}${datadir}/arm-none-eabi/
+
+    install -d ${D}${bindir}
+    # Symlink all executables into bindir
+    for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do
+        lnr $f ${D}${bindir}/$(basename $f)
+    done
+}
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
--

2.20.1