summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-07-22 18:38:31 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-07-23 09:26:10 +0200
commit0862f0da500ddd9bc11df7bc261b28d8f22e5e19 (patch)
treeab50db831f9a58101880b6cde2f5b139bff7748d
parent3e3ae4b3333a30275bbac8b81a114ecae8299314 (diff)
downloadptxdist-0862f0da500ddd9bc11df7bc261b28d8f22e5e19.tar.gz
root-debug: remove it everywhere
Separate debug files in .debug/ directories in root/ have been available for some time. This is supported by all modern toolchains and much less confusing. Remove all references to root-debug except for cleaning: This way there won't be old root-debug/ directories lying around after upgrading and running 'ptxdist clean' or 'ptxdist clean root'. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xbin/ptxdist5
-rw-r--r--doc/daily_work.inc25
-rw-r--r--doc/ref_manual.rst8
-rw-r--r--doc/user_manual.inc16
-rw-r--r--rules/base-pkgs.make6
-rw-r--r--rules/post/ptxd_make_world_common.make1
-rw-r--r--rules/qt4.make2
-rwxr-xr-xscripts/kdevelop_debug.sh2
-rw-r--r--scripts/lib/ptxd_make_image_fix_permissions.sh2
-rw-r--r--scripts/lib/ptxd_make_xpkg_pkg.sh4
-rw-r--r--scripts/ptxdist_vars.sh1
11 files changed, 26 insertions, 46 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 952bcca..152aa84 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -506,7 +506,6 @@ check_dirs() {
"${STATEDIR}" \
"${IMAGEDIR}" \
"${ROOTDIR}" \
- "${ROOTDIR_DEBUG}" \
"${PTXDIST_SRCDIR}" \
"${PTXDIST_GEN_CONFIG_DIR}" \
; do
@@ -1057,7 +1056,7 @@ clean() {
rm -fr -- "${IMAGEDIR}"
echo "${PTXDIST_LOG_PROMPT}cleaning root directory..."
rm -fr -- "${ROOTDIR}"
- rm -fr -- "${ROOTDIR_DEBUG}"
+ rm -fr -- "${PTXDIST_PLATFORMDIR}/root-debug"
echo "${PTXDIST_LOG_PROMPT}cleaning packages..."
rm -fr -- "${PKGDIR}"/*.ipk
echo "${PTXDIST_LOG_PROMPT}cleaning targetinstall stages..."
@@ -1153,7 +1152,7 @@ clean() {
rm -fr -- "${IMAGEDIR}"
echo "${PTXDIST_LOG_PROMPT}removing root..."
rm -fr -- "${ROOTDIR}"
- rm -fr -- "${ROOTDIR_DEBUG}"
+ rm -fr -- "${PTXDIST_PLATFORMDIR}/root-debug"
echo "${PTXDIST_LOG_PROMPT}removing state..."
rm -fr -- "${STATEDIR}"
echo "${PTXDIST_LOG_PROMPT}removing logfile..."
diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 3f6c9f0..4606930 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -251,14 +251,17 @@ the QEMU in the first console as:
::
- $ cd ptxdistPlatformDir/root-debug
- ptxdistPlatformDir/root-debug$ qemu-<architecture> -g 1234 -cpu <cpu-core> -L . usr/bin/myapp
+ $ cd ptxdistPlatformDir/root
+ ptxdistPlatformDir/root$ qemu-<architecture> -g 1234 -cpu <cpu-core> -L . usr/bin/myapp
-.. note:: PTXdist always builds two root filesystems. ``root/`` and
- ``root-debug/``. ``root/`` contains all components without debug
+.. note:: PTXdist always builds a root filesystems ``root/``.
+ It contains all components without debug
information (all binaries are in the same size as used later on on the
- real target), while all components in ``root-debug/`` still containing
- the debug symbols and are much bigger in size.
+ real target). In addition, each directory that contains binaries also
+ contains a ``.debug/`` directory. It contains a file with only the debug
+ symbols for each binary. These files are ignored while running
+ applications but GDB knows about it and will automatically load the debug
+ files.
The added *-g 1234* parameter lets QEMU wait for a GDB connection to run
the application.
@@ -269,18 +272,18 @@ used to build the project:
::
- $ ./selected_toolchain/<target>-gdbtui platform-<platformname>/root-debug/usr/bin/myapp
+ $ ./selected_toolchain/<target>-gdbtui platform-<platformname>/root/usr/bin/myapp
This will run a *curses* based GDB. Not so easy to handle (we must enter
all the commands and cannot click with a mouse!), but very fast to take
a quick look at our application.
At first we tell GDB where to look for debug symbols. The correct
-directory here is ``root-debug/``.
+directory here is ``root/``.
::
- (gdb) set solib-absolute-prefix platform-<platformname>/root-debug
+ (gdb) set solib-absolute-prefix platform-<platformname>/root
Next we connect this GDB to the waiting QEMU:
@@ -289,7 +292,7 @@ Next we connect this GDB to the waiting QEMU:
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
[New Thread 1]
- 0x40096a7c in _start () from root-debug/lib/ld.so.1
+ 0x40096a7c in _start () from root/lib/ld.so.1
As our application is already started, we can’t use the GDB command
``start`` to run it until it reaches ``main()``. We set a breakpoint
@@ -304,7 +307,7 @@ instead at ``main()`` and *continue* the application:
Breakpoint 1, main (argc=1, argv=0x4007f03c) at myapp.c:644
The top part of the running gdbtui console will always show us the
-current source line. Due to the ``root-debug/`` directory usage all
+current source line. Due to the ``root/`` directory usage all
debug information for GDB is available.
Now we can step through our application by using the commands *step*,
diff --git a/doc/ref_manual.rst b/doc/ref_manual.rst
index 68fb1dd..c2a7686 100644
--- a/doc/ref_manual.rst
+++ b/doc/ref_manual.rst
@@ -431,7 +431,6 @@ Usage:
Installs given file or directory into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg/opkg packet in the project's ``<platform-dir>/packages/``
Some of the parameters have fixed meanings:
@@ -532,7 +531,6 @@ Usage:
Installs the whole directory tree with all files from the given directory into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg packet in the project's ``<platform-dir>/packages/``
Some of the parameters have fixed meanings:
@@ -589,7 +587,6 @@ Usage:
Installs the whole source directory tree with all files from the given directory into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg packet in the project's ``<platform-dir>/packages/``
The ``<destination dir>`` is used like in the ``install_alternative`` to let
@@ -638,7 +635,6 @@ Usage:
Installs given files or directories into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg/opkg packet in the project's ``<platform-dir>/packages/``
The base parameters and their meanings:
@@ -702,7 +698,6 @@ Usage:
Installs a symbolic link into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg/opkg packet in the project's ``<platform-dir>/packages/``
The parameters and their meanings:
@@ -744,7 +739,6 @@ Usage:
Installs archives content into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg/opkg packet in the project's ``<platform-dir>/packages/``
All parameters have fixed meanings:
@@ -777,7 +771,6 @@ Installs parts of a directory tree with all files from the given directory
into:
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg packet in the project's ``<platform-dir>/packages/``
Some of the parameters have fixed meanings:
@@ -830,7 +823,6 @@ Usage:
Installs the shared library <libname> into the root filesystem.
* the project's ``<platform-dir>/root/``
-* the project's ``<platform-dir>/root-debug/``
* an ipkg/opkg packet in the project's ``<platform-dir>/packages/``
The parameters and their meanings:
diff --git a/doc/user_manual.inc b/doc/user_manual.inc
index 1f91987..3741258 100644
--- a/doc/user_manual.inc
+++ b/doc/user_manual.inc
@@ -417,18 +417,10 @@ project.
an NFS root for example. Refer :ref:`nfsroot` for further details how to
make use of it. In case of a debug session, this directory can be used
by a modern GDB for its sysroot as well by using
- ``set sysroot </path/to/workspace>/|ptxdistPlatformDir|/root``.
-
-``|ptxdistPlatformDir|/root-debug``
- Target’s root filesystem image intended to be used as system filesystem root
- for a debugger. The difference to ``|ptxdistPlatformDir|/root/`` is, all
- programs and libraries in this directory still have their debug information
- present. To be used by the debugger, we should setup our debugger with
- ``set sysroot </path/to/workspace>/|ptxdistPlatformDir|/root-debug``.
- Please note: this feature will fade-out soon. It is replaced by a long
- time supported feature used by modern GDBs: using sub-directories named
- ``.debug`` present in the ``|ptxdistPlatformDir|/root`` directory
- instead.
+ ``set sysroot </path/to/workspace>/|ptxdistPlatformDir|/root``:
+ All binaries are stripped but all debug symbols are saved in special
+ debug files in ``.debug`` sub-directories. GDB knows about this and
+ will load these files automatically.
``|ptxdistPlatformDir|/state``
Building every package is divided onto stages. And stages of one
diff --git a/rules/base-pkgs.make b/rules/base-pkgs.make
index 9c001e9..8ead99e 100644
--- a/rules/base-pkgs.make
+++ b/rules/base-pkgs.make
@@ -21,16 +21,12 @@ PACKAGES-$(PTXCONF_BASE_PKGS) += base-pkgs
$(STATEDIR)/base-pkgs.install:
@$(call targetinfo)
@echo -e \
- "copying 'root', 'root-debug' from\n" \
+ "copying 'root' from\n" \
"'$(PTXDIST_BASE_PLATFORMDIR)'\n"
@tar -c --exclude="./dev/*" \
-C "$(PTXDIST_BASE_PLATFORMDIR)/root" . | \
tar -x -C "$(ROOTDIR)" && \
check_pipe_status
- @tar -c -C "$(PTXDIST_BASE_PLATFORMDIR)/root-debug" . | \
- tar -x --exclude="./dev/*" \
- -C "$(ROOTDIR_DEBUG)" && \
- check_pipe_status
@$(call touch)
# ----------------------------------------------------------------------------
diff --git a/rules/post/ptxd_make_world_common.make b/rules/post/ptxd_make_world_common.make
index dc882bf..c561fab 100644
--- a/rules/post/ptxd_make_world_common.make
+++ b/rules/post/ptxd_make_world_common.make
@@ -15,7 +15,6 @@ ptx/env = \
PTXDIST_SYSROOT_CROSS="$(call ptx/escape,$(PTXDIST_SYSROOT_CROSS))" \
\
ptx_nfsroot="$(call ptx/escape,$(ROOTDIR))" \
- ptx_nfsroot_dbg="$(call ptx/escape,$(ROOTDIR_DEBUG))" \
\
ptx_extract_dir_target="$(call ptx/escape,$(BUILDDIR))" \
ptx_extract_dir_host="$(call ptx/escape,$(HOST_BUILDDIR))" \
diff --git a/rules/qt4.make b/rules/qt4.make
index 4ae79de..b7cb68d 100644
--- a/rules/qt4.make
+++ b/rules/qt4.make
@@ -65,7 +65,7 @@ QT4_WRAPPER_BLACKLIST := \
TARGET_COMPILER_RECORD_SWITCHES
# don't use CROSS_ENV. Qt uses mkspecs for instead.
-# 'strip' is our special wrapper to avoid stripping for root-debug
+# 'strip' is our special wrapper to avoid stripping
QT4_ENV := $(CROSS_ENV_PKG_CONFIG) STRIP=strip MAKEFLAGS="$(PARALLELMFLAGS)"
QT4_INSTALL_OPT := INSTALL_ROOT=$(QT4_PKGDIR)
diff --git a/scripts/kdevelop_debug.sh b/scripts/kdevelop_debug.sh
index f65737a..0a7befa 100755
--- a/scripts/kdevelop_debug.sh
+++ b/scripts/kdevelop_debug.sh
@@ -6,7 +6,7 @@
#
# to debug in a typical ptxdist environment do something like this:
#
-# ./kdevelop_debug.sh -e root-debug/bin/busybox -s root-debug \
+# ./kdevelop_debug.sh -e root/bin/busybox -s root \
# -t 192.168.23.194:1234 \
# -d arm-softfloat-linux-gnu-gdb
#
diff --git a/scripts/lib/ptxd_make_image_fix_permissions.sh b/scripts/lib/ptxd_make_image_fix_permissions.sh
index eae2ab3..0a1e807 100644
--- a/scripts/lib/ptxd_make_image_fix_permissions.sh
+++ b/scripts/lib/ptxd_make_image_fix_permissions.sh
@@ -103,7 +103,7 @@ ptxd_make_image_fix_permissions() {
local -a ptxd_reply_ipkg_file ptxd_reply_perm_files &&
ptxd_get_ipkg_files ${image_pkgs_selected_target} || return
- set -- "${ptx_nfsroot}" "${ptx_nfsroot_dbg}"
+ set -- "${ptx_nfsroot}"
exec 3> "${fixscript}"
while [ ${#} -ne 0 ]; do
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index ba9094b..9cb2784 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -99,11 +99,11 @@ ptxd_install_setup() {
esac
# all dirs
- dirs=("${ptx_nfsroot}" "${ptx_nfsroot_dbg}" "${pkg_xpkg_tmp}")
+ dirs=("${ptx_nfsroot}" "${pkg_xpkg_tmp}")
# nfs root dirs
# no setuid/setguid bit here
- ndirs=("${ptx_nfsroot}" "${ptx_nfsroot_dbg}")
+ ndirs=("${ptx_nfsroot}")
# package dirs
# this goes into the ipkg, thus full file modes here
diff --git a/scripts/ptxdist_vars.sh b/scripts/ptxdist_vars.sh
index 11167a8..5a7dfdd 100644
--- a/scripts/ptxdist_vars.sh
+++ b/scripts/ptxdist_vars.sh
@@ -15,7 +15,6 @@ REPORTDIR=${PTXDIST_PLATFORMDIR}/report
RELEASEDIR=${PTXDIST_PLATFORMDIR}/release
IMAGEDIR=${PTXDIST_PLATFORMDIR}/images
ROOTDIR=${PTXDIST_PLATFORMDIR}/root
-ROOTDIR_DEBUG=${PTXDIST_PLATFORMDIR}/root-debug
# we put generated config files here
PTXDIST_GEN_CONFIG_DIR=${STATEDIR}/config