Skip to contentSkip to conversation

core-image-minimal-initramfs: add libgcc into the initramfs image

PATCH In review Zhixiong Chi 4 participants 7 messages Mar 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core-image-minimal-initramfs: add libgcc into the initramfs image

Add the libgcc package into the initramfs image to avoid multithread function error in the userspace(eg: pthread_cancel).

---
 meta/recipes-core/images/core-image-minimal-initramfs.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/images/core-image-minimal-initramfs.bb +1 -1
index 7df8ab1ebd..3cf2c7b01f 100644
@@ -11,7 +11,7 @@ INITRAMFS_SCRIPTS ?= "\
                       initramfs-module-install-efi \
                      "
 
-PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd libgcc ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
Signature · 1 line
2.17.1
#1 lore raw

Wouldn't it be better to add that dependency to the packages which need it?

Ross

Quoted 30 lines · Zhixiong Chi

Add the libgcc package into the initramfs image to avoid multithread function error in the userspace(eg: pthread_cancel).

---
 meta/recipes-core/images/core-image-minimal-initramfs.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/images/core-image-minimal-initramfs.bb +1 -2
index 7df8ab1ebd..3cf2c7b01f 100644
@@ -11,7 +11,7 @@ INITRAMFS_SCRIPTS ?= "\
                       initramfs-module-install-efi \
                      "
 
-PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd libgcc ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

It's not for dependency of the package in the initramfs image,

just for the multithread application while the customer use initramfs image.

Since we use PACKAGE_INSTALL to override the rootfs in the initramfs bb file,

so we couldn't use the IMAGE_INSTALL_append to add the package in the local.conf.

Did you think if it should be added into the image? :-)

I know the initramfs is just to bootup the system. If the customer want to support the

multithread app, they can use the other types of the image.

Thanks.

Quoted 34 lines · Ross

Wouldn't it be better to add that dependency to the packages which need it?

Ross

Quoted 29 lines · Zhixiong Chi

Add the libgcc package into the initramfs image to avoid multithread function error in the userspace(eg: pthread_cancel).

---
  meta/recipes-core/images/core-image-minimal-initramfs.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/images/core-image-minimal-initramfs.bb +1 -2
index 7df8ab1ebd..3cf2c7b01f 100644
@@ -11,7 +11,7 @@ INITRAMFS_SCRIPTS ?= "\
                        initramfs-module-install-efi \
                       "
 
-PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd libgcc ${ROOTFS_BOOTSTRAP_INSTALL}"
 
  # Do not pollute the initrd image with rootfs features
  IMAGE_FEATURES = ""
--

2.17.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 4 lines
---------------------
Thanks,
Zhixiong Chi
Tel: +86-10-8477-7036
#3 lore raw
Quoted 13 lines · Zhixiong Chi

It's not for dependency of the package in the initramfs image,

just for the multithread application while the customer use initramfs image.

Since we use PACKAGE_INSTALL to override the rootfs in the initramfs bb
file,

so we couldn't use the IMAGE_INSTALL_append to add the package in the
local.conf.

Quoted 5 lines

Did you think if it should be added into the image? :-)

I know the initramfs is just to bootup the system. If the customer want to support the multithread app, they can use the other types of the image.

The customer needs to depend on libgcc in their app, or their initramfs, we're not adding random dependencies to the initramfs "just in case".

Cheers,

Richard

#4 lore raw
Quoted 3 lines · Richard Purdie

The customer needs to depend on libgcc in their app, or their initramfs, we're not adding random dependencies to the initramfs "just in case".

Part of the goal of my ELF parser rewrite was to make it easy to add libgcc dependencies on binaries that use pthread_cancel automatically.

Ross

#5 lore raw
Quoted 10 lines · Ross
Quoted 3 lines · Richard Purdie

The customer needs to depend on libgcc in their app, or their initramfs, we're not adding random dependencies to the initramfs "just in case".

Part of the goal of my ELF parser rewrite was to make it easy to add libgcc dependencies on binaries that use pthread_cancel automatically.

your suggestion about letting needing package rdep on it right, but adding a hardcoded dependency on libgcc is not. We have to consider a case where where there are alternatives to libgcc which can provide same functionality and is preferred.

Quoted 6 lines

Ross
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw
Quoted 4 lines · Khem Raj

your suggestion about letting needing package rdep on it right, but adding a hardcoded dependency on libgcc is not. We have to consider a case where where there are alternatives to libgcc which can provide same functionality and is preferred.

Absolutely.

Ross