On Wed, 2021-11-24 at 19:21 -0500, Mohammed Billoo wrote:
I need to add TI MCU firmware as part of an OE/Yocto build for a
project that I am working on. Basically, the firmware needs to be
built during the overall image build and be stored in the RFS. My
strategy to build the firmware was to set up the TI toolchain as part
of the image build. Since I have the toolchain components and believe
it to be unnecessary (if not impossible) to build them from source, I
have the necessary pre-built components (provided by TI) as tarballs
In determining the best way to use a pre-built toolchain, I just
copied the gcc-linaro-baremetal-arm-native recipe. But, when I go to
bake my recipe for the toolchain, I get the following error:
ERROR: ti-bios-1.0-r0 do_populate_sysroot: Error executing a python
function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
lineno: 170, function: uninative_changeinterp
0167: if not elf.isDynamic():
*** 0170: subprocess.check_output(("patchelf-uninative",
"--set-interpreter", d.getVar("UNINATIVE_LOADER"), f),
File: '/usr/lib64/python3.8/subprocess.py', lineno: 411, function: check_output
0407: # Explicitly passing input=None was previously
equivalent to passing an
0408: # empty string. That is maintained here for
0409: kwargs['input'] = '' if
kwargs.get('universal_newlines', False) else b''
*** 0411: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File: '/usr/lib64/python3.8/subprocess.py', lineno: 512, function: run
0508: # We don't call process.wait() as .__exit__ does
that for us.
0510: retcode = process.poll()
0511: if check and retcode:
*** 0512: raise CalledProcessError(retcode, process.args,
0513: output=stdout, stderr=stderr)
0514: return CompletedProcess(process.args, retcode, stdout, stderr)
Exception: subprocess.CalledProcessError: Command
returned non-zero exit status 1.
patchelf: cannot find section '.gnu.version_r'
It looks like uninative is ultimately being inherited and there are
some steps taken to eliminate any host-dependencies for the toolchain
binaries. Is there a way to disable this inheritance only for this
recipe (if I globally disable uninative in my conf file, the recipe
bakes just fine, but obviously can't do that)? Or, is there a better
way of accomplishing my goal?
You could define a new uninative_changeinterp() function in your recipe to
override the core one and make it do nothing. Not a particularly elegant
solution but should work...