Correct spelling error and config option to create symlinks for old naming of MTD...
author"Steven J. Hill" <sjhill@realitydiluted.com>
Sun, 14 Jan 2007 01:01:07 +0000 (01:01 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Sun, 14 Jan 2007 01:01:07 +0000 (01:01 -0000)
package/mtd/Config.in
package/mtd/mtd.mk

index d38ab2348fba5ebe6d4780146245b89b7fa770f1..582082d4bdc17392270bd43008be2a4a8b94c3d7 100644 (file)
@@ -57,7 +57,7 @@ config BR2_PACKAGE_MTD_FLASH_INFO
        depends on BR2_PACKAGE_MTD
 
 config BR2_PACKAGE_MTD_FLASH_LOCK
-       bool "flash_loco"
+       bool "flash_lock"
        default y
        depends on BR2_PACKAGE_MTD
 
@@ -71,6 +71,11 @@ config BR2_PACKAGE_MTD_FLASHCP
        default y
        depends on BR2_PACKAGE_MTD
 
+config BR2_PACKAGE_MTD_ERASE
+       bool "erase"
+       default y
+       depends on BR2_PACKAGE_MTD
+
 config BR2_PACKAGE_MTD_JFFS2DUMP
        bool "jffs2dump"
        default y
index 2d122e6e1e3538a17aac49e3cbd0e6d550ad5053..2f3c782aaff19ff522b56517b95e94619d7746b8 100644 (file)
@@ -116,14 +116,21 @@ MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS)               += doc_loadbios
 MTD_BUILD_TARGETS := $(addprefix $(MTD_DIR)/util/, $(MTD_TARGETS_y))
 
 $(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked
-       CFLAGS="-I$(LINUX_HEADERS_DIR)/include $(TARGET_CFLAGS)" \
-       $(MAKE) CC=$(TARGET_CC) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
+       $(MAKE) CC=$(TARGET_CC) CFLAGS="-I$(LINUX_HEADERS_DIR)/include -I$(MTD_DIR)/include $(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
 
 MTD_TARGETS := $(addprefix $(TARGET_DIR)/usr/sbin/, $(MTD_TARGETS_y))
 
 $(MTD_TARGETS): $(TARGET_DIR)/usr/sbin/% : $(MTD_DIR)/util/%
+       mkdir -p $(TARGET_DIR)/usr/sbin
        cp -f $< $@
        $(STRIP) $@
+ifneq ($(BR2_PACKAGE_MTD_FLASHCP),)
+       -ln -sf flashcp $(TARGET_DIR)/usr/sbin/fcp
+endif
+ifneq ($(BR2_PACKAGE_MTD_ERASE),)
+       -ln -sf flash_erase $(TARGET_DIR)/usr/sbin/erase
+       -ln -sf flash_eraseall $(TARGET_DIR)/usr/sbin/eraseall
+endif
 
 mtd: zlib $(MTD_TARGETS)
 
@@ -131,6 +138,13 @@ mtd-source: $(DL_DIR)/$(MTD_SOURCE)
 
 mtd-clean:
        -$(MAKE) -C $(MTD_DIR) clean
+ifneq ($(BR2_PACKAGE_MTD_FLASHCP),)
+       -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/fcp
+endif
+ifneq ($(BR2_PACKAGE_MTD_ERASE),)
+       -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/erase
+       -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/eraseall
+endif
 
 mtd-dirclean:
        rm -rf $(MTD_DIR)