Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/conffiles
  52. /etc/config/ubihealthd
  53. endef
  54. define Package/ubi-utils/install
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubihealthd} $(1)/usr/sbin/
  58. $(INSTALL_BIN) \
  59. $(PKG_INSTALL_DIR)/usr/sbin/{ubimkvol,ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
  60. $(INSTALL_DIR) $(1)/etc/init.d
  61. $(INSTALL_BIN) ./files/ubihealthd.init $(1)/etc/init.d/ubihealthd
  62. $(INSTALL_DIR) $(1)/etc/uci-defaults
  63. $(INSTALL_DATA) ./files/ubihealthd.defaults $(1)/etc/uci-defaults/ubihealthd
  64. endef
  65. define Package/nand-utils/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) \
  68. $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} \
  69. $(PKG_INSTALL_DIR)/usr/lib/mtd-utils/nandbiterrs $(1)/usr/sbin/
  70. endef
  71. $(eval $(call BuildPackage,ubi-utils))
  72. $(eval $(call BuildPackage,nand-utils))