Skip to contentSkip to conversation

ref-manual/ref: Add entry for why binaries are changed in images

PATCH In review Richard Purdie 2 participants 3 messages Oct 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ref-manual/ref: Add entry for why binaries are changed in images

---
 documentation/ref-manual/faq.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
documentation/ref-manual/faq.rst +11 -0
index 7a1614028..b79ba0306 100644
@@ -451,3 +451,14 @@ variant. For another example, permissions errors might be caused by a
 Makefile that ignores ``DESTDIR`` or uses a different name for that
 environment variable. Check the the build system to see if these kinds
 of issues exist.
+
+**Q:** I'm adding a binary in a recipe but its different in the image, what is
+changing it?
+
+**A:** The first most obvious change is the system stripping debug symbols from
+it. Setting ``INHIBIT_PACKAGE_STRIP`` to stop debug symbols being stripped and/or
+``INHIBIT_PACKAGE_DEBUG_SPLIT`` to stop debug symbols being split into a separate
+file will ensure the binary is unchanged. The other less obvious thing that can
+happen is prelinking of the image. This is set by default in local.conf via
+``USER_CLASSES`` which can contain 'image-prelink'. If you remove that, the
+image will not be prelinked meaning the binaries would be unchanged.
Signature · 1 line
2.25.1
#1 lore raw

Hi Richard,

Quoted 17 lines · Richard Purdie

---
documentation/ref-manual/faq.rst | 11 +++++++++++

1 file changed, 11 insertions(+)
documentation/ref-manual/faq.rst +0 -0
index 7a1614028..b79ba0306 100644
@@ -451,3 +451,14 @@ variant. For another example, permissions errors

might be caused by a
Makefile that ignores ``DESTDIR`` or uses a different name for that environment variable. Check the the build system to see if these kinds of issues exist.

documentation/ref-manual/faq.rst +2 -0
+
+**Q:** I'm adding a binary in a recipe but its different in the image,
Quoted 1 line

what is

s/its/it's/

Quoted 7 lines
documentation/ref-manual/faq.rst +3 -0
+changing it?
+
+**A:** The first most obvious change is the system stripping debug

symbols from
+it. Setting ``INHIBIT_PACKAGE_STRIP`` to stop debug symbols being stripped and/or
+``INHIBIT_PACKAGE_DEBUG_SPLIT`` to stop debug symbols being split into

Quoted 10 lines

a separate
+file will ensure the binary is unchanged. The other less obvious thing that can
+happen is prelinking of the image. This is set by default in local.conf via
+``USER_CLASSES`` which can contain 'image-prelink'. If you remove that, the
+image will not be prelinked meaning the binaries would be unchanged.

Signature · 1 line
2.25.1

I'd use refs to the listed variables to make it easier for people to find exactly what to do with them, e.g. :term:INHIBIT_PACKAGE_STRIP.

Quentin

#2 lore raw
Quoted 19 lines · Quentin Schulz

Hi Richard,

Quoted 15 lines · Richard Purdie

---
documentation/ref-manual/faq.rst | 11 +++++++++++

1 file changed, 11 insertions(+)
documentation/ref-manual/faq.rst +0 -0
index 7a1614028..b79ba0306 100644
@@ -451,3 +451,14 @@ variant. For another example, permissions

errors
might be caused by a
Makefile that ignores ``DESTDIR`` or uses a different name for that environment variable. Check the the build system to see if these

Quoted 8 lines
Quoted 6 lines

kinds
of issues exist.

documentation/ref-manual/faq.rst +2 -0
+
+**Q:** I'm adding a binary in a recipe but its different in the

image,
what is

s/its/it's/

Thanks, will fix.

Quoted 17 lines
Quoted 17 lines
documentation/ref-manual/faq.rst +3 -0
+changing it?
+
+**A:** The first most obvious change is the system stripping debug

symbols from
+it. Setting ``INHIBIT_PACKAGE_STRIP`` to stop debug symbols being stripped and/or
+``INHIBIT_PACKAGE_DEBUG_SPLIT`` to stop debug symbols being split into
a separate
+file will ensure the binary is unchanged. The other less obvious thing
that can
+happen is prelinking of the image. This is set by default in local.conf via
+``USER_CLASSES`` which can contain 'image-prelink'. If you remove that, the

Quoted 8 lines
Quoted 4 lines

+image will not be prelinked meaning the binaries would be unchanged.

Signature · 1 line
2.25.1

I'd use refs to the listed variables to make it easier for people to find exactly what to do with them, e.g. :term:INHIBIT_PACKAGE_STRIP.

See the second patch I sent! :)

Cheers,

Richard