[oe] Prebuilt toolchains

Gary Thomas gary at mlbassoc.com
Wed Nov 18 15:29:24 UTC 2009


On 11/18/2009 06:40 AM, Gary Thomas wrote:
> On 11/17/2009 12:34 AM, Koen Kooi wrote:
>> On 11-11-09 18:00, Gary Thomas wrote:
>>> I'd like to use my own toolchains when building OpenEmbedded.
>>> I've tried to follow the information at:
>>> http://docs.openembedded.org/usermanual/usermanual.html#commonuse_prebuilt_toolchain
>>>
>>>
>>>
>>> It's a bit terse and confusing, so I'm just trying to see
>>> what I need (I think the section tries to discuss too many
>>> concepts at once)
>>
>> If you're using angstrom and want to use a prebuilt CSL toolchain, you
>> only need to add this to local.conf (I suspect thunderbird will linewrap
>> it):
>>
>> # Black magic to automatically set SDK_PATH out of PATH - don't touch
>> this!
>> # Works with pretty much any external toolchain, like CS Lite or MV Pro 5
>> # Handles cross-toolchain vs. native toolchain
>> # SDK_PATH can be overwritten externally by META_SDK_PATH, e.g. for SDK
>> TOOLCHAIN_SYSPATH = "${@bb.data.getVar('TARGET_ARCH', d, 1) !=
>> bb.data.getVar('BUILD_ARCH', d, 1) and
>> os.path.abspath(os.path.dirname(bb.which(bb.data.getVar('PATH', d, 1),
>> bb.data.getVar('TARGET_PREFIX', d,
>> 1)+'cpp'))+'/../'+bb.data.getVar('TARGET_SYS', d, 1)) or ''}"
>> TOOLCHAIN_PATH = "${@bool(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) and
>> (os.path.exists(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) and
>> os.path.dirname(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) or
>> bb.fatal('No valid toolchain in PATH')) or ''}"
>> SDK_PATH = "${@[bb.data.getVar('TOOLCHAIN_PATH', d, 1),
>> bb.data.getVar('META_SDK_PATH', d,
>> 1)][bool(bb.data.getVar('META_SDK_PATH', d, 1))]}"
>>
>> # Set the necessary variables to use binary CodeSourcery Lite
>> TARGET_VENDOR = "-none"
>> TARGET_CPPFLAGS_append = " -I${SDK_PATH}/${TARGET_SYS}/libc/usr/include "
>> TARGET_LDFLAGS_prepend = " -L${SDK_PATH}/${TARGET_SYS}/libc/lib
>> -Wl,-rpath-link,${SDK_PATH}/${TARGET_SYS}/libc/lib "
>> TOOLCHAIN_TYPE = "external"
>> TOOLCHAIN_BRAND = "csl"
>
> Thanks, this looks like something to try.
>
> I'm having a bit of trouble with the setting of 'TOOLCHAIN_SYSPATH'
> (my toolchain is home-grown. not CSL). Is there some way to debug this
> line, e.g. print out the components and results?
>

Here's what I'm getting:
$ bitbake minimal-image
NOTE: Handling BitBake files: \ (0045/7445) [ 0 %]ERROR: No valid toolchain in PATH
NOTE: <type 'exceptions.SystemExit'>:1 while evaluating:
${@bool(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) and (os.path.exists(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) and os.path.dirname(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)) or 
bb.fatal('No valid toolchain in PATH')) or ''}
NOTE: <type 'exceptions.SystemExit'>:1 while evaluating:
${@[bb.data.getVar('TOOLCHAIN_PATH', d, 1), bb.data.getVar('META_SDK_PATH', d, 1)][bool(bb.data.getVar('META_SDK_PATH', d, 1))]}
NOTE: <type 'exceptions.SystemExit'>:1 while evaluating:
-isystem${STAGING_DIR_TARGET}${layout_includedir} -I${SDK_PATH}/${TARGET_SYS}/libc/usr/include
NOTE: <type 'exceptions.SystemExit'>:1 while evaluating:
${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}
NOTE: <type 'exceptions.SystemExit'>:1 while evaluating:
${TARGET_CFLAGS}
ERROR: Error in executing: /local/Angstrom_BeagleBoard/openembedded/recipes/xmame/xmame_0.100.bb
ERROR: Exception:<type 'exceptions.SystemExit'> Message:1
ERROR: Printing the environment of the function

How can I debug what 'TOOLCHAIN_SYSPATH' is evaluating to?

Thanks


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------




More information about the Openembedded-devel mailing list