Skip to contentSkip to conversation

external-arm-toolchain: Add support for SDK generation

PATCH Superseded Sumit Garg 4 participants 24 messages Jun 2, 2020 – Jun 12, 2020 1 message not in the archive

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

cover external-arm-toolchain: Add support for SDK generation

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk

Patch #3 adds a README to describe usage details of pre-built Arm tool-set.

Patch #4 adds package specific licences for external-arm-toolchain recipe.

Sumit Garg (4):
external-arm-toolchain: Remove glibc locale dependency
external-arm-toolchain: Refine dev libraies packaging
external-arm-toolchain: Add README
external-arm-toolchain: Add package specific licenses

 .../conf/distro/include/tcmode-external-arm.inc    |  1 +
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++
 .../external-arm-toolchain.bb                      | 29 ++++++++-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 4 files changed, 154 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/4 external-arm-toolchain: Remove glibc locale dependency

External Arm tool-set doesn't seem to provide packages corresponding to OE glibc locale recipe. So explicitly remove corresponding libc dependencies.

---
 meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc | 1 +
 1 file changed, 1 insertion(+)
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +1 -0
index 9171380..eee1a51 100644
@@ -58,6 +58,7 @@ DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-c
 ENABLE_BINARY_LOCALE_GENERATION = "0"
 GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
 LIBCOVERRIDE = ":libc-glibc"
+LIBC_DEPENDENCIES_remove = "glibc-gconv-cp1252 glibc-gconv-ibm850 glibc-gconv-iso8859-1 glibc-gconv-iso8859-15 glibc-localedata-i18n"
 
 ERROR_QA[type] ?= "list"
 python toolchain_metadata_setup () {
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/4] external-arm-toolchain: Remove glibc locale dependency

Quoted 1 line · Sumit Garg

External Arm tool-set

Why do you call it tool-set? It's definitely not critical, but toolchain is kind of a standard name for this:
https://en.wikipedia.org/wiki/Toolchain

Quoted 1 line

doesn't seem to provide packages corresponding to OE glibc locale recipe.

Actually, the toolchain itself does provide all the gconv libs, AFAICS, it's just they are not packaged by the recipe. When I hit it back in April, I just didn't have time and ended up with LIBC_DEPENDENCIES_remove hack as a temporary workaround, planning to enevtually go back and fix it properly:
http://arago-project.org/git/?p=meta-arago.git;a=blobdiff;f=meta-arago-distro/conf/distro/arago.conf;hb=84c30ee97056589ba0811428527f4adf8268c9b2;hpb=3a4ed9d1e8a118aefb2ef49ce450f74f14e239d0

So, re-using this LIBC_DEPENDENCIES_remove here in upstream meta-arm isn't correct...

Quoted 12 lines

So explicitly remove corresponding libc dependencies.

---
 meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc | 1 +
 1 file changed, 1 insertion(+)
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +0 -0
index 9171380..eee1a51 100644

meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-c · line 61

Quoted 4 lines
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +1 -0
@@ -58,6 +58,7 @@ DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-c
 ENABLE_BINARY_LOCALE_GENERATION = "0"
 GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
 LIBCOVERRIDE = ":libc-glibc"
+LIBC_DEPENDENCIES_remove = "glibc-gconv-cp1252 glibc-gconv-ibm850 glibc-gconv-iso8859-1 glibc-gconv-iso8859-15 glibc-localedata-i18n"

You shouldn't be using _remove in meta-arm, as it's not the final layer and there won't be any way to override this in BSPs or Distros.

Quoted 5 lines
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +0 -0
 ERROR_QA[type] ?= "list"
 python toolchain_metadata_setup () {
Signature · 1 line
2.7.4
author
#3 lore raw

Re: [PATCH 1/4] external-arm-toolchain: Remove glibc locale dependency

Quoted 8 lines · Denys Dmytriyenko
Quoted 1 line · Sumit Garg

External Arm tool-set

Why do you call it tool-set? It's definitely not critical, but toolchain is kind of a standard name for this:
https://en.wikipedia.org/wiki/Toolchain

Okay.

Quoted 5 lines
Quoted 2 lines

doesn't seem to provide packages corresponding to OE glibc locale recipe.

Actually, the toolchain itself does provide all the gconv libs, AFAICS, it's just they are not packaged by the recipe.

Yes, I saw those libraries provided by toolchain iself. But I am a little skeptical about whether we would be able to generate dynamic glibc locale data package using pre-built toolchain.

Quoted 5 lines

When I hit it back in April,
I just didn't have time and ended up with LIBC_DEPENDENCIES_remove hack as a temporary workaround, planning to enevtually go back and fix it properly:
http://arago-project.org/git/?p=meta-arago.git;a=blobdiff;f=meta-arago-distro/conf/distro/arago.conf;hb=84c30ee97056589ba0811428527f4adf8268c9b2;hpb=3a4ed9d1e8a118aefb2ef49ce450f74f14e239d0

I do look forward to your patch adding support for glibc locale packages but until then we shouldn't block usage of SDKs.

Quoted 3 lines

So, re-using this LIBC_DEPENDENCIES_remove here in upstream meta-arm isn't correct...

I think it's a separate feature rather than a gating item to use SDKs. So it's better to advertise properly what is currently being supported by pre-built toolchain rather than failing due to missing features.

We can definitely get rid of this once we sort out proper packaging for glibc locale using pre-built toolchain.

Quoted 8 lines
Quoted 8 lines

So explicitly remove corresponding libc dependencies.

---
 meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc | 1 +
 1 file changed, 1 insertion(+)
Quoted 13 lines

meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-c · line 61

Quoted 9 lines
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +1 -0
index 9171380..eee1a51 100644
@@ -58,6 +58,7 @@ DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-c
 ENABLE_BINARY_LOCALE_GENERATION = "0"
 GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
 LIBCOVERRIDE = ":libc-glibc"
+LIBC_DEPENDENCIES_remove = "glibc-gconv-cp1252 glibc-gconv-ibm850 glibc-gconv-iso8859-1 glibc-gconv-iso8859-15 glibc-localedata-i18n"

You shouldn't be using _remove in meta-arm, as it's not the final layer and there won't be any way to override this in BSPs or Distros.

Do you have any other alternative way to achieve similar functionality as this comes from tclibc-glibc.inc?

-Sumit

Quoted 6 lines
Quoted 6 lines
meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +0 -1
 ERROR_QA[type] ?= "list"
 python toolchain_metadata_setup () {
--

2.7.4

author
#4 lore raw

PATCH 2/4 external-arm-toolchain: Refine dev libraies packaging

In reply to Sumit Garg

OE core by default package all libraies installed as "${libdir}/lib*.so" or "${libdir}/*.la" as part of "FILES_${PN}-dev" but in case of external Arm tool-set recipe, multiple packages are provided which needs to include specific libraries. So split dev libraries packaging accordingly and only package remaining libraries as part of "FILES_${PN}-dev" which aren't provided as part of other packages.

---
 .../external-arm-toolchain.bb                      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +23 -0
index 04d8923..7f5a6f5 100644
@@ -545,6 +545,29 @@ FILES_${PN} += "\
 	${base_libdir}/libpcprofile.so \
     "
 
+FILES_${PN}-dev_remove = "\
+	${libdir}/lib*.so \
+	${libdir}/*.la \
+    "
+FILES_${PN}-dev += "\
+	${libdir}/libcrypt.so \
+	${libdir}/libc.so \
+	${libdir}/libm.so \
+	${libdir}/libpthread.so \
+	${libdir}/libresolv.so \
+	${libdir}/librt.so \
+	${libdir}/libutil.so \
+	${libdir}/libnss_files.so \
+	${libdir}/libnss_compat.so \
+	${libdir}/libnss_dns.so \
+	${libdir}/libnss_hesiod.so \
+	${libdir}/libnss_db.so \
+	${libdir}/libdl.so \
+	${libdir}/libanl.so \
+	${libdir}/libBrokenLocale.so \
+	${libdir}/libthread_db.so \
+    "
+
 FILES_${PN}-dbg += "${base_libdir}/debug"
 
 # From gcc-runtime.inc
Signature · 1 line
2.7.4
#5 lore raw

Re: [PATCH 2/4] external-arm-toolchain: Refine dev libraies packaging

Quoted 17 lines · Sumit Garg

OE core by default package all libraies installed as "${libdir}/lib*.so" or "${libdir}/*.la" as part of "FILES_${PN}-dev" but in case of external Arm tool-set recipe, multiple packages are provided which needs to include specific libraries. So split dev libraries packaging accordingly and only package remaining libraries as part of "FILES_${PN}-dev" which aren't provided as part of other packages.

---
 .../external-arm-toolchain.bb                      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +0 -0
index 04d8923..7f5a6f5 100644

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb FILES_${PN} += "\ · line 548

Quoted 4 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +1 -0
@@ -545,6 +545,29 @@ FILES_${PN} += "\
 	${base_libdir}/libpcprofile.so \
     "
 
+FILES_${PN}-dev_remove = "\

Shouldn't be using _remove here. It will probably break anyones .bbappends on this recipe and will make it hard making any adjustments.

If you check git logs, you'll see that every time we needed to change the default lists defined by glibc-package.inc in OE-Core, we had to re-create them from scratch.

Quoted 28 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +22 -0
+	${libdir}/lib*.so \
+	${libdir}/*.la \
+    "
+FILES_${PN}-dev += "\
+	${libdir}/libcrypt.so \
+	${libdir}/libc.so \
+	${libdir}/libm.so \
+	${libdir}/libpthread.so \
+	${libdir}/libresolv.so \
+	${libdir}/librt.so \
+	${libdir}/libutil.so \
+	${libdir}/libnss_files.so \
+	${libdir}/libnss_compat.so \
+	${libdir}/libnss_dns.so \
+	${libdir}/libnss_hesiod.so \
+	${libdir}/libnss_db.so \
+	${libdir}/libdl.so \
+	${libdir}/libanl.so \
+	${libdir}/libBrokenLocale.so \
+	${libdir}/libthread_db.so \
+    "
+
 FILES_${PN}-dbg += "${base_libdir}/debug"
 
 # From gcc-runtime.inc
Signature · 1 line
2.7.4
author
#6 lore raw

Re: [PATCH 2/4] external-arm-toolchain: Refine dev libraies packaging

Quoted 22 lines · Denys Dmytriyenko
Quoted 20 lines · Sumit Garg

OE core by default package all libraies installed as "${libdir}/lib*.so" or "${libdir}/*.la" as part of "FILES_${PN}-dev" but in case of external Arm tool-set recipe, multiple packages are provided which needs to include specific libraries. So split dev libraries packaging accordingly and only package remaining libraries as part of "FILES_${PN}-dev" which aren't provided as part of other packages.

---
 .../external-arm-toolchain.bb                      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +0 -0
index 04d8923..7f5a6f5 100644
@@ -545,6 +545,29 @@ FILES_${PN} += "\
      ${base_libdir}/libpcprofile.so \
     "
 
Quoted 5 lines

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb FILES_${PN} += "\ · line 548

Quoted 1 line
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +1 -0
+FILES_${PN}-dev_remove = "\

Shouldn't be using _remove here. It will probably break anyones .bbappends on this recipe and will make it hard making any adjustments.

Any specific reason to use .bbappends? Why can't those changes land in meta-arm instead?

Quoted 4 lines

If you check git logs, you'll see that every time we needed to change the default lists defined by glibc-package.inc in OE-Core, we had to re-create them from scratch.

Sounds reasonable, will create FILES_${PN}-dev from scratch instead.

-Sumit

Quoted 29 lines
Quoted 29 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +22 -1
+     ${libdir}/lib*.so \
+     ${libdir}/*.la \
+    "
+FILES_${PN}-dev += "\
+     ${libdir}/libcrypt.so \
+     ${libdir}/libc.so \
+     ${libdir}/libm.so \
+     ${libdir}/libpthread.so \
+     ${libdir}/libresolv.so \
+     ${libdir}/librt.so \
+     ${libdir}/libutil.so \
+     ${libdir}/libnss_files.so \
+     ${libdir}/libnss_compat.so \
+     ${libdir}/libnss_dns.so \
+     ${libdir}/libnss_hesiod.so \
+     ${libdir}/libnss_db.so \
+     ${libdir}/libdl.so \
+     ${libdir}/libanl.so \
+     ${libdir}/libBrokenLocale.so \
+     ${libdir}/libthread_db.so \
+    "
+
 FILES_${PN}-dbg += "${base_libdir}/debug"
 
 # From gcc-runtime.inc
--

2.7.4

#7 lore raw

Re: [PATCH 2/4] external-arm-toolchain: Refine dev libraies packaging

Quoted 33 lines · Sumit Garg
Quoted 22 lines · Denys Dmytriyenko
Quoted 20 lines · Sumit Garg

OE core by default package all libraies installed as "${libdir}/lib*.so" or "${libdir}/*.la" as part of "FILES_${PN}-dev" but in case of external Arm tool-set recipe, multiple packages are provided which needs to include specific libraries. So split dev libraries packaging accordingly and only package remaining libraries as part of "FILES_${PN}-dev" which aren't provided as part of other packages.

---
 .../external-arm-toolchain.bb                      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +0 -0
index 04d8923..7f5a6f5 100644
@@ -545,6 +545,29 @@ FILES_${PN} += "\
      ${base_libdir}/libpcprofile.so \
     "
 
Quoted 5 lines

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb FILES_${PN} += "\ · line 548

Quoted 1 line
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +1 -0
+FILES_${PN}-dev_remove = "\

Shouldn't be using _remove here. It will probably break anyones .bbappends on this recipe and will make it hard making any adjustments.

Any specific reason to use .bbappends? Why can't those changes land in meta-arm instead?

Quoted 6 lines
Quoted 4 lines

If you check git logs, you'll see that every time we needed to change the default lists defined by glibc-package.inc in OE-Core, we had to re-create them from scratch.

Sounds reasonable, will create FILES_${PN}-dev from scratch instead.

Denys has made some good comments, I don't have much to add. I did spot a typo in the subject though, "libraies" should be "libraries".

Signature · 2 lines
Paul Barker
Konsulko Group
author
#8 lore raw

PATCH 3/4 external-arm-toolchain: Add README

In reply to Sumit Garg

Document usage details for pre-built Arm toolchains.

---
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +50 -0
new file mode 100644
index 0000000..65d1a42
@@ -0,0 +1,50 @@
+Pre-built Arm toolchain recipes
+===============================
+
+Introduction
+------------
+This layer contains recipes for pre-built Arm toolchain recipes as follows:
+
+external-arm-toolchain.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU toolchains targeting processors
+from the Arm Cortex-A family and implementing the Arm A-profile architecture.
+
+Usage
+^^^^^
+
+In order to use any of pre-built Arm toolchain versions (8.2, 8.3, 9.2 and so
+on), a user needs to download and untar tool-set on host machine at a particular
+installation path eg: ``/opt/toolchain/``. Then user needs to specify following
+in ``conf/local.conf`` in order to replace OE toolcahin with pre-built GNU-A
+toolchain:
+
+TCMODE = "external-arm"
+EXTERNAL_TOOLCHAIN = "<path-to-the-toolchain>"
+
+-  Eg. for AArch64 (eg. qemuarm64 machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
+   "
+
+-  Eg. for AArch32 (eg. qemuarm machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
+   "
+
+Supported distros and machines
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Since this pre-built GNU-A tool-set simply replaces OE toolchain, so it is
+meant to be distro and machine agnostic as long as one is cross-compiling for
+Arm A-profile architecture.
+
+gcc-arm-none-eabi_<version>.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU Arm Embedded toolchain for
+bare-metal software development on devices based on 32-bit Arm Cortex-A,
+Cortex-R and Cortex-M processors.
+
+Supported version: 9-2019-q4-major
Signature · 1 line
2.7.4
#9 lore raw

Re: [PATCH 3/4] external-arm-toolchain: Add README

Quoted 48 lines · Sumit Garg

Document usage details for pre-built Arm toolchains.

---
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +34 -0
new file mode 100644
index 0000000..65d1a42
@@ -0,0 +1,50 @@
+Pre-built Arm toolchain recipes
+===============================
+
+Introduction
+------------
+This layer contains recipes for pre-built Arm toolchain recipes as follows:
+
+external-arm-toolchain.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU toolchains targeting processors
+from the Arm Cortex-A family and implementing the Arm A-profile architecture.
+
+Usage
+^^^^^
+
+In order to use any of pre-built Arm toolchain versions (8.2, 8.3, 9.2 and so
+on), a user needs to download and untar tool-set on host machine at a particular
+installation path eg: ``/opt/toolchain/``. Then user needs to specify following
+in ``conf/local.conf`` in order to replace OE toolcahin with pre-built GNU-A
+toolchain:
+
+TCMODE = "external-arm"
+EXTERNAL_TOOLCHAIN = "<path-to-the-toolchain>"
+
+-  Eg. for AArch64 (eg. qemuarm64 machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
+   "
+
+-  Eg. for AArch32 (eg. qemuarm machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
+   "

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 44

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +10 -0
+
+Supported distros and machines
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Since this pre-built GNU-A tool-set simply replaces OE toolchain, so it is
+meant to be distro and machine agnostic as long as one is cross-compiling for
+Arm A-profile architecture.
+
+gcc-arm-none-eabi_<version>.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc-aarch64-none-elf?

Probably need to explain a bit more regarding the differences between baremetal and Linux toolchains, as currently it can be confusing to some why there are 2 sets of toolchain recipes...

Quoted 8 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +5 -0
+This recipe provides support for pre-built GNU Arm Embedded toolchain for
+bare-metal software development on devices based on 32-bit Arm Cortex-A,
+Cortex-R and Cortex-M processors.
+
+Supported version: 9-2019-q4-major
Signature · 1 line
2.7.4
author
#10 lore raw

Re: [PATCH 3/4] external-arm-toolchain: Add README

Quoted 54 lines · Denys Dmytriyenko
Quoted 52 lines · Sumit Garg

Document usage details for pre-built Arm toolchains.

---
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +38 -0
new file mode 100644
index 0000000..65d1a42
@@ -0,0 +1,50 @@
+Pre-built Arm toolchain recipes
+===============================
+
+Introduction
+------------
+This layer contains recipes for pre-built Arm toolchain recipes as follows:
+
+external-arm-toolchain.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU toolchains targeting processors
+from the Arm Cortex-A family and implementing the Arm A-profile architecture.
+
+Usage
+^^^^^
+
+In order to use any of pre-built Arm toolchain versions (8.2, 8.3, 9.2 and so
+on), a user needs to download and untar tool-set on host machine at a particular
+installation path eg: ``/opt/toolchain/``. Then user needs to specify following
+in ``conf/local.conf`` in order to replace OE toolcahin with pre-built GNU-A
+toolchain:
+
+TCMODE = "external-arm"
+EXTERNAL_TOOLCHAIN = "<path-to-the-toolchain>"
+
+-  Eg. for AArch64 (eg. qemuarm64 machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
+   "
+
+-  Eg. for AArch32 (eg. qemuarm machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
+   "
+
+Supported distros and machines
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
Quoted 9 lines

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 44

Quoted 6 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +6 -0
+Since this pre-built GNU-A tool-set simply replaces OE toolchain, so it is
+meant to be distro and machine agnostic as long as one is cross-compiling for
+Arm A-profile architecture.
+
+gcc-arm-none-eabi_<version>.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc-aarch64-none-elf?

Sure will update for gcc-aarch64-none-elf as well.

Quoted 4 lines

Probably need to explain a bit more regarding the differences between baremetal and Linux toolchains, as currently it can be confusing to some why there are 2 sets of toolchain recipes...

Isn't baremetal development and Linux development self explanatory?

What additional differences are you looking for?

-Sumit

Quoted 9 lines
Quoted 9 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +5 -1
+This recipe provides support for pre-built GNU Arm Embedded toolchain for
+bare-metal software development on devices based on 32-bit Arm Cortex-A,
+Cortex-R and Cortex-M processors.
+
+Supported version: 9-2019-q4-major
--

2.7.4

#11 lore raw

Re: [PATCH 3/4] external-arm-toolchain: Add README

In reply to Sumit Garg
Quoted 15 lines · Sumit Garg

Document usage details for pre-built Arm toolchains.

---
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +0 -0
new file mode 100644
index 0000000..65d1a42

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 2

Quoted 2 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +2 -0
@@ -0,0 +1,50 @@
+Pre-built Arm toolchain recipes
+===============================

I'd recommend saying explicitly in this readme file that info on contributing, reporting bugs, etc can be found in the top-level meta-arm readme file.

Quoted 8 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +8 -0
+
+Introduction
+------------
+This layer contains recipes for pre-built Arm toolchain recipes as follows:
+
+external-arm-toolchain.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~
+

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 20

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +10 -0
+This recipe provides support for pre-built GNU toolchains targeting processors
+from the Arm Cortex-A family and implementing the Arm A-profile architecture.
+
+Usage
+^^^^^
+
+In order to use any of pre-built Arm toolchain versions (8.2, 8.3, 9.2 and so
+on), a user needs to download and untar tool-set on host machine at a particular
+installation path eg: ``/opt/toolchain/``. Then user needs to specify following
+in ``conf/local.conf`` in order to replace OE toolcahin with pre-built GNU-A

Typo: "toolcahin" should be "toolchain".

Quoted 11 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +11 -0
+toolchain:
+
+TCMODE = "external-arm"
+EXTERNAL_TOOLCHAIN = "<path-to-the-toolchain>"
+
+-  Eg. for AArch64 (eg. qemuarm64 machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
+   "
+
+-  Eg. for AArch32 (eg. qemuarm machine in poky distro)

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 41

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +10 -0
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
+   "
+
+Supported distros and machines
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Since this pre-built GNU-A tool-set simply replaces OE toolchain, so it is
+meant to be distro and machine agnostic as long as one is cross-compiling for
+Arm A-profile architecture.

This section should cover what is actually tested. For example, let's say I have a custom distro & machine and I see some weird behaviour from the ARM toolchain. I'd like to know which distro & machine combination is known to be good so that I can see if it reproduces the same errors. That would allow me to determine if the error is in meta-arm-toolchain or if it is my own layers.

Quoted 12 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +9 -1
+
+gcc-arm-none-eabi_<version>.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU Arm Embedded toolchain for
+bare-metal software development on devices based on 32-bit Arm Cortex-A,
+Cortex-R and Cortex-M processors.
+
+Supported version: 9-2019-q4-major
--

2.7.4

Signature · 2 lines
Paul Barker
Konsulko Group
author
#12 lore raw

Re: [PATCH 3/4] external-arm-toolchain: Add README

Quoted 11 lines · Paul Barker
Quoted 9 lines · Sumit Garg

Document usage details for pre-built Arm toolchains.

---
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
Quoted 13 lines

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 2

Quoted 8 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +2 -0
new file mode 100644
index 0000000..65d1a42
@@ -0,0 +1,50 @@
+Pre-built Arm toolchain recipes
+===============================

I'd recommend saying explicitly in this readme file that info on contributing, reporting bugs, etc can be found in the top-level meta-arm readme file.

Okay.

Quoted 41 lines
Quoted 8 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +8 -0
+
+Introduction
+------------
+This layer contains recipes for pre-built Arm toolchain recipes as follows:
+
+external-arm-toolchain.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~
+

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 20

Quoted 10 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +10 -0
+This recipe provides support for pre-built GNU toolchains targeting processors
+from the Arm Cortex-A family and implementing the Arm A-profile architecture.
+
+Usage
+^^^^^
+
+In order to use any of pre-built Arm toolchain versions (8.2, 8.3, 9.2 and so
+on), a user needs to download and untar tool-set on host machine at a particular
+installation path eg: ``/opt/toolchain/``. Then user needs to specify following
+in ``conf/local.conf`` in order to replace OE toolcahin with pre-built GNU-A

Typo: "toolcahin" should be "toolchain".

Quoted 20 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +20 -0
+toolchain:
+
+TCMODE = "external-arm"
+EXTERNAL_TOOLCHAIN = "<path-to-the-toolchain>"
+
+-  Eg. for AArch64 (eg. qemuarm64 machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu \
+   "
+
+-  Eg. for AArch32 (eg. qemuarm machine in poky distro)
+   EXTERNAL_TOOLCHAIN = "\
+     <installation-path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf \
+   "
+
+Supported distros and machines
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Since this pre-built GNU-A tool-set simply replaces OE toolchain, so it is
+meant to be distro and machine agnostic as long as one is cross-compiling for
Quoted 8 lines

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md line 41

Quoted 1 line
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +1 -0
+Arm A-profile architecture.

This section should cover what is actually tested. For example, let's say I have a custom distro & machine and I see some weird behaviour from the ARM toolchain. I'd like to know which distro & machine combination is known to be good so that I can see if it reproduces the same errors. That would allow me to determine if the error is in meta-arm-toolchain or if it is my own layers.

How about the following add-on?

Tested distro and machines (for zeus stable release):
1. Distro: poky; machines: qemuarm and qemuarm64 (build and boot tested)
2. Distro: RPB; machines: dragonboard-410c (build and boot tested)
3. Distro: world; machines: qemuarm and qemuarm64. Build tested for following layers:
- poky/meta
- poky/meta-poky
- poky/meta-yocto-bsp
- meta-openembedded/meta-oe
- meta-openembedded/meta-python
- meta-openembedded/meta-networking

-Sumit

Quoted 18 lines
Quoted 11 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md new file +9 -1
+
+gcc-arm-none-eabi_<version>.bb
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This recipe provides support for pre-built GNU Arm Embedded toolchain for
+bare-metal software development on devices based on 32-bit Arm Cortex-A,
+Cortex-R and Cortex-M processors.
+
+Supported version: 9-2019-q4-major
--
Quoted 2 lines

2.7.4

--
Paul Barker
Konsulko Group

author
#13 lore raw

PATCH 4/4 external-arm-toolchain: Add package specific licenses

In reply to Sumit Garg

Add license.inc file to state license of various packages provided by pre-built Arm tool-set.

---
 .../external-arm-toolchain.bb                      |  6 +-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 2 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +4 -2
index 7f5a6f5..6bceed0 100644
@@ -1,9 +1,11 @@
+# This recipe is distributed under MIT license.
+
 require recipes-core/glibc/glibc-package.inc
 
+require license.inc
+
 INHIBIT_DEFAULT_DEPS = "1"
 
-# License applies to this recipe code, not the toolchain itself
-LICENSE = "MIT"
 LIC_FILES_CHKSUM = "\
 	file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
 	file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc new file +76 -0

76 lines not on this page · raw message

Signature · 1 line
2.7.4
#14 lore raw

Re: [PATCH 4/4] external-arm-toolchain: Add package specific licenses

Quoted 16 lines · Sumit Garg

Add license.inc file to state license of various packages provided by pre-built Arm tool-set.

---
 .../external-arm-toolchain.bb                      |  6 +-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 2 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +0 -0
index 7f5a6f5..6bceed0 100644

meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb line 2

Quoted 2 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +2 -0
@@ -1,9 +1,11 @@
+# This recipe is distributed under MIT license.
+

This shouldn't be needed, see other recipes in the meta-arm layer.

Quoted 96 lines
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +2 -2
 require recipes-core/glibc/glibc-package.inc
 
+require license.inc
+
 INHIBIT_DEFAULT_DEPS = "1"
 
-# License applies to this recipe code, not the toolchain itself
-LICENSE = "MIT"
 LIC_FILES_CHKSUM = "\
        file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
        file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc new file +76 -1
new file mode 100644
index 0000000..b6ee42c
@@ -0,0 +1,76 @@
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3 & GPLv2 & LGPLv3 & LGPLv2.1 & LGPLv2"
+
+EAT_GCC_LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+EAT_LIBC_LICENSE = "GPLv2 & LGPLv2.1"
+
+LICENSE_${PN} = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-dev = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-doc = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-dbg = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-pic = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-utils = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-mtrace = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-gconv = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-extra-nss = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-thread-db = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-pcprofile = "${EAT_LIBC_LICENSE}"
+LICENSE_${PN}-staticdev = "${EAT_LIBC_LICENSE}"
+LICENSE_catchsegv = "${EAT_LIBC_LICENSE}"
+LICENSE_glibc-extra-nss = "${EAT_LIBC_LICENSE}"
+LICENSE_glibc-thread-db = "${EAT_LIBC_LICENSE}"
+
+LICENSE_libmemusage = "${EAT_LIBC_LICENSE}"
+LICENSE_libsegfault = "${EAT_LIBC_LICENSE}"
+LICENSE_libsotruss = "${EAT_LIBC_LICENSE}"
+LICENSE_sln = "${EAT_LIBC_LICENSE}"
+LICENSE_nscd = "${EAT_LIBC_LICENSE}"
+LICENSE_ldd = "${EAT_LIBC_LICENSE}"
+
+LICENSE_libasan-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libasan = "${EAT_GCC_LICENSE}"
+LICENSE_libasan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libatomic-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libatomic = "${EAT_GCC_LICENSE}"
+LICENSE_libatomic-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libg2c-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libg2c = "${EAT_GCC_LICENSE}"
+LICENSE_libgcc-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libgcc = "${EAT_GCC_LICENSE}"
+LICENSE_libgfortran-dbg = "${EAT_GCC_LICENSE}"
+LICENSE_libgfortran-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libgfortran = "${EAT_GCC_LICENSE}"
+LICENSE_libgfortran-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libgomp-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libgomp = "${EAT_GCC_LICENSE}"
+LICENSE_libgomp-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libitm-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libitm = "${EAT_GCC_LICENSE}"
+LICENSE_libitm-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_liblsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE_liblsan = "${EAT_GCC_LICENSE}"
+LICENSE_liblsan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libmudflap-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libmudflap = "${EAT_GCC_LICENSE}"
+LICENSE_libmudflap-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libquadmath-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libquadmath = "${EAT_GCC_LICENSE}"
+LICENSE_libquadmath-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libssp-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libssp = "${EAT_GCC_LICENSE}"
+LICENSE_libssp-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libstdc++-dbg = "${EAT_GCC_LICENSE}"
+LICENSE_libstdc++-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libstdc++ = "${EAT_GCC_LICENSE}"
+LICENSE_libstdc++-precompile-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libstdc++-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libtsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libtsan = "${EAT_GCC_LICENSE}"
+LICENSE_libtsan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE_libubsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE_libubsan = "${EAT_GCC_LICENSE}"
+LICENSE_libubsan-staticdev = "${EAT_GCC_LICENSE}"
+
+LICENSE_linux-libc-headers-dev = "GPLv2"
+LICENSE_linux-libc-headers = "GPLv2"
+
+LICENSE_gdbserver = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
--

2.7.4

Signature · 2 lines
Paul Barker
Konsulko Group
#15 lore raw
In reply to Sumit Garg
Quoted 24 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk

Patch #3 adds a README to describe usage details of pre-built Arm tool-set.

Patch #4 adds package specific licences for external-arm-toolchain recipe.

Sumit Garg (4):
external-arm-toolchain: Remove glibc locale dependency
external-arm-toolchain: Refine dev libraies packaging
external-arm-toolchain: Add README
external-arm-toolchain: Add package specific licenses

 .../conf/distro/include/tcmode-external-arm.inc    |  1 +
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++
 .../external-arm-toolchain.bb                      | 29 ++++++++-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 4 files changed, 154 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
Quoted 2 lines

--
2.7.4

Thanks for these, they all look good at first glance. I'll have some time to properly review and test the changes in a couple of days.

Signature · 2 lines
Paul Barker
Konsulko Group
#16 lore raw
In reply to Sumit Garg
Quoted 4 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk

This just ensures that external-arm-toolchain doesn't get in the way of SDK generation by avoiding any conflicts. The only re-use here is glibc. The rest of pre-built Arm toolchain gets thrown out and rebuilt from sources - gcc, binutils, gdb/gdbserver are all built from sources as TCMODE was not set and falls back to "default". Sure, pre-built Arm toolchain doesn't provide all possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little re-use...

Quoted 21 lines

Patch #3 adds a README to describe usage details of pre-built Arm tool-set.

Patch #4 adds package specific licences for external-arm-toolchain recipe.

Sumit Garg (4):
external-arm-toolchain: Remove glibc locale dependency
external-arm-toolchain: Refine dev libraies packaging
external-arm-toolchain: Add README
external-arm-toolchain: Add package specific licenses

 .../conf/distro/include/tcmode-external-arm.inc    |  1 +
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++
 .../external-arm-toolchain.bb                      | 29 ++++++++-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 4 files changed, 154 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
Signature · 1 line
2.7.4
author
#17 lore raw
Quoted 5 lines · Denys Dmytriyenko
Quoted 3 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

Quoted 7 lines
Quoted 1 line
$ bitbake core-image-base -c populate_sdk

This just ensures that external-arm-toolchain doesn't get in the way of SDK generation by avoiding any conflicts. The only re-use here is glibc. The rest of pre-built Arm toolchain gets thrown out and rebuilt from sources - gcc, binutils, gdb/gdbserver are all built from sources as TCMODE was not set and falls back to "default".

Yes I noticed this as well. I guess we can improve this situation to package tools from pre-built toolchain only rather than building from source. Will explore options.

Quoted 3 lines

Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little re-use...

Yes, but don't you think that having a common build environment using SDKs is still useful from the end user's perspective irrespective of underlying toolchain (built from source or pre-built)?

-Sumit

Quoted 23 lines
Quoted 23 lines

Patch #3 adds a README to describe usage details of pre-built Arm tool-set.

Patch #4 adds package specific licences for external-arm-toolchain recipe.

Sumit Garg (4):
external-arm-toolchain: Remove glibc locale dependency
external-arm-toolchain: Refine dev libraies packaging
external-arm-toolchain: Add README
external-arm-toolchain: Add package specific licenses

 .../conf/distro/include/tcmode-external-arm.inc    |  1 +
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++
 .../external-arm-toolchain.bb                      | 29 ++++++++-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 4 files changed, 154 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc

--
2.7.4

#18 lore raw
Quoted 18 lines · Sumit Garg
Quoted 5 lines · Denys Dmytriyenko
Quoted 3 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

Quoted 7 lines
Quoted 1 line
$ bitbake core-image-base -c populate_sdk

This just ensures that external-arm-toolchain doesn't get in the way of SDK generation by avoiding any conflicts. The only re-use here is glibc. The rest of pre-built Arm toolchain gets thrown out and rebuilt from sources - gcc, binutils, gdb/gdbserver are all built from sources as TCMODE was not set and falls back to "default".

Yes I noticed this as well. I guess we can improve this situation to package tools from pre-built toolchain only rather than building from source. Will explore options.

Quoted 7 lines
Quoted 3 lines

Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little re-use...

Yes, but don't you think that having a common build environment using SDKs is still useful from the end user's perspective irrespective of underlying toolchain (built from source or pre-built)?

Just wanted to get back to this point.

Yes, in general that would be preferred (and exactly why OE insists on building everything, starting with the toolchain, compared to competitors that use prebuilt toolchains by default, like buildroot, etc).

But as you have seen from the discussion in the other thread, there are some legitimate (hopefully) reasons to re-use prebuilt binaries even for SDK - licensing, distribution and such...

Back in the day it was simpler - 32-bit x86 was dominant and what prebuilt toolchain supported as a host and being the default/only SDKMACHINE.

For some time Linaro toolchain supported both 32-bit and 64-bit x86 as a host, so it was possible to support both of those SDKMACHINEs. These days 32-bit x86 faded into obscurity. But on the other hand, aarch64 hosts are gaining traction, so targeting aarch64 SDKMACHINE from x86 host will be a problem with external-arm-toolchain w/o full rebuild of SDK toolchain...

So, hopefully this can be done optionally/conditionally to either re-use prebuilt binaries from external toolchain or build them from sources.

Signature · 1 line
Denys

A message that is not in the archive (sent off-list or not yet received): [email protected]

#20 lore raw
Quoted 6 lines · Denys Dmytriyenko
Quoted 4 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk
Quoted 7 lines

This just ensures that external-arm-toolchain doesn't get in the way of SDK generation by avoiding any conflicts. The only re-use here is glibc. The rest of pre-built Arm toolchain gets thrown out and rebuilt from sources - gcc, binutils, gdb/gdbserver are all built from sources as TCMODE was not set and falls back to "default". Sure, pre-built Arm toolchain doesn't provide all possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little re-use...

And I wonder is the resulting SDK was even tested:

$ . environment-setup-armv7at2hf-neon-oe-linux-gnueabi
$ arm-none-linux-gnueabihf-gcc -o hello hello.c 
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
$ arm-none-linux-gnueabihf-g++ -o hello++ hello.cpp 
hello.cpp:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Quoted 23 lines
Quoted 21 lines

Patch #3 adds a README to describe usage details of pre-built Arm tool-set.

Patch #4 adds package specific licences for external-arm-toolchain recipe.

Sumit Garg (4):
external-arm-toolchain: Remove glibc locale dependency
external-arm-toolchain: Refine dev libraies packaging
external-arm-toolchain: Add README
external-arm-toolchain: Add package specific licenses

 .../conf/distro/include/tcmode-external-arm.inc    |  1 +
 .../external-arm-toolchain/README.md               | 50 ++++++++++++++
 .../external-arm-toolchain.bb                      | 29 ++++++++-
 .../external-arm-toolchain/license.inc             | 76 ++++++++++++++++++++++
 4 files changed, 154 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/README.md
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
Signature · 1 line
2.7.4
#21 lore raw
Quoted 32 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to
support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk
Quoted 13 lines

This just ensures that external-arm-toolchain doesn't get in the way of SDK
generation by avoiding any conflicts. The only re-use here is glibc. The rest
of pre-built Arm toolchain gets thrown out and rebuilt from sources
- gcc,
binutils, gdb/gdbserver are all built from sources as TCMODE was not set and
falls back to "default". Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little
re-use...

And I wonder is the resulting SDK was even tested:

$ . environment-setup-armv7at2hf-neon-oe-linux-gnueabi
$ arm-none-linux-gnueabihf-gcc -o hello hello.c 
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Quoted 5 lines
$ arm-none-linux-gnueabihf-g++ -o hello++ hello.cpp 
hello.cpp:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.

If you've done "bitbake core-image-base -c populate_sdk" to build it, you can do "bitbake core-image-base -c testsdk" to test it as we have basic automated QA tests for that.

Cheers,

Richard

author
#22 lore raw
Quoted 34 lines · Richard Purdie
Quoted 32 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to
support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk
Quoted 13 lines

This just ensures that external-arm-toolchain doesn't get in the way of SDK
generation by avoiding any conflicts. The only re-use here is glibc. The rest
of pre-built Arm toolchain gets thrown out and rebuilt from sources
- gcc,
binutils, gdb/gdbserver are all built from sources as TCMODE was not set and
falls back to "default". Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little
re-use...

And I wonder is the resulting SDK was even tested:

$ . environment-setup-armv7at2hf-neon-oe-linux-gnueabi
$ arm-none-linux-gnueabihf-gcc -o hello hello.c
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Quoted 5 lines
Quoted 5 lines
$ arm-none-linux-gnueabihf-g++ -o hello++ hello.cpp
hello.cpp:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.

I guess you missed the basics to use the installed SDK as you haven't provided a proper sysroot path. See expansion of "$CC" below:

$ . environment-setup-aarch64-poky-linux
$ echo $CC
aarch64-none-linux-gnu-gcc -march=armv8-a+crc
--sysroot=/home/sumit.garg/temp/oe_sdk/sysroots/aarch64-poky-linux
Quoted 4 lines

If you've done "bitbake core-image-base -c populate_sdk" to build it, you can do "bitbake core-image-base -c testsdk" to test it as we have basic automated QA tests for that.

Thanks for this pointer. There are test cases which are failing, will fix them.

-Sumit

Quoted 10 lines

Cheers,

Richard

#23 lore raw
Quoted 42 lines · Sumit Garg
Quoted 34 lines · Richard Purdie
Quoted 32 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to
support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk
Quoted 13 lines

This just ensures that external-arm-toolchain doesn't get in the way of SDK
generation by avoiding any conflicts. The only re-use here is glibc. The rest
of pre-built Arm toolchain gets thrown out and rebuilt from sources
- gcc,
binutils, gdb/gdbserver are all built from sources as TCMODE was not set and
falls back to "default". Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little
re-use...

And I wonder is the resulting SDK was even tested:

$ . environment-setup-armv7at2hf-neon-oe-linux-gnueabi
$ arm-none-linux-gnueabihf-gcc -o hello hello.c
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Quoted 5 lines
Quoted 5 lines
$ arm-none-linux-gnueabihf-g++ -o hello++ hello.cpp
hello.cpp:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Quoted 7 lines

I guess you missed the basics to use the installed SDK as you haven't provided a proper sysroot path. See expansion of "$CC" below:

$ . environment-setup-aarch64-poky-linux
$ echo $CC
aarch64-none-linux-gnu-gcc -march=armv8-a+crc
--sysroot=/home/sumit.garg/temp/oe_sdk/sysroots/aarch64-poky-linux

Sorry, it was too late here and I sent the wrong logs... Yes, I'm aware of using $CC and $CXX instead of calling binaries directly.

The correct logs I wanted to send are there:

$ $CC -o hello hello.c
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find crtbegin.o: No such file or directory
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find -lgcc
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
$ $CXX -o hello++ hello.cpp 
In file included from hello.cpp:1:
/tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory
   38 | #include <bits/c++config.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

The first one you can recognize is due to missing libgcc.a, which should be fixed by my patch.

And I know the reason for the second one two - I've been fixing these for years. I need to send the fixes...

Quoted 19 lines
Quoted 3 lines

If you've done "bitbake core-image-base -c populate_sdk" to build it, you can do "bitbake core-image-base -c testsdk" to test it as we have basic automated QA tests for that.

Thanks for this pointer. There are test cases which are failing, will fix them.

-Sumit

Quoted 10 lines

Cheers,

Richard

author
#24 lore raw
Quoted 47 lines · Denys Dmytriyenko
Quoted 45 lines · Sumit Garg
Quoted 34 lines · Richard Purdie
Quoted 32 lines · Denys Dmytriyenko
Quoted 7 lines · Denys Dmytriyenko
Quoted 5 lines · Sumit Garg

Patch #1 and #2 adds impprovements in external-arm-toolchain recipe in order to
support SDK generation. SDK generation has been tested using:

$ bitbake core-image-base -c populate_sdk
Quoted 13 lines

This just ensures that external-arm-toolchain doesn't get in the way of SDK
generation by avoiding any conflicts. The only re-use here is glibc. The rest
of pre-built Arm toolchain gets thrown out and rebuilt from sources
- gcc,
binutils, gdb/gdbserver are all built from sources as TCMODE was not set and
falls back to "default". Sure, pre-built Arm toolchain doesn't provide all
possible SDKMACHINE binaries, but for 90% cases of x86_64, there's very little
re-use...

And I wonder is the resulting SDK was even tested:

$ . environment-setup-armv7at2hf-neon-oe-linux-gnueabi
$ arm-none-linux-gnueabihf-gcc -o hello hello.c
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Quoted 5 lines
Quoted 5 lines
$ arm-none-linux-gnueabihf-g++ -o hello++ hello.cpp
hello.cpp:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.

I guess you missed the basics to use the installed SDK as you haven't provided a proper sysroot path. See expansion of "$CC" below:

Quoted 6 lines
Quoted 4 lines
$ . environment-setup-aarch64-poky-linux
$ echo $CC
aarch64-none-linux-gnu-gcc -march=armv8-a+crc
--sysroot=/home/sumit.garg/temp/oe_sdk/sysroots/aarch64-poky-linux

Sorry, it was too late here and I sent the wrong logs...

No worries.

Quoted 11 lines

Yes, I'm aware of
using $CC and $CXX instead of calling binaries directly.

The correct logs I wanted to send are there:

$ $CC -o hello hello.c
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find crtbegin.o: No such file or directory
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find -lgcc
/tmp/armsdk/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.1/real-ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Quoted 7 lines
$ $CXX -o hello++ hello.cpp
In file included from hello.cpp:1:
/tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory
   38 | #include <bits/c++config.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

These are the same errors that I noticed with testsdk as well. So I think testsdk should be a good enough sanity testing tool to say SDK is generated properly.

Quoted 3 lines

The first one you can recognize is due to missing libgcc.a, which should be fixed by my patch.

Yeah.

Quoted 4 lines

And I know the reason for the second one two - I've been fixing these for years. I need to send the fixes...

Okay, let me wait for your fixes in order to avoid duplicate work. In the meantime, will explore pre-built tools packaging from external toolchain.

-Sumit

Quoted 20 lines
Quoted 20 lines
Quoted 4 lines

If you've done "bitbake core-image-base -c populate_sdk" to build it, you can do "bitbake core-image-base -c testsdk" to test it as we have basic automated QA tests for that.

Thanks for this pointer. There are test cases which are failing, will fix them.

-Sumit

Quoted 10 lines

Cheers,

Richard