Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.1.5
  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:=386e27fd121699b6b729bc2e8e04dda987b31cca6b16e12fb6cc6dcf26449f46
  14. PKG_INSTALL:=1
  15. PKG_FIXUP:=autoreconf
  16. PKG_FLAGS:=nonshared
  17. PKG_BUILD_FLAGS:=gc-sections
  18. PKG_BUILD_DEPENDS:=util-linux
  19. PKG_LICENSE:=GPLv2
  20. PKG_LICENSE_FILES:=
  21. PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils
  22. PKG_MAINTAINER:=John Crispin <john@phrozen.org>
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/mtd-utils/Default
  25. SECTION:=utils
  26. CATEGORY:=Utilities
  27. URL:=http://www.linux-mtd.infradead.org/
  28. DEPENDS:=@NAND_SUPPORT
  29. endef
  30. define Package/ubi-utils
  31. $(call Package/mtd-utils/Default)
  32. TITLE:=Utilities for ubi info/debug
  33. endef
  34. define Package/ubi-utils/description
  35. Utilities for manipulating memory technology devices.
  36. endef
  37. define Package/nand-utils
  38. $(call Package/mtd-utils/Default)
  39. TITLE:=Utilities for nand flash erase/read/write/test
  40. endef
  41. define Package/nand-utils/description
  42. Utilities for NAND devices.
  43. endef
  44. MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
  45. CONFIGURE_ARGS += \
  46. --disable-tests \
  47. --without-crypto \
  48. --without-xattr \
  49. --without-zstd \
  50. --without-lzo
  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} $(1)/usr/sbin/
  62. endef
  63. $(eval $(call BuildPackage,ubi-utils))
  64. $(eval $(call BuildPackage,nand-utils))