On Mon, 2023-11-06 at 13:50 +0000, Richard Purdie wrote:
> On Wed, 2023-11-01 at 12:01 +0100, Adrian Freihofer wrote:
> > Remove the image-combined-dbg.bbclass and make this the default
> > behavior for the rootfs-dbg. A rootfs-dbg with only debug symbols
> > but
> > no executable binaries also causes problems with gdb, which is
> > probably the most common use case for the roofs-dbg. This change
> > simplifies and improves the user experience for a slightly larger
> > rootfs-dbg.
> > 
> > If the rootfs-dbg contains a complete copy of the rootfs, it is
> > also
> > usable for booting the target device over the network. This in turn
> > simplifies other use cases with e.g. the use of perf on a device
> > booted over the network.
> > 
> > Signed-off-by: Adrian Freihofer <adrian.freiho...@siemens.com>
> 
> I'm being pressured for review on this so I'll just say what the
> problem is. I struggle to review this as off the top of my head, I
> can't remember the difference between "rootfs-dbg" or "image-
> combined-
> dbg". I understand the patch gets rid of one and the argument appears
> to be that gdb doesn't work well with the case that is removed.
> 
> What isn't here is any reminder of what the differences are, or a
> pointer to the history which lead us to have two different modes in
> the
> first place. We presumably had a reason for adding it.
> 
> That means in order to review it, I'd have to dig into the history
> and
> work out the differences, then work out why we added the two modes
> and
> then determine if they're still needed.
> 
> What would help speed up review would be a pointer to the original
> commits and/or a summary of why the were added. A summary of the
> differences between the two modes would also help/
> 

We have tried to work through the git history and to search for use
cases that rely on the old implementation. The git history does not
explain why it is like it is.

Enguerrand came up with theoretical use cases where the rootfs-dbg
could be mounted somehow as overlay at run-time. I can't rule out the
possibility of someone doing something like that.

Maybe we should keep that as it is.

@Ross: do you have a different opinion regarding the discussion we had:
https://lists.openembedded.org/g/openembedded-core/message/188995


Here are my notes. Just in case we would like to come back to this some
when.

- 7a7c6b021f114c6bedfbdc9afd2bf2925b238d19:
  The first implementation of rootfs-dbg only added the *-dbg packages
  and the package database.
- 69d3df9169133d5e05eff25019569fb8974d48c2
- c1ce0d9a9e200e35a9b6f9d537232875683ab9f1
- e73a85be3e020561db92a197c593afe7fd952919
- 1800b1ba7ae07cd010e529653eaa1d7a5841e6e5
  Added some workarounds related to opkg and openssl which got finally
  reverted again.
- 364c4c7d3fc049f2b734a6a235758a75af364ce0
  Support for PACKAGE_DEBUG_SPLIT_STYLE= 'debug-with-srcpkg'
- 5f30534c47571d199d8655b3da51f7b55fe20c04
  Introduce IMAGE_INSTALL_DEBUGFS
- 18f080fbe4cf51824e5f1d73a10e06e3a5724423
  Removes the package database later, as it caused problems with RPMs.

Comparison of
  $ tar xvfj core-image-minimal-qemux86-64.rootfs.tar.bz2
  $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2
without this patch verus
  $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2
with this patch applied shows some differences. This is expected
because
some of the post rootfs steps run after rootfs gets copied to
rootfs-dbg. Changing this would require more changes.

$ diff -r --no-dereference debug-fs1 debug-fs2
Only in debug-fs1/etc/default: postinst
Only in debug-fs2/etc/init.d: run-postinsts
diff -r --no-dereference debug-fs1/etc/issue debug-fs2/etc/issue
1c1
< Poky (Yocto Project Reference Distro) 4.3+snapshot-
bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 \n \l
---
> Poky (Yocto Project Reference Distro) 4.3+snapshot-
44ec9356d2d8686189531b55b2bd2b268b5dffa3 \n \l
diff -r --no-dereference debug-fs1/etc/issue.net debug-
fs2/etc/issue.net
1c1
< Poky (Yocto Project Reference Distro) 4.3+snapshot-
bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 %h
---
> Poky (Yocto Project Reference Distro) 4.3+snapshot-
44ec9356d2d8686189531b55b2bd2b268b5dffa3 %h
Only in debug-fs1/etc: ld.so.cache
Only in debug-fs2/etc/rcS.d: S99run-postinsts
Only in debug-fs1/etc: timestamp
Only in debug-fs1/etc: version
Only in debug-fs2/usr/sbin: run-postinsts
Only in debug-fs2/var/volatile: log
Only in debug-fs2/var/volatile: tmp

Best reagrds,
Adrian

> Cheers,
> 
> Richard
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190602): 
https://lists.openembedded.org/g/openembedded-core/message/190602
Mute This Topic: https://lists.openembedded.org/mt/102316026/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to