[elbe-devel] [PATCH] sdk: Add missing run/debug components

John Ogness john.ogness at linutronix.de
Mon Jan 29 13:01:02 CET 2024


A toolchain typically contains everything necessary to build, run,
and debug software. Although the ELBE SDK contains everything
necessary to build, it does not contain everything necessary to
run and debug the software. The missing components are:

ldconfig: To setup the dynamic loader cache on the target.

gdbserver: To perform remote debugging on the target.

glibc debug symbols: To debug the libraries provided by the
toolchain.

Add these 3 missing components.

Signed-off-by: John Ogness <john.ogness at linutronix.de>
---
 elbepack/elbeproject.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 5ba49d92..2dd60090 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -222,6 +222,8 @@ class ElbeProject:
         paths = [
             './usr/include',
             './usr/include/' + triplet,
+            './usr/bin/gdbserver',
+            './usr/sbin/ldconfig',
             './etc/ld.so.conf*',
             './opt/*/lib/*.so',
             './opt/*lib/*.so.*',
@@ -249,6 +251,10 @@ class ElbeProject:
         self.sysrootenv.import_keys()
         logging.info("Keys imported")
 
+        self.xml.add_target_package("libc-bin")
+        self.xml.add_target_package("libc6-dbg")
+        self.xml.add_target_package("gdbserver")
+
         self.install_packages(self.sysrootenv, buildenv=False)
 
         # ignore packages from debootstrap
@@ -300,7 +306,10 @@ class ElbeProject:
         # include /lib if it is a symlink (buster and later)
         if os.path.islink(self.sysrootpath + '/lib'):
             with open(sysrootfilelist, 'a') as filelist_fd:
-                filelist_fd.write('./lib')
+                filelist_fd.write('./lib\n')
+        if os.path.islink(self.sysrootpath + '/sbin'):
+            with open(sysrootfilelist, 'a') as filelist_fd:
+                filelist_fd.write('./sbin\n')
 
         do(
             f"tar cfJ {self.builddir}/sysroot.tar.xz "

base-commit: 3c13991c118c879b03db88a9874df4faf623e02f
-- 
2.39.2



More information about the elbe-devel mailing list