]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
scripts/esdk-tools: use a dedicated, static directory for esdk tools
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 3 Nov 2023 10:28:05 +0000 (11:28 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Nov 2023 08:05:37 +0000 (08:05 +0000)
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.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 files changed:
meta/classes-recipe/populate_sdk_ext.bbclass
scripts/esdk-tools/devtool [new symlink]
scripts/esdk-tools/oe-find-native-sysroot [new symlink]
scripts/esdk-tools/recipetool [new symlink]
scripts/esdk-tools/runqemu [new symlink]
scripts/esdk-tools/runqemu-addptable2image [new symlink]
scripts/esdk-tools/runqemu-export-rootfs [new symlink]
scripts/esdk-tools/runqemu-extract-sdk [new symlink]
scripts/esdk-tools/runqemu-gen-tapdevs [new symlink]
scripts/esdk-tools/runqemu-ifdown [new symlink]
scripts/esdk-tools/runqemu-ifup [new symlink]
scripts/esdk-tools/wic [new symlink]

index 173b3065b0032782dd4809c253d9c3d7fa7f39ee..53adc868d4788622a9ff2d6c0e4908edb84ef641 100644 (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
 
diff --git a/scripts/esdk-tools/devtool b/scripts/esdk-tools/devtool
new file mode 120000 (symlink)
index 0000000..176a01c
--- /dev/null
@@ -0,0 +1 @@
+../devtool
\ No newline at end of file
diff --git a/scripts/esdk-tools/oe-find-native-sysroot b/scripts/esdk-tools/oe-find-native-sysroot
new file mode 120000 (symlink)
index 0000000..d3493f3
--- /dev/null
@@ -0,0 +1 @@
+../oe-find-native-sysroot
\ No newline at end of file
diff --git a/scripts/esdk-tools/recipetool b/scripts/esdk-tools/recipetool
new file mode 120000 (symlink)
index 0000000..60a95dd
--- /dev/null
@@ -0,0 +1 @@
+../recipetool
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu b/scripts/esdk-tools/runqemu
new file mode 120000 (symlink)
index 0000000..ae7e7ad
--- /dev/null
@@ -0,0 +1 @@
+../runqemu
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-addptable2image b/scripts/esdk-tools/runqemu-addptable2image
new file mode 120000 (symlink)
index 0000000..afcd00e
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-addptable2image
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-export-rootfs b/scripts/esdk-tools/runqemu-export-rootfs
new file mode 120000 (symlink)
index 0000000..a26fcf6
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-export-rootfs
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-extract-sdk b/scripts/esdk-tools/runqemu-extract-sdk
new file mode 120000 (symlink)
index 0000000..cc858aa
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-extract-sdk
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-gen-tapdevs b/scripts/esdk-tools/runqemu-gen-tapdevs
new file mode 120000 (symlink)
index 0000000..dbdf791
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-gen-tapdevs
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-ifdown b/scripts/esdk-tools/runqemu-ifdown
new file mode 120000 (symlink)
index 0000000..0097693
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-ifdown
\ No newline at end of file
diff --git a/scripts/esdk-tools/runqemu-ifup b/scripts/esdk-tools/runqemu-ifup
new file mode 120000 (symlink)
index 0000000..41026d2
--- /dev/null
@@ -0,0 +1 @@
+../runqemu-ifup
\ No newline at end of file
diff --git a/scripts/esdk-tools/wic b/scripts/esdk-tools/wic
new file mode 120000 (symlink)
index 0000000..a9d908a
--- /dev/null
@@ -0,0 +1 @@
+../wic
\ No newline at end of file