packages: clean up the package folder
[openwrt/staging/yousong.git] / package / kernel / mmc_over_gpio / Makefile
1 #
2 # Copyright (C) 2008 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 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=mmc-over-gpio
11 PKG_RELEASE:=4
12
13 include $(INCLUDE_DIR)/package.mk
14
15
16 define KernelPackage/mmc-over-gpio
17 SUBMENU:=Other modules
18 DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old +kmod-fs-configfs
19 KCONFIG:=CONFIG_GPIOMMC
20 TITLE:=MMC/SD card over GPIO support
21 FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.ko
22 AUTOLOAD:=$(call AutoLoad,93,gpiommc)
23 MENU:=1
24 endef
25
26 define Package/kmod-mmc-over-gpio/config
27 menu "Configuration"
28 depends on PACKAGE_kmod-mmc-over-gpio
29
30 config KMOD_MMC_OVER_GPIO_DI_PIN
31 int "GPIO DI (Data-In) pin"
32 default 1
33
34 config KMOD_MMC_OVER_GPIO_DO_PIN
35 int "GPIO DO (Data-Out) pin"
36 default 3
37
38 config KMOD_MMC_OVER_GPIO_CLK_PIN
39 int "GPIO CLK (Clock) pin"
40 default 4
41
42 config KMOD_MMC_OVER_GPIO_CS_PIN
43 int "GPIO CS (Chip-Select) pin"
44 default 7
45
46 endmenu
47 endef
48
49 define KernelPackage/mmc-over-gpio/description
50 Support for driving an MMC/SD card over GPIO pins via SPI.
51 endef
52
53 define KernelPackage/mmc-over-gpio/conffiles
54 /etc/config/mmc_over_gpio
55 endef
56
57 define Build/Prepare
58 mkdir -p $(PKG_BUILD_DIR)
59 endef
60
61 define Build/Compile
62 endef
63
64 define KernelPackage/mmc-over-gpio/install
65 $(INSTALL_DIR) $(1)/etc/config
66 $(INSTALL_DATA) ./files/mmc_over_gpio.config $(1)/etc/config/mmc_over_gpio
67 $(INSTALL_DIR) $(1)/etc/init.d
68 $(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
69
70 $(SED) 's,@GPIO_DI_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DI_PIN),g' \
71 -e 's,@GPIO_DO_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DO_PIN),g' \
72 -e 's,@GPIO_CLK_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CLK_PIN),g' \
73 -e 's,@GPIO_CS_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CS_PIN),g' \
74 $(1)/etc/config/mmc_over_gpio
75 endef
76
77 $(eval $(call KernelPackage,mmc-over-gpio))