[ELDK] [PATCH RFSB] Auto-create any directories needed for BusyBox links

Wolfgang Denk wd at denx.de
Fri Apr 30 08:48:06 CEST 2010


Commit db3060c8 moved the creation of some standard directories to the
end of the build process. This may cause problems when creating the
BusyBox links.  Make sure to auto-create any directories needed for
these links.

Signed-off-by: Wolfgang Denk <wd at denx.de>
Acked-by: Steven A. Falco <sfalco at harris.com>
Cc: Detlev Zundel <dzu at denx.de>
---
 Makefile |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index fefbd8d..1c59bba 100644
--- a/Makefile
+++ b/Makefile
@@ -191,15 +191,18 @@ $(STAMP_ELDK_PKGS):	$(STAMP_RFSB_SKEL)
 			echo "No 'busybox.links' file found, skipping busybox preparation." ;\
 		else \
 			cd $(BUILD_RFS) ;\
+			mkdir -p ./bin ;\
 			ln -sf /sbin/busybox bin/busybox ;\
 			while read lnk; do \
+				dname=`dirname $$lnk` ;\
 				if [ -r ./$$lnk ]; then \
-					dname=`dirname $$lnk`/bb ;\
+					dname=${dname}/bb ;\
 					fname=`basename $$lnk` ;\
 					echo "Warning: creating conflicting link as $$dname/$$fname" ;\
 					mkdir -p ./$$dname ;\
 					ln -s /sbin/busybox ./$$dname/$$fname ;\
 				else \
+					mkdir -p ./$$dname ;\
 					ln -s /sbin/busybox ./$$lnk ;\
 				fi ; \
 			done < $$bblinks ;\
-- 
1.6.2.5



More information about the eldk mailing list