mtd: bump to 1.5.0
[buildroot-gz.git] / package / mtd / mtd.mk
blob3bcefa5c955e9968b373b177e2fcdc910cade37e
1 #############################################################
3 # mtd provides jffs2 utilities
5 #############################################################
6 MTD_VERSION = 1.5.0
7 MTD_SOURCE = mtd-utils-$(MTD_VERSION).tar.bz2
8 MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils
9 ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y)
10 MTD_DEPENDENCIES = zlib lzo
11 endif
13 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
14 MTD_DEPENDENCIES += busybox
15 endif
17 HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-e2fsprogs
19 define HOST_MTD_BUILD_CMDS
20 CC="$(HOSTCC)" CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" \
21 CROSS= $(MAKE1) BUILDDIR=$(@D) \
22 WITHOUT_XATTR=1 -C $(@D)
23 endef
25 define HOST_MTD_INSTALL_CMDS
26 $(MAKE1) BUILDDIR=$(@D) DESTDIR=$(HOST_DIR) -C $(@D) install
27 endef
29 MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2
30 SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool
32 MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk
33 MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios
34 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp
35 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASE) += flash_erase
36 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_LOCK) += flash_lock
37 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_DUMP) += flash_otp_dump
38 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_INFO) += flash_otp_info
39 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_UNLOCK) += flash_unlock
40 MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_CHECK) += ftl_check
41 MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_FORMAT) += ftl_format
42 MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS2DUMP) += jffs2dump
43 MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS2) += mkfs.jffs2
44 MTD_TARGETS_$(BR2_PACKAGE_MTD_MTD_DEBUG) += mtd_debug
45 MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDDUMP) += nanddump
46 MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDTEST) += nandtest
47 MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDWRITE) += nandwrite
48 MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTLDUMP) += nftldump
49 MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTL_FORMAT) += nftl_format
50 MTD_TARGETS_$(BR2_PACKAGE_MTD_RECV_IMAGE) += recv_image
51 MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDDUMP) += rfddump
52 MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDFORMAT) += rfdformat
53 MTD_TARGETS_$(BR2_PACKAGE_MTD_SERVE_IMAGE) += serve_image
54 MTD_TARGETS_$(BR2_PACKAGE_MTD_SUMTOOL) += sumtool
56 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_MTDINFO) += mtdinfo
57 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIATTACH) += ubiattach
58 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBICRC32) += ubicrc32
59 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIDETACH) += ubidetach
60 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIFORMAT) += ubiformat
61 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIMKVOL) += ubimkvol
62 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINFO) += ubinfo
63 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINIZE) += ubinize
64 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRENAME) += ubirename
65 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRMVOL) += ubirmvol
66 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRSVOL) += ubirsvol
67 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIUPDATEVOL) += ubiupdatevol
69 MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y))
71 define MTD_BUILD_CMDS
72 $(MAKE1) $(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
73 BUILDDIR=$(@D) WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 -C $(@D) \
74 $(addprefix $(@D)/,$(MTD_TARGETS_y))
75 endef
77 define MTD_INSTALL_TARGET_CMDS
78 for f in $(MTD_TARGETS_y) ; do \
79 install -D -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$${f##*/} ; \
80 done
81 endef
83 $(eval $(call GENTARGETS))
84 $(eval $(call GENTARGETS,host))