buildroot creating jffs filesytem too early...

Clem Taylor clem.taylor at gmail.com
Wed May 24 22:32:32 UTC 2006


On 5/23/06, Clem Taylor <clem.taylor at gmail.com> wrote:
> I have a target/device/.../.../linux.mk that builds the linux kernel,
> encapsulates it in a u-boot wrapper and copies it into the
> $(TARGET_DIR). However, this step happens *after* buildroot has built
> the jffs2 filesystem image. So far, I haven't been able to figure out
> what my linux target should depend on to make sure that it is run
> before the root filesystem image is created?

It seems that the order that things are built is currently dumb luck.
This issue has been fixed in some other buildroot based trees
(gumstix, openwrt) by adding a TARGET_FS flag, having all the *root.mk
files use TARGET_FS instead of TARGETS and making TARGET_FS the last
world dependency.

                                --Clem

(The revisions below are from my local tree, not the buildroot-svn)

Index: Makefile
===================================================================
--- Makefile	(revision 2232)
+++ Makefile	(working copy)
@@ -46,6 +46,7 @@
 #
 ##############################################################
  TARGETS:=host-sed kernel-headers uclibc-configured binutils gcc
uclibc-target-utils
+TARGET_FS:=
  include toolchain/Makefile.in
  include package/Makefile.in

@@ -77,9 +78,9 @@
  TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
  TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))

-world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
+world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
$(TARGET_FS)

-.PHONY: all world clean dirclean distclean source $(TARGETS) \
+.PHONY: all world clean dirclean distclean source $(TARGETS) $(TARGET_FS) \
 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
 	$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)

Index: target/ext2/ext2root.mk
===================================================================
--- target/ext2/ext2root.mk	(revision 2232)
+++ target/ext2/ext2root.mk	(working copy)
@@ -125,5 +125,5 @@
 #
 #############################################################
  ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2)),y)
-TARGETS+=ext2root
+TARGET_FS+=ext2root
  endif
Index: target/jffs2/jffs2root.mk
===================================================================
--- target/jffs2/jffs2root.mk	(revision 2232)
+++ target/jffs2/jffs2root.mk	(working copy)
@@ -82,5 +82,5 @@
 #
 #############################################################
  ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
-TARGETS+=jffs2root
+TARGET_FS+=jffs2root
  endif
Index: target/squashfs/squashfsroot.mk
===================================================================
--- target/squashfs/squashfsroot.mk	(revision 2232)
+++ target/squashfs/squashfsroot.mk	(working copy)
@@ -91,5 +91,5 @@
 #
 #############################################################
  ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS)),y)
-TARGETS+=squashfsroot
+TARGET_FS+=squashfsroot
  endif
Index: target/tar/tarroot.mk
===================================================================
--- target/tar/tarroot.mk	(revision 2232)
+++ target/tar/tarroot.mk	(working copy)
@@ -39,5 +39,5 @@
 #
 #############################################################
  ifeq ($(strip $(BR2_TARGET_ROOTFS_TAR)),y)
-TARGETS+=tarroot
+TARGET_FS+=tarroot
  endif



More information about the uClibc mailing list