summaryrefslogtreecommitdiffstats
path: root/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile')
-rw-r--r--package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile129
1 files changed, 129 insertions, 0 deletions
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
new file mode 100644
index 0000000000..7e94d49246
--- /dev/null
+++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
@@ -0,0 +1,129 @@
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dsl_vr9_firmware_xdsl
+PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=4c8d9ca68dda88d3cfc0ca0fb946a63e
+PKG_BUILD_DEPENDS:=bsdiff/host
+
+include $(INCLUDE_DIR)/package.mk
+
+PKG_B_NAME:=dsl_vr9_firmware_xdsl
+PKG_B_VERSION:=05.07.03.03.00.06_05.07.01.0C.00.02_osc
+PKG_B_SOURCE:=$(PKG_B_NAME)-$(PKG_B_VERSION).tar.gz
+
+ANNEX_A_VER:=574306_571801
+ANNEX_B_VER:=573306_571C02
+
+define Download/dsl_vr9_firmware_xdsl_b
+ FILE:=$(PKG_B_SOURCE)
+ URL:=$(PKG_SOURCE_URL)
+ MD5SUM:=af5581836cbe574574590c046fe45bab
+endef
+$(eval $(call Download,dsl_vr9_firmware_xdsl_b))
+
+
+define Package/dsl-vrx200-firmware-xdsl-a
+ SECTION:=firmware
+ CATEGORY:=Firmware
+ TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
+ URL:=http://www.lantiq.com/
+ DEPENDS:=@TARGET_lantiq_xrx200
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-a/description
+ VRX200 / VR9 CPE VDSL and ADSL Annex A firmware
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b
+ SECTION:=firmware
+ CATEGORY:=Firmware
+ TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
+ URL:=http://www.lantiq.com/
+ DEPENDS:=@TARGET_lantiq_xrx200
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b/description
+ VRX200 / VR9 CPE VDSL and ADSL Annex B firmware
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-a-patch
+ SECTION:=firmware
+ CATEGORY:=Firmware
+ TITLE:=VRX200 / VR9 CPE xDSL Annex B to Annex A firmware patch
+ URL:=http://www.lantiq.com/
+ DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-b +bspatch
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-a-patch/description
+ Patch which between the Annex A and Annex B firmware to create the Annex A firmware.
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b-patch
+ SECTION:=firmware
+ CATEGORY:=Firmware
+ TITLE:=VRX200 / VR9 CPE xDSL Annex A to Annex B firmware patch
+ URL:=http://www.lantiq.com/
+ DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-a +bspatch
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b-patch/description
+ Patch which between the Annex A and Annex B firmware to create the Annex B firmware.
+endef
+
+define Build/Prepare
+ rm -rf $(PKG_BUILD_DIR)
+ mkdir -p $(PKG_BUILD_DIR)
+ $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
+ $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_B_SOURCE)
+endef
+
+define Build/Compile
+ bsdiff \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch
+ bsdiff \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin \
+ $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-a/install
+ $(INSTALL_DIR) $(1)/lib/firmware/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/lib/firmware/xcpe_$(ANNEX_A_VER).LICENSE
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/
+ ln -s xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/lantiq-vrx200-a.bin
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b/install
+ $(INSTALL_DIR) $(1)/lib/firmware/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/lib/firmware/xcpe_$(ANNEX_B_VER).LICENSE
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin $(1)/lib/firmware/
+ ln -s xcpe_$(ANNEX_B_VER).bin $(1)/lib/firmware/lantiq-vrx200-b.bin
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-a-patch/install
+ $(INSTALL_DIR) $(1)/lib/firmware/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch $(1)/lib/firmware/
+ ln -s xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch $(1)/lib/firmware/lantiq-vrx200-b-to-a.bspatch
+endef
+
+define Package/dsl-vrx200-firmware-xdsl-b-patch/install
+ $(INSTALL_DIR) $(1)/lib/firmware/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch $(1)/lib/firmware/
+ ln -s xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch $(1)/lib/firmware/lantiq-vrx200-a-to-b.bspatch
+endef
+
+$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a))
+$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b))
+$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a-patch))
+$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b-patch))
77 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488
/*
 * This file is subject to the terms of the GFX License. If a copy of
 * the license was not distributed with this file, you can obtain one at:
 *
 *              http://ugfx.org/license.html
 */

/**
 * @file    gfx.h
 * @brief   GFX system header file.
 *
 * @addtogroup GFX
 *
 * @brief	Main module to glue all the others together
 *
 * @{
 */

#ifndef _GFX_H
#define _GFX_H

/**
 * These two definitions below are required before anything else so that we can
 * turn module definitions off and on.
 */

/**
 * @brief   Generic 'false' boolean constant.
 */
#if !defined(FALSE) || defined(__DOXYGEN__)
	#define FALSE       0
#endif

/**
 * @brief   Generic 'true' boolean constant.
 */
#if !defined(TRUE) || defined(__DOXYGEN__)
	#define TRUE        -1
#endif

/**
 * @brief   Mark a function as deprecated.
 */
#ifndef DEPRECATED
	#if defined(__GNUC__) || defined(__MINGW32_) || defined(__CYGWIN__)
		#define DEPRECATED(msg)		__attribute__((deprecated(msg)))
	#elif defined(_MSC_VER)
		#define DEPRECATED(msg)		__declspec(deprecated(msg))
	#else
		#define DEPRECATED(msg)
	#endif
#endif

/* gfxconf.h is the user's project configuration for the GFX system. */
#include "gfxconf.h"

/**
 * @name    GFX sub-systems that can be turned on
 * @{
 */
	/**
	 * @brief   GFX Driver API
	 * @details	Defaults to TRUE
	 * @note	Not much useful can be done without a driver
	 */
	#ifndef GFX_USE_GDRIVER
		#define GFX_USE_GDRIVER	TRUE
	#endif
	/**
	 * @brief   GFX Graphics Display Basic API
	 * @details	Defaults to FALSE
	 * @note	Also add the specific hardware driver to your makefile.
	 * 			Eg.  include $(GFXLIB)/drivers/gdisp/Nokia6610/driver.mk
	 */
	#ifndef GFX_USE_GDISP
		#define GFX_USE_GDISP	FALSE
	#endif
	/**
	 * @brief   GFX Graphics Windowing API
	 * @details	Defaults to FALSE
	 * @details	Extends the GDISP API to add the concept of graphic windows.
	 * @note	Also supports high-level "window" objects such as console windows,
	 * 			buttons, graphing etc
	 */
	#ifndef GFX_USE_GWIN
		#define GFX_USE_GWIN	FALSE
	#endif
	/**
	 * @brief   GFX Event API
	 * @details	Defaults to FALSE
	 * @details	Defines the concept of a "Source" that can send "Events" to "Listeners".
	 */
	#ifndef GFX_USE_GEVENT
		#define GFX_USE_GEVENT	FALSE
	#endif
	/**
	 * @brief   GFX Timer API
	 * @details	Defaults to FALSE
	 * @details	Provides thread context timers - both one-shot and periodic.
	 */
	#ifndef GFX_USE_GTIMER
		#define GFX_USE_GTIMER	FALSE
	#endif
	/**
	 * @brief   GFX Queue API
	 * @details	Defaults to FALSE
	 * @details	Provides queue management.
	 */
	#ifndef GFX_USE_GQUEUE
		#define GFX_USE_GQUEUE	FALSE
	#endif
	/**
	 * @brief   GFX Input Device API
	 * @details	Defaults to FALSE
	 * @note	Also add the specific hardware drivers to your makefile.
	 * 			Eg.
	 * 				include $(GFXLIB)/drivers/ginput/toggle/Pal/driver.mk
	 * 			and...
	 * 				include $(GFXLIB)/drivers/ginput/touch/MCU/driver.mk
	 */
	#ifndef GFX_USE_GINPUT
		#define GFX_USE_GINPUT	FALSE
	#endif
	/**
	 * @brief   GFX Generic Periodic ADC API
	 * @details	Defaults to FALSE
	 */
	#ifndef GFX_USE_GADC
		#define GFX_USE_GADC	FALSE
	#endif
	/**
	 * @brief   GFX Audio API
	 * @details	Defaults to FALSE
	 * @note	Also add the specific hardware drivers to your makefile.
	 * 			Eg.
	 * 				include $(GFXLIB)/drivers/gaudio/GADC/driver.mk
	 */
	#ifndef GFX_USE_GAUDIO
		#define GFX_USE_GAUDIO	FALSE
	#endif
	/**
	 * @brief   GFX Miscellaneous Routines API
	 * @details	Defaults to FALSE
	 * @note	Turning this on without turning on any GMISC_NEED_xxx macros will result
	 * 			in no extra code being compiled in. GMISC is made up from the sum of its
	 * 			parts.
	 */
	#ifndef GFX_USE_GMISC
		#define GFX_USE_GMISC	FALSE
	#endif
	/**
	 * @brief   GFX File API
	 * @details	Defaults to FALSE
	 */
	#ifndef GFX_USE_GFILE
		#define GFX_USE_GFILE	FALSE
	#endif
/** @} */

/**
 * @name    GFX system-wide options
 * @{
 */
 	/**
	 * @brief	Should various inline ugfx functions be non-inline.
	 * @details	Defaults to FALSE
	 * @note	Generally there is no need to set this to TRUE as it will have huge performance impacts
	 *			in the driver level.
	 */
	#ifndef GFX_NO_INLINE
		#define GFX_NO_INLINE			FALSE
	#endif
	/**
	 * @brief	Enable compiler specific code
	 * @details	Defaults to GFX_COMPILER_UNKNOWN
	 * @note	This is setting enables optimisations that are compiler specific. It does
	 * 			not need to be specified as reasonable defaults and various auto-detection
	 * 			will happen as required.
	 * @note	Currently only used by ugfx generic thread handling (GOS_USE_OS_RAW32 and GOS_USE_OS_ARDUINO)
	 * @{
	 */
	#ifndef GFX_COMPILER
		#define GFX_COMPILER			GFX_COMPILER_UNKNOWN
	#endif
	#define GFX_COMPILER_UNKNOWN		0		//**< Unknown compiler
	#define GFX_COMPILER_GCC			1		//**< Standard GCC/G++
	#define GFX_COMPILER_MINGW32		2		//**< MingW32 (x86) compiler for windows
	#define GFX_COMPILER_MINGW64		3		//**< MingW64 (x64) compiler for windows
	#define GFX_COMPILER_CYGWIN			4		//**< Cygwin (x86) unix emulator compiler for windows
	#define GFX_COMPILER_ARMCC			5		//**< ARMCC compiler
	#define GFX_COMPILER_KEIL			6		//**< Keil (use this when working with uVision IDE)
	#define GFX_COMPILER_CLANG			7		//**< CLang (LLVM) compiler
	#define GFX_COMPILER_HP				8		//**< HP C/aC++
	#define GFX_COMPILER_IBMXL			9		//**< IBM XL C/C++ Compiler
	#define GFX_COMPILER_ICC			10		//**< Intel ICC/ICPC Compiler
	#define GFX_COMPILER_VS				11		//**< Microsoft Visual Studio
	#define GFX_COMPILER_OSS			12		//**< Oracle Solaris Studio
	#define GFX_COMPILER_PGCC			13		//**< Portland PGCC/PGCPP
	#define GFX_COMPILER_TURBOC			14		//**< Borland Turbo C
	#define GFX_COMPILER_BORLAND		15		//**< Borland C++
	#define GFX_COMPILER_COMEAU			16		//**< Comeau C++
	#define GFX_COMPILER_COMPAQ			17		//**< Compaq C
	#define GFX_COMPILER_DEC			18		//**< The older DEC C Compiler
	#define GFX_COMPILER_CRAY			19		//**< Cray C/C++
	#define GFX_COMPILER_DAIB			20		//**< Diab C/C++
	#define GFX_COMPILER_DMARS			21		//**< Digital Mars/Symantic C++/Zortech C++
	#define GFX_COMPILER_KAI			22		//**< Kai C++
	#define GFX_COMPILER_LCC			23		//**< LCC
	#define GFX_COMPILER_HIGHC			24		//**< Metaware High C/C++
	#define GFX_COMPILER_METROWORKS		25		//**< Metroworks
	#define GFX_COMPILER_MIPSPRO		26		//**< MIPS Pro
	#define GFX_COMPILER_MPW			27		//**< MPW C++
	#define GFX_COMPILER_NORCROFT		28		//**< Norcroft ARM
	#define GFX_COMPILER_SASC			29		//**< SAS/C
	#define GFX_COMPILER_SCO			30		//**< SCO OpenServer
	#define GFX_COMPILER_TINYC			31		//**< Tiny C
	#define GFX_COMPILER_USL			32		//**< USL C
	#define GFX_COMPILER_WATCOM			33		//**< Watcom
	/** @} */
	/**
	 * @brief	Enable cpu specific code
	 * @details	Defaults to GFX_CPU_UNKNOWN
	 * @note	This is setting enables optimisations that are cpu specific. It does
	 * 			not need to be specified as reasonable defaults and various auto-detection
	 * 			will happen as required.
	 * @note	Currently only used by ugfx generic thread handling (GOS_USE_OS_RAW32 and GOS_USE_OS_ARDUINO)
	 * @{
	 */
	#ifndef GFX_CPU
		#define GFX_CPU					GFX_CPU_UNKNOWN
	#endif
	#define GFX_CPU_UNKNOWN				0		//**< Unknown cpu
	#define GFX_CPU_CORTEX_M0			0x01	//**< Cortex M0
	#define GFX_CPU_CORTEX_M1			0x02	//**< Cortex M1
	#define GFX_CPU_CORTEX_M2			0x03	//**< Cortex M2
	#define GFX_CPU_CORTEX_M3			0x04	//**< Cortex M3
	#define GFX_CPU_CORTEX_M4			0x05	//**< Cortex M4
	#define GFX_CPU_CORTEX_M4_FP		0x06	//**< Cortex M4 with hardware floating point
	#define GFX_CPU_CORTEX_M7			0x07	//**< Cortex M7
	#define GFX_CPU_CORTEX_M7_FP		0x08	//**< Cortex M7 with hardware floating point
	#define GFX_CPU_X86					0x10	//**< Intel x86
	#define GFX_CPU_X64					0x11	//**< Intel x64
	#define GFX_CPU_IA64				0x12	//**< Intel Itanium
	#define GFX_CPU_POWERPC32			0x20	//**< PowerPC
	#define GFX_CPU_POWERPC64			0x21	//**< PowerPC
	#define GFX_CPU_SPARC				0x22	//**< Sparc
	/** @} */
	/**
	 * @brief   Does this CPU generate no alignment faults
	 * @details	Defaults to FALSE
	 * @note	Turning this on can increase code size and speed but
	 * 			should not be turned on with a CPU that can generate
	 * 			alignment segfaults.
	 * @note	If you are unsure leave this as FALSE as that generates
	 * 			the more conservative code.
	 */
	#ifndef GFX_CPU_NO_ALIGNMENT_FAULTS
		#define GFX_CPU_NO_ALIGNMENT_FAULTS		FALSE
	#endif
	/**
	 * @brief	What is the CPU endianness
	 * @details	Defaults to GFX_CPU_ENDIAN_UNKNOWN
	 * @note	This is setting enables optimisations that are cpu endian specific. It does
	 * 			not need to be specified as reasonable defaults and various auto-detection
	 * 			will happen as required.
	 * @{
	 */
	#ifndef GFX_CPU_ENDIAN
		#define GFX_CPU_ENDIAN			GFX_CPU_ENDIAN_UNKNOWN
	#endif
	#define GFX_CPU_ENDIAN_UNKNOWN		0				//**< Unknown endianness
	#define GFX_CPU_ENDIAN_LITTLE		0x04030201		//**< Little Endian
	#define GFX_CPU_ENDIAN_BIG			0x01020304		//**< Big Endian
	/** @} */

/** @} */

/* Try to auto-detect some stuff from the compiler itself */
#if GFX_COMPILER == GFX_COMPILER_UNKNOWN
	#undef GFX_COMPILER
	#if defined(__MINGW32__)
		#define GFX_COMPILER	GFX_COMPILER_MINGW32
	#elif defined(__MINGW64__)
		#define GFX_COMPILER	GFX_COMPILER_MINGW64
	#elif defined(__CYGWIN__)
		#define GFX_COMPILER	GFX_COMPILER_CYGWIN
	#elif defined(__KEIL__) || defined(__C51__)
		#define GFX_COMPILER	GFX_COMPILER_KEIL
	#elif defined(__clang__)
		#define GFX_COMPILER	GFX_COMPILER_CLANG
	#elif defined(__ICC) || defined(__INTEL_COMPILER)
		#define GFX_COMPILER	GFX_COMPILER_ICC
	#elif defined(__GNUC__) || defined(__GNUG__)
		#define GFX_COMPILER	GFX_COMPILER_GCC
	#elif defined(__HP_cc) || defined(__HP_aCC)
		#define GFX_COMPILER	GFX_COMPILER_HP
	#elif defined(__IBMC__) || defined(__IBMCPP__)
		#define GFX_COMPILER	GFX_COMPILER_IBMXL
	#elif defined(_MSC_VER)
		#define GFX_COMPILER	GFX_COMPILER_VS
	#elif defined(__PGI)
		#define GFX_COMPILER	GFX_COMPILER_PGCC
	#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
		#define GFX_COMPILER	GFX_COMPILER_OSS
	#elif defined(__TURBOC__)
		#define GFX_COMPILER	GFX_COMPILER_TURBOC
	#elif defined(__BORLANDC__)
		#define GFX_COMPILER	GFX_COMPILER_BORLAND
	#elif defined(__COMO__)
		#define GFX_COMPILER	GFX_COMPILER_COMEAU
	#elif defined(__DECC) || defined(__VAXC) || defined(VAXC) || defined(__DECCXX)
		#define GFX_COMPILER	GFX_COMPILER_COMPAQ
	#elif defined(__osf__) && defined(__LANGUAGE_C__)
		#define GFX_COMPILER	GFX_COMPILER_DEC
	#elif defined(_CRAYC)
		#define GFX_COMPILER	GFX_COMPILER_CRAY
	#elif defined(__DCC__)
		#define GFX_COMPILER	GFX_COMPILER_DAIB
	#elif defined(__DMC__) || defined(__SC__) || defined(__ZTC__)