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.

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