You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB

  1. #
  2. # Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
  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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=mtd-rw
  10. PKG_VERSION:=git-20160214
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_MIRROR_HASH:=c44db17c3e05079116a1704f277642c9ce6f5ca4fa380c60f7e6d44509dc16be
  14. PKG_SOURCE_URL:=https://github.com/jclehner/mtd-rw.git
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=7e8562067d6a366c8cbaa8084396c33b7e12986b
  18. PKG_MAINTAINER:=Joseph C. Lehner <joseph.c.lehner@gmail.com>
  19. PKG_LICENSE=GPL-2.0
  20. PKG_LICENSE_FILES=LICENSE
  21. include $(INCLUDE_DIR)/package.mk
  22. define KernelPackage/mtd-rw
  23. SUBMENU:=Other modules
  24. TITLE:=Write-enabler for MTD partitions
  25. FILES:=$(PKG_BUILD_DIR)/mtd-rw.ko
  26. endef
  27. define KernelPackage/mtd-rw/description
  28. A kernel module that temporarily makes all MTD partitions writeable.
  29. endef
  30. MAKE_OPTS:= \
  31. ARCH="$(LINUX_KARCH)" \
  32. CROSS_COMPILE="$(TARGET_CROSS)" \
  33. M="$(PKG_BUILD_DIR)"
  34. define Build/Compile
  35. $(MAKE) -C "$(LINUX_DIR)" \
  36. $(MAKE_OPTS) \
  37. CONFIG_MTD_RW=m \
  38. modules
  39. endef
  40. $(eval $(call KernelPackage,mtd-rw))