1
0

Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.1
  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:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
  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-crypto \
  46. --without-xattr \
  47. --without-zstd \
  48. --without-lzo
  49. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  50. TARGET_LDFLAGS += -Wl,--gc-sections
  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))