Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Colin Foster <colin.foster@in-advantage.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH V1] core: add kconfig option to archive an un-stripped filesystem
Date: Sat, 29 Jul 2023 09:49:52 +0200	[thread overview]
Message-ID: <20230729094952.11722d87@windsurf> (raw)
In-Reply-To: <20230728231839.4193379-1-colin.foster@in-advantage.com>

Hello Colin,

On Fri, 28 Jul 2023 16:18:39 -0700
Colin Foster <colin.foster@in-advantage.com> wrote:

> It is reasonable to expect that deployed systems don't contain debugging
> symbols. At the very least, it will bloat image size unnecessarily.
> 
> There might also be scenarios where a previously released image might
> generate core dumps, or require attaching a debugger to a process
> well after the filesystem image has been made.
> 
> These two goals contradict each other, and is addressed here.
> 
> Just before stripping target binaries, allow the option to tar the
> target filesystem for archiving. This will create a single image -
> rootfs_syms.tgz - with un-stripped target binaries, and allow post-build
> debugging and core dump analysis. The final image will be unaffected.
> 
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>

I understand the reasoning, and what you proposed is indeed a simple
solution that can work today.

However, I think the "grand plan" to solve this issue was to install
everything to $(STAGING_DIR), not only packages installing libraries.
In $(STAGING_DIR), packages are installed unstripped, and with
debugging symbols if BR2_ENABLE_DEBUG=y. One issue with this solution
is that it requires a lot of effort to implement, so nobody ever
tackled that.

Perhaps one concern with your proposal is that the tar you're
generating is not exactly the same as the generated filesystem with
binaries unstripped. Indeed, after the point where you generate this
tarball, a number of other things will happen in the rootfs, most
notably all what happens within fakeroot (permission/ownership tweaks,
etc.). I understand these generally don't cause any issue for the
specific use-case of having binaries with debugging symbols, but it
shows that this option does not really provide a "rootfs with debugging
symbols", but rather a "almost complete but not quite entirely rootfs
with debugging symbols".

Let's see what others think. The advantage of your proposal is that it
is actionable now. For now, what we tell people is that libraries with
debugging symbols are in $(STAGING_DIR), and for packages that don't
install to staging, the debugging symbols are in the build dir of the
package: output/build/foo-1.0.0/foo.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-07-29  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28 23:18 [Buildroot] [PATCH V1] core: add kconfig option to archive an un-stripped filesystem Colin Foster
2023-07-29  7:49 ` Thomas Petazzoni via buildroot [this message]
2023-07-29 20:43   ` Colin Foster
2023-07-29 20:59     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230729094952.11722d87@windsurf \
    --to=buildroot@buildroot.org \
    --cc=colin.foster@in-advantage.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox