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
:=386e27fd121699b6b729bc2e8e04dda987b31cca6b16e12fb6cc6dcf26449f46
22 PKG_BUILD_FLAGS
:=gc-sections
24 PKG_BUILD_DEPENDS
:=util-linux
28 PKG_CPE_ID
:=cpe
:/a
:mtd-utils_project
:mtd-utils
30 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
32 include $(INCLUDE_DIR
)/package.mk
34 define Package
/mtd-utils
/Default
37 URL
:=http
://www.linux-mtd.infradead.org
/
38 DEPENDS
:=@NAND_SUPPORT
41 define Package
/ubi-utils
42 $(call Package
/mtd-utils
/Default
)
43 TITLE
:=Utilities for ubi
info/debug
46 define Package
/ubi-utils
/description
47 Utilities for manipulating memory technology devices.
50 define Package
/nand-utils
51 $(call Package
/mtd-utils
/Default
)
52 TITLE
:=Utilities for nand flash erase
/read
/write
/test
55 define Package
/nand-utils
/description
56 Utilities for NAND devices.
59 MAKE_FLAGS
+= LDLIBS
+="$(LIBGCC_S)"
68 define Package
/ubi-utils
/install
69 $(INSTALL_DIR
) $(1)/usr
/sbin
71 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubiattach
,ubicrc32
,ubiblock
,ubidetach
,ubiformat
,ubimkvol
} $(1)/usr
/sbin
/
73 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubinfo
,ubinize
,ubirename
,ubirmvol
,ubirsvol
,ubiupdatevol
} $(1)/usr
/sbin
/
76 define Package
/nand-utils
/install
77 $(INSTALL_DIR
) $(1)/usr
/sbin
79 $(PKG_INSTALL_DIR
)/usr
/sbin
/{flash_erase
,nanddump
,nandwrite
,nandtest
,mtdinfo
} $(1)/usr
/sbin
/
82 $(eval
$(call BuildPackage
,ubi-utils
))
83 $(eval
$(call BuildPackage
,nand-utils
))