[LEDE-DEV] [PATCH 3/3] build: Run ldconfig on the final rootfs

Florian Fainelli f.fainelli at gmail.com
Wed Sep 21 11:13:39 PDT 2016


ldconfig needs to run with all libraries staged into the final rootfs
directory, and this needs to happen before the initramfs is linked into the
kernel as well. Do it right after mklibs.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 include/rootfs.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/rootfs.mk b/include/rootfs.mk
index f3ba33a2be03..ead7cbb7fc10 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -33,6 +33,12 @@ ifdef CONFIG_USE_MKLIBS
   endef
 endif
 
+ifdef CONFIG_USE_GLIBC
+  define ldconfig
+	(cd $(TARGET_DIR); $(STAGING_DIR_HOST)/bin/ldconfig -r . -v)
+  endef
+endif
+
 # where to build (and put) .ipk packages
 opkg = \
   IPKG_NO_SCRIPT=1 \
@@ -76,4 +82,5 @@ define prepare_rootfs
 	rm -f $(1)/usr/lib/opkg/info/*.prerm*
 	$(if $(CONFIG_CLEAN_IPKG),rm -rf $(1)/usr/lib/opkg)
 	$(call mklibs,$(1))
+	$(call ldconfig)
 endef
-- 
2.9.3




More information about the Lede-dev mailing list