summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-07-03 22:51:00 +0200
committerDave Reisner <dreisner@archlinux.org>2013-07-08 22:28:41 +0200
commitd811d8d0fdf76f73b9c4108094bafcb72becec5d (patch)
treeba8f6e2aa1d699f5f06cea7917f8c5570269fe83
parent99c790b22382d888853509b49526c64eb812b0ae (diff)
downloadmkinitcpio-d811d8d0fdf76f73b9c4108094bafcb72becec5d.tar.gz
mkinitcpio-d811d8d0fdf76f73b9c4108094bafcb72becec5d.tar.xz
Generate /etc/ld.so.cache for image
Shaves a trivial, but measurable, amount of time off of early userspace at the cost of a small cache file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--functions3
-rwxr-xr-xmkinitcpio3
2 files changed, 6 insertions, 0 deletions
diff --git a/functions b/functions
index 8a4e3be..532884f 100644
--- a/functions
+++ b/functions
@@ -658,6 +658,9 @@ initialize_buildroot() {
# indicate that this is an initramfs
>"$workdir/root/etc/initrd-release"
+ # add a blank ld.so.conf to keep ldconfig happy
+ >"$workdir/root/etc/ld.so.conf"
+
printf '%s' "$workdir"
}
diff --git a/mkinitcpio b/mkinitcpio
index 6e03635..0ae6913 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -482,6 +482,9 @@ set +o functrace
set +o errtrace
trap -- ERR
+# this is simply a nice-to-have -- it doesn't matter if it fails.
+ldconfig -r "$BUILDROOT" &>/dev/null
+
if [[ $_optgenimg ]]; then
build_image "$_optgenimg" "$_optcompress"
else