2 # Copyright (C) 2009-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=https
://infraroot.at
/pub
/mtd
/
16 PKG_HASH
:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803
21 PKG_BUILD_FLAGS
:=gc-sections
23 PKG_BUILD_DEPENDS
:=util-linux
27 PKG_CPE_ID
:=cpe
:/a
:mtd-utils_project
:mtd-utils
29 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/mtd-utils
/Default
36 URL
:=http
://www.linux-mtd.infradead.org
/
37 DEPENDS
:=@NAND_SUPPORT
40 define Package
/ubi-utils
41 $(call Package
/mtd-utils
/Default
)
42 TITLE
:=Utilities for ubi
info/debug
45 define Package
/ubi-utils
/description
46 Utilities for manipulating memory technology devices.
49 define Package
/nand-utils
50 $(call Package
/mtd-utils
/Default
)
51 TITLE
:=Utilities for nand flash erase
/read
/write
/test
54 define Package
/nand-utils
/description
55 Utilities for NAND devices.
58 MAKE_FLAGS
+= LDLIBS
+="$(LIBGCC_S)"
68 define Package
/ubi-utils
/conffiles
69 /etc
/config
/ubihealthd
72 define Package
/ubi-utils
/install
73 $(INSTALL_DIR
) $(1)/usr
/sbin
75 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubiattach
,ubicrc32
,ubiblock
,ubidetach
,ubiformat
,ubihealthd
} $(1)/usr
/sbin
/
77 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubimkvol
,ubinfo
,ubinize
,ubirename
,ubirmvol
,ubirsvol
,ubiupdatevol
} $(1)/usr
/sbin
/
78 $(INSTALL_DIR
) $(1)/etc
/init.d
79 $(INSTALL_BIN
) .
/files
/ubihealthd.init
$(1)/etc
/init.d
/ubihealthd
80 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
81 $(INSTALL_DATA
) .
/files
/ubihealthd.defaults
$(1)/etc
/uci-defaults
/ubihealthd
84 define Package
/nand-utils
/install
85 $(INSTALL_DIR
) $(1)/usr
/sbin
87 $(PKG_INSTALL_DIR
)/usr
/sbin
/{flash_erase
,nanddump
,nandwrite
,nandtest
,mtdinfo
} \
88 $(PKG_INSTALL_DIR
)/usr
/lib
/mtd-utils
/nandbiterrs
$(1)/usr
/sbin
/
91 $(eval
$(call BuildPackage
,ubi-utils
))
92 $(eval
$(call BuildPackage
,nand-utils
))