On Thu, Oct 12, 2023 at 02:53 PM, Ross Burton wrote:

>
> I’d not noticed image-combined-dbg existed and do wonder if that shoud be
> the behaviour of the debug rootfs. Is there actually a use-case for a tarball
> which is _just_ the symbols?
>

The use for a rootfs containing just the debug tarballs is explicited in the 
documentation here: 
https://docs.yoctoproject.org/4.0.4/singleindex.html#using-the-gdbserver-method

$ tar xvfj build-dir/tmp-glibc/deploy/images/machine/image.rootfs.tar.bz2
$ tar xvfj build-dir/tmp-glibc/deploy/images/machine/image-dbg.rootfs.tar.bz2

This debug-rootfs is "combined" with the rootfs image which already contains 
the binaries. It could also be done at runtime on a live target (through tar, 
overlayfs, ...).

The later patch-set makes image-combined-dbg the default which makes the 
debug-rootfs already containing the image rootfs. This would not produce an 
error with those tar commands because they silently overwrite existing files. 
However, it would break some users setups with these conditions:
 a. The user has another way for combining the rootfs and dbg rootfs which 
produces an error if files exist in both archives
 b. The user has storage limitations for the dbg rootfs which would be exceeded 
when adding the binaries to it
 c. The user customizes the original rootfs output. These customizations would 
be lost when combining.
 d. The user is extracting the debug rootfs on a runtime rootfs with runtime 
modifications

An example for C is wic fstab customization, or any modifications which happen 
at the do_rootfs step:

     do_rootfs_postprocess() {
         echo "Customized issue" >> ${IMAGE_ROOTFS}/etc/issue
     }

     addtask do_rootfs_postprocess after do_rootfs before do_image

When extracting the debug-rootfs with image-combined-dbg, this customization 
gets lost because the debug-rootfs contains the original files from the package.

That's why I suggest keeping the debug-rootfs as it is and keep 
image-combined-debug as a separate option.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190490): 
https://lists.openembedded.org/g/openembedded-core/message/190490
Mute This Topic: https://lists.openembedded.org/mt/101275530/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