2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 #XXX This package will go away once the stuff is merged into the kernel.
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
12 PKG_NAME:=mmc-over-gpio
15 include $(INCLUDE_DIR)/package.mk
18 define KernelPackage/mmc-over-gpio
19 SUBMENU:=Other modules
20 DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio
21 TITLE:=MMC/SD card over GPIO support
22 FILES:=$(PKG_BUILD_DIR)/mmc_over_spigpio.$(LINUX_KMOD_SUFFIX)
23 AUTOLOAD:=$(call AutoLoad,93,spi_gpio mmc_over_spigpio)
26 define KernelPackage/mmc-over-gpio/description
27 Support for driving an MMC/SD card over GPIO pins via SPI.
31 mkdir -p $(PKG_BUILD_DIR)
32 $(CP) ./src/* $(PKG_BUILD_DIR)/
36 $(MAKE) -C "$(LINUX_DIR)" \
37 CROSS_COMPILE="$(TARGET_CROSS)" \
38 ARCH="$(LINUX_KARCH)" \
39 SUBDIRS="$(PKG_BUILD_DIR)" \
40 EXTRA_CFLAGS="$(BUILDFLAGS)" \
44 define KernelPackage/mmc-over-gpio/install
45 $(INSTALL_DIR) $(1)/etc/init.d
46 $(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
49 $(eval $(call KernelPackage,mmc-over-gpio))