diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-11-03 11:28:05 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-05 08:44:06 +0000 |
| commit | 81a400a8f56f2a8122102d7f3c13062e1e5205dc (patch) | |
| tree | ac4b4b43f370d9538c7fb5291f5cc1cb7ae6b9e2 /meta/classes-recipe | |
| parent | a92d76e4da705d99000fad2f9b737a215f42b8a1 (diff) | |
| download | poky-81a400a8f56f2a8122102d7f3c13062e1e5205dc.tar.gz | |
scripts/esdk-tools: use a dedicated, static directory for esdk tools
This allows easier replication of esdk environment (which provides
a curated, limited set of tools that for example does not include bitbake)
in a standard yocto build. Switchover between various sets can be achieved
via PATH manipulation.
(From OE-Core rev: 20c548f2edca3888152adb63de7b23d84e3848e7)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
| -rw-r--r-- | meta/classes-recipe/populate_sdk_ext.bbclass | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass index 173b3065b0..53adc868d4 100644 --- a/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/meta/classes-recipe/populate_sdk_ext.bbclass | |||
| @@ -220,16 +220,16 @@ python copy_buildsystem () { | |||
| 220 | if os.path.exists(os.path.join(baseoutpath, relpath)): | 220 | if os.path.exists(os.path.join(baseoutpath, relpath)): |
| 221 | conf_initpath = relpath | 221 | conf_initpath = relpath |
| 222 | 222 | ||
| 223 | relpath = os.path.join('layers', path, 'scripts', 'devtool') | 223 | relpath = os.path.join('layers', path, 'scripts', 'esdk-tools', 'devtool') |
| 224 | if os.path.exists(os.path.join(baseoutpath, relpath)): | 224 | if os.path.exists(os.path.join(baseoutpath, relpath)): |
| 225 | scriptrelpath = os.path.dirname(relpath) | 225 | esdk_tools_path = os.path.dirname(relpath) |
| 226 | 226 | ||
| 227 | relpath = os.path.join('layers', path, 'meta') | 227 | relpath = os.path.join('layers', path, 'meta') |
| 228 | if os.path.exists(os.path.join(baseoutpath, relpath, 'lib', 'oe')): | 228 | if os.path.exists(os.path.join(baseoutpath, relpath, 'lib', 'oe')): |
| 229 | core_meta_subdir = relpath | 229 | core_meta_subdir = relpath |
| 230 | 230 | ||
| 231 | d.setVar('oe_init_build_env_path', conf_initpath) | 231 | d.setVar('oe_init_build_env_path', conf_initpath) |
| 232 | d.setVar('scriptrelpath', scriptrelpath) | 232 | d.setVar('esdk_tools_path', esdk_tools_path) |
| 233 | 233 | ||
| 234 | # Write out config file for devtool | 234 | # Write out config file for devtool |
| 235 | import configparser | 235 | import configparser |
| @@ -627,14 +627,6 @@ def get_sdk_required_utilities(buildtools_fn, d): | |||
| 627 | return ' '.join(sanity_required_utilities) | 627 | return ' '.join(sanity_required_utilities) |
| 628 | 628 | ||
| 629 | install_tools() { | 629 | install_tools() { |
| 630 | install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk} | ||
| 631 | scripts="devtool recipetool oe-find-native-sysroot runqemu* wic" | ||
| 632 | for script in $scripts; do | ||
| 633 | for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do | ||
| 634 | targetscriptfn="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/$(basename $scriptfn)" | ||
| 635 | test -e ${targetscriptfn} || ln -rs ${scriptfn} ${targetscriptfn} | ||
| 636 | done | ||
| 637 | done | ||
| 638 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase | 630 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase |
| 639 | 631 | ||
| 640 | # find latest buildtools-tarball and install it | 632 | # find latest buildtools-tarball and install it |
| @@ -713,7 +705,7 @@ sdk_ext_postinst() { | |||
| 713 | 705 | ||
| 714 | # A bit of another hack, but we need this in the path only for devtool | 706 | # A bit of another hack, but we need this in the path only for devtool |
| 715 | # so put it at the end of $PATH. | 707 | # so put it at the end of $PATH. |
| 716 | echo "export PATH=\"$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH\"" >> $env_setup_script | 708 | echo "export PATH=\"$target_sdk_dir/${esdk_tools_path}:\$PATH\"" >> $env_setup_script |
| 717 | 709 | ||
| 718 | echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script | 710 | echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script |
| 719 | 711 | ||
