Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mtd-utils
  9. PKG_VERSION:=1.5.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_VERSION:=aea36417067dade75192bafa03af70b6eb2677b1
  14. PKG_MIRROR_HASH:=e11b342b85a36b2e438a8412ec52f87621d3046aec1a93039f8c72de9990b2a7
  15. PKG_INSTALL:=1
  16. PKG_BUILD_DEPENDS:=util-linux liblzo zlib
  17. PKG_LICENSE:=GPLv2
  18. PKG_LICENSE_FILES:=
  19. PKG_MAINTAINER:=John Crispin <[email protected]>
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/mtd-utils/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. URL:=http://www.linux-mtd.infradead.org/
  25. DEPENDS:=@NAND_SUPPORT
  26. endef
  27. define Package/ubi-utils
  28. $(call Package/mtd-utils/Default)
  29. TITLE:=Utilities for ubi info/debug
  30. endef
  31. define Package/ubi-utils/description
  32. Utilities for manipulating memory technology devices.
  33. endef
  34. define Package/nand-utils
  35. $(call Package/mtd-utils/Default)
  36. TITLE:=Utilities for nand flash read/write/test
  37. endef
  38. define Package/nand-utils/description
  39. Utilities for NAND devices.
  40. endef
  41. MAKE_FLAGS += \
  42. DESTDIR="$(PKG_INSTALL_DIR)" \
  43. BUILDDIR="$(PKG_BUILD_DIR)" \
  44. LDLIBS+="$(LIBGCC_S)" \
  45. WITHOUT_XATTR=1 \
  46. WITHOUT_LZO=1
  47. define Package/ubi-utils/install
  48. $(INSTALL_DIR) $(1)/usr/sbin
  49. $(INSTALL_BIN) \
  50. $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
  51. $(INSTALL_BIN) \
  52. $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
  53. endef
  54. define Package/nand-utils/install
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/sbin/{nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
  58. endef
  59. $(eval $(call BuildPackage,ubi-utils))
  60. $(eval $(call BuildPackage,nand-utils))