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>
This commit is contained in:
Alexander Kanavin 2023-11-03 11:28:05 +01:00 committed by Richard Purdie
parent a92d76e4da
commit 81a400a8f5
12 changed files with 15 additions and 12 deletions

View File

@ -220,16 +220,16 @@ python copy_buildsystem () {
if os.path.exists(os.path.join(baseoutpath, relpath)):
conf_initpath = relpath
relpath = os.path.join('layers', path, 'scripts', 'devtool')
relpath = os.path.join('layers', path, 'scripts', 'esdk-tools', 'devtool')
if os.path.exists(os.path.join(baseoutpath, relpath)):
scriptrelpath = os.path.dirname(relpath)
esdk_tools_path = os.path.dirname(relpath)
relpath = os.path.join('layers', path, 'meta')
if os.path.exists(os.path.join(baseoutpath, relpath, 'lib', 'oe')):
core_meta_subdir = relpath
d.setVar('oe_init_build_env_path', conf_initpath)
d.setVar('scriptrelpath', scriptrelpath)
d.setVar('esdk_tools_path', esdk_tools_path)
# Write out config file for devtool
import configparser
@ -627,14 +627,6 @@ def get_sdk_required_utilities(buildtools_fn, d):
return ' '.join(sanity_required_utilities)
install_tools() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
scripts="devtool recipetool oe-find-native-sysroot runqemu* wic"
for script in $scripts; do
for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
targetscriptfn="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/$(basename $scriptfn)"
test -e ${targetscriptfn} || ln -rs ${scriptfn} ${targetscriptfn}
done
done
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
# find latest buildtools-tarball and install it
@ -713,7 +705,7 @@ sdk_ext_postinst() {
# A bit of another hack, but we need this in the path only for devtool
# so put it at the end of $PATH.
echo "export PATH=\"$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH\"" >> $env_setup_script
echo "export PATH=\"$target_sdk_dir/${esdk_tools_path}:\$PATH\"" >> $env_setup_script
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

1
scripts/esdk-tools/devtool Symbolic link
View File

@ -0,0 +1 @@
../devtool

View File

@ -0,0 +1 @@
../oe-find-native-sysroot

View File

@ -0,0 +1 @@
../recipetool

1
scripts/esdk-tools/runqemu Symbolic link
View File

@ -0,0 +1 @@
../runqemu

View File

@ -0,0 +1 @@
../runqemu-addptable2image

View File

@ -0,0 +1 @@
../runqemu-export-rootfs

View File

@ -0,0 +1 @@
../runqemu-extract-sdk

View File

@ -0,0 +1 @@
../runqemu-gen-tapdevs

View File

@ -0,0 +1 @@
../runqemu-ifdown

View File

@ -0,0 +1 @@
../runqemu-ifup

1
scripts/esdk-tools/wic Symbolic link
View File

@ -0,0 +1 @@
../wic