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
:=ftp
://ftp.infradead.org
/pub
/mtd-utils
/
16 PKG_HASH
:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
23 PKG_BUILD_DEPENDS
:=util-linux lzo zlib
28 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/mtd-utils
/Default
35 URL
:=http
://www.linux-mtd.infradead.org
/
36 DEPENDS
:=@NAND_SUPPORT
39 define Package
/ubi-utils
40 $(call Package
/mtd-utils
/Default
)
41 TITLE
:=Utilities for ubi
info/debug
44 define Package
/ubi-utils
/description
45 Utilities for manipulating memory technology devices.
48 define Package
/nand-utils
49 $(call Package
/mtd-utils
/Default
)
50 TITLE
:=Utilities for nand flash erase
/read
/write
/test
53 define Package
/nand-utils
/description
54 Utilities for NAND devices.
57 MAKE_FLAGS
+= LDLIBS
+="$(LIBGCC_S)"
66 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
67 TARGET_LDFLAGS
+= -Wl
,--gc-sections
69 define Package
/ubi-utils
/install
70 $(INSTALL_DIR
) $(1)/usr
/sbin
72 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubiattach
,ubicrc32
,ubiblock
,ubidetach
,ubiformat
,ubimkvol
} $(1)/usr
/sbin
/
74 $(PKG_INSTALL_DIR
)/usr
/sbin
/{ubinfo
,ubinize
,ubirename
,ubirmvol
,ubirsvol
,ubiupdatevol
} $(1)/usr
/sbin
/
77 define Package
/nand-utils
/install
78 $(INSTALL_DIR
) $(1)/usr
/sbin
80 $(PKG_INSTALL_DIR
)/usr
/sbin
/{flash_erase
,nanddump
,nandwrite
,nandtest
,mtdinfo
} $(1)/usr
/sbin
/
83 $(eval
$(call BuildPackage
,ubi-utils
))
84 $(eval
$(call BuildPackage
,nand-utils
))