All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Selectively disable uninative for a recipe
       [not found] <CALkjhPomzPv7jrj4hnbi04Sbi8hg1p=PpzPf1oiaTVhhBXnZsA@mail.gmail.com>
@ 2021-11-25  0:21 ` Mohammed Billoo
  2021-11-25  8:44   ` [yocto] " Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Billoo @ 2021-11-25  0:21 UTC (permalink / raw)
  To: yocto

Hi,

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
uploaded somewhere.

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>
     0001:
 *** 0002:uninative_changeinterp(d)
     0003:
File: '/home/mbilloo/yocto-builds/norbert/yocto/build-doris/../layers/poky/meta/classes/uninative.bbclass',
lineno: 170, function: uninative_changeinterp
     0166:                continue
     0167:            if not elf.isDynamic():
     0168:                continue
     0169:
 *** 0170:            subprocess.check_output(("patchelf-uninative",
"--set-interpreter", d.getVar("UNINATIVE_LOADER"), f),
stderr=subprocess.STDOUT)
     0171:}
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
backwards compatibility.
     0409:        kwargs['input'] = '' if
kwargs.get('universal_newlines', False) else b''
     0410:
 *** 0411:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
     0412:               **kwargs).stdout
     0413:
     0414:
     0415:class CompletedProcess(object):
File: '/usr/lib64/python3.8/subprocess.py', lineno: 512, function: run
     0508:            # We don't call process.wait() as .__exit__ does
that for us.
     0509:            raise
     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)
     0515:
     0516:
Exception: subprocess.CalledProcessError: Command
'('patchelf-uninative', '--set-interpreter',
'/home/mbilloo/yocto-builds/norbert/yocto/build-doris/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2',
'/home/mbilloo/yocto-builds/norbert/yocto/build-doris/tmp/work/x86_64-linux/ti-bios/1.0-r0/sstate-build-populate_sysroot/recipe-sysroot-native/usr/share/bios_6_73_01_01/packages/ti/platforms/sim6xxx/Solaris/kelvin')'
returned non-zero exit status 1.

Subprocess output:
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?

Thanks
--
Mohammed A Billoo
Founder
MAB Labs, LLC
www.mab-labs.com
www.linkedin.com/company/mab-labs
201-338-2022
22 East Quackenbush Ave Suite LL5
Dumont, NJ 07628


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] Selectively disable uninative for a recipe
  2021-11-25  0:21 ` Fwd: Selectively disable uninative for a recipe Mohammed Billoo
@ 2021-11-25  8:44   ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2021-11-25  8:44 UTC (permalink / raw)
  To: Mohammed Billoo, yocto

On Wed, 2021-11-24 at 19:21 -0500, Mohammed Billoo wrote:
> Hi,
> 
> 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
> uploaded somewhere.
> 
> 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>
>      0001:
>  *** 0002:uninative_changeinterp(d)
>      0003:
> File: '/home/mbilloo/yocto-builds/norbert/yocto/build-doris/../layers/poky/meta/classes/uninative.bbclass',
> lineno: 170, function: uninative_changeinterp
>      0166:                continue
>      0167:            if not elf.isDynamic():
>      0168:                continue
>      0169:
>  *** 0170:            subprocess.check_output(("patchelf-uninative",
> "--set-interpreter", d.getVar("UNINATIVE_LOADER"), f),
> stderr=subprocess.STDOUT)
>      0171:}
> 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
> backwards compatibility.
>      0409:        kwargs['input'] = '' if
> kwargs.get('universal_newlines', False) else b''
>      0410:
>  *** 0411:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
>      0412:               **kwargs).stdout
>      0413:
>      0414:
>      0415:class CompletedProcess(object):
> File: '/usr/lib64/python3.8/subprocess.py', lineno: 512, function: run
>      0508:            # We don't call process.wait() as .__exit__ does
> that for us.
>      0509:            raise
>      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)
>      0515:
>      0516:
> Exception: subprocess.CalledProcessError: Command
> '('patchelf-uninative', '--set-interpreter',
> '/home/mbilloo/yocto-builds/norbert/yocto/build-doris/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2',
> '/home/mbilloo/yocto-builds/norbert/yocto/build-doris/tmp/work/x86_64-linux/ti-bios/1.0-r0/sstate-build-populate_sysroot/recipe-sysroot-native/usr/share/bios_6_73_01_01/packages/ti/platforms/sim6xxx/Solaris/kelvin')'
> returned non-zero exit status 1.
> 
> Subprocess output:
> 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...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-25  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CALkjhPomzPv7jrj4hnbi04Sbi8hg1p=PpzPf1oiaTVhhBXnZsA@mail.gmail.com>
2021-11-25  0:21 ` Fwd: Selectively disable uninative for a recipe Mohammed Billoo
2021-11-25  8:44   ` [yocto] " Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.