Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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_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. --disable-tests \
  46. --without-crypto \
  47. --without-xattr \
  48. --without-zstd \
  49. --without-lzo
  50. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  51. TARGET_LDFLAGS += -Wl,--gc-sections
  52. define Package/ubi-utils/install
  53. $(INSTALL_DIR) $(1)/usr/sbin
  54. $(INSTALL_BIN) \
  55. $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
  58. endef
  59. define Package/nand-utils/install
  60. $(INSTALL_DIR) $(1)/usr/sbin
  61. $(INSTALL_BIN) \
  62. $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
  63. endef
  64. $(eval $(call BuildPackage,ubi-utils))
  65. $(eval $(call BuildPackage,nand-utils))