Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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:=2.2.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
  13. PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803
  14. PKG_INSTALL:=1
  15. PKG_FLAGS:=nonshared
  16. PKG_BUILD_FLAGS:=gc-sections
  17. PKG_BUILD_DEPENDS:=util-linux
  18. PKG_LICENSE:=GPLv2
  19. PKG_LICENSE_FILES:=
  20. PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils
  21. PKG_MAINTAINER:=John Crispin <[email protected]>
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/mtd-utils/Default
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. URL:=http://www.linux-mtd.infradead.org/
  27. DEPENDS:=@NAND_SUPPORT
  28. endef
  29. define Package/ubi-utils
  30. $(call Package/mtd-utils/Default)
  31. TITLE:=Utilities for ubi info/debug
  32. endef
  33. define Package/ubi-utils/description
  34. Utilities for manipulating memory technology devices.
  35. endef
  36. define Package/nand-utils
  37. $(call Package/mtd-utils/Default)
  38. TITLE:=Utilities for nand flash erase/read/write/test
  39. endef
  40. define Package/nand-utils/description
  41. Utilities for NAND devices.
  42. endef
  43. MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
  44. CONFIGURE_ARGS += \
  45. --enable-tests \
  46. --without-crypto \
  47. --without-xattr \
  48. --without-zstd \
  49. --without-lzo \
  50. --without-zlib
  51. define Package/ubi-utils/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) \
  54. $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
  55. $(INSTALL_BIN) \
  56. $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
  57. endef
  58. define Package/nand-utils/install
  59. $(INSTALL_DIR) $(1)/usr/sbin
  60. $(INSTALL_BIN) \
  61. $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} \
  62. $(PKG_INSTALL_DIR)/usr/lib/mtd-utils/nandbiterrs $(1)/usr/sbin/
  63. endef
  64. $(eval $(call BuildPackage,ubi-utils))
  65. $(eval $(call BuildPackage,nand-utils))