[Buildroot] [PATCH] fix errors with the JFFS2 rootfs target

Nicolas Pitre nico at cam.org
Wed Dec 3 20:03:31 UTC 2008

First, the build is stopped because

	rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share

returns an error.  The problem is not that /usr/share is not empty or
the like, but rather that it simply doesn't exist at all in some cases.
So let's ignore the return code in that case.

Also, when BR2_PREFER_STATIC_LIB is set, there is no ldconfig for
the target.

Signed-off-by: Nicolas Pitre <nico at cam.org>

Index: target/jffs2/jffs2root.mk
--- target/jffs2/jffs2root.mk	(revision 24219)
+++ target/jffs2/jffs2root.mk	(working copy)
@@ -58,8 +58,10 @@
 ifneq ($(BR2_HAVE_INFOPAGES),y)
 	@rm -rf $(TARGET_DIR)/usr/info
-	@rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
+	- at rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
+ifneq ($(BR2_PREFER_STATIC_LIB),y)
 	$(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
 	# Use fakeroot to pretend all target binaries are owned by root
 	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000

More information about the buildroot mailing list