1
0

Makefile 1.9 KB

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