Makefile 1.9 KB

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