netifd: update to latest git HEAD (FS#1668)
[openwrt/staging/chunkeey.git] / package / utils / mtd-utils / Makefile
1 #
2 # Copyright (C) 2009-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mtd-utils
11 PKG_VERSION:=2.0.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
16 PKG_HASH:=fb3de61be8e932abb424e8ea3c30298f553d5f970ad158a737bb303bbf9660b8
17
18 PKG_INSTALL:=1
19 PKG_FIXUP:=autoreconf
20
21 PKG_FLAGS:=nonshared
22
23 PKG_BUILD_DEPENDS:=util-linux lzo zlib
24
25 PKG_LICENSE:=GPLv2
26 PKG_LICENSE_FILES:=
27
28 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
29
30 include $(INCLUDE_DIR)/package.mk
31
32 define Package/mtd-utils/Default
33 SECTION:=utils
34 CATEGORY:=Utilities
35 URL:=http://www.linux-mtd.infradead.org/
36 DEPENDS:=@NAND_SUPPORT
37 endef
38
39 define Package/ubi-utils
40 $(call Package/mtd-utils/Default)
41 TITLE:=Utilities for ubi info/debug
42 endef
43
44 define Package/ubi-utils/description
45 Utilities for manipulating memory technology devices.
46 endef
47
48 define Package/nand-utils
49 $(call Package/mtd-utils/Default)
50 TITLE:=Utilities for nand flash erase/read/write/test
51 endef
52
53 define Package/nand-utils/description
54 Utilities for NAND devices.
55 endef
56
57 MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
58
59 CONFIGURE_ARGS += \
60 --disable-tests \
61 --without-xattr \
62 --without-lzo
63
64 TARGET_CFLAGS += -ffunction-sections -fdata-sections
65 TARGET_LDFLAGS += -Wl,--gc-sections
66
67 define Package/ubi-utils/install
68 $(INSTALL_DIR) $(1)/usr/sbin
69 $(INSTALL_BIN) \
70 $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
71 $(INSTALL_BIN) \
72 $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
73 endef
74
75 define Package/nand-utils/install
76 $(INSTALL_DIR) $(1)/usr/sbin
77 $(INSTALL_BIN) \
78 $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
79 endef
80
81 $(eval $(call BuildPackage,ubi-utils))
82 $(eval $(call BuildPackage,nand-utils))