diff options
author | John Crispin <blogic@openwrt.org> | 2011-10-10 15:14:17 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2011-10-10 15:14:17 +0000 |
commit | d504175233010ec8b3431ca3f18c7d3760ee4993 (patch) | |
tree | c744550c4eb70b0a99eeee97ad19b8f914d40fdc /package/ltq-dsl/Makefile | |
parent | 4cc422e0f3860fbe49957352cfb7cd61e5e884d3 (diff) | |
download | master-187ad058-d504175233010ec8b3431ca3f18c7d3760ee4993.tar.gz master-187ad058-d504175233010ec8b3431ca3f18c7d3760ee4993.tar.bz2 master-187ad058-d504175233010ec8b3431ca3f18c7d3760ee4993.zip |
[ltq-dsl]
* add support for ar9
* add support for ase
(vr9 support is still a todo)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28406 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ltq-dsl/Makefile')
-rw-r--r-- | package/ltq-dsl/Makefile | 115 |
1 files changed, 61 insertions, 54 deletions
diff --git a/package/ltq-dsl/Makefile b/package/ltq-dsl/Makefile index d645af7770..4a602e89d2 100644 --- a/package/ltq-dsl/Makefile +++ b/package/ltq-dsl/Makefile @@ -11,29 +11,32 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-dsl PKG_BASE_NAME:=drv_dsl_cpe_api_danube PKG_VERSION:=3.24.4.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/drv_dsl_cpe_api-$(PKG_VERSION) PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ PKG_MD5SUM:=c45bc531c1ed2ac80f68fb986b63bb87 -FW_BASE_NAME:=dsl_danube_firmware_adsl -FW_A_VER:=02.04.04.00.00.01 -FW_B_VER:=02.04.01.07.00.02 -FW_A_FILE_VER:=244001 -FW_B_FILE_VER:=241702 -FW_A_MD5:=f717db3067a0049a26e233ab11238710 -FW_B_MD5:=349de7cd20368f4ac9b7e8322114a512 +FW_NAME:=ltq-dsl-fw-0.1 +FW_MD5:=4700a36b66b955b4c5544227267356f4 include $(INCLUDE_DIR)/package.mk -define KernelPackage/ltq-dsl +define Download/ltq-dsl-fw + FILE:=$(FW_NAME).tar.bz2 + MD5SUM:=$(FW_MD5) + URL:=http://mirror2.openwrt.org/sources/ +endef +$(eval $(call Download,ltq-dsl-fw)) + +define KernelPackage/ltq-dsl-template SECTION:=sys CATEGORY:=Kernel modules SUBMENU:=Network Devices - TITLE:=Lantiq dsl driver + TITLE:=Lantiq dsl driver for $(1) URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_danube +kmod-atm + VARIANT:=$(1) + DEPENDS:=@TARGET_lantiq_$(1) +kmod-atm FILES:=$(PKG_BUILD_DIR)/src/mei/lantiq_mei.ko \ $(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko \ $(PKG_BUILD_DIR)/src/mei/lantiq_atm.ko @@ -41,48 +44,39 @@ define KernelPackage/ltq-dsl MAINTAINER:=John Crispin <blogic@openwrt.org> endef -define Package/kmod-ltq-dsl-firmware/default +KernelPackage/ltq-dsl-danube=$(call KernelPackage/ltq-dsl-template,danube) +KernelPackage/ltq-dsl-ase=$(call KernelPackage/ltq-dsl-template,ase) +KernelPackage/ltq-dsl-ar9=$(call KernelPackage/ltq-dsl-template,ar9) +KernelPackage/ltq-dsl-vr9=$(call KernelPackage/ltq-dsl-template,vr9) + +define Package/kmod-ltq-dsl-firmware-template + TITLE+=Firmware Annex-$(1) $(2) SECTION:=sys CATEGORY:=Kernel modules SUBMENU:=Network Devices - TITLE:=Firmware + VARIANT:= $(1)-$(2) URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_danube kmod-ltq-dsl + DEPENDS:=@TARGET_lantiq_$(2) kmod-ltq-dsl-$(2) MAINTAINER:=John Crispin <blogic@openwrt.org> endef -define Package/kmod-ltq-dsl-firmware-a - $(call Package/kmod-ltq-dsl-firmware/default) - TITLE+=Annex-A Danube -endef - -define Package/kmod-ltq-dsl-firmware-b - $(call Package/kmod-ltq-dsl-firmware/default) - TITLE+=Annex-B Danube -endef +Package/kmod-ltq-dsl-firmware-a-danube=$(call Package/kmod-ltq-dsl-firmware-template,a,danube) +Package/kmod-ltq-dsl-firmware-b-danube=$(call Package/kmod-ltq-dsl-firmware-template,b,danube) +Package/kmod-ltq-dsl-firmware-a-ase=$(call Package/kmod-ltq-dsl-firmware-template,a,ase) +Package/kmod-ltq-dsl-firmware-b-ase=$(call Package/kmod-ltq-dsl-firmware-template,b,ase) +Package/kmod-ltq-dsl-firmware-a-ar9=$(call Package/kmod-ltq-dsl-firmware-template,a,ar9) +Package/kmod-ltq-dsl-firmware-b-ar9=$(call Package/kmod-ltq-dsl-firmware-template,b,ar9) +Package/kmod-ltq-dsl-firmware-a-vr9=$(call Package/kmod-ltq-dsl-firmware-template,a,vr9) +Package/kmod-ltq-dsl-firmware-b-vr9=$(call Package/kmod-ltq-dsl-firmware-template,b,vr9) define KernelPackage/ltq-dsl/description - Lantiq DSL CPE API for Amazon SE, Danube and Vinax. + Lantiq DSL driver for AR9, Amazon SE, Danube and VR9 endef define KernelPackage/ltq-dsl/config source "$(SOURCE)/Config.in" endef -define Download/annex-a - FILE:=$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz - URL:=http://mirror2.openwrt.org/sources/ - MD5SUM:=$(FW_A_MD5) -endef -$(eval $(call Download,annex-a)) - -define Download/annex-b - FILE:=$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz - URL:=http://mirror2.openwrt.org/sources/ - MD5SUM:=$(FW_B_MD5) -endef -$(eval $(call Download,annex-b)) - IFX_DSL_MAX_DEVICE=1 IFX_DSL_LINES_PER_DEVICE=1 IFX_DSL_CHANNELS_PER_LINE=1 @@ -91,8 +85,6 @@ CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \ --with-max-device="$(IFX_DSL_MAX_DEVICE)" \ --with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \ --with-channels-per-line="$(IFX_DSL_CHANNELS_PER_LINE)" \ - --enable-danube \ - --enable-add-drv-cflags="-DMODULE" \ --disable-dsl-delt-static \ --disable-adsl-led \ --enable-dsl-ceoc \ @@ -111,7 +103,17 @@ CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \ --enable-kernelbuild="$(LINUX_DIR)" \ ARCH=$(LINUX_KARCH) -EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0 +CONFIG_TAG_danube:=DANUBE +CONFIG_TAG_ase:=AMAZON_SE +CONFIG_TAG_ar9:=AR9 +CONFIG_TAG_vr9:=VR9 +CONFIGURE_ARGS += --enable-add-drv-cflags="-DMODULE -DCONFIG_$(CONFIG_TAG_$(BUILD_VARIANT))" + +ifeq ($(BUILD_VARIANT),vr9) +CONFIGURE_ARGS += --enable-vinax +else +CONFIGURE_ARGS += --enable-danube +endif ifeq ($(CONFIG_LANTIQ_DSL_DEBUG),y) CONFIGURE_ARGS += \ @@ -120,13 +122,14 @@ CONFIGURE_ARGS += \ EXTRA_CFLAGS += -DDEBUG endif +EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0 + define Build/Prepare $(PKG_UNPACK) $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/mei/ $(CP) ./src/* $(PKG_BUILD_DIR)/src/mei/ $(Build/Patch) - $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz - $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz + $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(FW_NAME).tar.bz2 endef define Build/Configure @@ -137,7 +140,7 @@ endef define Build/Compile cd $(LINUX_DIR); \ ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \ - $(MAKE) M=$(PKG_BUILD_DIR)/src/mei/ V=1 modules + BUILD_VARIANT=$(BUILD_VARIANT) $(MAKE) M=$(PKG_BUILD_DIR)/src/mei/ V=1 modules $(call Build/Compile/Default) endef @@ -155,16 +158,20 @@ define Build/InstallDev $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_cmv_danube.h $(1)/usr/include endef -define Package/kmod-ltq-dsl-firmware-a/install - $(INSTALL_DIR) $(1)/lib/firmware/ - $(CP) $(PKG_BUILD_DIR)/$(FW_BASE_NAME)_a_$(FW_A_FILE_VER).bin $(1)/lib/firmware/ModemHWE.bin -endef - -define Package/kmod-ltq-dsl-firmware-b/install +define Package/kmod-ltq-dsl-firmware-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/lib/firmware/ - $(CP) $(PKG_BUILD_DIR)/$(FW_BASE_NAME)_b_$(FW_B_FILE_VER).bin $(1)/lib/firmware/ModemHWE.bin + $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(BUILD_VARIANT).bin $(1)/lib/firmware/ModemHWE.bin endef -$(eval $(call KernelPackage,ltq-dsl)) -$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-a)) -$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-b)) +$(eval $(call KernelPackage,ltq-dsl-danube)) +$(eval $(call KernelPackage,ltq-dsl-ase)) +$(eval $(call KernelPackage,ltq-dsl-ar9)) +#$(eval $(call KernelPackage,ltq-dsl-vr9)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-a-danube)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-b-danube)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-a-ase)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-b-ase)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-a-ar9)) +$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-b-ar9)) +#$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-a-vr9)) +#$(eval $(call BuildPackage,kmod-ltq-dsl-firmware-b-vr9)) |