From 8a393395079801f2a8ca2eb1b8f1996e460861c8 Mon Sep 17 00:00:00 2001
From: Sven Bachmann <dev@mcbachmann.de>
Date: Sat, 4 Jun 2011 17:16:37 +0200
Subject: [PATCH] base-files: copy uClibc files from ext. toolchain

When using an external toolchain with uClibc the Makefile of base-files
only selects libc* files for copying to the firmware /lib dir but not
the libuClibc-*.so and the ld-uClibc.so.0-Symlink.

This prevents the final firmware from booting, because busybox (and
others) rely on these files and you'll get a broken firmware (without
noticing, because the kernel only tells you that /etc/preinit can't be
started).

To fix this I added the uClibc-files to the libc-install target when
CONFIG_USE_UCLIBC is set.

This should close bug #9157.

Signed-off-by: Sven Bachmann <dev@mcbachmann.de>
---
 package/base-files/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 5e6e652..7a80f71 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -188,7 +188,8 @@ define Package/libc/config
 		string
 		prompt "libc shared library files (use wildcards)"
 		depends EXTERNAL_TOOLCHAIN && PACKAGE_libc
-		default "./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
+		default "./lib/ld{-*.so*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}" if !USE_UCLIBC
+		default "./lib/ld{-*.so*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util,uClibc}{-*.so,.so.*}" if USE_UCLIBC
 
 	endmenu
 endef
-- 
1.7.4.1

