summaryrefslogtreecommitdiffstats
path: root/pvr-source/eurasiacon
diff options
context:
space:
mode:
authorEric Luong <x0119002@ti.com>2015-02-06 10:54:56 -0800
committerHashcode <hashcode0f@gmail.com>2015-02-06 10:59:59 -0800
commit391c312c8964088c512de2cfb1e29c78d245d06b (patch)
treebdef0b7ecb2ff0da3c9b5922fa358fca1bdbbe73 /pvr-source/eurasiacon
parent882c2b4c53e1b2633700906b50c86d4b5f4ce274 (diff)
downloadhardware_ti_omap4-391c312c8964088c512de2cfb1e29c78d245d06b.zip
hardware_ti_omap4-391c312c8964088c512de2cfb1e29c78d245d06b.tar.gz
hardware_ti_omap4-391c312c8964088c512de2cfb1e29c78d245d06b.tar.bz2
IMG DDK 1.9@2166536 for Android
IMG DDK Release 1.9@2166536 for Android. Included in this release: - User space and Kernel module binaries - Kernel module source code TI's Patches: - 084d3db SGX-KM: sgxfreq: Enable on3demand governor as default - c1e1f93 SGX-KM: on3demand: Added polling based on timeout - 1baf19c Build: Compile OMAP4 kernel modules with arm-eabi toolchain - e166956 Build: Add production build option to build script - 9efd5d3 SGX UM: Properly update vertex shader constants when recompiled - f6e71f1 Revert "Build: Add optional flag to disable uKernel logging" - a49e042 SGXKM: Inherit PVRSRV_HAP_GPU_PAGEABLE flag - f05da87 SGXUM: Creates a new PVRSRV_HAP MAPPING CTRL mask - 0e6ac23 SGXKM: Creates a new PVRSRV_HAP MAPPING CTRL mask - 5044cbb SGXKM: Divorce Sparse Mapping from GPU Pageable - 4abdd37 SGX-KM: sgxfreq: Header for GPL license - 7a1e61b gpu: thermal: adding cooling device for "case" management - 1221aba SGX-KM: Add 'userspace' governor to sgxfreq - 7cc1319 SGX-KM: Add on3demand governor to sgxfreq - c3283ff SGX-KM: Allow sgxfreq active notification when prev state was active - 7275e62 SGX-KM: Add idle and active time caluclation to sgxfreq - e15265c SGX-KM: Add frame_done interface to sgxfreq - a021f10 SGX-KM: Add activeidle governor to sgxfreq - bbdceee SGX-KM: Add active/idle notification to sgxfreq - 4e1e8d9 SGX-UM: Rework SGX idle notification - fce3459 SGX-KM: Rework SGX idle notification - 17cdf8c SGX-KM: Add onoff governor to sgxfreq - 403caa1 SGX-KM: Add cooling device interface to sgxfreq - 1d785b8 SGX-KM: Add sgxfreq subsystem for DVFS control - 14de6d8 Build: Add optional flag to disable uKernel logging - 374bea1 SGX UM: Set ro.product.processor before loading modules - 91d286d SGX UM: Pvrsrvinit fix typo in remount command - 3d08869 SGX UM: Remove BRN32044 for omap5 - 086f52b OMAP5: WA: Race condition when SGX is powered down - 1a904c2 SGX KM: ShrinkPagePool statistics changed to PVR_DBG_MESSAGE - fbf2890 SGX KM: Fix num_handle calculation for ion handles - 322af97 BUILD: fix usage and help - 50440d3 BUILD: Add install option "adb" - ee66bfb pvr-km: gc: Add page offset for ion allocated buffers - be4fe11 pvr-km: gc: Improve gc map/unmap logging - 51da16d gralloc: Map NV12 buffers with the GC MMU - 210b590 SGX-KM: Enable APM for OMAP5 - 31e2f05 SGX-UM: Enable APM for OMAP5 - a98b81b SGX-UM: Don't load omaplfb module when in-kernel driver is present - b20f5c6 SGX-KM: Support in-kernel omaplfb - 0955f19 SGXKM: Multi-plane support for deviceclass i-face - 11f6682 build: remove omaplfb from install step - 9ecd6e0 pvr-um: use arm-linux-androideabi- and fix JB debug build - abef31d PVR-UM: Make pvrsrvinit wrapper compatible with Jellybean - 5b4e4f0 Revert "SGXUM: Implements Gralloc late CPU mapping" - 5f25289 SGX-UM: build - Remove target platform based configuration - 9d5ac31 OMAP5: BUILD: Remove unused variable - 5365b64 readme: Correct DDK version - 8095cc6 SGX-UM: Add support for hardware specific powervr.ini files - 7e13d26 PVR-UM: Add support to DDK for powervr.ini files - e545f59 SGX-UM: Added 16 bit depth EGL configs - 27da0ae SGX UM: Srvinit block until services ready - ba35538 SGX UM: HAL block OpenPVRServices until services initialized - 43f8c1f SGX UM: Fix calculation of chroma plane in blit_internal - f6a6944 SGX KM: Dump dsscomp info during HW recovery - fc6d85b SGXKM: Adds support for 1D buffer allocation - d8d061b SGXKM: Do not perform explicit invalidate on mmap - 3ac6e1f SGXUM: Implements Gralloc late CPU mapping - b621744 SGXUM: Gralloc allow for late or no GPU mapping - dde30cf SGXUM: Add allocation of images from system heap - 552c0f5 SGXUM: Adds A8/U8/Y8 color format to WSEGL - f1c7822 SGXKM: Increase XPROC_WORKAROUND to 500 - 65f61bf SGXKM: Fix cc-check.sh file permissions - 0dfe392 SGXKM: Make the DMM offset optional - 946eb30 gralloc: add support for GRALLOC_USAGE_EXCLUSIVE_DISP - 5cf7248 gralloc: publicly define omap specific usage flags - afcb9bd SGX-KM: Block DPLL cascading when SGX clock is enabled - 616ff0b SGX-KM: Hold wake lock during hardware recovery - 872b4c0 SGXKM: Fix NULL handle warning when blitting GC320 - 39de55c SGXKM: Allow for late or no GPU mapping - d229a7b SGXKM: Allow for SW access to a tiler buffer - 7024790 SGXUM: Adds YUV plane offsets for MM - d202649 SGXKM: SGX Tiler non-page-aligned support - 2b2ac18 SGXUM: Implements GPU Common Buffer Interface - 86cd052 SGXUM: Multi-buffer manage bridge - d272c49 SGXKM: Multi-buffer manage bridge - 4d8facf SGXKM: Implements Heap Alloc Failure Report - 6d4253a SGXUM: Add support for GPU unmap/remap - 64f4805 SGXKM: Add support for GPU unmap/remap - 5425356 SGX-KM: Use CONFIG_DRM_OMAP_DMM_TILER for kernel 3.4 - 853be19 SGX-KM: Use pud_offset to get pmd_offset - 5ec5d70 PVR-KM: Prevent compilation of dc_omapfb3_linux - 1bbe8a2 SGX-KM: Remove hardcoding of values in egl.cfg - 83b8af6 pvr-km: kfree phys info at unmap instead of map - f347fb9 pvr-km: add a struct size to the physical descriptor - 6ccff8f gralloc: Set flag to enable GC MMU mapping in PVR services - 0cfaa6d PVR-KM: Add function to obtain BV descriptor through 3PDC interface - c8f4c5f PVR-KM: Map buffers to GC core MMU on allocation time with Bltsville - 65b2b84 SGXKM: Prevent mapping of export with zero ref - f4cc0a2 OMAP4-SGX-UM: Allow for tiler buffer SW access - 5c97ded OMAP4-SGX-UM: Gralloc SW access and caching flags - bbf5424 OMAP4-SGX-UM: Gralloc HAL_PIXEL_FORMAT_NV12 format - ec6cc69 SGX-KM: Make PVRSRVExportFDToIONHandles generic and register it with ion - 8c1255d PVR-KM: OMAP5: Use shared device for Tiler 2D Mappings - 2391ac8 PVR-KM: OMAP5: Hardcode core version value - 7d87962 SGX-KM: OMAP5: HACK: Set the size of the SGX registers - 9f40224 SGX-UM: add detection of OMAP5432 in pvrsrvinit - f75d48b SGX-UM: build: Add panda5 and omap5sevm to product list - c23eff9 SGX-KM: BUILD: Add OMAP5 support - 5cc4ade SGX-UM: BUILD: Consolidate build into a single Makefile - 2c6a2f6 SGX-KM: (build) Remove Android product and version dependency - 6f54fe8 Build: Don't install egl.cfg anymore - a49c59c SGX-KM: egl.cfg sysfs entry - c759928 SGX-KM: Enable DPF, TRACE and ASSERT - 1628094 build-km: Enable blaze and blaze_tablet for ICS environment - 05f00eb build: Enable blaze and blaze_tablet for ICS environment - 542e279 SGX-KM: Add ability to build multiple sets of GFX kernel modules - 69d3661 build: Set correct load directory for kernel modules. - 2dfe14b KM: add support for sgx544sc - 58f317a SGX-UM: Add ability to build multiple sets of GFX binaries - 04e5deb SGX-KM: Use platform data for OPP symbols. - 5eed373 SGX-UM: Enable building binaries for specific SGX - 0801be2 readme: Add README - 649d010 build: Add build_DDK.sh - fe34640 Create gitignore file - 519ca9a IMG DDK 1.9@2166536 for Android Change-Id: I4a060344fa134a2484d1b7a69fc87963455e9e34 Signed-off-by: Eric Luong <x0119002@ti.com>
Diffstat (limited to 'pvr-source/eurasiacon')
-rw-r--r--pvr-source/eurasiacon/build/linux2/bits.mk112
-rw-r--r--pvr-source/eurasiacon/build/linux2/buildvars.mk217
-rw-r--r--pvr-source/eurasiacon/build/linux2/commands.mk219
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk59
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk68
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk47
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/features.mk319
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/paths.mk53
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk156
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/dridrm.mk63
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/omap4.mk43
-rw-r--r--pvr-source/eurasiacon/build/linux2/common/opencl.mk40
-rw-r--r--pvr-source/eurasiacon/build/linux2/config/core.mk604
-rw-r--r--pvr-source/eurasiacon/build/linux2/defs.mk140
-rw-r--r--pvr-source/eurasiacon/build/linux2/kbuild/Makefile.template92
-rw-r--r--pvr-source/eurasiacon/build/linux2/kbuild/external_tarball.mk49
-rw-r--r--pvr-source/eurasiacon/build/linux2/kbuild/kbuild.mk91
-rw-r--r--pvr-source/eurasiacon/build/linux2/kernel_module.mk75
-rw-r--r--pvr-source/eurasiacon/build/linux2/kernel_version.mk100
-rw-r--r--pvr-source/eurasiacon/build/linux2/moduledefs.mk96
-rw-r--r--pvr-source/eurasiacon/build/linux2/modules.mk49
-rw-r--r--pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile185
-rw-r--r--pvr-source/eurasiacon/build/linux2/omap4430_android/products.mk46
-rw-r--r--pvr-source/eurasiacon/build/linux2/prepare_tree.mk60
-rw-r--r--pvr-source/eurasiacon/build/linux2/this_makefile.mk68
-rwxr-xr-xpvr-source/eurasiacon/build/linux2/tools/cc-check.sh99
-rw-r--r--pvr-source/eurasiacon/build/linux2/toplevel.mk226
27 files changed, 3376 insertions, 0 deletions
diff --git a/pvr-source/eurasiacon/build/linux2/bits.mk b/pvr-source/eurasiacon/build/linux2/bits.mk
new file mode 100644
index 0000000..a1a7eef
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/bits.mk
@@ -0,0 +1,112 @@
+########################################################################### ###
+#@Title Useful special targets which don't build anything
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),)
+dumpvar-%: ;
+$(foreach _var_to_dump,$(patsubst dumpvar-%,%,$(filter dumpvar-%,$(MAKECMDGOALS))),$(info $(if $(filter undefined,$(origin $(_var_to_dump))),# $$($(_var_to_dump)) is not set,$(_var_to_dump) := $($(_var_to_dump)))))
+endif
+
+ifneq ($(filter whereis-%,$(MAKECMDGOALS)),)
+whereis-%: ;
+$(foreach _module_to_find,$(patsubst whereis-%,%,$(filter whereis-%,$(MAKECMDGOALS))),$(info $(if $(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),$(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),# No module $(_module_to_find))))
+endif
+
+ifneq ($(filter whatis-%,$(MAKECMDGOALS)),)
+whatis-$(RELATIVE_OUT)/target/%: ;
+whatis-$(RELATIVE_OUT)/host/%: ;
+$(foreach _file_to_find,$(patsubst whatis-%,%,$(filter whatis-%,$(MAKECMDGOALS))),$(info $(strip $(foreach _m,$(ALL_MODULES),$(if $(filter $(_file_to_find),$(INTERNAL_TARGETS_FOR_$(_m))),$(_file_to_find) is in $(_m) which is defined in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)),)))))
+endif
+
+.PHONY: ls-modules
+ls-modules:
+ @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)))))
+
+ifeq ($(strip $(MAKECMDGOALS)),visualise)
+FORMAT ?= xlib
+GRAPHVIZ ?= neato
+visualise: $(OUT)/MAKE_RULES.dot
+ $(GRAPHVIZ) -T$(FORMAT) -o $(OUT)/MAKE_RULES.$(FORMAT) $<
+$(OUT)/MAKE_RULES.dot: $(OUT)/MAKE_RULES
+ perl $(MAKE_TOP)/tools/depgraph.pl -t $(TOP) -g $(firstword $(GRAPHVIZ)) $(OUT)/MAKE_RULES >$(OUT)/MAKE_RULES.dot
+$(OUT)/MAKE_RULES: $(ALL_MAKEFILES)
+ -$(MAKE) -C $(TOP) -f $(MAKE_TOP)/toplevel.mk TOP=$(TOP) OUT=$(OUT) ls-modules -qp >$(OUT)/MAKE_RULES 2>&1
+else
+visualise:
+ @: $(error visualise specified along with other goals. This is not supported)
+endif
+
+.PHONY: help
+help:
+ @echo 'Build targets'
+ @echo ' make, make build Build all components of the build'
+ @echo ' make components Build only the user-mode components'
+ @echo ' make kbuild Build only the kernel-mode components'
+ @echo ' make MODULE Build the module MODULE and all of its dependencies'
+ @echo ' make eurasiacon/binary2_.../target/libsomething.so'
+ @echo ' Build a particular file (including intermediates)'
+ @echo 'Variables'
+ @echo ' make V=1 ... Print the commands that are executed'
+ @echo ' make W=1 ... Enable extra compiler warnings'
+ @echo ' make D=opt ... Set build system debug option (D=help for a list)'
+ @echo ' make OUT=dir ... Place output+intermediates in specified directory'
+ @echo ' EXCLUDED_APIS=... List of APIs to remove from the build'
+ @echo ' make SOMEOPTION=1 ... Set configuration options (see config/core.mk)'
+ @echo ' Defaults are set by $(PVR_BUILD_DIR)/Makefile'
+ @echo 'Clean targets'
+ @echo ' make clean Remove only intermediates for the current build'
+ @echo ' make clobber As "make clean", but remove output files too'
+ @echo ' make clean-MODULE Clean (or clobber) only files for MODULE'
+ @echo ''
+ @echo 'Special targets'
+ @echo ' make whereis-MODULE Show the path to the Linux.mk defining MODULE'
+ @echo ' make whatis-FILE Show which module builds an output FILE'
+ @echo ' make ls-modules List all modules defined by makefiles'
+
+ifneq ($(filter help,$(D)),)
+empty :=
+space := $(empty) $(empty)
+$(info Debug options)
+$(info $(space)D=modules dump module info)
+$(info $(space)D=freeze-config prevent config changes)
+$(info $(space)D=config-changes dump diffs when config changes)
+$(info Options may be combined: make D=freeze-config,config-changes)
+$(error D=help given)
+endif
diff --git a/pvr-source/eurasiacon/build/linux2/buildvars.mk b/pvr-source/eurasiacon/build/linux2/buildvars.mk
new file mode 100644
index 0000000..24fa829
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/buildvars.mk
@@ -0,0 +1,217 @@
+########################################################################### ###
+#@Title Define global variables
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@Description This file is read once at the start of the build, after reading
+# in config.mk. It should define the non-MODULE_* variables used
+# in commands, like ALL_CFLAGS
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+ifeq ($(BUILD),debug)
+COMMON_USER_FLAGS := -O0
+else
+OPTIM ?= -O2
+COMMON_USER_FLAGS := $(OPTIM)
+endif
+
+# FIXME: We should probably audit the driver for aliasing
+#
+COMMON_USER_FLAGS += -fno-strict-aliasing
+
+# We always enable debugging. Either the release binaries are stripped
+# and the symbols put in the symbolpackage, or we're building debug.
+#
+COMMON_USER_FLAGS += -g
+
+# These flags are used for kernel, User C and User C++
+#
+COMMON_FLAGS = -W -Wall
+
+# Some GCC warnings are C only, so we must mask them from C++
+#
+COMMON_CFLAGS := $(COMMON_FLAGS) \
+ -Wdeclaration-after-statement -Wno-format-zero-length \
+ -Wmissing-prototypes -Wstrict-prototypes
+
+# Additional warnings, and optional warnings.
+#
+WARNING_CFLAGS := \
+ -Wpointer-arith -Wunused-parameter \
+ -Wmissing-format-attribute \
+ $(call cc-option,-Wno-missing-field-initializers) \
+ $(call cc-option,-fdiagnostics-show-option)
+
+ifeq ($(W),1)
+WARNING_CFLAGS += \
+ $(call cc-option,-Wbad-function-cast) \
+ $(call cc-option,-Wcast-qual) \
+ $(call cc-option,-Wcast-align) \
+ $(call cc-option,-Wconversion) \
+ $(call cc-option,-Wdisabled-optimization) \
+ $(call cc-option,-Wlogical-op) \
+ $(call cc-option,-Wmissing-declarations) \
+ $(call cc-option,-Wmissing-include-dirs) \
+ $(call cc-option,-Wnested-externs) \
+ $(call cc-option,-Wold-style-definition) \
+ $(call cc-option,-Woverlength-strings) \
+ $(call cc-option,-Wpacked) \
+ $(call cc-option,-Wpacked-bitfield-compat) \
+ $(call cc-option,-Wpadded) \
+ $(call cc-option,-Wredundant-decls) \
+ $(call cc-option,-Wshadow) \
+ $(call cc-option,-Wswitch-default) \
+ $(call cc-option,-Wvla) \
+ $(call cc-option,-Wwrite-strings)
+endif
+
+WARNING_CFLAGS += \
+ $(call cc-optional-warning,-Wunused-but-set-variable)
+
+HOST_WARNING_CFLAGS := \
+ -Wpointer-arith -Wunused-parameter \
+ -Wmissing-format-attribute \
+ $(call host-cc-option,-Wno-missing-field-initializers) \
+ $(call host-cc-option,-fdiagnostics-show-option)
+
+ifeq ($(W),1)
+HOST_WARNING_CFLAGS += \
+ $(call host-cc-option,-Wbad-function-cast) \
+ $(call host-cc-option,-Wcast-qual) \
+ $(call host-cc-option,-Wcast-align) \
+ $(call host-cc-option,-Wconversion) \
+ $(call host-cc-option,-Wdisabled-optimization) \
+ $(call host-cc-option,-Wlogical-op) \
+ $(call host-cc-option,-Wmissing-declarations) \
+ $(call host-cc-option,-Wmissing-include-dirs) \
+ $(call host-cc-option,-Wnested-externs) \
+ $(call host-cc-option,-Wold-style-definition) \
+ $(call host-cc-option,-Woverlength-strings) \
+ $(call host-cc-option,-Wpacked) \
+ $(call host-cc-option,-Wpacked-bitfield-compat) \
+ $(call host-cc-option,-Wpadded) \
+ $(call host-cc-option,-Wredundant-decls) \
+ $(call host-cc-option,-Wshadow) \
+ $(call host-cc-option,-Wswitch-default) \
+ $(call host-cc-option,-Wvla) \
+ $(call host-cc-option,-Wwrite-strings)
+endif
+
+HOST_WARNING_CFLAGS += \
+ $(call host-cc-optional-warning,-Wunused-but-set-variable)
+
+KBUILD_WARNING_CFLAGS := \
+ -Wno-unused-parameter -Wno-sign-compare
+KBUILD_WARNING_CFLAGS += \
+ $(call kernel-cc-optional-warning,-Wbad-function-cast) \
+ $(call kernel-cc-optional-warning,-Wcast-qual) \
+ $(call kernel-cc-optional-warning,-Wcast-align) \
+ $(call kernel-cc-optional-warning,-Wconversion) \
+ $(call kernel-cc-optional-warning,-Wdisabled-optimization) \
+ $(call kernel-cc-optional-warning,-Wlogical-op) \
+ $(call kernel-cc-optional-warning,-Wmissing-declarations) \
+ $(call kernel-cc-optional-warning,-Wmissing-include-dirs) \
+ $(call kernel-cc-optional-warning,-Wnested-externs) \
+ $(call kernel-cc-optional-warning,-Wno-missing-field-initializers) \
+ $(call kernel-cc-optional-warning,-Wold-style-definition) \
+ $(call kernel-cc-optional-warning,-Woverlength-strings) \
+ $(call kernel-cc-optional-warning,-Wpacked) \
+ $(call kernel-cc-optional-warning,-Wpacked-bitfield-compat) \
+ $(call kernel-cc-optional-warning,-Wpadded) \
+ $(call kernel-cc-optional-warning,-Wredundant-decls) \
+ $(call kernel-cc-optional-warning,-Wshadow) \
+ $(call kernel-cc-optional-warning,-Wswitch-default) \
+ $(call kernel-cc-optional-warning,-Wvla) \
+ $(call kernel-cc-optional-warning,-Wwrite-strings)
+
+# User C only
+#
+ALL_CFLAGS := \
+ $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \
+ $(SYS_CFLAGS)
+
+ALL_HOST_CFLAGS := \
+ $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS)
+
+# User C++ only
+#
+ALL_CXXFLAGS := \
+ $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \
+ -fno-rtti -fno-exceptions \
+ -Wpointer-arith -Wunused-parameter \
+ $(SYS_CXXFLAGS)
+
+ALL_HOST_CXXFLAGS := \
+ $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall
+
+# User C and C++
+#
+# NOTE: ALL_HOST_LDFLAGS should probably be using -rpath-link too, and if we
+# ever need to support building host shared libraries, it's required.
+#
+# We can't use it right now because we want to support non-GNU-compatible
+# linkers like the Darwin 'ld' which doesn't support -rpath-link.
+#
+ALL_HOST_LDFLAGS := -L$(HOST_OUT)
+ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
+
+ifneq ($(strip $(TOOLCHAIN)),)
+ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib
+endif
+
+ifneq ($(strip $(LINKER_RPATH)),)
+ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH))
+endif
+
+ALL_LDFLAGS += $(SYS_LDFLAGS)
+
+# Kernel C only
+#
+ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_WARNING_CFLAGS) \
+ $(call kernel-cc-option,-Wno-type-limits) \
+ $(call kernel-cc-option,-Wno-pointer-arith) \
+ $(call kernel-cc-option,-Wno-aggregate-return) \
+ $(call kernel-cc-option,-Wno-unused-but-set-variable)
+
+# This variable contains a list of all modules built by kbuild
+ALL_KBUILD_MODULES :=
+
+# This variable contains a list of all modules which contain C++ source files
+ALL_CXX_MODULES :=
+
+# Toolchain triple for cross environment
+CROSS_TRIPLE := $(patsubst %-,%,$(CROSS_COMPILE))
diff --git a/pvr-source/eurasiacon/build/linux2/commands.mk b/pvr-source/eurasiacon/build/linux2/commands.mk
new file mode 100644
index 0000000..25e5ed1
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/commands.mk
@@ -0,0 +1,219 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# from-one-* recipes make a thing from one source file, so they use $<. Others
+# use $(MODULE_something) instead of $^
+
+# We expect that MODULE_*FLAGS contains all the flags we need, including the
+# flags for all modules (like $(ALL_CFLAGS) and $(ALL_HOST_CFLAGS)), and
+# excluding flags for include search dirs or for linking libraries. The
+# exceptions are ALL_EXE_LDFLAGS and ALL_LIB_LDFLAGS, since they depend on the
+# type of thing being linked, so they appear in the commands below
+
+define host-o-from-one-c
+$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
+$(HOST_CC) -MD -c $(MODULE_HOST_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
+ -include $(CONFIG_H) $< -o $@
+endef
+
+define target-o-from-one-c
+$(if $(V),,@echo " CC " $(call relative-to-top,$<))
+$(CC) -MD -c $(MODULE_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
+ -include $(CONFIG_H) $< -o $@
+endef
+
+# We use $(CC) to compile C++ files, and expect it to detect that it's
+# compiling C++
+define host-o-from-one-cxx
+$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
+$(HOST_CC) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
+ -include $(CONFIG_H) $< -o $@
+endef
+
+define target-o-from-one-cxx
+$(if $(V),,@echo " CC " $(call relative-to-top,$<))
+$(CC) -MD -c $(MODULE_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
+ -include $(CONFIG_H) $< -o $@
+endef
+
+define host-executable-from-o
+$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
+$(HOST_CC) $(MODULE_HOST_LDFLAGS) \
+ -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
+ $(MODULE_LIBRARY_FLAGS)
+endef
+
+define host-executable-cxx-from-o
+$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
+$(HOST_CXX) $(MODULE_HOST_LDFLAGS) \
+ -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
+ $(MODULE_LIBRARY_FLAGS)
+endef
+
+define target-executable-from-o
+$(if $(V),,@echo " LD " $(call relative-to-top,$@))
+$(CC) \
+ $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
+ $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
+ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
+endef
+
+define target-executable-cxx-from-o
+$(if $(V),,@echo " LD " $(call relative-to-top,$@))
+$(CXX) \
+ $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
+ $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
+ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
+endef
+
+define target-shared-library-from-o
+$(if $(V),,@echo " LD " $(call relative-to-top,$@))
+$(CC) -shared -Wl,-Bsymbolic \
+ $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
+ $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
+ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
+endef
+
+# If there were any C++ source files in a shared library, we use this recipe,
+# which runs the C++ compiler to link the final library
+define target-shared-library-cxx-from-o
+$(if $(V),,@echo " LD " $(call relative-to-top,$@))
+$(CXX) -shared -Wl,-Bsymbolic \
+ $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
+ $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
+ $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
+endef
+
+define target-copy-debug-information
+$(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg
+endef
+
+define host-strip-debug-information
+$(HOST_STRIP) --strip-unneeded $@
+endef
+
+define target-strip-debug-information
+$(STRIP) --strip-unneeded $@
+endef
+
+define target-add-debuglink
+$(if $(V),,@echo " DBGLINK " $(call relative-to-top,$(basename $@).dbg))
+$(OBJCOPY) --add-gnu-debuglink=$(basename $@).dbg $@
+endef
+
+define host-static-library-from-o
+$(if $(V),,@echo " HOST_AR " $(call relative-to-top,$@))
+$(HOST_AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
+endef
+
+define target-static-library-from-o
+$(if $(V),,@echo " AR " $(call relative-to-top,$@))
+$(AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
+endef
+
+define tab-c-from-y
+$(if $(V),,@echo " BISON " $(call relative-to-top,$<))
+$(BISON) $(MODULE_BISON_FLAGS) -o $@ -d $<
+endef
+
+define l-c-from-l
+$(if $(V),,@echo " FLEX " $(call relative-to-top,$<))
+$(FLEX) $(MODULE_FLEX_FLAGS) -o$@ $<
+endef
+
+define clean-dirs
+$(if $(V),,@echo " RM " $(call relative-to-top,$(MODULE_DIRS_TO_REMOVE)))
+$(RM) -rf $(MODULE_DIRS_TO_REMOVE)
+endef
+
+define make-directory
+$(MKDIR) -p $@
+endef
+
+define check-exports
+endef
+
+# Programs used in recipes
+
+BISON ?= bison
+CC ?= gcc
+CXX ?= g++
+HOST_CC ?= gcc
+HOST_CXX ?= g++
+JAR ?= jar
+JAVA ?= java
+JAVAC ?= javac
+ZIP ?= zip
+
+override AR := $(if $(V),,@)$(CROSS_COMPILE)ar
+override BISON := $(if $(V),,@)$(BISON)
+override BZIP2 := $(if $(V),,@)bzip2 -9
+override CC := $(if $(V),,@)$(CROSS_COMPILE)$(CC)
+override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh
+override CXX := $(if $(V),,@)$(CROSS_COMPILE)$(CXX)
+override CHMOD := $(if $(V),,@)chmod
+override CP := $(if $(V),,@)cp
+override ECHO := $(if $(V),,@)echo
+override FLEX := $(if $(V),,@)flex
+override GAWK := $(if $(V),,@)gawk
+override GREP := $(if $(V),,@)grep
+override HOST_AR := $(if $(V),,@)ar
+override HOST_CC := $(if $(V),,@)$(HOST_CC)
+override HOST_CXX := $(if $(V),,@)$(HOST_CXX)
+override HOST_STRIP := $(if $(V),,@)strip
+override INSTALL := $(if $(V),,@)install
+override JAR := $(if $(V),,@)$(JAR)
+override JAVA := $(if $(V),,@)$(JAVA)
+override JAVAC := $(if $(V),,@)$(JAVAC)
+override M4 := $(if $(V),,@)m4
+override MKDIR := $(if $(V),,@)mkdir
+override MV := $(if $(V),,@)mv
+override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy
+override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm
+override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib
+override RM := $(if $(V),,@)rm -f
+override SED := $(if $(V),,@)sed
+override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip
+override TAR := $(if $(V),,@)tar
+override TOUCH := $(if $(V),,@)touch
+override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm
+override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink
+override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc
+override ZIP := $(if $(V),,@)$(ZIP)
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk b/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk
new file mode 100644
index 0000000..6e16b14
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/arch_common.mk
@@ -0,0 +1,59 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+SYS_CFLAGS := \
+ -fno-short-enums -D__linux__ \
+ -I$(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
+ -I$(ANDROID_ROOT)/bionic/libc/include \
+ -I$(ANDROID_ROOT)/bionic/libc/kernel/common \
+ -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \
+ -I$(ANDROID_ROOT)/bionic/libm/include \
+ -I$(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \
+ -I$(ANDROID_ROOT)/bionic/libthread_db/include \
+ -I$(ANDROID_ROOT)/frameworks/base/include \
+ -isystem $(ANDROID_ROOT)/system/core/include \
+ -I$(ANDROID_ROOT)/hardware/libhardware/include \
+ -I$(ANDROID_ROOT)/external/openssl/include
+
+SYS_EXE_LDFLAGS := \
+ -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \
+ -lc -ldl -lcutils
+
+SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS)
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk b/pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk
new file mode 100644
index 0000000..8c3f937
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk
@@ -0,0 +1,68 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+OPTIM := -Os
+
+ANDROID_ARCH := arm
+include ../common/android/arch_common.mk
+
+SYS_CFLAGS += -march=armv7-a
+
+SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o
+SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o
+
+# Handle the removal of the armelf.x and armelf.xsc linker scripts.
+ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),)
+# The linker scripts have been removed. We need to use these options
+# instead.
+SYS_EXE_LDFLAGS += -Wl,-z,relro -Wl,-z,now
+SYS_LIB_LDFLAGS += -Wl,-z,relro -Wl,-z,now
+else
+# The linker scripts are still present in the Android tree, so we need to
+# use them.
+SYS_EXE_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.x
+SYS_LIB_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.xsc
+endif
+
+JNI_CPU_ABI := armeabi
+
+# Android builds are usually GPL
+#
+LDM_PLATFORM ?= 1
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk b/pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk
new file mode 100644
index 0000000..320804e
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk
@@ -0,0 +1,47 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+
+$(eval $(call BothConfigC,ANDROID,))
+
+
+
+
+
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/features.mk b/pvr-source/eurasiacon/build/linux2/common/android/features.mk
new file mode 100644
index 0000000..18bc370
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/features.mk
@@ -0,0 +1,319 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+include ../common/android/platform_version.mk
+
+# Basic support option tuning for Android
+#
+SUPPORT_ANDROID_PLATFORM := 1
+SUPPORT_OPENGLES1_V1_ONLY := 1
+
+# Meminfo IDs are required for buffer stamps
+#
+SUPPORT_MEMINFO_IDS := 1
+
+# Need multi-process support in PDUMP
+#
+SUPPORT_PDUMP_MULTI_PROCESS := 1
+
+# Always print debugging after 5 seconds of no activity
+#
+CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
+
+# Android WSEGL is always the same
+#
+OPK_DEFAULT := libpvrANDROID_WSEGL.so
+
+# srvkm is always built, but bufferclass_example is only built
+# before EGL_image_external was generally available.
+#
+KERNEL_COMPONENTS := srvkm
+ifeq ($(is_at_least_honeycomb),0)
+KERNEL_COMPONENTS += bufferclass_example
+endif
+
+# Kernel modules are always installed here under Android
+#
+PVRSRV_MODULE_BASEDIR := /system/modules/
+
+# Use the new PVR_DPF implementation to allow lower message levels
+# to be stripped from production drivers
+#
+PVRSRV_NEW_PVR_DPF := 1
+
+# Production Android builds don't want PVRSRVGetDCSystemBuffer
+#
+SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER := 0
+
+# Prefer to limit the 3D parameters heap to <16MB and move the
+# extra 48MB to the general heap. This only affects cores with
+# 28bit MMUs (520, 530, 531, 540).
+#
+SUPPORT_LARGE_GENERAL_HEAP := 1
+
+# Enable a page pool for uncached memory allocations. This improves
+# the performance of such allocations because the pages are temporarily
+# not returned to Linux and therefore do not have to be re-invalidated
+# (fewer cache invalidates are needed).
+#
+# Default the cache size to a maximum of 5400 pages (~21MB). If using
+# newer Linux kernels (>=3.0) the cache may be reclaimed and become
+# smaller than this maximum during runtime.
+#
+PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
+
+##############################################################################
+# EGL connect/disconnect hooks only available since Froyo
+# Obsolete in future versions
+#
+ifeq ($(is_at_least_froyo),1)
+ifeq ($(is_at_least_icecream_sandwich),0)
+PVR_ANDROID_HAS_CONNECT_DISCONNECT := 1
+endif
+endif
+
+##############################################################################
+# Override surface field name for older versions
+#
+ifeq ($(is_at_least_gingerbread),0)
+PVR_ANDROID_SURFACE_FIELD_NAME := \"mSurface\"
+endif
+
+##############################################################################
+# Provide ANativeWindow{Buffer,} typedefs for older versions
+#
+ifeq ($(is_at_least_gingerbread),0)
+PVR_ANDROID_NEEDS_ANATIVEWINDOW_TYPEDEF := 1
+endif
+ifeq ($(is_at_least_icecream_sandwich),0)
+PVR_ANDROID_NEEDS_ANATIVEWINDOWBUFFER_TYPEDEF := 1
+endif
+
+##############################################################################
+# Handle various platform includes for unittests
+#
+UNITTEST_INCLUDES := eurasiacon/android
+
+ifeq ($(is_at_least_gingerbread),1)
+UNITTEST_INCLUDES += $(ANDROID_ROOT)/frameworks/base/native/include
+endif
+
+ifeq ($(is_at_least_jellybean),1)
+UNITTEST_INCLUDES += \
+ $(ANDROID_ROOT)/frameworks/native/include \
+ $(ANDROID_ROOT)/frameworks/native/opengl/include \
+ $(ANDROID_ROOT)/libnativehelper/include
+# FIXME: This is the old location for the JNI header.
+UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include
+else
+UNITTEST_INCLUDES += \
+ $(ANDROID_ROOT)/frameworks/base/opengl/include \
+ $(ANDROID_ROOT)/dalvik/libnativehelper/include
+endif
+
+# But it doesn't have OpenVG headers
+#
+UNITTEST_INCLUDES += eurasiacon/unittests/include
+
+##############################################################################
+# Future versions moved proprietary libraries to a vendor directory
+#
+ifeq ($(is_at_least_gingerbread),1)
+SHLIB_DESTDIR := /system/vendor/lib
+DEMO_DESTDIR := /system/vendor/bin
+else
+SHLIB_DESTDIR := /system/lib
+DEMO_DESTDIR := /system/bin
+endif
+
+# EGL libraries go in a special place
+#
+EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
+
+##############################################################################
+# We can support OpenCL in the build since Froyo (stlport was added in 2.2)
+#
+ifeq ($(is_at_least_froyo),1)
+SYS_CXXFLAGS := \
+ -fuse-cxa-atexit \
+ $(SYS_CFLAGS) \
+ -I$(ANDROID_ROOT)/bionic \
+ -I$(ANDROID_ROOT)/external/stlport/stlport
+else
+SYS_CXXFLAGS := \
+ $(SYS_CFLAGS) \
+ -I$(ANDROID_ROOT)/bionic/libstdc++/include
+endif
+
+##############################################################################
+# Composition bypass feature, supported since Froyo.
+# In ICS, hardware composer (HWC) should be used instead.
+#
+ifeq ($(is_at_least_froyo),1)
+ifeq ($(is_at_least_honeycomb),0)
+PVR_ANDROID_HAS_NATIVE_BUFFER_TRANSFORM := 1
+SUPPORT_ANDROID_COMPOSITION_BYPASS := 1
+endif
+endif
+
+##############################################################################
+# In ICS, we have hardware composer (HWC) support.
+#
+# SUPPORT_ANDROID_COMPOSER_HAL adds Post2() to the framebuffer HAL interface
+# and is intended for inter-op with external HWC modules. It is always
+# enabled (but we allow it to be compiled out just in case).
+#
+# SUPPORT_ANDROID_COMPOSITION_BYPASS adds a new buffer type (client buffers
+# allocated from the framebuffer pool) which maximizes compatibility with
+# most 3rdparty display controllers. It is orthogonal to HWC support.
+#
+ifeq ($(is_at_least_honeycomb),1)
+SUPPORT_ANDROID_COMPOSER_HAL := 1
+endif
+
+##############################################################################
+# We have some extra GRALLOC_USAGE bits we need to handle in ICS
+#
+ifeq ($(is_at_least_honeycomb),1)
+PVR_ANDROID_HAS_GRALLOC_USAGE_EXTERNAL_DISP := 1
+PVR_ANDROID_HAS_GRALLOC_USAGE_PROTECTED := 1
+PVR_ANDROID_HAS_GRALLOC_USAGE_PRIVATE := 1
+endif
+
+##############################################################################
+# Support the new OES_EGL_image_external extension + YV12 buffers
+#
+ifeq ($(is_at_least_honeycomb),1)
+PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YV12 := 1
+GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
+GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
+endif
+
+##############################################################################
+# Gingerbread adds the native window cancelBuffer operation
+#
+ifeq ($(is_at_least_gingerbread),1)
+PVR_ANDROID_HAS_CANCELBUFFER := 1
+endif
+
+##############################################################################
+# Versions prior to ICS have another header we must include
+#
+ifeq ($(is_at_least_icecream_sandwich),0)
+PVR_ANDROID_HAS_ANDROID_NATIVE_BUFFER_H := 1
+endif
+
+##############################################################################
+# ICS added dump() hook to gralloc alloc_device_t API
+#
+ifeq ($(is_at_least_honeycomb),1)
+PVR_ANDROID_HAS_GRALLOC_DUMP := 1
+endif
+
+##############################################################################
+# ICS added support for the BGRX pixel format, and allows drivers to advertise
+# configs in this format instead of RGBX.
+#
+# The DDK provides a private definition of HAL_PIXEL_FORMAT_BGRX_8888. This
+# option exposes it as the native visual for 8888 configs with alpha ignored
+#
+ifeq ($(is_at_least_icecream_sandwich),1)
+SUPPORT_HAL_PIXEL_FORMAT_BGRX := 1
+endif
+
+##############################################################################
+# ICS added the ability for GL clients to pre-rotate their rendering to the
+# orientation desired by the compositor. The SGX DDK can use TRANSFORM_HINT
+# to access this functionality.
+#
+# This is required by some HWC implementations that cannot use the display
+# to rotate buffers, otherwise the HWC optimization cannot be used when
+# rotating the device.
+#
+ifeq ($(is_at_least_icecream_sandwich),1)
+PVR_ANDROID_HAS_WINDOW_TRANSFORM_HINT := 1
+endif
+
+##############################################################################
+# ICS requires that at least one driver EGLConfig advertises the
+# EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
+# rendered with this config can be consumed by an OMX video encoder.
+#
+ifeq ($(is_at_least_icecream_sandwich),1)
+EGL_EXTENSION_ANDROID_RECORDABLE := 1
+endif
+
+##############################################################################
+# ICS added a new usage bit. USAGE_HW_COMPOSER indicates that a buffer might
+# be used with HWComposer. In practice this is all non-MM buffers.
+#
+ifeq ($(is_at_least_icecream_sandwich),1)
+PVR_ANDROID_HAS_GRALLOC_USAGE_HW_COMPOSER := 1
+endif
+
+##############################################################################
+# ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
+# extension in EGL/GLESv2.
+#
+ifeq ($(is_at_least_icecream_sandwich),1)
+EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
+endif
+
+##############################################################################
+# ICS MR1 added a new usage bit. USAGE_HW_VIDEO_ENCODER indicates that a
+# buffer might be used with the video encoder.
+#
+ifeq ($(is_at_least_icecream_sandwich_mr1),1)
+PVR_ANDROID_HAS_GRALLOC_USAGE_HW_VIDEO_ENCODER := 1
+endif
+
+##############################################################################
+# ICS and earlier should rate-limit composition by waiting for 3D renders
+# to complete in the compositor's eglSwapBuffers().
+#
+ifeq ($(is_at_least_jellybean),0)
+PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
+endif
+
+# Placeholder for future version handling
+#
+ifeq ($(is_future_version),1)
+-include ../common/android/future_version.mk
+endif
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/paths.mk b/pvr-source/eurasiacon/build/linux2/common/android/paths.mk
new file mode 100644
index 0000000..5c8f000
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/paths.mk
@@ -0,0 +1,53 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+TARGET_BUILD_TYPE ?= release
+
+OUT_DIR ?= $(ANDROID_ROOT)/out
+
+ifeq ($(TARGET_BUILD_TYPE),debug)
+TARGET_ROOT := $(OUT_DIR)/debug/target
+else
+TARGET_ROOT := $(OUT_DIR)/target
+endif
+
+TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/obj
+
+LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name)
diff --git a/pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk b/pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk
new file mode 100644
index 0000000..698efa3
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk
@@ -0,0 +1,156 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Figure out the version of Android we're building against.
+#
+PLATFORM_VERSION := $(shell \
+ if [ -f $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop ]; then \
+ cat $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop | \
+ grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \
+ else \
+ echo 4.0.3; \
+ fi)
+
+define version-starts-with
+$(shell echo $(PLATFORM_VERSION) | grep -q ^$(1); \
+ [ "$$?" = "0" ] && echo 1 || echo 0)
+endef
+
+# ro.build.version.release contains the version number for release builds, or
+# the version codename otherwise. In this case we need to assume that the
+# version of Android we're building against has the features that are in the
+# final release of that version, so we set PLATFORM_VERSION to the
+# corresponding release number.
+#
+ifeq ($(call version-starts-with,Eclair),1)
+PLATFORM_VERSION := 2.0
+else ifeq ($(call version-starts-with,Froyo),1)
+PLATFORM_VERSION := 2.2
+else ifeq ($(call version-starts-with,Gingerbread),1)
+PLATFORM_VERSION := 2.3
+else ifeq ($(call version-starts-with,Honeycomb),1)
+PLATFORM_VERSION := 3.0
+else ifeq ($(call version-starts-with,IceCreamSandwichMR),1)
+PLATFORM_VERSION := 4.0.3
+else ifeq ($(call version-starts-with,IceCreamSandwich),1)
+PLATFORM_VERSION := 4.0
+else ifeq ($(call version-starts-with,JellyBean),1)
+PLATFORM_VERSION := 4.1
+else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
+PLATFORM_VERSION := 5.0
+endif
+
+PLATFORM_VERSION_MAJ := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d'.')
+PLATFORM_VERSION_MIN := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d'.')
+PLATFORM_VERSION_PATCH := $(shell echo $(PLATFORM_VERSION) | cut -f3 -d'.')
+
+# Not all versions have a patchlevel; fix that up here
+#
+ifeq ($(PLATFORM_VERSION_PATCH),)
+PLATFORM_VERSION_PATCH := 0
+endif
+
+# Macros to help categorize support for features and API_LEVEL for tests.
+#
+is_at_least_eclair := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
+ ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
+ test $(PLATFORM_VERSION_MIN) -ge 0 ) ) && echo 1 || echo 0)
+is_at_least_froyo := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
+ ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
+ test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0)
+is_at_least_gingerbread := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
+ ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
+ test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
+is_at_least_honeycomb := \
+ $(shell test $(PLATFORM_VERSION_MAJ) -ge 3 && echo 1 || echo 0)
+is_at_least_icecream_sandwich := \
+ $(shell test $(PLATFORM_VERSION_MAJ) -ge 4 && echo 1 || echo 0)
+is_at_least_icecream_sandwich_mr1 := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
+ ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
+ ( test $(PLATFORM_VERSION_MIN) -ge 1 || \
+ test $(PLATFORM_VERSION_PATCH) -ge 3 ) ) ) && echo 1 || echo 0)
+is_at_least_jellybean := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
+ ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
+ test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0)
+
+# FIXME: Assume "future versions" are >=5.0, but we don't really know
+is_future_version := \
+ $(shell ( test $(PLATFORM_VERSION_MAJ) -ge 5 ) && echo 1 || echo 0)
+
+# Picking an exact match of API_LEVEL for the platform we're building
+# against can avoid compatibility theming and affords better integration.
+#
+ifeq ($(is_future_version),1)
+API_LEVEL := 17
+else ifeq ($(is_at_least_jellybean),1)
+API_LEVEL := 16
+else ifeq ($(is_at_least_icecream_sandwich),1)
+# MR1 15
+API_LEVEL := 14
+else ifeq ($(is_at_least_honeycomb),1)
+# MR2 13
+# MR1 12
+API_LEVEL := 11
+else ifeq ($(is_at_least_gingerbread),1)
+# MR1 10
+API_LEVEL := 9
+else ifeq ($(is_at_least_froyo),1)
+API_LEVEL := 8
+else ifeq ($(is_at_least_eclair),1)
+# MR1 7
+# 2.0.1 6
+API_LEVEL := 5
+else
+$(error Must build against Android >= 2.0)
+endif
+
+# Each DDK is tested against only a single version of the platform.
+# Warn if a different platform version is used.
+#
+ifeq ($(is_future_version),1)
+$(info WARNING: Android version is newer than this DDK supports)
+else ifneq ($(is_at_least_icecream_sandwich),1)
+$(info WARNING: Android version is older than this DDK supports)
+endif
diff --git a/pvr-source/eurasiacon/build/linux2/common/dridrm.mk b/pvr-source/eurasiacon/build/linux2/common/dridrm.mk
new file mode 100644
index 0000000..5d0289f
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/dridrm.mk
@@ -0,0 +1,63 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM,))
+$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM_EXT,))
+$(eval $(call TunableKernelConfigC,SUPPORT_DRI_DRM_PLUGIN,))
+
+
+$(eval $(call TunableBothConfigMake,SUPPORT_DRI_DRM,))
+
+ifeq ($(SUPPORT_DRI_DRM),1)
+ifeq ($(SUPPORT_DRI_DRM_NO_LIBDRM),1)
+endif
+$(eval $(call TunableKernelConfigC,PVR_SECURE_DRM_AUTH_EXPORT,))
+$(eval $(call TunableKernelConfigC,SUPPORT_DRM_MODESET,))
+endif
+
+$(eval $(call TunableKernelConfigC,PVR_DISPLAY_CONTROLLER_DRM_IOCTL,))
+
+$(eval $(call TunableBothConfigC,PVR_DRI_DRM_NOT_PCI))
+$(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI))
+
+$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,))
+
+
+export EXTERNAL_3PDD_TARBALL
diff --git a/pvr-source/eurasiacon/build/linux2/common/omap4.mk b/pvr-source/eurasiacon/build/linux2/common/omap4.mk
new file mode 100644
index 0000000..153159a
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/omap4.mk
@@ -0,0 +1,43 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,))
+$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,))
+$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,))
diff --git a/pvr-source/eurasiacon/build/linux2/common/opencl.mk b/pvr-source/eurasiacon/build/linux2/common/opencl.mk
new file mode 100644
index 0000000..b5f84d4
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/common/opencl.mk
@@ -0,0 +1,40 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
diff --git a/pvr-source/eurasiacon/build/linux2/config/core.mk b/pvr-source/eurasiacon/build/linux2/config/core.mk
new file mode 100644
index 0000000..247d1e1
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/config/core.mk
@@ -0,0 +1,604 @@
+########################################################################### ###
+#@Title Root build configuration.
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Configuration wrapper for new build system. This file deals with
+# configuration of the build. Add to this file anything that deals
+# with switching driver options on/off and altering the defines or
+# objects the build uses.
+#
+# At the end of this file is an exhaustive list of all variables
+# that are passed between the platform/config stage and the generic
+# build. PLEASE refrain from adding more variables than necessary
+# to this stage -- almost all options can go through config.h.
+#
+
+################################# MACROS ####################################
+
+# Write out a kernel GNU make option.
+#
+define KernelConfigMake
+$$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new)
+endef
+
+# Write out a GNU make option for both user & kernel
+#
+define BothConfigMake
+$$(eval $$(call KernelConfigMake,$(1),$(2)))
+endef
+
+# Conditionally write out a kernel GNU make option
+#
+define TunableKernelConfigMake
+ifneq ($$($(1)),)
+ifneq ($$($(1)),0)
+$$(eval $$(call KernelConfigMake,$(1),$$($(1))))
+endif
+else
+ifneq ($(2),)
+$$(eval $$(call KernelConfigMake,$(1),$(2)))
+endif
+endif
+endef
+
+# Conditionally write out a GNU make option for both user & kernel
+#
+define TunableBothConfigMake
+$$(eval $$(call TunableKernelConfigMake,$(1),$(2)))
+endef
+
+# Write out a kernel-only option
+#
+define KernelConfigC
+$$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new)
+endef
+
+# Write out an option for both user & kernel
+#
+define BothConfigC
+$$(eval $$(call KernelConfigC,$(1),$(2)))
+endef
+
+# Conditionally write out a kernel-only option
+#
+define TunableKernelConfigC
+ifneq ($$($(1)),)
+ifneq ($$($(1)),0)
+ifeq ($$($(1)),1)
+$$(eval $$(call KernelConfigC,$(1),))
+else
+$$(eval $$(call KernelConfigC,$(1),$$($(1))))
+endif
+endif
+else
+ifneq ($(2),)
+ifeq ($(2),1)
+$$(eval $$(call KernelConfigC,$(1),))
+else
+$$(eval $$(call KernelConfigC,$(1),$(2)))
+endif
+endif
+endif
+endef
+
+# Conditionally write out an option for both user & kernel
+#
+define TunableBothConfigC
+$$(eval $$(call TunableKernelConfigC,$(1),$(2)))
+endef
+
+############################### END MACROS ##################################
+
+# Check we have a new enough version of GNU make.
+#
+need := 3.81
+ifeq ($(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))),)
+$(error A version of GNU make >= $(need) is required - this is version $(MAKE_VERSION))
+endif
+
+# Try to guess EURASIAROOT if it wasn't set. Check this location.
+#
+_GUESSED_EURASIAROOT := $(abspath ../../../..)
+ifneq ($(strip $(EURASIAROOT)),)
+# We don't want to warn about EURASIAROOT if it's empty: this might mean that
+# it's not set at all anywhere, but it could also mean that it's set like
+# "export EURASIAROOT=" or "make EURASIAROOT= sometarget". If it is set but
+# empty, we'll act as if it's unset and not warn.
+ifneq ($(strip $(EURASIAROOT)),$(_GUESSED_EURASIAROOT))
+nothing :=
+space := $(nothing) $(nothing)
+$(warning EURASIAROOT is set (via: $(origin EURASIAROOT)), but its value does not)
+$(warning match the root of this source tree, so it is being ignored)
+$(warning EURASIAROOT is set to: $(EURASIAROOT))
+$(warning $(space)The detected root is: $(_GUESSED_EURASIAROOT))
+$(warning To suppress this message, unset EURASIAROOT or set it empty)
+endif
+# else, EURASIAROOT matched the actual root of the source tree: don't warn
+endif
+override EURASIAROOT := $(_GUESSED_EURASIAROOT)
+TOP := $(EURASIAROOT)
+
+ifneq ($(words $(TOP)),1)
+$(warning This source tree is located in a path which contains whitespace,)
+$(warning which is not supported.)
+$(warning $(space)The root is: $(TOP))
+$(error Whitespace found in $$(TOP))
+endif
+
+$(call directory-must-exist,$(TOP))
+
+include ../defs.mk
+
+# Infer PVR_BUILD_DIR from the directory configuration is launched from.
+# Check anyway that such a directory exists.
+#
+PVR_BUILD_DIR := $(notdir $(abspath .))
+$(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR))
+
+# Output directory for configuration, object code,
+# final programs/libraries, and install/rc scripts.
+#
+BUILD ?= release
+# TI: Added SGX type to binary build location so builds for different GPUs
+# with the same build directory are put in different places
+OUT ?= $(TOP)/eurasiacon/binary2_$(SGXCORE)_$(SGX_CORE_REV)_$(PVR_BUILD_DIR)_$(BUILD)
+override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT))
+
+CONFIG_MK := $(OUT)/config.mk
+CONFIG_H := $(OUT)/config.h
+CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk
+CONFIG_KERNEL_H := $(OUT)/config_kernel.h
+
+# Create the OUT directory and delete any previous intermediary files
+#
+$(shell mkdir -p $(OUT))
+$(shell \
+ for file in $(CONFIG_MK).new $(CONFIG_H).new \
+ $(CONFIG_KERNEL_MK).new $(CONFIG_KERNEL_H).new; do \
+ rm -f $$file; \
+ done)
+
+# Some targets don't need information about any modules. If we only specify
+# these targets on the make command line, set INTERNAL_CLOBBER_ONLY to
+# indicate that toplevel.mk shouldn't read any makefiles
+CLOBBER_ONLY_TARGETS := clean clobber help install
+INTERNAL_CLOBBER_ONLY :=
+ifneq ($(strip $(MAKECMDGOALS)),)
+INTERNAL_CLOBBER_ONLY := \
+$(if \
+ $(strip $(foreach _cmdgoal,$(MAKECMDGOALS),\
+ $(if $(filter $(_cmdgoal),$(CLOBBER_ONLY_TARGETS)),,x))),,true)
+endif
+
+# For a clobber-only build, we shouldn't regenerate any config files, or
+# require things like SGXCORE to be set
+ifneq ($(INTERNAL_CLOBBER_ONLY),true)
+
+-include ../config/user-defs.mk
+
+# FIXME: Backwards compatibility remaps.
+#
+ifeq ($(SUPPORT_SLC),1)
+SGX_FEATURE_SYSTEM_CACHE := 1
+endif
+ifeq ($(BYPASS_SLC),1)
+SGX_BYPASS_SYSTEM_CACHE := 1
+endif
+ifeq ($(BYPASS_DCU),1)
+SGX_BYPASS_DCU := 1
+endif
+ifneq ($(SGXCOREREV),)
+SGX_CORE_REV := $(SGXCOREREV)
+endif
+
+# Core handling
+#
+ifeq ($(SGXCORE),)
+$(error Must specify SGXCORE)
+endif
+ifeq ($(SGX_CORE_REV),)
+override USE_SGX_CORE_REV_HEAD := 1
+else ifeq ($(SGX_CORE_REV),000)
+override USE_SGX_CORE_REV_HEAD := 1
+override SGX_CORE_REV :=
+else
+override USE_SGX_CORE_REV_HEAD := 0
+endif
+
+# Enforced dependencies. Move this to an include.
+#
+ifeq ($(SUPPORT_LINUX_USING_WORKQUEUES),1)
+override PVR_LINUX_USING_WORKQUEUES := 1
+override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1
+override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1
+override SYS_CUSTOM_POWERLOCK_WRAP := 1
+else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1)
+override PVR_LINUX_USING_WORKQUEUES := 1
+override PVR_LINUX_MISR_USING_WORKQUEUE := 1
+override PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE := 1
+override SYS_CUSTOM_POWERLOCK_WRAP := 1
+endif
+
+ifneq ($(PDUMP),1)
+override SUPPORT_PDUMP_MULTI_PROCESS := 0
+endif
+
+ifeq ($(SUPPORT_HYBRID_PB),1)
+override SUPPORT_SHARED_PB := 1
+override SUPPORT_PERCONTEXT_PB := 1
+else ifeq ($(SUPPORT_PERCONTEXT_PB),1)
+override SUPPORT_SHARED_PB := 0
+endif
+
+ifeq ($(NO_HARDWARE),1)
+override SYS_USING_INTERRUPTS := 0
+override SUPPORT_HW_RECOVERY := 0
+override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
+endif
+
+# We're bumping against USSE limits on older cores because the ukernel
+# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and
+# PVRSRV_USSE_EDM_STATUS_DEBUG=1.
+#
+# Automatically disable vistest support if debugging the ukernel to
+# prevent build failures.
+#
+ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),)
+ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1)
+SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden
+ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden)
+$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
+SGX_DISABLE_VISTEST_SUPPORT := 1
+endif
+endif
+endif
+
+ifeq ($(SGXCORE),535)
+ifeq ($(PVRSRV_USSE_EDM_STATUS_DEBUG),1)
+SUPPORT_SGX_HWPERF ?= not-overridden
+ifeq ($(SUPPORT_SGX_HWPERF),not-overridden)
+$(warning Setting SUPPORT_SGX_HWPERF=0 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
+SUPPORT_SGX_HWPERF := 0
+endif
+endif
+PVR2D_ALT_2DHW ?= 0
+endif
+
+# Multi-core handling must be done separately to other options
+# Also do some sanity checks
+#
+ifeq ($(SGX_FEATURE_MP),1)
+ifeq ($(SGX_FEATURE_MP_CORE_COUNT),)
+ifeq ($(SGX_FEATURE_MP_CORE_COUNT_TA),)
+$(error Must specify SGX_FEATURE_MP_CORE_COUNT or both SGX_FEATURE_MP_CORE_COUNT_TA and SGX_FEATURE_MP_CORE_COUNT_3D with SGX_FEATURE_MP)
+else
+$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_TA,$(SGX_FEATURE_MP_CORE_COUNT_TA)))
+endif
+ifeq ($(SGX_FEATURE_MP_CORE_COUNT_3D),)
+$(error Must specify SGX_FEATURE_MP_CORE_COUNT or both SGX_FEATURE_MP_CORE_COUNT_TA and SGX_FEATURE_MP_CORE_COUNT_3D with SGX_FEATURE_MP)
+else
+$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_3D,$(SGX_FEATURE_MP_CORE_COUNT_3D)))
+endif
+else
+$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT,$(SGX_FEATURE_MP_CORE_COUNT)))
+endif
+endif
+
+# Rather than requiring the user to have to define two variables (one quoted,
+# one not), make PVRSRV_MODNAME a non-tunable and give it an overridable
+# default here.
+#
+PVRSRV_MODNAME ?= pvrsrvkm
+
+# The user didn't set CROSS_COMPILE. There's probably nothing wrong
+# with that, but we'll let them know anyway.
+#
+ifeq ($(CROSS_COMPILE),)
+$(warning CROSS_COMPILE is not set. Target components will be built with the host compiler)
+endif
+
+# The user is trying to set one of the old SUPPORT_ options on the
+# command line or in the environment. This isn't supported any more
+# and will often break the build. The user is generally only trying
+# to remove a component from the list of targets to build, so we'll
+# point them at the new way of doing this.
+define sanity-check-support-option-origin
+ifeq ($$(filter undefined file,$$(origin $(1))),)
+$$(warning *** Setting $(1) via $$(origin $(1)) is deprecated)
+$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl")
+endif
+endef
+$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENVG SUPPORT_OPENCL SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o))))
+
+# Check for words in EXCLUDED_APIS that aren't understood by the
+# common/apis/*.mk files. This should be kept in sync with all the tests on
+# EXCLUDED_APIS in those files
+_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts
+_unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS)))
+ifneq ($(_unrecognised),)
+$(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised))
+$(warning *** EXCLUDED_APIS was set via: $(origin EXCLUDED_APIS))
+$(error Excludable APIs are: $(_excludable_apis))
+endif
+
+# Build's selected list of components
+#
+-include components.mk
+
+# PDUMP needs extra components
+#
+ifeq ($(PDUMP),1)
+ifneq ($(COMPONENTS),)
+COMPONENTS += pdump
+endif
+ifeq ($(SUPPORT_DRI_DRM),1)
+EXTRA_PVRSRVKM_COMPONENTS += dbgdrv
+else
+KERNEL_COMPONENTS += dbgdrv
+endif
+endif
+
+ifeq ($(SUPPORT_PVR_REMOTE),1)
+ifneq ($(filter pvr2d,$(COMPONENTS)),)
+COMPONENTS += null_pvr2d_remote
+endif
+COMPONENTS += pvrvncsrv
+endif
+
+# If KERNELDIR is set, write it out to the config.mk, with
+# KERNEL_COMPONENTS and KERNEL_ID
+#
+ifneq ($(strip $(KERNELDIR)),)
+include ../kernel_version.mk
+PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/
+$(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR)))
+# Needed only by install script
+$(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS)))
+$(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,))
+$(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,))
+
+# If KERNEL_CROSS_COMPILE is set to "undef", this is magically
+# equivalent to being unset. If it is unset, we use CROSS_COMPILE
+# (which might also be unset). If it is set, use it directly.
+ifneq ($(KERNEL_CROSS_COMPILE),undef)
+KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE)
+$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,))
+endif
+
+# Check the KERNELDIR has a kernel built and also check that it is
+# not 64-bit, which we do not support.
+VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux))
+ifneq ($(VMLINUX),)
+VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false)
+ifneq ($(VMLINUX_IS_64BIT),false)
+$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.)
+endif
+else
+$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.)
+endif
+endif
+
+
+# Ideally configured by platform Makefiles, as necessary
+#
+
+# Invariant options for Linux
+#
+$(eval $(call BothConfigC,LINUX,))
+
+$(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\""))
+$(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\""))
+$(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\""))
+
+$(eval $(call TunableBothConfigC,SGXCORE,))
+$(eval $(call BothConfigC,SGX$(SGXCORE),))
+$(eval $(call BothConfigC,SUPPORT_SGX$(SGXCORE),))
+
+$(eval $(call TunableBothConfigC,SUPPORT_SGX,1))
+$(eval $(call TunableBothConfigC,SGX_CORE_REV,))
+$(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,))
+
+$(eval $(call BothConfigC,TRANSFER_QUEUE,))
+$(eval $(call BothConfigC,PVR_SECURE_HANDLES,))
+
+ifneq ($(DISPLAY_CONTROLLER),)
+$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER)))
+endif
+
+PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0
+ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
+PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
+include ../kernel_version.mk
+ifeq ($(call kernel-version-at-least,3,0),true)
+PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1
+endif
+endif
+$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,))
+
+
+$(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM)))
+
+
+# Build-type dependent options
+#
+$(eval $(call BothConfigMake,BUILD,$(BUILD)))
+
+ifeq ($(BUILD),debug)
+$(eval $(call BothConfigC,DEBUG,))
+$(eval $(call KernelConfigC,DEBUG_LINUX_MEMORY_ALLOCATIONS,))
+$(eval $(call KernelConfigC,DEBUG_LINUX_MEM_AREAS,))
+$(eval $(call KernelConfigC,DEBUG_LINUX_MMAP_AREAS,))
+$(eval $(call KernelConfigC,DEBUG_BRIDGE_KM,))
+else ifeq ($(BUILD),release)
+$(eval $(call BothConfigC,RELEASE,))
+$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
+else ifeq ($(BUILD),timing)
+$(eval $(call BothConfigC,TIMING,))
+$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
+else
+$(error BUILD= must be either debug, release or timing)
+endif
+
+# User-configurable options
+#
+$(eval $(call TunableBothConfigC,SUPPORT_PERCONTEXT_PB,1))
+$(eval $(call TunableBothConfigC,SUPPORT_SHARED_PB,))
+$(eval $(call TunableBothConfigC,SUPPORT_HYBRID_PB,))
+$(eval $(call TunableBothConfigC,SUPPORT_HW_RECOVERY,1))
+$(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1))
+$(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1))
+$(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1))
+$(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,))
+$(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1))
+$(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,))
+$(eval $(call TunableBothConfigC,SUPPORT_DBGDRV_EVENT_OBJECTS,1))
+$(eval $(call TunableBothConfigC,SGX_FEATURE_SYSTEM_CACHE,))
+$(eval $(call TunableBothConfigC,SGX_BYPASS_SYSTEM_CACHE,))
+$(eval $(call TunableBothConfigC,SGX_BYPASS_DCU,))
+$(eval $(call TunableBothConfigC,SGX_FAST_DPM_INIT,))
+$(eval $(call TunableBothConfigC,SGX_FEATURE_MP,))
+$(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,))
+$(eval $(call TunableBothConfigC,FPGA,))
+$(eval $(call TunableBothConfigC,PDUMP,))
+$(eval $(call TunableBothConfigC,NO_HARDWARE,))
+$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,))
+$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,))
+$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,))
+$(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,))
+$(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1))
+$(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,))
+$(eval $(call TunableBothConfigC,PVRSRV_NEW_PVR_DPF,))
+$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_DPF,))
+$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_ASSERT,))
+$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,))
+$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,))
+$(eval $(call TunableBothConfigC,SUPPORT_ION,))
+$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,))
+$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1))
+$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,))
+
+$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1))
+$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1))
+$(eval $(call TunableKernelConfigC,SGX_DYNAMIC_TIMING_INFO,))
+$(eval $(call TunableKernelConfigC,SYS_SGX_ACTIVE_POWER_LATENCY_MS,))
+$(eval $(call TunableKernelConfigC,SYS_CUSTOM_POWERLOCK_WRAP,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_USING_WORKQUEUES,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_WORKQUEUE,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,))
+$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,))
+$(eval $(call TunableKernelConfigC,LDM_PLATFORM,))
+$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,))
+$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,))
+$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\""))
+$(eval $(call TunableKernelConfigC,LDM_PCI,))
+$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_MK_TRACE,))
+$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_KERNEL_CCB,))
+$(eval $(call TunableKernelConfigC,PVRSRV_REFCOUNT_DEBUG,))
+$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,))
+$(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,))
+$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,))
+$(eval $(call TunableKernelConfigC,TTRACE,))
+
+ifeq ($(BUILD),debug)
+$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,1))
+else
+$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,))
+endif
+
+$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS_HEAP_ALLOC_DEBUG,))
+
+$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
+
+
+$(eval $(call TunableBothConfigMake,OPTIM,))
+
+
+$(eval $(call TunableKernelConfigMake,TTRACE,))
+
+endif # INTERNAL_CLOBBER_ONLY
+
+export INTERNAL_CLOBBER_ONLY
+export TOP
+export OUT
+
+MAKE_ETC := -Rr --no-print-directory -C $(TOP) TOP=$(TOP) OUT=$(OUT) \
+ -f eurasiacon/build/linux2/toplevel.mk
+
+# This must match the default value of MAKECMDGOALS below, and the default
+# goal in toplevel.mk
+.DEFAULT_GOAL := build
+
+ifeq ($(MAKECMDGOALS),)
+MAKECMDGOALS := build
+else
+# We can't pass autogen to toplevel.mk
+MAKECMDGOALS := $(filter-out autogen,$(MAKECMDGOALS))
+endif
+
+.PHONY: autogen
+autogen:
+ifeq ($(INTERNAL_CLOBBER_ONLY),)
+ @$(MAKE) -s --no-print-directory -C $(EURASIAROOT) \
+ -f eurasiacon/build/linux2/prepare_tree.mk \
+ LDM_PCI=$(LDM_PCI) LDM_PLATFORM=$(LDM_PLATFORM)
+else
+ @:
+endif
+
+# This deletes built-in suffix rules. Otherwise the submake isn't run when
+# saying e.g. "make thingy.a"
+.SUFFIXES:
+
+# Because we have a match-anything rule below, we'll run the main build when
+# we're actually trying to remake various makefiles after they're read in.
+# These rules try to prevent that
+%.mk: ;
+Makefile%: ;
+Makefile: ;
+
+.PHONY: build kbuild install
+build kbuild install: autogen
+ @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
+
+%: autogen
+ @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
diff --git a/pvr-source/eurasiacon/build/linux2/defs.mk b/pvr-source/eurasiacon/build/linux2/defs.mk
new file mode 100644
index 0000000..621e03e
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/defs.mk
@@ -0,0 +1,140 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+define must-be-defined
+$(if $(filter undefined,$(origin $(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must be defined),)
+endef
+
+define must-be-nonempty
+$(if $(strip $($(1))),,$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain a value))
+endef
+
+define directory-must-exist
+$(if $(wildcard $(abspath $(1)/)),,$(error Directory $(1) must exist))
+endef
+
+define one-word-only
+$(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),)
+endef
+
+define target-intermediates-of
+$(addprefix $(TARGET_OUT)/intermediates/$(1)/,$(2))
+endef
+
+define host-intermediates-of
+$(addprefix $(HOST_OUT)/intermediates/$(1)/,$(2))
+endef
+
+define module-library
+$(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so))
+endef
+
+# This is done to allow module type makefiles to use $(THIS_MAKEFILE)
+define register-module
+INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE)
+endef
+
+define process-module
+THIS_MODULE := $(1)
+THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1))
+include $$(MAKE_TOP)/this_makefile.mk
+$$(call must-be-nonempty,THIS_MAKEFILE)
+$$(call must-be-nonempty,$(1)_type)
+MODULE_HOST_BUILD := $$(if $(filter host_%,$($(1)_type)),true,)
+include $$(MAKE_TOP)/moduledefs.mk
+include $$(MAKE_TOP)/$$(patsubst host_%,%,$($(1)_type)).mk
+INTERNAL_TARGETS_FOR_$(THIS_MODULE) := $(MODULE_TARGETS)
+endef
+
+# This can be used by module_type.mk files to indicate that they can't be
+# built as host_module_type
+define target-build-only
+$(if $(filter true,$(MODULE_HOST_BUILD)),$(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) attempted to build a host $(1), which is not supported))
+endef
+
+define relative-to-top
+$(patsubst $(TOP)/%,%,$(1))
+endef
+
+define cc-check
+$(shell \
+ CC_CHECK=$(patsubst @%,%,$(CC_CHECK)) && \
+ $(patsubst @%,%,$(CHMOD)) +x $$CC_CHECK && \
+ $$CC_CHECK --cc "$(1)" --out "$(2)" $(3))
+endef
+
+define cc-is-64bit
+$(call cc-check,$(1),$(OUT),--64)
+endef
+
+define cc-option
+$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1))
+endef
+
+define cxx-option
+$(call cc-check,$(patsubst @%,%,$(CXX)),$(OUT),$(1))
+endef
+
+define host-cc-option
+$(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1))
+endef
+
+define kernel-cc-option
+$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1))
+endef
+
+# Turn a particular warning on, or explicitly turn it off, depending on
+# the value of W. The "-W" or "-Wno-" part of the warning need not be
+# specified.
+define cc-optional-warning
+$(call cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
+endef
+
+define host-cc-optional-warning
+$(call host-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
+endef
+
+define kernel-cc-optional-warning
+$(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
+endef
+
+define module-info-line
+$(if $(filter modules,$(D)),$(info $(1)),)
+endef
diff --git a/pvr-source/eurasiacon/build/linux2/kbuild/Makefile.template b/pvr-source/eurasiacon/build/linux2/kbuild/Makefile.template
new file mode 100644
index 0000000..9d88941
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/kbuild/Makefile.template
@@ -0,0 +1,92 @@
+########################################################################### ###
+#@Title Root kernel makefile
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# This top-level kbuild makefile builds all the Linux kernel modules in the
+# DDK. To run kbuild, this makefile is copied to $(TARGET_OUT)/kbuild/Makefile
+# and make is invoked in $(TARGET_OUT)/kbuild.
+
+# This makefile doesn't define any kbuild special variables apart from
+# ccflags-y and obj-m. The variables for objects are picked up by including
+# the kbuild makefile fragments named in $(INTERNAL_KBUILD_MAKEFILES). The
+# list of objects that these fragments make is collected in
+# $(INTERNAL_KBUILD_OBJECTS) and $(INTERNAL_EXTRA_KBUILD_OBJECTS). These
+# variables are set according to the build's $(KERNEL_COMPONENTS) and
+# $(EXTRA_PVRSRVKM_COMPONENTS). To add a new kernel module to the build, edit
+# these variables in the per-build Makefile.
+
+include $(OUT)/config_kernel.mk
+
+.SECONDARY:
+
+$(OUT)/target/kbuild/external/%.c: $(EXTRA_KBUILD_SOURCE)/%.c
+ @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
+ @if [ ! -h $@ ]; then ln -sf $< $@; fi
+
+$(OUT)/target/kbuild/%.c: $(TOP)/%.c
+ @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
+ @if [ ! -h $@ ]; then ln -sf $< $@; fi
+
+ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \
+ -DDEBUG_LOG_PATH_TRUNCATE="\"$(OUT)/target/kbuild\"" \
+ -I$(OUT)/include \
+ -I$(TOP)/include4 \
+ -I$(TOP)/services4/include \
+ -I$(TOP)/services4/system/$(PVR_SYSTEM) \
+ -I$(TOP)/services4/system/include \
+ -I$(TOP)/services4/srvkm/bridged \
+ -I$(TOP)/services4/srvkm/bridged/sgx \
+ -I$(TOP)/services4/srvkm/common \
+ -I$(TOP)/services4/srvkm/devices/sgx \
+ -I$(TOP)/services4/srvkm/env/linux \
+ -I$(TOP)/services4/srvkm/include
+
+ifeq ($(PVR_LOCAL_HWDEFS),)
+ccflags-y += -I$(TOP)/services4/srvkm/hwdefs
+else
+ccflags-y += -I$(TOP)/hwdefs
+endif
+
+include $(INTERNAL_KBUILD_MAKEFILES)
+
+$(if $(pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y),,$(error pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y was empty, which could mean that srvkm is missing from $$(KERNEL_COMPONENTS)))
+pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y))
+
+obj-m += $(INTERNAL_KBUILD_OBJECTS)
diff --git a/pvr-source/eurasiacon/build/linux2/kbuild/external_tarball.mk b/pvr-source/eurasiacon/build/linux2/kbuild/external_tarball.mk
new file mode 100644
index 0000000..d3aa147
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/kbuild/external_tarball.mk
@@ -0,0 +1,49 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+ifneq ($(EXTERNAL_3PDD_TARBALL),)
+TAR_OPT_STRIP_COMPONENTS ?= --strip-components
+prepare_tree: $(OUT)/target/kbuild/external
+$(OUT)/target/kbuild/external: eurasiacon/external/$(EXTERNAL_3PDD_TARBALL)
+ @echo "Extracting $<.."
+ @mkdir -p $@
+ @tar $(TAR_OPT_STRIP_COMPONENTS) 1 --touch -jxf $< -C $@
+ @touch $(OUT)/target/kbuild/external
+endif
diff --git a/pvr-source/eurasiacon/build/linux2/kbuild/kbuild.mk b/pvr-source/eurasiacon/build/linux2/kbuild/kbuild.mk
new file mode 100644
index 0000000..94e2100
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/kbuild/kbuild.mk
@@ -0,0 +1,91 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+$(if $(strip $(KERNELDIR)),,$(error KERNELDIR must be set))
+$(call directory-must-exist,$(KERNELDIR))
+
+$(TARGET_OUT)/kbuild/Makefile: $(MAKE_TOP)/kbuild/Makefile.template
+ @[ ! -e $(dir $@) ] && mkdir -p $(dir $@) || true
+ $(CP) -f $< $@
+
+# We need to make INTERNAL_KBUILD_MAKEFILES absolute because the files will be
+# read while chdir'd into $(KERNELDIR)
+INTERNAL_KBUILD_MAKEFILES := $(abspath $(foreach _m,$(KERNEL_COMPONENTS) $(EXTRA_PVRSRVKM_COMPONENTS),$(if $(INTERNAL_KBUILD_MAKEFILE_FOR_$(_m)),$(INTERNAL_KBUILD_MAKEFILE_FOR_$(_m)),$(error Unknown kbuild module "$(_m)"))))
+INTERNAL_KBUILD_OBJECTS := $(foreach _m,$(KERNEL_COMPONENTS),$(if $(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(error BUG: Unknown kbuild module "$(_m)" should have been caught earlier)))
+INTERNAL_EXTRA_KBUILD_OBJECTS := $(foreach _m,$(EXTRA_PVRSRVKM_COMPONENTS),$(if $(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(error BUG: Unknown kbuild module "$(_m)" should have been caught earlier)))
+.PHONY: kbuild kbuild_clean
+
+kbuild: $(TARGET_OUT)/kbuild/Makefile
+ @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
+ INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
+ INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
+ INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
+ EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
+ CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
+ EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
+ V=$(V) W=$(W) \
+ TOP=$(TOP)
+ @for kernel_module in $(addprefix $(TARGET_OUT)/kbuild/,$(INTERNAL_KBUILD_OBJECTS:.o=.ko)); do \
+ cp $$kernel_module $(TARGET_OUT); \
+ done
+
+kbuild_clean: $(TARGET_OUT)/kbuild/Makefile
+ @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
+ INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
+ INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
+ INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
+ EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
+ CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
+ EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
+ V=$(V) W=$(W) \
+ TOP=$(TOP) clean
+
+kbuild_install: $(TARGET_OUT)/kbuild/Makefile
+ @: $(if $(strip $(DISCIMAGE)),,$(error $$(DISCIMAGE) was empty or unset while trying to use it to set INSTALL_MOD_PATH for modules_install))
+ @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
+ INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
+ INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
+ INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
+ EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
+ CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
+ EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
+ INSTALL_MOD_PATH="$(DISCIMAGE)" \
+ V=$(V) W=$(W) \
+ TOP=$(TOP) modules_install
diff --git a/pvr-source/eurasiacon/build/linux2/kernel_module.mk b/pvr-source/eurasiacon/build/linux2/kernel_module.mk
new file mode 100644
index 0000000..a0a1289
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/kernel_module.mk
@@ -0,0 +1,75 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Rules for making kernel modules with kbuild. This makefile doesn't define
+# any rules that build the modules, it only copies the kbuild Makefile into
+# the right place and then invokes kbuild to do the actual build
+
+$(call target-build-only,kernel module)
+
+MODULE_KBUILD_DIR := $(MODULE_OUT)/kbuild
+
+# $(THIS_MODULE)_makefile names the kbuild makefile fragment used to build
+# this module's objects
+$(call must-be-nonempty,$(THIS_MODULE)_makefile)
+MODULE_KBUILD_MAKEFILE := $($(THIS_MODULE)_makefile)
+$(if $(wildcard $(abspath $(MODULE_KBUILD_MAKEFILE))),,$(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) requires kbuild makefile $(MODULE_KBUILD_MAKEFILE), which is missing))
+
+# $(THIS_MODULE)_target specifies the name of the kernel module
+$(call must-be-nonempty,$(THIS_MODULE)_target)
+MODULE_KBUILD_OBJECTS := $($(THIS_MODULE)_target:.ko=.o)
+
+# Here we could maybe include $(MODULE_KBUILD_MAKEFILE) and look at
+# $(MODULE_KBUILD_OBJECTS)-y to see which source files might be built
+
+.PHONY: $(THIS_MODULE)
+$(THIS_MODULE): MODULE_KBUILD_MAKEFILE := $(MODULE_KBUILD_MAKEFILE)
+$(THIS_MODULE): MODULE_KBUILD_OBJECTS := $(MODULE_KBUILD_OBJECTS)
+$(THIS_MODULE):
+ @echo "kbuild module '$@'"
+ @echo " MODULE_KBUILD_MAKEFILE := $(MODULE_KBUILD_MAKEFILE)"
+ @echo " MODULE_KBUILD_OBJECTS := $(MODULE_KBUILD_OBJECTS)"
+ @echo ' Being built:' $(if $(filter $@,$(KERNEL_COMPONENTS)),"yes (separate module)",$(if $(filter $@,$(EXTRA_PVRSRVKM_COMPONENTS)),"yes (into pvrsrvkm)","no"))
+ @echo "Module $@ is a kbuild module. Run 'make kbuild' to make it"
+ @false
+
+ALL_KBUILD_MODULES += $(THIS_MODULE)
+INTERNAL_KBUILD_MAKEFILE_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_MAKEFILE)
+INTERNAL_KBUILD_OBJECTS_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_OBJECTS)
diff --git a/pvr-source/eurasiacon/build/linux2/kernel_version.mk b/pvr-source/eurasiacon/build/linux2/kernel_version.mk
new file mode 100644
index 0000000..35ecceb
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/kernel_version.mk
@@ -0,0 +1,100 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+$(if $(KERNELDIR),,$(error KERNELDIR must be set to obtain a version))
+
+override KERNEL_VERSION := \
+ $(shell grep "^VERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
+override KERNEL_PATCHLEVEL := \
+ $(shell grep "^PATCHLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
+override KERNEL_SUBLEVEL := \
+ $(shell grep "^SUBLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
+override KERNEL_EXTRAVERSION := \
+ $(shell grep "^EXTRAVERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
+
+# Break the kernel version up into a space separated list
+kernel_version_as_list := $(KERNEL_VERSION) \
+ $(KERNEL_PATCHLEVEL) \
+ $(KERNEL_SUBLEVEL) \
+ $(patsubst .%,%,$(KERNEL_EXTRAVERSION))
+
+# The base ID doesn't have to be accurate; we only use it for
+# feature checks which will not care about extraversion bits
+#
+override KERNEL_BASE_ID := \
+ $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)
+
+# Try to get the kernel ID from the kernel.release file.
+#
+KERNEL_ID ?= \
+ $(shell cat $(KERNELDIR)/include/config/kernel.release 2>/dev/null)
+
+# If the kernel ID isn't set yet, try to set it from the UTS_RELEASE
+# macro.
+#
+ifeq ($(strip $(KERNEL_ID)),)
+KERNEL_ID := \
+ $(shell grep -h '\#define UTS_RELEASE' \
+ $(KERNELDIR)/include/linux/* | cut -f3 -d' ' | sed s/\"//g)
+endif
+
+ifeq ($(strip $(KERNEL_ID)),)
+KERNEL_ID := \
+ $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION)
+endif
+
+# Return 1 if the kernel version is at least the value passed to the
+# function, else return nothing.
+# Examples
+# $(call kernel-version-at-least,2,6,35)
+# $(call kernel-version-at-least,2,6,35,7)
+#
+define kernel-version-at-least
+$(shell set -- $(kernel_version_as_list) 0 0 0 0; \
+ Y=true; \
+ for D in $1 $2 $3 $4; \
+ do \
+ [ $$1 ] || break; \
+ [ $$1 -eq $$D ] && { shift; continue; };\
+ [ $$1 -lt $$D ] && Y=; \
+ break; \
+ done; \
+ echo $$Y)
+endef
diff --git a/pvr-source/eurasiacon/build/linux2/moduledefs.mk b/pvr-source/eurasiacon/build/linux2/moduledefs.mk
new file mode 100644
index 0000000..869026f
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/moduledefs.mk
@@ -0,0 +1,96 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+MODULE_TARGETS :=
+MODULE_CFLAGS := $(ALL_CFLAGS) $($(THIS_MODULE)_cflags)
+MODULE_CXXFLAGS := $(ALL_CXXFLAGS) $($(THIS_MODULE)_cxxflags)
+MODULE_HOST_CFLAGS := $(ALL_HOST_CFLAGS) $($(THIS_MODULE)_cflags)
+MODULE_HOST_CXXFLAGS := $(ALL_HOST_CXXFLAGS) $($(THIS_MODULE)_cxxflags)
+MODULE_LDFLAGS := $(ALL_LDFLAGS) $($(THIS_MODULE)_ldflags)
+MODULE_HOST_LDFLAGS := $(ALL_HOST_LDFLAGS) $($(THIS_MODULE)_ldflags)
+MODULE_BISON_FLAGS := $(ALL_BISON_FLAGS) $($(THIS_MODULE)_bisonflags)
+MODULE_FLEX_FLAGS := $(ALL_FLEX_FLAGS) $($(THIS_MODULE)_flexflags)
+
+# -L flags for library search dirs
+MODULE_LIBRARY_DIR_FLAGS := $(foreach _path,$($(THIS_MODULE)_libpaths),$(if $(filter /%,$(_path)),-L$(call relative-to-top,$(_path)),-L$(_path)))
+# -I flags for header search dirs
+MODULE_INCLUDE_FLAGS := $(foreach _path,$($(THIS_MODULE)_includes),$(if $(filter /%,$(_path)),-I$(call relative-to-top,$(_path)),-I$(_path)))
+
+# Variables used to differentiate between host/target builds
+MODULE_OUT := $(if $(MODULE_HOST_BUILD),$(HOST_OUT),$(TARGET_OUT))
+MODULE_INTERMEDIATES_DIR := $(if $(MODULE_HOST_BUILD),$(HOST_INTERMEDIATES)/$(THIS_MODULE),$(TARGET_INTERMEDIATES)/$(THIS_MODULE))
+
+.SECONDARY: $(MODULE_INTERMEDIATES_DIR)
+$(MODULE_INTERMEDIATES_DIR):
+ $(make-directory)
+
+Host_or_target := $(if $(MODULE_HOST_BUILD),Host,Target)
+
+# These define the rules for finding source files.
+# - If a name begins with a slash, we strip $(TOP) off the front if it begins
+# with $(TOP). This is so that we don't get really long error messages from
+# the compiler if the source tree is in a deeply nested directory, but we
+# still do get absolute paths if you say "make OUT=/tmp/somewhere"
+# - Otherwise, if a name contains a slash and begins with $(OUT), we leave it
+# as it is. This is so you can say "module_src :=
+# $(TARGET_INTERMEDIATES)/something/generated.c"
+# - Otherwise, we assume it's a path referring to somewhere under the
+# directory containing Linux.mk, and add $(THIS_DIR) to it
+_SOURCES_WITHOUT_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),,$(_s))))
+_SOURCES_WITH_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),$(_s),)))
+MODULE_SOURCES := $(addprefix $(THIS_DIR)/,$(_SOURCES_WITHOUT_SLASH))
+MODULE_SOURCES += $(call relative-to-top,$(filter /%,$(_SOURCES_WITH_SLASH)))
+_RELATIVE_SOURCES_WITH_SLASH := $(filter-out /%,$(_SOURCES_WITH_SLASH))
+_OUTDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
+_THISDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter-out $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
+MODULE_SOURCES += $(_OUTDIR_RELATIVE_SOURCES_WITH_SLASH)
+MODULE_SOURCES += $(addprefix $(THIS_DIR)/,$(_THISDIR_RELATIVE_SOURCES_WITH_SLASH))
+MODULE_SOURCES += $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_gensrc))
+MODULE_GENERATED_HEADERS := $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_genheaders))
+
+# -l flags for each library
+MODULE_LIBRARY_FLAGS := $(addprefix -l, $($(THIS_MODULE)_staticlibs)) $(addprefix -l,$($(THIS_MODULE)_libs)) $(foreach _lib,$($(THIS_MODULE)_extlibs),$(if $(filter undefined,$(origin lib$(_lib)_ldflags)),-l$(_lib),$(lib$(_lib)_ldflags)))
+
+# pkg-config integration; primarily used by X.org
+# FIXME: We don't support arbitrary CFLAGS yet (just includes)
+$(foreach _package,$($(THIS_MODULE)_packages),\
+ $(eval MODULE_INCLUDE_FLAGS += `pkg-config --cflags-only-I $(_package)`)\
+ $(eval MODULE_LIBRARY_FLAGS += `pkg-config --libs-only-l $(_package)`)\
+ $(eval MODULE_LIBRARY_DIR_FLAGS += `pkg-config --libs-only-L $(_package)`))
diff --git a/pvr-source/eurasiacon/build/linux2/modules.mk b/pvr-source/eurasiacon/build/linux2/modules.mk
new file mode 100644
index 0000000..1576590
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/modules.mk
@@ -0,0 +1,49 @@
+########################################################################### ###
+#@Title Module processing
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Bits for processing $(modules) after reading in each Linux.mk
+
+#$(info ---- $(modules) ----)
+$(call must-be-nonempty,modules)
+
+$(foreach _m,$(modules),$(if $(filter $(_m),$(ALL_MODULES)),$(error In makefile $(THIS_MAKEFILE): Duplicate module $(_m) (first seen in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))) listed in $$(modules)),$(eval $(call register-module,$(_m)))))
+
+ALL_MODULES += $(modules)
diff --git a/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile b/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile
new file mode 100644
index 0000000..b034ea0
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/omap4430_android/Makefile
@@ -0,0 +1,185 @@
+########################################################################### ###
+#@Title Root makefile for omap4430 Android. Builds everything else.
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+ifeq ($(TARGET_SGX),544sc)
+ SGXCORE := 544
+ SGX_CORE_REV := 112
+else ifeq ($(TARGET_SGX),540)
+ SGXCORE := 540
+ SGX_CORE_REV := 120
+else ifeq ($(TARGET_SGX),544)
+ SGXCORE := 544
+ SGX_CORE_REV := 105
+ HAL_VARIANT := omap5
+ SGX_FEATURE_MP := 1
+ SGX_FEATURE_SYSTEM_CACHE := 1
+ SGX_FEATURE_MP_CORE_COUNT := 2
+else
+ #default config
+ SGXCORE := 540
+ SGX_CORE_REV := 120
+endif
+export SGXCORE
+export SGX_CORE_REV
+
+SGX_DYNAMIC_TIMING_INFO := 1
+
+SUPPORT_LINUX_USING_WORKQUEUES := 1
+
+DISPLAY_CONTROLLER := omaplfb
+
+PVR_SYSTEM := omap4
+HAL_VARIANT := $(PVR_SYSTEM)
+
+# We have more memory on OMAP platforms, so we can spare to make the
+# pool larger, and have higher resolutions which benefit from it.
+#
+PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 10800
+
+include ../common/android/paths.mk
+include ../common/android/armv7-a.mk
+include ../common/android/features.mk
+
+ifneq ($(strip $(KERNELDIR)),)
+ include ../kernel_version.mk
+ ifeq ($(call kernel-version-at-least,2,6,35),true)
+ PVR_NO_OMAP_TIMER := 1
+ endif
+ ifeq ($(call kernel-version-at-least,2,6,39),true)
+ ifeq ($(LDM_PLATFORM),1)
+ PVR_LDM_PLATFORM_PRE_REGISTERED := 1
+ PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\""
+ endif
+ endif
+ ifeq ($(is_at_least_icecream_sandwich),1)
+ ifeq ($(call kernel-version-at-least,3,0),true)
+ SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
+ PVR_ANDROID_NEEDS_ACCUM_SYNC_WORKAROUND := 1
+ SYS_OMAP4_HAS_DVFS_FRAMEWORK := 1
+ endif
+ endif
+else
+ ifeq ($(is_at_least_icecream_sandwich),1)
+ $(warning "KERNELDIR is not set, so can't feature check DVFS or dsscomp.")
+ $(warning "Assuming we want DVFS and dsscomp support.")
+ SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
+ PVR_ANDROID_NEEDS_ACCUM_SYNC_WORKAROUND := 1
+ SYS_OMAP4_HAS_DVFS_FRAMEWORK := 1
+ endif
+endif
+
+ifneq ($(LDM_PLATFORM),1)
+SUPPORT_LINUX_USING_WORKQUEUES := 0
+SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1
+SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
+DISPLAY_CONTROLLER := pvrlfb
+DISPLAY_CONTROLLER_COMPONENT := linux_framebuffer
+OMAP_NON_FLIP_DISPLAY := 1
+
+# The code for the omaplfb component is now hosted on a
+# different repository. No need to compile this now
+#
+# DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
+
+endif
+
+ifeq ($(SUPPORT_DRI_DRM),1)
+ifeq ($(PVR_LDM_PLATFORM_PRE_REGISTERED),1)
+PVR_DRI_DRM_PLATFORM_DEV := 1
+PVR_DRI_DRM_STATIC_BUS_ID := 1
+PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\"
+else
+PVR_DRI_DRM_NOT_PCI := 1
+KERNEL_COMPONENTS += linux_drm
+endif
+EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
+EXTRA_KBUILD_SOURCE := $(KERNELDIR)
+# FIXME: Only required for comparison with X's KM
+PVR_SECURE_DRM_AUTH_EXPORT := 1
+ifneq ($(OMAP_NON_FLIP_DISPLAY),1)
+PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1
+endif
+else
+KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
+endif
+
+SUPPORT_ANDROID_OMAP_NV12 := 1
+
+ifeq ($(is_at_least_icecream_sandwich),1)
+ifeq ($(SUPPORT_ANDROID_COMPOSER_HAL),1)
+PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1
+endif
+endif
+
+PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
+
+# FIXME: Remove this once vsync issues are resolved
+PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
+
+ifeq ($(is_at_least_icecream_sandwich),1)
+-include products.mk
+endif
+
+ifeq ($(NO_HARDWARE),1)
+ifeq ($(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED),1)
+$(info WARNING: SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=1 is incompatible with NO_HARDWARE=1)
+$(info WARNING: Setting SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=0 and switching to dc_nohw)
+override SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 0
+override DISPLAY_CONTROLLER := dcnohw
+KERNEL_COMPONENTS += dc_nohw
+endif
+endif
+
+include ../config/core.mk
+include ../common/android/extra_config.mk
+include ../common/dridrm.mk
+include ../common/opencl.mk
+include ../common/omap4.mk
+
+# Not all OMAP4 kernels have a compatible DVFS framework
+#
+$(eval $(call TunableKernelConfigC,SYS_OMAP4_HAS_DVFS_FRAMEWORK,))
+
+# If set, services allows two flips to enter the processing queue,
+# and does not add read dependencies to the set of buffers last
+# flipped to. This is necessary for DSS composition on OMAP4.
+#
+$(eval $(call TunableKernelConfigC,SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED,))
diff --git a/pvr-source/eurasiacon/build/linux2/omap4430_android/products.mk b/pvr-source/eurasiacon/build/linux2/omap4430_android/products.mk
new file mode 100644
index 0000000..53073a9
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/omap4430_android/products.mk
@@ -0,0 +1,46 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1
+SGX_DISABLE_VISTEST_SUPPORT ?= 1
+PVRSRV_DUMP_MK_TRACE ?= 1
+PVRSRV_NEED_PVR_DPF ?= 1
+PVRSRV_NEED_PVR_TRACE ?= 1
+PVRSRV_NEED_PVR_ASSERT ?= 1
diff --git a/pvr-source/eurasiacon/build/linux2/prepare_tree.mk b/pvr-source/eurasiacon/build/linux2/prepare_tree.mk
new file mode 100644
index 0000000..05e4fe3
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/prepare_tree.mk
@@ -0,0 +1,60 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+.PHONY: prepare_tree
+
+-include eurasiacon/build/linux2/kbuild/external_tarball.mk
+
+# If there's no external tarball, there's nothing to do
+#
+prepare_tree:
+
+INTERNAL_INCLUDED_PREPARE_HEADERS :=
+-include eurasiacon/build/linux2/prepare_headers.mk
+ifneq ($(INTERNAL_INCLUDED_PREPARE_HEADERS),true)
+missing_headers := $(strip $(shell test ! -e include4/pvrversion.h && echo true))
+ifdef missing_headers
+$(info )
+$(info ** include4/pvrversion.h is missing, and cannot be rebuilt.)
+$(info ** Cannot continue.)
+$(info )
+$(error Missing headers)
+endif
+endif
diff --git a/pvr-source/eurasiacon/build/linux2/this_makefile.mk b/pvr-source/eurasiacon/build/linux2/this_makefile.mk
new file mode 100644
index 0000000..c312001
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/this_makefile.mk
@@ -0,0 +1,68 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Find out the path of the Linux.mk makefile currently being processed, and
+# set paths used by the build rules
+
+# This magic is used so we can use this_makefile.mk twice: first when reading
+# in each Linux.mk, and then again when generating rules. There we set
+# $(THIS_MAKEFILE), and $(REMAINING_MAKEFILES) should be empty
+ifneq ($(strip $(REMAINING_MAKEFILES)),)
+
+# Absolute path to the Linux.mk being processed
+THIS_MAKEFILE := $(firstword $(REMAINING_MAKEFILES))
+
+# The list of makefiles left to process
+REMAINING_MAKEFILES := $(wordlist 2,$(words $(REMAINING_MAKEFILES)),$(REMAINING_MAKEFILES))
+
+else
+
+# When generating rules, we should have read in every Linux.mk
+$(if $(INTERNAL_INCLUDED_ALL_MAKEFILES),,$(error No makefiles left in $$(REMAINING_MAKEFILES), but $$(INTERNAL_INCLUDED_ALL_MAKEFILES) is not set))
+
+endif
+
+# Path to the directory containing Linux.mk
+THIS_DIR := $(patsubst %/,%,$(dir $(THIS_MAKEFILE)))
+ifeq ($(strip $(THIS_DIR)),)
+$(error Empty $$(THIS_DIR) for makefile "$(THIS_MAKEFILE)")
+endif
+
+modules :=
diff --git a/pvr-source/eurasiacon/build/linux2/tools/cc-check.sh b/pvr-source/eurasiacon/build/linux2/tools/cc-check.sh
new file mode 100755
index 0000000..6cef8fa
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/tools/cc-check.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+########################################################################### ###
+#@Title Test the nature of the C compiler.
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+LANG=C
+export LANG
+
+usage() {
+ echo "usage: $0 [--64] --cc CC --out OUT [cflag]"
+ exit 1
+}
+
+# NOTE: The program passed to the compiler is deliberately incorrect
+# (`return;' should be `return 0;') but we do this to emit a warning.
+#
+# Emitting a warning is necessary to get GCC to print out additional
+# warnings about any unsupported -Wno options, so we can handle these
+# as unsupported by the build.
+#
+do_cc() {
+ echo "int main(void){return;}" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1
+}
+
+while [ 1 ]; do
+ if [ "$1" = "--64" ]; then
+ BIT_CHECK=1
+ elif [ "$1" = "--cc" ]; then
+ [ "x$2" = "x" ] && usage
+ CC="$2" && shift
+ elif [ "$1" = "--out" ]; then
+ [ "x$2" = "x" ] && usage
+ OUT="$2" && shift
+ elif [ "${1#--}" != "$1" ]; then
+ usage
+ else
+ break
+ fi
+ shift
+done
+
+[ "x$CC" = "x" ] && usage
+[ "x$OUT" = "x" ] && usage
+ccof=$OUT/cc-sanity-check
+log=${ccof}.log
+
+if [ "x$BIT_CHECK" = "x1" ]; then
+ do_cc $ccof $log ""
+ file $ccof | grep 64-bit >/dev/null 2>&1
+ [ "$?" = "0" ] && echo true || echo false
+else
+ [ "x$1" = "x" ] && usage
+ do_cc $ccof $log $1
+ if [ "$?" = "0" ]; then
+ # compile passed, but was the warning unrecognized?
+ grep -q "^cc1: warning: unrecognized command line option \"$1\"" $log
+ [ "$?" = "1" ] && echo $1
+ fi
+fi
+
+rm -f $ccof $log
+exit 0
diff --git a/pvr-source/eurasiacon/build/linux2/toplevel.mk b/pvr-source/eurasiacon/build/linux2/toplevel.mk
new file mode 100644
index 0000000..26b1198
--- /dev/null
+++ b/pvr-source/eurasiacon/build/linux2/toplevel.mk
@@ -0,0 +1,226 @@
+########################################################################### ###
+#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+#@License Dual MIT/GPLv2
+#
+# The contents of this file are subject to the MIT license as set out below.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# the GNU General Public License Version 2 ("GPL") in which case the provisions
+# of GPL are applicable instead of those above.
+#
+# If you wish to allow use of your version of this file only under the terms of
+# GPL, and not to allow others to use your version of this file under the terms
+# of the MIT license, indicate your decision by deleting the provisions above
+# and replace them with the notice and other provisions required by GPL as set
+# out in the file called "GPL-COPYING" included in this distribution. If you do
+# not delete the provisions above, a recipient may use your version of this file
+# under the terms of either the MIT license or GPL.
+#
+# This License is also included in this distribution in the file called
+# "MIT-COPYING".
+#
+# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
+# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+### ###########################################################################
+
+# Define the default goal. This masks a previous definition of the default
+# goal in Makefile.config, which must match this one
+.PHONY: build
+build: components kbuild
+
+ifeq ($(OUT),)
+$(error "Must specify output directory with OUT=")
+endif
+
+ifeq ($(TOP),)
+$(error "Must specify root of source tree with TOP=")
+endif
+$(call directory-must-exist,$(TOP))
+
+# Output directory for configuration, object code,
+# final programs/libraries, and install/rc scripts.
+#
+
+# RELATIVE_OUT is relative only if it's under $(TOP)
+RELATIVE_OUT := $(patsubst $(TOP)/%,%,$(OUT))
+HOST_OUT := $(RELATIVE_OUT)/host
+TARGET_OUT := $(RELATIVE_OUT)/target
+CONFIG_MK := $(RELATIVE_OUT)/config.mk
+CONFIG_H := $(RELATIVE_OUT)/config.h
+CONFIG_KERNEL_MK := $(RELATIVE_OUT)/config_kernel.mk
+CONFIG_KERNEL_H := $(RELATIVE_OUT)/config_kernel.h
+MAKE_TOP := eurasiacon/build/linux2
+THIS_MAKEFILE := (top-level makefiles)
+
+# Convert commas to spaces in $(D). This is so you can say "make
+# D=config-changes,freeze-config" and have $(filter config-changes,$(D))
+# still work.
+comma := ,
+empty :=
+space := $(empty) $(empty)
+override D := $(subst $(comma),$(space),$(D))
+
+include $(MAKE_TOP)/defs.mk
+
+ifneq ($(INTERNAL_CLOBBER_ONLY),true)
+# Create the out directory
+#
+$(shell mkdir -p $(OUT))
+
+# Provide rules to create $(HOST_OUT) and $(TARGET_OUT)
+.SECONDARY: $(HOST_OUT) $(TARGET_OUT)
+$(HOST_OUT) $(TARGET_OUT):
+ $(make-directory)
+
+# If these generated files differ from any pre-existing ones,
+# replace them, causing affected parts of the driver to rebuild.
+#
+_want_config_diff := $(filter config-changes,$(D))
+_freeze_config := $(strip $(filter freeze-config,$(D)))
+_updated_config_files := $(shell \
+ $(if $(_want_config_diff),rm -f $(OUT)/config.diff;,) \
+ for file in $(CONFIG_MK) $(CONFIG_H) \
+ $(CONFIG_KERNEL_MK) $(CONFIG_KERNEL_H); do \
+ diff -U 0 $$file $$file.new \
+ >>$(if $(_want_config_diff),$(OUT)/config.diff,/dev/null) 2>/dev/null \
+ && rm -f $$file.new \
+ || echo $$file; \
+ done)
+
+ifneq ($(_want_config_diff),)
+# We send the diff to stderr so it isn't captured by $(shell)
+$(shell [ -s $(OUT)/config.diff ] && echo >&2 "Configuration changed in $(RELATIVE_OUT):" && cat >&2 $(OUT)/config.diff)
+endif
+
+ifneq ($(_freeze_config),)
+$(if $(_updated_config_files),$(error Configuration change in $(RELATIVE_OUT) prevented by D=freeze-config),)
+endif
+
+# Update the config, if changed
+$(foreach _f,$(_updated_config_files), \
+ $(shell mv -f $(_f).new $(_f) >/dev/null 2>/dev/null))
+
+endif # INTERNAL_CLOBBER_ONLY
+
+MAKEFLAGS := -Rr --no-print-directory
+
+ifneq ($(INTERNAL_CLOBBER_ONLY),true)
+
+# This is so you can say "find $(TOP) -name Linux.mk > /tmp/something; export
+# ALL_MAKEFILES=/tmp/something; make" and avoid having to run find. This is
+# handy if your source tree is mounted over NFS or something
+override ALL_MAKEFILES := $(call relative-to-top,$(if $(strip $(ALL_MAKEFILES)),$(shell cat $(ALL_MAKEFILES)),$(shell find $(TOP) -type f -name Linux.mk -print -o -type d -name '.*' -prune)))
+ifeq ($(strip $(ALL_MAKEFILES)),)
+$(info ** Unable to find any Linux.mk files under $$(TOP). This could mean that)
+$(info ** there are no makefiles, or that ALL_MAKEFILES is set in the environment)
+$(info ** and points to a nonexistent or empty file.)
+$(error No makefiles)
+endif
+
+else # clobber-only
+ALL_MAKEFILES :=
+endif
+
+unexport ALL_MAKEFILES
+
+REMAINING_MAKEFILES := $(ALL_MAKEFILES)
+ALL_MODULES :=
+INTERNAL_INCLUDED_ALL_MAKEFILES :=
+
+ifneq ($(INTERNAL_CLOBBER_ONLY),true)
+# Please do not change the format of the following lines
+-include $(CONFIG_KERNEL_MK)
+# These files may not exist in GPL km source packages
+-include $(MAKE_TOP)/xorgconf.mk
+-include $(MAKE_TOP)/llvm.mk
+endif
+
+include $(MAKE_TOP)/commands.mk
+include $(MAKE_TOP)/buildvars.mk
+
+HOST_INTERMEDIATES := $(HOST_OUT)/intermediates
+TARGET_INTERMEDIATES := $(TARGET_OUT)/intermediates
+
+# Include each Linux.mk, then include modules.mk to save some information
+# about each module
+include $(foreach _Linux.mk,$(ALL_MAKEFILES),$(MAKE_TOP)/this_makefile.mk $(_Linux.mk) $(MAKE_TOP)/modules.mk)
+
+ifeq ($(strip $(REMAINING_MAKEFILES)),)
+INTERNAL_INCLUDED_ALL_MAKEFILES := true
+else
+$(error Impossible: $(words $(REMAINING_MAKEFILES)) makefiles were mysteriously ignored when reading $$(ALL_MAKEFILES))
+endif
+
+# At this point, all Linux.mks have been included. Now generate rules to build
+# each module: for each module in $(ALL_MODULES), set per-makefile variables
+$(foreach _m,$(ALL_MODULES),$(eval $(call process-module,$(_m))))
+
+.PHONY: kbuild install
+kbuild install:
+
+ifneq ($(INTERNAL_CLOBBER_ONLY),true)
+-include $(MAKE_TOP)/scripts.mk
+-include $(MAKE_TOP)/kbuild/kbuild.mk
+else
+# We won't depend on 'build' here so that people can build subsets of
+# components and still have the install script attempt to install the
+# subset.
+install:
+ @if [ ! -d "$(DISCIMAGE)" ]; then \
+ echo; \
+ echo "** DISCIMAGE was not set or does not point to a valid directory."; \
+ echo "** Cannot continue with install."; \
+ echo; \
+ exit 1; \
+ fi
+ @if [ ! -f $(TARGET_OUT)/install.sh ]; then \
+ echo; \
+ echo "** install.sh not found in $(TARGET_OUT)."; \
+ echo "** Cannot continue with install."; \
+ echo; \
+ exit 1; \
+ fi
+ @cd $(TARGET_OUT) && ./install.sh
+endif
+
+# You can say 'make all_modules' to attempt to make everything, or 'make
+# components' to only make the things which are listed (in the per-build
+# makefiles) as components of the build.
+.PHONY: all_modules components
+all_modules: $(ALL_MODULES)
+components: $(COMPONENTS)
+
+# Cleaning
+.PHONY: clean clobber
+clean: MODULE_DIRS_TO_REMOVE := $(OUT)/host/intermediates $(OUT)/target/intermediates $(OUT)/target/kbuild
+clean:
+ $(clean-dirs)
+clobber: MODULE_DIRS_TO_REMOVE := $(OUT)
+clobber:
+ $(clean-dirs)
+
+# Saying 'make clean-MODULE' removes the intermediates for MODULE.
+# clobber-MODULE deletes the output files as well
+clean-%:
+ $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$*))
+ $(RM) -rf $(OUT)/host/intermediates/$*/* $(OUT)/target/intermediates/$*/*
+clobber-%:
+ $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)))
+ $(RM) -rf $(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)
+
+include $(MAKE_TOP)/bits.mk