cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbake fails for st-image-core when building on a Tegra Jetson Nano board.

RStew.1351
Associate II

I'm working on getting a Distribution Package build working on an aarch64 machine, specifically a Nvidia Jetson Nano. After downloading the 1.1.0 ecosystem package and sourcing the bitbake environment, bitbake st-image-core runs successfully for a while but fails while executing the strip command in the populate-sysroot section of gcc-arm-none-eabi-native-7-r0. When I execute the strip command by hand the failure is actually an "unknown format" error on the file being stripped. When I execute the "file" command against the file giving the error it has been compiled for x86_64. This would imply, I think that the recipes for gcc have be set up for a 64-bit Intel architecture. My question is where do I modify the recipes to ensure they are using the local machines architecture to build the components?

An example of the error I am getting is:

ERROR: gcc-arm-none-eabi-native-7-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:

Command '['strip', '--remove-section=.comment', '--remove-section=.note', '--strip-unneeded', '/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/sysroot-destdir/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/recipe-sysroot-native/usr/share/gcc-arm-none-eabi/lib/libcc1.so.0.0.0']' returned non-zero exit status 1.: Traceback (most recent call last):

 File "/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/meta/lib/oe/utils.py", line 272, in run

   ret = self._target(*self._args, **self._kwargs)

 File "/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/meta/lib/oe/package.py", line 44, in runstrip

   output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)

 File "/usr/lib/python3.6/subprocess.py", line 356, in check_output

   **kwargs).stdout

 File "/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/openembedded-core/meta/lib/oe/package.py", line 44, in runstrip

   output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)

 File "/usr/lib/python3.6/subprocess.py", line 356, in check_output

   **kwargs).stdout

 File "/usr/lib/python3.6/subprocess.py", line 438, in run

   output=stdout, stderr=stderr)

The output of the file command on the file producing the strip error is:

file /home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/sysroot-destdir/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/recipe-sysroot-native/usr/share/gcc-arm-none-eabi/lib/libcc1.so.0.0.0

/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/sysroot-destdir/home/bob/STM32MP15/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/build-openstlinuxweston-stm32mp1/tmp-glibc/work/aarch64-linux/gcc-arm-none-eabi-native/7-r0/recipe-sysroot-native/usr/share/gcc-arm-none-eabi/lib/libcc1.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=aced57569f0499c3ffd70570aa0f53074a3af71d, with debug_info, not stripped

Thanks for any help you can give me as I read through the bitbake documentation.

Bob Stewart

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @RStew.1351​ 

Limitation with Distribution Package with an ARM host machine is indeed linked to M4 ( MP1 Coprocessor ) toolset only available for X86.

BR,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
RStew.1351
Associate II

To answer my own question looks like one cannot build distributions on an ARM processor as the layer recipes have been created to download components that are built for x86 architectures, not ARM. For example, recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi_7.inc in the meta-st layer downloads a tar file from Keil whose libraries, like libcc1.so.0.0.0, and executables, are built for Intel x86.

Olivier GALLIEN
ST Employee

Hi @RStew.1351​ 

Limitation with Distribution Package with an ARM host machine is indeed linked to M4 ( MP1 Coprocessor ) toolset only available for X86.

BR,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
RStew.1351
Associate II

​Thank you for the reply.

Bob Stewart