Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.3.0
  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:=2db102908b232406ccb20719c0f43b61196aef4534493419fbf98a273c598c10
  14. PKG_INSTALL:=1
  15. PKG_FLAGS:=nonshared
  16. PKG_BUILD_FLAGS:=gc-sections
  17. PKG_FIXUP:=autoreconf
  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 <[email protected]>
  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. --enable-tests \
  47. --disable-unit-tests \
  48. --without-crypto \
  49. --without-xattr \
  50. --without-zstd \
  51. --without-lzo \
  52. --without-zlib
  53. define Package/ubi-utils/conffiles
  54. /etc/config/ubihealthd
  55. endef
  56. define Package/ubi-utils/install
  57. $(INSTALL_DIR) $(1)/usr/sbin
  58. $(INSTALL_BIN) \
  59. $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubihealthd} $(1)/usr/sbin/
  60. $(INSTALL_BIN) \
  61. $(PKG_INSTALL_DIR)/usr/sbin/{ubimkvol,ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
  62. $(INSTALL_DIR) $(1)/etc/init.d
  63. $(INSTALL_BIN) ./files/ubihealthd.init $(1)/etc/init.d/ubihealthd
  64. $(INSTALL_DIR) $(1)/etc/uci-defaults
  65. $(INSTALL_DATA) ./files/ubihealthd.defaults $(1)/etc/uci-defaults/ubihealthd
  66. endef
  67. define Package/nand-utils/install
  68. $(INSTALL_DIR) $(1)/usr/sbin
  69. $(INSTALL_BIN) \
  70. $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} \
  71. $(PKG_INSTALL_DIR)/usr/lib/mtd-utils/nandbiterrs $(1)/usr/sbin/
  72. endef
  73. $(eval $(call BuildPackage,ubi-utils))
  74. $(eval $(call BuildPackage,nand-utils))