summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2013-06-10 15:28:26 -0500
committerVishal Mahaveer2013-06-10 15:28:26 -0500
commit49290fec5b79ea4464b7b6db018bc1f03e4b6e49 (patch)
treec3c370a6dd58444d34732f6c475b13c138146ebf /jacinto6/sgx_src/eurasia_km/eurasiacon/build
parentcca3094bfd2e6b9bbad60eb3515347259e3c920d (diff)
downloaddevice-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.tar.gz
device-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.tar.xz
device-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.zip
proprietary-open: jacinto6: add graphics kernel module sources
Adding kernel module sources. Branch: origin/1.9/j6-wip Commit: 6708c05 Change-Id: I01a2ed673a2ad790bf2f15d86d947aca4fe26f6c Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Diffstat (limited to 'jacinto6/sgx_src/eurasia_km/eurasiacon/build')
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk112
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk217
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk219
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk61
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk68
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk47
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk326
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk53
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk156
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk63
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk43
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk40
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk604
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk140
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template92
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk49
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk91
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk75
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_version.mk100
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk96
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk49
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile193
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/products.mk46
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk60
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/this_makefile.mk68
-rwxr-xr-xjacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh99
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk226
27 files changed, 3393 insertions, 0 deletions
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
new file mode 100644
index 0000000..a1a7eef
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
@@ -0,0 +1,112 @@
1########################################################################### ###
2#@Title Useful special targets which don't build anything
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),)
43dumpvar-%: ;
44$(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)))))
45endif
46
47ifneq ($(filter whereis-%,$(MAKECMDGOALS)),)
48whereis-%: ;
49$(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))))
50endif
51
52ifneq ($(filter whatis-%,$(MAKECMDGOALS)),)
53whatis-$(RELATIVE_OUT)/target/%: ;
54whatis-$(RELATIVE_OUT)/host/%: ;
55$(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)),)))))
56endif
57
58.PHONY: ls-modules
59ls-modules:
60 @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)))))
61
62ifeq ($(strip $(MAKECMDGOALS)),visualise)
63FORMAT ?= xlib
64GRAPHVIZ ?= neato
65visualise: $(OUT)/MAKE_RULES.dot
66 $(GRAPHVIZ) -T$(FORMAT) -o $(OUT)/MAKE_RULES.$(FORMAT) $<
67$(OUT)/MAKE_RULES.dot: $(OUT)/MAKE_RULES
68 perl $(MAKE_TOP)/tools/depgraph.pl -t $(TOP) -g $(firstword $(GRAPHVIZ)) $(OUT)/MAKE_RULES >$(OUT)/MAKE_RULES.dot
69$(OUT)/MAKE_RULES: $(ALL_MAKEFILES)
70 -$(MAKE) -C $(TOP) -f $(MAKE_TOP)/toplevel.mk TOP=$(TOP) OUT=$(OUT) ls-modules -qp >$(OUT)/MAKE_RULES 2>&1
71else
72visualise:
73 @: $(error visualise specified along with other goals. This is not supported)
74endif
75
76.PHONY: help
77help:
78 @echo 'Build targets'
79 @echo ' make, make build Build all components of the build'
80 @echo ' make components Build only the user-mode components'
81 @echo ' make kbuild Build only the kernel-mode components'
82 @echo ' make MODULE Build the module MODULE and all of its dependencies'
83 @echo ' make eurasiacon/binary2_.../target/libsomething.so'
84 @echo ' Build a particular file (including intermediates)'
85 @echo 'Variables'
86 @echo ' make V=1 ... Print the commands that are executed'
87 @echo ' make W=1 ... Enable extra compiler warnings'
88 @echo ' make D=opt ... Set build system debug option (D=help for a list)'
89 @echo ' make OUT=dir ... Place output+intermediates in specified directory'
90 @echo ' EXCLUDED_APIS=... List of APIs to remove from the build'
91 @echo ' make SOMEOPTION=1 ... Set configuration options (see config/core.mk)'
92 @echo ' Defaults are set by $(PVR_BUILD_DIR)/Makefile'
93 @echo 'Clean targets'
94 @echo ' make clean Remove only intermediates for the current build'
95 @echo ' make clobber As "make clean", but remove output files too'
96 @echo ' make clean-MODULE Clean (or clobber) only files for MODULE'
97 @echo ''
98 @echo 'Special targets'
99 @echo ' make whereis-MODULE Show the path to the Linux.mk defining MODULE'
100 @echo ' make whatis-FILE Show which module builds an output FILE'
101 @echo ' make ls-modules List all modules defined by makefiles'
102
103ifneq ($(filter help,$(D)),)
104empty :=
105space := $(empty) $(empty)
106$(info Debug options)
107$(info $(space)D=modules dump module info)
108$(info $(space)D=freeze-config prevent config changes)
109$(info $(space)D=config-changes dump diffs when config changes)
110$(info Options may be combined: make D=freeze-config,config-changes)
111$(error D=help given)
112endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
new file mode 100644
index 0000000..24fa829
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
@@ -0,0 +1,217 @@
1########################################################################### ###
2#@Title Define global variables
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@Description This file is read once at the start of the build, after reading
5# in config.mk. It should define the non-MODULE_* variables used
6# in commands, like ALL_CFLAGS
7#@License Dual MIT/GPLv2
8#
9# The contents of this file are subject to the MIT license as set out below.
10#
11# Permission is hereby granted, free of charge, to any person obtaining a copy
12# of this software and associated documentation files (the "Software"), to deal
13# in the Software without restriction, including without limitation the rights
14# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15# copies of the Software, and to permit persons to whom the Software is
16# furnished to do so, subject to the following conditions:
17#
18# The above copyright notice and this permission notice shall be included in
19# all copies or substantial portions of the Software.
20#
21# Alternatively, the contents of this file may be used under the terms of
22# the GNU General Public License Version 2 ("GPL") in which case the provisions
23# of GPL are applicable instead of those above.
24#
25# If you wish to allow use of your version of this file only under the terms of
26# GPL, and not to allow others to use your version of this file under the terms
27# of the MIT license, indicate your decision by deleting the provisions above
28# and replace them with the notice and other provisions required by GPL as set
29# out in the file called "GPL-COPYING" included in this distribution. If you do
30# not delete the provisions above, a recipient may use your version of this file
31# under the terms of either the MIT license or GPL.
32#
33# This License is also included in this distribution in the file called
34# "MIT-COPYING".
35#
36# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
37# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
38# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
40# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
41# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43### ###########################################################################
44
45ifeq ($(BUILD),debug)
46COMMON_USER_FLAGS := -O0
47else
48OPTIM ?= -O2
49COMMON_USER_FLAGS := $(OPTIM)
50endif
51
52# FIXME: We should probably audit the driver for aliasing
53#
54COMMON_USER_FLAGS += -fno-strict-aliasing
55
56# We always enable debugging. Either the release binaries are stripped
57# and the symbols put in the symbolpackage, or we're building debug.
58#
59COMMON_USER_FLAGS += -g
60
61# These flags are used for kernel, User C and User C++
62#
63COMMON_FLAGS = -W -Wall
64
65# Some GCC warnings are C only, so we must mask them from C++
66#
67COMMON_CFLAGS := $(COMMON_FLAGS) \
68 -Wdeclaration-after-statement -Wno-format-zero-length \
69 -Wmissing-prototypes -Wstrict-prototypes
70
71# Additional warnings, and optional warnings.
72#
73WARNING_CFLAGS := \
74 -Wpointer-arith -Wunused-parameter \
75 -Wmissing-format-attribute \
76 $(call cc-option,-Wno-missing-field-initializers) \
77 $(call cc-option,-fdiagnostics-show-option)
78
79ifeq ($(W),1)
80WARNING_CFLAGS += \
81 $(call cc-option,-Wbad-function-cast) \
82 $(call cc-option,-Wcast-qual) \
83 $(call cc-option,-Wcast-align) \
84 $(call cc-option,-Wconversion) \
85 $(call cc-option,-Wdisabled-optimization) \
86 $(call cc-option,-Wlogical-op) \
87 $(call cc-option,-Wmissing-declarations) \
88 $(call cc-option,-Wmissing-include-dirs) \
89 $(call cc-option,-Wnested-externs) \
90 $(call cc-option,-Wold-style-definition) \
91 $(call cc-option,-Woverlength-strings) \
92 $(call cc-option,-Wpacked) \
93 $(call cc-option,-Wpacked-bitfield-compat) \
94 $(call cc-option,-Wpadded) \
95 $(call cc-option,-Wredundant-decls) \
96 $(call cc-option,-Wshadow) \
97 $(call cc-option,-Wswitch-default) \
98 $(call cc-option,-Wvla) \
99 $(call cc-option,-Wwrite-strings)
100endif
101
102WARNING_CFLAGS += \
103 $(call cc-optional-warning,-Wunused-but-set-variable)
104
105HOST_WARNING_CFLAGS := \
106 -Wpointer-arith -Wunused-parameter \
107 -Wmissing-format-attribute \
108 $(call host-cc-option,-Wno-missing-field-initializers) \
109 $(call host-cc-option,-fdiagnostics-show-option)
110
111ifeq ($(W),1)
112HOST_WARNING_CFLAGS += \
113 $(call host-cc-option,-Wbad-function-cast) \
114 $(call host-cc-option,-Wcast-qual) \
115 $(call host-cc-option,-Wcast-align) \
116 $(call host-cc-option,-Wconversion) \
117 $(call host-cc-option,-Wdisabled-optimization) \
118 $(call host-cc-option,-Wlogical-op) \
119 $(call host-cc-option,-Wmissing-declarations) \
120 $(call host-cc-option,-Wmissing-include-dirs) \
121 $(call host-cc-option,-Wnested-externs) \
122 $(call host-cc-option,-Wold-style-definition) \
123 $(call host-cc-option,-Woverlength-strings) \
124 $(call host-cc-option,-Wpacked) \
125 $(call host-cc-option,-Wpacked-bitfield-compat) \
126 $(call host-cc-option,-Wpadded) \
127 $(call host-cc-option,-Wredundant-decls) \
128 $(call host-cc-option,-Wshadow) \
129 $(call host-cc-option,-Wswitch-default) \
130 $(call host-cc-option,-Wvla) \
131 $(call host-cc-option,-Wwrite-strings)
132endif
133
134HOST_WARNING_CFLAGS += \
135 $(call host-cc-optional-warning,-Wunused-but-set-variable)
136
137KBUILD_WARNING_CFLAGS := \
138 -Wno-unused-parameter -Wno-sign-compare
139KBUILD_WARNING_CFLAGS += \
140 $(call kernel-cc-optional-warning,-Wbad-function-cast) \
141 $(call kernel-cc-optional-warning,-Wcast-qual) \
142 $(call kernel-cc-optional-warning,-Wcast-align) \
143 $(call kernel-cc-optional-warning,-Wconversion) \
144 $(call kernel-cc-optional-warning,-Wdisabled-optimization) \
145 $(call kernel-cc-optional-warning,-Wlogical-op) \
146 $(call kernel-cc-optional-warning,-Wmissing-declarations) \
147 $(call kernel-cc-optional-warning,-Wmissing-include-dirs) \
148 $(call kernel-cc-optional-warning,-Wnested-externs) \
149 $(call kernel-cc-optional-warning,-Wno-missing-field-initializers) \
150 $(call kernel-cc-optional-warning,-Wold-style-definition) \
151 $(call kernel-cc-optional-warning,-Woverlength-strings) \
152 $(call kernel-cc-optional-warning,-Wpacked) \
153 $(call kernel-cc-optional-warning,-Wpacked-bitfield-compat) \
154 $(call kernel-cc-optional-warning,-Wpadded) \
155 $(call kernel-cc-optional-warning,-Wredundant-decls) \
156 $(call kernel-cc-optional-warning,-Wshadow) \
157 $(call kernel-cc-optional-warning,-Wswitch-default) \
158 $(call kernel-cc-optional-warning,-Wvla) \
159 $(call kernel-cc-optional-warning,-Wwrite-strings)
160
161# User C only
162#
163ALL_CFLAGS := \
164 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \
165 $(SYS_CFLAGS)
166
167ALL_HOST_CFLAGS := \
168 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS)
169
170# User C++ only
171#
172ALL_CXXFLAGS := \
173 $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \
174 -fno-rtti -fno-exceptions \
175 -Wpointer-arith -Wunused-parameter \
176 $(SYS_CXXFLAGS)
177
178ALL_HOST_CXXFLAGS := \
179 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall
180
181# User C and C++
182#
183# NOTE: ALL_HOST_LDFLAGS should probably be using -rpath-link too, and if we
184# ever need to support building host shared libraries, it's required.
185#
186# We can't use it right now because we want to support non-GNU-compatible
187# linkers like the Darwin 'ld' which doesn't support -rpath-link.
188#
189ALL_HOST_LDFLAGS := -L$(HOST_OUT)
190ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
191
192ifneq ($(strip $(TOOLCHAIN)),)
193ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib
194endif
195
196ifneq ($(strip $(LINKER_RPATH)),)
197ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH))
198endif
199
200ALL_LDFLAGS += $(SYS_LDFLAGS)
201
202# Kernel C only
203#
204ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_WARNING_CFLAGS) \
205 $(call kernel-cc-option,-Wno-type-limits) \
206 $(call kernel-cc-option,-Wno-pointer-arith) \
207 $(call kernel-cc-option,-Wno-aggregate-return) \
208 $(call kernel-cc-option,-Wno-unused-but-set-variable)
209
210# This variable contains a list of all modules built by kbuild
211ALL_KBUILD_MODULES :=
212
213# This variable contains a list of all modules which contain C++ source files
214ALL_CXX_MODULES :=
215
216# Toolchain triple for cross environment
217CROSS_TRIPLE := $(patsubst %-,%,$(CROSS_COMPILE))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
new file mode 100644
index 0000000..25e5ed1
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
@@ -0,0 +1,219 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# from-one-* recipes make a thing from one source file, so they use $<. Others
42# use $(MODULE_something) instead of $^
43
44# We expect that MODULE_*FLAGS contains all the flags we need, including the
45# flags for all modules (like $(ALL_CFLAGS) and $(ALL_HOST_CFLAGS)), and
46# excluding flags for include search dirs or for linking libraries. The
47# exceptions are ALL_EXE_LDFLAGS and ALL_LIB_LDFLAGS, since they depend on the
48# type of thing being linked, so they appear in the commands below
49
50define host-o-from-one-c
51$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
52$(HOST_CC) -MD -c $(MODULE_HOST_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
53 -include $(CONFIG_H) $< -o $@
54endef
55
56define target-o-from-one-c
57$(if $(V),,@echo " CC " $(call relative-to-top,$<))
58$(CC) -MD -c $(MODULE_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
59 -include $(CONFIG_H) $< -o $@
60endef
61
62# We use $(CC) to compile C++ files, and expect it to detect that it's
63# compiling C++
64define host-o-from-one-cxx
65$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
66$(HOST_CC) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
67 -include $(CONFIG_H) $< -o $@
68endef
69
70define target-o-from-one-cxx
71$(if $(V),,@echo " CC " $(call relative-to-top,$<))
72$(CC) -MD -c $(MODULE_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
73 -include $(CONFIG_H) $< -o $@
74endef
75
76define host-executable-from-o
77$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
78$(HOST_CC) $(MODULE_HOST_LDFLAGS) \
79 -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
80 $(MODULE_LIBRARY_FLAGS)
81endef
82
83define host-executable-cxx-from-o
84$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
85$(HOST_CXX) $(MODULE_HOST_LDFLAGS) \
86 -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
87 $(MODULE_LIBRARY_FLAGS)
88endef
89
90define target-executable-from-o
91$(if $(V),,@echo " LD " $(call relative-to-top,$@))
92$(CC) \
93 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
94 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
95 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
96endef
97
98define target-executable-cxx-from-o
99$(if $(V),,@echo " LD " $(call relative-to-top,$@))
100$(CXX) \
101 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
102 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
103 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
104endef
105
106define target-shared-library-from-o
107$(if $(V),,@echo " LD " $(call relative-to-top,$@))
108$(CC) -shared -Wl,-Bsymbolic \
109 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
110 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
111 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
112endef
113
114# If there were any C++ source files in a shared library, we use this recipe,
115# which runs the C++ compiler to link the final library
116define target-shared-library-cxx-from-o
117$(if $(V),,@echo " LD " $(call relative-to-top,$@))
118$(CXX) -shared -Wl,-Bsymbolic \
119 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
120 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
121 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
122endef
123
124define target-copy-debug-information
125$(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg
126endef
127
128define host-strip-debug-information
129$(HOST_STRIP) --strip-unneeded $@
130endef
131
132define target-strip-debug-information
133$(STRIP) --strip-unneeded $@
134endef
135
136define target-add-debuglink
137$(if $(V),,@echo " DBGLINK " $(call relative-to-top,$(basename $@).dbg))
138$(OBJCOPY) --add-gnu-debuglink=$(basename $@).dbg $@
139endef
140
141define host-static-library-from-o
142$(if $(V),,@echo " HOST_AR " $(call relative-to-top,$@))
143$(HOST_AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
144endef
145
146define target-static-library-from-o
147$(if $(V),,@echo " AR " $(call relative-to-top,$@))
148$(AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
149endef
150
151define tab-c-from-y
152$(if $(V),,@echo " BISON " $(call relative-to-top,$<))
153$(BISON) $(MODULE_BISON_FLAGS) -o $@ -d $<
154endef
155
156define l-c-from-l
157$(if $(V),,@echo " FLEX " $(call relative-to-top,$<))
158$(FLEX) $(MODULE_FLEX_FLAGS) -o$@ $<
159endef
160
161define clean-dirs
162$(if $(V),,@echo " RM " $(call relative-to-top,$(MODULE_DIRS_TO_REMOVE)))
163$(RM) -rf $(MODULE_DIRS_TO_REMOVE)
164endef
165
166define make-directory
167$(MKDIR) -p $@
168endef
169
170define check-exports
171endef
172
173# Programs used in recipes
174
175BISON ?= bison
176CC ?= gcc
177CXX ?= g++
178HOST_CC ?= gcc
179HOST_CXX ?= g++
180JAR ?= jar
181JAVA ?= java
182JAVAC ?= javac
183ZIP ?= zip
184
185override AR := $(if $(V),,@)$(CROSS_COMPILE)ar
186override BISON := $(if $(V),,@)$(BISON)
187override BZIP2 := $(if $(V),,@)bzip2 -9
188override CC := $(if $(V),,@)$(CROSS_COMPILE)$(CC)
189override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh
190override CXX := $(if $(V),,@)$(CROSS_COMPILE)$(CXX)
191override CHMOD := $(if $(V),,@)chmod
192override CP := $(if $(V),,@)cp
193override ECHO := $(if $(V),,@)echo
194override FLEX := $(if $(V),,@)flex
195override GAWK := $(if $(V),,@)gawk
196override GREP := $(if $(V),,@)grep
197override HOST_AR := $(if $(V),,@)ar
198override HOST_CC := $(if $(V),,@)$(HOST_CC)
199override HOST_CXX := $(if $(V),,@)$(HOST_CXX)
200override HOST_STRIP := $(if $(V),,@)strip
201override INSTALL := $(if $(V),,@)install
202override JAR := $(if $(V),,@)$(JAR)
203override JAVA := $(if $(V),,@)$(JAVA)
204override JAVAC := $(if $(V),,@)$(JAVAC)
205override M4 := $(if $(V),,@)m4
206override MKDIR := $(if $(V),,@)mkdir
207override MV := $(if $(V),,@)mv
208override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy
209override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm
210override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib
211override RM := $(if $(V),,@)rm -f
212override SED := $(if $(V),,@)sed
213override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip
214override TAR := $(if $(V),,@)tar
215override TOUCH := $(if $(V),,@)touch
216override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm
217override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink
218override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc
219override ZIP := $(if $(V),,@)$(ZIP)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
new file mode 100644
index 0000000..23f9175
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
@@ -0,0 +1,61 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41SYS_CFLAGS := \
42 -fno-short-enums \
43 -funwind-tables \
44 -D__linux__ \
45 -I$(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
46 -I$(ANDROID_ROOT)/bionic/libc/include \
47 -I$(ANDROID_ROOT)/bionic/libc/kernel/common \
48 -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \
49 -I$(ANDROID_ROOT)/bionic/libm/include \
50 -I$(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \
51 -I$(ANDROID_ROOT)/bionic/libthread_db/include \
52 -I$(ANDROID_ROOT)/frameworks/base/include \
53 -isystem $(ANDROID_ROOT)/system/core/include \
54 -I$(ANDROID_ROOT)/hardware/libhardware/include \
55 -I$(ANDROID_ROOT)/external/openssl/include
56
57SYS_EXE_LDFLAGS := \
58 -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \
59 -lc -ldl -lcutils
60
61SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
new file mode 100644
index 0000000..8c3f937
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
@@ -0,0 +1,68 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41OPTIM := -Os
42
43ANDROID_ARCH := arm
44include ../common/android/arch_common.mk
45
46SYS_CFLAGS += -march=armv7-a
47
48SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o
49SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o
50
51# Handle the removal of the armelf.x and armelf.xsc linker scripts.
52ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),)
53# The linker scripts have been removed. We need to use these options
54# instead.
55SYS_EXE_LDFLAGS += -Wl,-z,relro -Wl,-z,now
56SYS_LIB_LDFLAGS += -Wl,-z,relro -Wl,-z,now
57else
58# The linker scripts are still present in the Android tree, so we need to
59# use them.
60SYS_EXE_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.x
61SYS_LIB_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.xsc
62endif
63
64JNI_CPU_ABI := armeabi
65
66# Android builds are usually GPL
67#
68LDM_PLATFORM ?= 1
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
new file mode 100644
index 0000000..320804e
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
@@ -0,0 +1,47 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41
42$(eval $(call BothConfigC,ANDROID,))
43
44
45
46
47
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
new file mode 100644
index 0000000..8a60fb7
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
@@ -0,0 +1,326 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41include ../common/android/platform_version.mk
42
43# Basic support option tuning for Android
44#
45SUPPORT_ANDROID_PLATFORM := 1
46SUPPORT_OPENGLES1_V1_ONLY := 1
47
48# Meminfo IDs are required for buffer stamps
49#
50SUPPORT_MEMINFO_IDS := 1
51
52# Need multi-process support in PDUMP
53#
54SUPPORT_PDUMP_MULTI_PROCESS := 1
55
56# Always print debugging after 5 seconds of no activity
57#
58CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
59
60# Android WSEGL is always the same
61#
62OPK_DEFAULT := libpvrANDROID_WSEGL.so
63
64# srvkm is always built, but bufferclass_example is only built
65# before EGL_image_external was generally available.
66#
67KERNEL_COMPONENTS := srvkm
68ifeq ($(is_at_least_honeycomb),0)
69KERNEL_COMPONENTS += bufferclass_example
70endif
71
72# Kernel modules are always installed here under Android
73#
74PVRSRV_MODULE_BASEDIR := /system/modules/
75
76# Use the new PVR_DPF implementation to allow lower message levels
77# to be stripped from production drivers
78#
79PVRSRV_NEW_PVR_DPF := 1
80
81# Production Android builds don't want PVRSRVGetDCSystemBuffer
82#
83SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER := 0
84
85# Prefer to limit the 3D parameters heap to <16MB and move the
86# extra 48MB to the general heap. This only affects cores with
87# 28bit MMUs (520, 530, 531, 540).
88#
89SUPPORT_LARGE_GENERAL_HEAP := 1
90
91# Enable a page pool for uncached memory allocations. This improves
92# the performance of such allocations because the pages are temporarily
93# not returned to Linux and therefore do not have to be re-invalidated
94# (fewer cache invalidates are needed).
95#
96# Default the cache size to a maximum of 5400 pages (~21MB). If using
97# newer Linux kernels (>=3.0) the cache may be reclaimed and become
98# smaller than this maximum during runtime.
99#
100PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
101
102##############################################################################
103# EGL connect/disconnect hooks only available since Froyo
104# Obsolete in future versions
105#
106ifeq ($(is_at_least_froyo),1)
107ifeq ($(is_at_least_icecream_sandwich),0)
108PVR_ANDROID_HAS_CONNECT_DISCONNECT := 1
109endif
110endif
111
112##############################################################################
113# Override surface field name for older versions
114#
115ifeq ($(is_at_least_gingerbread),0)
116PVR_ANDROID_SURFACE_FIELD_NAME := \"mSurface\"
117endif
118
119##############################################################################
120# Provide ANativeWindow{Buffer,} typedefs for older versions
121#
122ifeq ($(is_at_least_gingerbread),0)
123PVR_ANDROID_NEEDS_ANATIVEWINDOW_TYPEDEF := 1
124endif
125ifeq ($(is_at_least_icecream_sandwich),0)
126PVR_ANDROID_NEEDS_ANATIVEWINDOWBUFFER_TYPEDEF := 1
127endif
128
129##############################################################################
130# Handle various platform includes for unittests
131#
132UNITTEST_INCLUDES := eurasiacon/android
133
134ifeq ($(is_at_least_gingerbread),1)
135UNITTEST_INCLUDES += $(ANDROID_ROOT)/frameworks/base/native/include
136endif
137
138ifeq ($(is_at_least_jellybean),1)
139UNITTEST_INCLUDES += \
140 $(ANDROID_ROOT)/frameworks/native/include \
141 $(ANDROID_ROOT)/frameworks/native/opengl/include \
142 $(ANDROID_ROOT)/libnativehelper/include
143# FIXME: This is the old location for the JNI header.
144UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include
145else
146UNITTEST_INCLUDES += \
147 $(ANDROID_ROOT)/frameworks/base/opengl/include \
148 $(ANDROID_ROOT)/dalvik/libnativehelper/include
149endif
150
151# But it doesn't have OpenVG headers
152#
153UNITTEST_INCLUDES += eurasiacon/unittests/include
154
155##############################################################################
156# Future versions moved proprietary libraries to a vendor directory
157#
158ifeq ($(is_at_least_gingerbread),1)
159SHLIB_DESTDIR := /system/vendor/lib
160DEMO_DESTDIR := /system/vendor/bin
161else
162SHLIB_DESTDIR := /system/lib
163DEMO_DESTDIR := /system/bin
164endif
165
166# EGL libraries go in a special place
167#
168EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
169
170##############################################################################
171# We can support OpenCL in the build since Froyo (stlport was added in 2.2)
172#
173ifeq ($(is_at_least_froyo),1)
174SYS_CXXFLAGS := \
175 -fuse-cxa-atexit \
176 $(SYS_CFLAGS) \
177 -I$(ANDROID_ROOT)/bionic \
178 -I$(ANDROID_ROOT)/external/stlport/stlport
179else
180SYS_CXXFLAGS := \
181 $(SYS_CFLAGS) \
182 -I$(ANDROID_ROOT)/bionic/libstdc++/include
183endif
184
185##############################################################################
186# Composition bypass feature, supported since Froyo.
187# In ICS, hardware composer (HWC) should be used instead.
188#
189ifeq ($(is_at_least_froyo),1)
190ifeq ($(is_at_least_honeycomb),0)
191PVR_ANDROID_HAS_NATIVE_BUFFER_TRANSFORM := 1
192SUPPORT_ANDROID_COMPOSITION_BYPASS := 1
193endif
194endif
195
196##############################################################################
197# In ICS, we have hardware composer (HWC) support.
198#
199# SUPPORT_ANDROID_COMPOSER_HAL adds Post2() to the framebuffer HAL interface
200# and is intended for inter-op with external HWC modules. It is always
201# enabled (but we allow it to be compiled out just in case).
202#
203# SUPPORT_ANDROID_COMPOSITION_BYPASS adds a new buffer type (client buffers
204# allocated from the framebuffer pool) which maximizes compatibility with
205# most 3rdparty display controllers. It is orthogonal to HWC support.
206#
207ifeq ($(is_at_least_honeycomb),1)
208SUPPORT_ANDROID_COMPOSER_HAL := 1
209endif
210
211##############################################################################
212# We have some extra GRALLOC_USAGE bits we need to handle in ICS
213#
214ifeq ($(is_at_least_honeycomb),1)
215PVR_ANDROID_HAS_GRALLOC_USAGE_EXTERNAL_DISP := 1
216PVR_ANDROID_HAS_GRALLOC_USAGE_PROTECTED := 1
217PVR_ANDROID_HAS_GRALLOC_USAGE_PRIVATE := 1
218endif
219
220##############################################################################
221# Support the new OES_EGL_image_external extension + YV12 buffers
222#
223ifeq ($(is_at_least_honeycomb),1)
224PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YV12 := 1
225GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
226GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
227endif
228
229##############################################################################
230# Gingerbread adds the native window cancelBuffer operation
231#
232ifeq ($(is_at_least_gingerbread),1)
233PVR_ANDROID_HAS_CANCELBUFFER := 1
234endif
235
236##############################################################################
237# Versions prior to ICS have another header we must include
238#
239ifeq ($(is_at_least_icecream_sandwich),0)
240PVR_ANDROID_HAS_ANDROID_NATIVE_BUFFER_H := 1
241endif
242
243##############################################################################
244# ICS added dump() hook to gralloc alloc_device_t API
245#
246ifeq ($(is_at_least_honeycomb),1)
247PVR_ANDROID_HAS_GRALLOC_DUMP := 1
248endif
249
250##############################################################################
251# ICS added support for the BGRX pixel format, and allows drivers to advertise
252# configs in this format instead of RGBX.
253#
254# The DDK provides a private definition of HAL_PIXEL_FORMAT_BGRX_8888. This
255# option exposes it as the native visual for 8888 configs with alpha ignored
256#
257ifeq ($(is_at_least_icecream_sandwich),1)
258SUPPORT_HAL_PIXEL_FORMAT_BGRX := 1
259endif
260
261##############################################################################
262# ICS added the ability for GL clients to pre-rotate their rendering to the
263# orientation desired by the compositor. The SGX DDK can use TRANSFORM_HINT
264# to access this functionality.
265#
266# This is required by some HWC implementations that cannot use the display
267# to rotate buffers, otherwise the HWC optimization cannot be used when
268# rotating the device.
269#
270ifeq ($(is_at_least_icecream_sandwich),1)
271PVR_ANDROID_HAS_WINDOW_TRANSFORM_HINT := 1
272endif
273
274##############################################################################
275# ICS requires that at least one driver EGLConfig advertises the
276# EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
277# rendered with this config can be consumed by an OMX video encoder.
278#
279ifeq ($(is_at_least_icecream_sandwich),1)
280EGL_EXTENSION_ANDROID_RECORDABLE := 1
281endif
282
283##############################################################################
284# ICS added a new usage bit. USAGE_HW_COMPOSER indicates that a buffer might
285# be used with HWComposer. In practice this is all non-MM buffers.
286#
287ifeq ($(is_at_least_icecream_sandwich),1)
288PVR_ANDROID_HAS_GRALLOC_USAGE_HW_COMPOSER := 1
289endif
290
291##############################################################################
292# ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
293# extension in EGL/GLESv2.
294#
295ifeq ($(is_at_least_icecream_sandwich),1)
296EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
297endif
298
299##############################################################################
300# ICS MR1 added a new usage bit. USAGE_HW_VIDEO_ENCODER indicates that a
301# buffer might be used with the video encoder.
302#
303ifeq ($(is_at_least_icecream_sandwich_mr1),1)
304PVR_ANDROID_HAS_GRALLOC_USAGE_HW_VIDEO_ENCODER := 1
305endif
306
307##############################################################################
308# ICS and earlier should rate-limit composition by waiting for 3D renders
309# to complete in the compositor's eglSwapBuffers().
310#
311ifeq ($(is_at_least_jellybean),0)
312PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
313endif
314
315##############################################################################
316# JB added a new corkscrew API for userland backtracing.
317#
318ifeq ($(is_at_least_jellybean),1)
319PVR_ANDROID_HAS_CORKSCREW_API := 1
320endif
321
322# Placeholder for future version handling
323#
324ifeq ($(is_future_version),1)
325-include ../common/android/future_version.mk
326endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
new file mode 100644
index 0000000..5c8f000
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
@@ -0,0 +1,53 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41TARGET_BUILD_TYPE ?= release
42
43OUT_DIR ?= $(ANDROID_ROOT)/out
44
45ifeq ($(TARGET_BUILD_TYPE),debug)
46TARGET_ROOT := $(OUT_DIR)/debug/target
47else
48TARGET_ROOT := $(OUT_DIR)/target
49endif
50
51TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/obj
52
53LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
new file mode 100644
index 0000000..698efa3
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
@@ -0,0 +1,156 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# Figure out the version of Android we're building against.
42#
43PLATFORM_VERSION := $(shell \
44 if [ -f $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop ]; then \
45 cat $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop | \
46 grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \
47 else \
48 echo 4.0.3; \
49 fi)
50
51define version-starts-with
52$(shell echo $(PLATFORM_VERSION) | grep -q ^$(1); \
53 [ "$$?" = "0" ] && echo 1 || echo 0)
54endef
55
56# ro.build.version.release contains the version number for release builds, or
57# the version codename otherwise. In this case we need to assume that the
58# version of Android we're building against has the features that are in the
59# final release of that version, so we set PLATFORM_VERSION to the
60# corresponding release number.
61#
62ifeq ($(call version-starts-with,Eclair),1)
63PLATFORM_VERSION := 2.0
64else ifeq ($(call version-starts-with,Froyo),1)
65PLATFORM_VERSION := 2.2
66else ifeq ($(call version-starts-with,Gingerbread),1)
67PLATFORM_VERSION := 2.3
68else ifeq ($(call version-starts-with,Honeycomb),1)
69PLATFORM_VERSION := 3.0
70else ifeq ($(call version-starts-with,IceCreamSandwichMR),1)
71PLATFORM_VERSION := 4.0.3
72else ifeq ($(call version-starts-with,IceCreamSandwich),1)
73PLATFORM_VERSION := 4.0
74else ifeq ($(call version-starts-with,JellyBean),1)
75PLATFORM_VERSION := 4.1
76else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
77PLATFORM_VERSION := 5.0
78endif
79
80PLATFORM_VERSION_MAJ := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d'.')
81PLATFORM_VERSION_MIN := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d'.')
82PLATFORM_VERSION_PATCH := $(shell echo $(PLATFORM_VERSION) | cut -f3 -d'.')
83
84# Not all versions have a patchlevel; fix that up here
85#
86ifeq ($(PLATFORM_VERSION_PATCH),)
87PLATFORM_VERSION_PATCH := 0
88endif
89
90# Macros to help categorize support for features and API_LEVEL for tests.
91#
92is_at_least_eclair := \
93 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
94 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
95 test $(PLATFORM_VERSION_MIN) -ge 0 ) ) && echo 1 || echo 0)
96is_at_least_froyo := \
97 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
98 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
99 test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0)
100is_at_least_gingerbread := \
101 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
102 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
103 test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
104is_at_least_honeycomb := \
105 $(shell test $(PLATFORM_VERSION_MAJ) -ge 3 && echo 1 || echo 0)
106is_at_least_icecream_sandwich := \
107 $(shell test $(PLATFORM_VERSION_MAJ) -ge 4 && echo 1 || echo 0)
108is_at_least_icecream_sandwich_mr1 := \
109 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
110 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
111 ( test $(PLATFORM_VERSION_MIN) -ge 1 || \
112 test $(PLATFORM_VERSION_PATCH) -ge 3 ) ) ) && echo 1 || echo 0)
113is_at_least_jellybean := \
114 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
115 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
116 test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0)
117
118# FIXME: Assume "future versions" are >=5.0, but we don't really know
119is_future_version := \
120 $(shell ( test $(PLATFORM_VERSION_MAJ) -ge 5 ) && echo 1 || echo 0)
121
122# Picking an exact match of API_LEVEL for the platform we're building
123# against can avoid compatibility theming and affords better integration.
124#
125ifeq ($(is_future_version),1)
126API_LEVEL := 17
127else ifeq ($(is_at_least_jellybean),1)
128API_LEVEL := 16
129else ifeq ($(is_at_least_icecream_sandwich),1)
130# MR1 15
131API_LEVEL := 14
132else ifeq ($(is_at_least_honeycomb),1)
133# MR2 13
134# MR1 12
135API_LEVEL := 11
136else ifeq ($(is_at_least_gingerbread),1)
137# MR1 10
138API_LEVEL := 9
139else ifeq ($(is_at_least_froyo),1)
140API_LEVEL := 8
141else ifeq ($(is_at_least_eclair),1)
142# MR1 7
143# 2.0.1 6
144API_LEVEL := 5
145else
146$(error Must build against Android >= 2.0)
147endif
148
149# Each DDK is tested against only a single version of the platform.
150# Warn if a different platform version is used.
151#
152ifeq ($(is_future_version),1)
153$(info WARNING: Android version is newer than this DDK supports)
154else ifneq ($(is_at_least_icecream_sandwich),1)
155$(info WARNING: Android version is older than this DDK supports)
156endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
new file mode 100644
index 0000000..5d0289f
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
@@ -0,0 +1,63 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM,))
42$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM_EXT,))
43$(eval $(call TunableKernelConfigC,SUPPORT_DRI_DRM_PLUGIN,))
44
45
46$(eval $(call TunableBothConfigMake,SUPPORT_DRI_DRM,))
47
48ifeq ($(SUPPORT_DRI_DRM),1)
49ifeq ($(SUPPORT_DRI_DRM_NO_LIBDRM),1)
50endif
51$(eval $(call TunableKernelConfigC,PVR_SECURE_DRM_AUTH_EXPORT,))
52$(eval $(call TunableKernelConfigC,SUPPORT_DRM_MODESET,))
53endif
54
55$(eval $(call TunableKernelConfigC,PVR_DISPLAY_CONTROLLER_DRM_IOCTL,))
56
57$(eval $(call TunableBothConfigC,PVR_DRI_DRM_NOT_PCI))
58$(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI))
59
60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,))
61
62
63export EXTERNAL_3PDD_TARBALL
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
new file mode 100644
index 0000000..153159a
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
@@ -0,0 +1,43 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,))
42$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,))
43$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk
new file mode 100644
index 0000000..b5f84d4
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk
@@ -0,0 +1,40 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
new file mode 100644
index 0000000..247d1e1
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
@@ -0,0 +1,604 @@
1########################################################################### ###
2#@Title Root build configuration.
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# Configuration wrapper for new build system. This file deals with
43# configuration of the build. Add to this file anything that deals
44# with switching driver options on/off and altering the defines or
45# objects the build uses.
46#
47# At the end of this file is an exhaustive list of all variables
48# that are passed between the platform/config stage and the generic
49# build. PLEASE refrain from adding more variables than necessary
50# to this stage -- almost all options can go through config.h.
51#
52
53################################# MACROS ####################################
54
55# Write out a kernel GNU make option.
56#
57define KernelConfigMake
58$$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new)
59endef
60
61# Write out a GNU make option for both user & kernel
62#
63define BothConfigMake
64$$(eval $$(call KernelConfigMake,$(1),$(2)))
65endef
66
67# Conditionally write out a kernel GNU make option
68#
69define TunableKernelConfigMake
70ifneq ($$($(1)),)
71ifneq ($$($(1)),0)
72$$(eval $$(call KernelConfigMake,$(1),$$($(1))))
73endif
74else
75ifneq ($(2),)
76$$(eval $$(call KernelConfigMake,$(1),$(2)))
77endif
78endif
79endef
80
81# Conditionally write out a GNU make option for both user & kernel
82#
83define TunableBothConfigMake
84$$(eval $$(call TunableKernelConfigMake,$(1),$(2)))
85endef
86
87# Write out a kernel-only option
88#
89define KernelConfigC
90$$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new)
91endef
92
93# Write out an option for both user & kernel
94#
95define BothConfigC
96$$(eval $$(call KernelConfigC,$(1),$(2)))
97endef
98
99# Conditionally write out a kernel-only option
100#
101define TunableKernelConfigC
102ifneq ($$($(1)),)
103ifneq ($$($(1)),0)
104ifeq ($$($(1)),1)
105$$(eval $$(call KernelConfigC,$(1),))
106else
107$$(eval $$(call KernelConfigC,$(1),$$($(1))))
108endif
109endif
110else
111ifneq ($(2),)
112ifeq ($(2),1)
113$$(eval $$(call KernelConfigC,$(1),))
114else
115$$(eval $$(call KernelConfigC,$(1),$(2)))
116endif
117endif
118endif
119endef
120
121# Conditionally write out an option for both user & kernel
122#
123define TunableBothConfigC
124$$(eval $$(call TunableKernelConfigC,$(1),$(2)))
125endef
126
127############################### END MACROS ##################################
128
129# Check we have a new enough version of GNU make.
130#
131need := 3.81
132ifeq ($(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))),)
133$(error A version of GNU make >= $(need) is required - this is version $(MAKE_VERSION))
134endif
135
136# Try to guess EURASIAROOT if it wasn't set. Check this location.
137#
138_GUESSED_EURASIAROOT := $(abspath ../../../..)
139ifneq ($(strip $(EURASIAROOT)),)
140# We don't want to warn about EURASIAROOT if it's empty: this might mean that
141# it's not set at all anywhere, but it could also mean that it's set like
142# "export EURASIAROOT=" or "make EURASIAROOT= sometarget". If it is set but
143# empty, we'll act as if it's unset and not warn.
144ifneq ($(strip $(EURASIAROOT)),$(_GUESSED_EURASIAROOT))
145nothing :=
146space := $(nothing) $(nothing)
147$(warning EURASIAROOT is set (via: $(origin EURASIAROOT)), but its value does not)
148$(warning match the root of this source tree, so it is being ignored)
149$(warning EURASIAROOT is set to: $(EURASIAROOT))
150$(warning $(space)The detected root is: $(_GUESSED_EURASIAROOT))
151$(warning To suppress this message, unset EURASIAROOT or set it empty)
152endif
153# else, EURASIAROOT matched the actual root of the source tree: don't warn
154endif
155override EURASIAROOT := $(_GUESSED_EURASIAROOT)
156TOP := $(EURASIAROOT)
157
158ifneq ($(words $(TOP)),1)
159$(warning This source tree is located in a path which contains whitespace,)
160$(warning which is not supported.)
161$(warning $(space)The root is: $(TOP))
162$(error Whitespace found in $$(TOP))
163endif
164
165$(call directory-must-exist,$(TOP))
166
167include ../defs.mk
168
169# Infer PVR_BUILD_DIR from the directory configuration is launched from.
170# Check anyway that such a directory exists.
171#
172PVR_BUILD_DIR := $(notdir $(abspath .))
173$(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR))
174
175# Output directory for configuration, object code,
176# final programs/libraries, and install/rc scripts.
177#
178BUILD ?= release
179# TI: Added SGX type to binary build location so builds for different GPUs
180# with the same build directory are put in different places
181OUT ?= $(TOP)/eurasiacon/binary2_$(SGXCORE)_$(SGX_CORE_REV)_$(PVR_BUILD_DIR)_$(BUILD)
182override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT))
183
184CONFIG_MK := $(OUT)/config.mk
185CONFIG_H := $(OUT)/config.h
186CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk
187CONFIG_KERNEL_H := $(OUT)/config_kernel.h
188
189# Create the OUT directory and delete any previous intermediary files
190#
191$(shell mkdir -p $(OUT))
192$(shell \
193 for file in $(CONFIG_MK).new $(CONFIG_H).new \
194 $(CONFIG_KERNEL_MK).new $(CONFIG_KERNEL_H).new; do \
195 rm -f $$file; \
196 done)
197
198# Some targets don't need information about any modules. If we only specify
199# these targets on the make command line, set INTERNAL_CLOBBER_ONLY to
200# indicate that toplevel.mk shouldn't read any makefiles
201CLOBBER_ONLY_TARGETS := clean clobber help install
202INTERNAL_CLOBBER_ONLY :=
203ifneq ($(strip $(MAKECMDGOALS)),)
204INTERNAL_CLOBBER_ONLY := \
205$(if \
206 $(strip $(foreach _cmdgoal,$(MAKECMDGOALS),\
207 $(if $(filter $(_cmdgoal),$(CLOBBER_ONLY_TARGETS)),,x))),,true)
208endif
209
210# For a clobber-only build, we shouldn't regenerate any config files, or
211# require things like SGXCORE to be set
212ifneq ($(INTERNAL_CLOBBER_ONLY),true)
213
214-include ../config/user-defs.mk
215
216# FIXME: Backwards compatibility remaps.
217#
218ifeq ($(SUPPORT_SLC),1)
219SGX_FEATURE_SYSTEM_CACHE := 1
220endif
221ifeq ($(BYPASS_SLC),1)
222SGX_BYPASS_SYSTEM_CACHE := 1
223endif
224ifeq ($(BYPASS_DCU),1)
225SGX_BYPASS_DCU := 1
226endif
227ifneq ($(SGXCOREREV),)
228SGX_CORE_REV := $(SGXCOREREV)
229endif
230
231# Core handling
232#
233ifeq ($(SGXCORE),)
234$(error Must specify SGXCORE)
235endif
236ifeq ($(SGX_CORE_REV),)
237override USE_SGX_CORE_REV_HEAD := 1
238else ifeq ($(SGX_CORE_REV),000)
239override USE_SGX_CORE_REV_HEAD := 1
240override SGX_CORE_REV :=
241else
242override USE_SGX_CORE_REV_HEAD := 0
243endif
244
245# Enforced dependencies. Move this to an include.
246#
247ifeq ($(SUPPORT_LINUX_USING_WORKQUEUES),1)
248override PVR_LINUX_USING_WORKQUEUES := 1
249override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1
250override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1
251override SYS_CUSTOM_POWERLOCK_WRAP := 1
252else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1)
253override PVR_LINUX_USING_WORKQUEUES := 1
254override PVR_LINUX_MISR_USING_WORKQUEUE := 1
255override PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE := 1
256override SYS_CUSTOM_POWERLOCK_WRAP := 1
257endif
258
259ifneq ($(PDUMP),1)
260override SUPPORT_PDUMP_MULTI_PROCESS := 0
261endif
262
263ifeq ($(SUPPORT_HYBRID_PB),1)
264override SUPPORT_SHARED_PB := 1
265override SUPPORT_PERCONTEXT_PB := 1
266else ifeq ($(SUPPORT_PERCONTEXT_PB),1)
267override SUPPORT_SHARED_PB := 0
268endif
269
270ifeq ($(NO_HARDWARE),1)
271override SYS_USING_INTERRUPTS := 0
272override SUPPORT_HW_RECOVERY := 0
273override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
274endif
275
276# We're bumping against USSE limits on older cores because the ukernel
277# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and
278# PVRSRV_USSE_EDM_STATUS_DEBUG=1.
279#
280# Automatically disable vistest support if debugging the ukernel to
281# prevent build failures.
282#
283ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),)
284ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1)
285SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden
286ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden)
287$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
288SGX_DISABLE_VISTEST_SUPPORT := 1
289endif
290endif
291endif
292
293ifeq ($(SGXCORE),535)
294ifeq ($(PVRSRV_USSE_EDM_STATUS_DEBUG),1)
295SUPPORT_SGX_HWPERF ?= not-overridden
296ifeq ($(SUPPORT_SGX_HWPERF),not-overridden)
297$(warning Setting SUPPORT_SGX_HWPERF=0 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
298SUPPORT_SGX_HWPERF := 0
299endif
300endif
301PVR2D_ALT_2DHW ?= 0
302endif
303
304# Multi-core handling must be done separately to other options
305# Also do some sanity checks
306#
307ifeq ($(SGX_FEATURE_MP),1)
308ifeq ($(SGX_FEATURE_MP_CORE_COUNT),)
309ifeq ($(SGX_FEATURE_MP_CORE_COUNT_TA),)
310$(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)
311else
312$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_TA,$(SGX_FEATURE_MP_CORE_COUNT_TA)))
313endif
314ifeq ($(SGX_FEATURE_MP_CORE_COUNT_3D),)
315$(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)
316else
317$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_3D,$(SGX_FEATURE_MP_CORE_COUNT_3D)))
318endif
319else
320$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT,$(SGX_FEATURE_MP_CORE_COUNT)))
321endif
322endif
323
324# Rather than requiring the user to have to define two variables (one quoted,
325# one not), make PVRSRV_MODNAME a non-tunable and give it an overridable
326# default here.
327#
328PVRSRV_MODNAME ?= pvrsrvkm
329
330# The user didn't set CROSS_COMPILE. There's probably nothing wrong
331# with that, but we'll let them know anyway.
332#
333ifeq ($(CROSS_COMPILE),)
334$(warning CROSS_COMPILE is not set. Target components will be built with the host compiler)
335endif
336
337# The user is trying to set one of the old SUPPORT_ options on the
338# command line or in the environment. This isn't supported any more
339# and will often break the build. The user is generally only trying
340# to remove a component from the list of targets to build, so we'll
341# point them at the new way of doing this.
342define sanity-check-support-option-origin
343ifeq ($$(filter undefined file,$$(origin $(1))),)
344$$(warning *** Setting $(1) via $$(origin $(1)) is deprecated)
345$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl")
346endif
347endef
348$(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))))
349
350# Check for words in EXCLUDED_APIS that aren't understood by the
351# common/apis/*.mk files. This should be kept in sync with all the tests on
352# EXCLUDED_APIS in those files
353_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts
354_unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS)))
355ifneq ($(_unrecognised),)
356$(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised))
357$(warning *** EXCLUDED_APIS was set via: $(origin EXCLUDED_APIS))
358$(error Excludable APIs are: $(_excludable_apis))
359endif
360
361# Build's selected list of components
362#
363-include components.mk
364
365# PDUMP needs extra components
366#
367ifeq ($(PDUMP),1)
368ifneq ($(COMPONENTS),)
369COMPONENTS += pdump
370endif
371ifeq ($(SUPPORT_DRI_DRM),1)
372EXTRA_PVRSRVKM_COMPONENTS += dbgdrv
373else
374KERNEL_COMPONENTS += dbgdrv
375endif
376endif
377
378ifeq ($(SUPPORT_PVR_REMOTE),1)
379ifneq ($(filter pvr2d,$(COMPONENTS)),)
380COMPONENTS += null_pvr2d_remote
381endif
382COMPONENTS += pvrvncsrv
383endif
384
385# If KERNELDIR is set, write it out to the config.mk, with
386# KERNEL_COMPONENTS and KERNEL_ID
387#
388ifneq ($(strip $(KERNELDIR)),)
389include ../kernel_version.mk
390PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/
391$(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR)))
392# Needed only by install script
393$(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS)))
394$(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,))
395$(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,))
396
397# If KERNEL_CROSS_COMPILE is set to "undef", this is magically
398# equivalent to being unset. If it is unset, we use CROSS_COMPILE
399# (which might also be unset). If it is set, use it directly.
400ifneq ($(KERNEL_CROSS_COMPILE),undef)
401KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE)
402$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,))
403endif
404
405# Check the KERNELDIR has a kernel built and also check that it is
406# not 64-bit, which we do not support.
407VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux))
408ifneq ($(VMLINUX),)
409VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false)
410ifneq ($(VMLINUX_IS_64BIT),false)
411$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.)
412endif
413else
414$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.)
415endif
416endif
417
418
419# Ideally configured by platform Makefiles, as necessary
420#
421
422# Invariant options for Linux
423#
424$(eval $(call BothConfigC,LINUX,))
425
426$(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\""))
427$(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\""))
428$(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\""))
429
430$(eval $(call TunableBothConfigC,SGXCORE,))
431$(eval $(call BothConfigC,SGX$(SGXCORE),))
432$(eval $(call BothConfigC,SUPPORT_SGX$(SGXCORE),))
433
434$(eval $(call TunableBothConfigC,SUPPORT_SGX,1))
435$(eval $(call TunableBothConfigC,SGX_CORE_REV,))
436$(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,))
437
438$(eval $(call BothConfigC,TRANSFER_QUEUE,))
439$(eval $(call BothConfigC,PVR_SECURE_HANDLES,))
440
441ifneq ($(DISPLAY_CONTROLLER),)
442$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER)))
443endif
444
445PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0
446ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
447PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
448include ../kernel_version.mk
449ifeq ($(call kernel-version-at-least,3,0),true)
450PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1
451endif
452endif
453$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
454$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,))
455$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,))
456
457
458$(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM)))
459
460
461# Build-type dependent options
462#
463$(eval $(call BothConfigMake,BUILD,$(BUILD)))
464
465ifeq ($(BUILD),debug)
466$(eval $(call BothConfigC,DEBUG,))
467$(eval $(call KernelConfigC,DEBUG_LINUX_MEMORY_ALLOCATIONS,))
468$(eval $(call KernelConfigC,DEBUG_LINUX_MEM_AREAS,))
469$(eval $(call KernelConfigC,DEBUG_LINUX_MMAP_AREAS,))
470$(eval $(call KernelConfigC,DEBUG_BRIDGE_KM,))
471else ifeq ($(BUILD),release)
472$(eval $(call BothConfigC,RELEASE,))
473$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
474else ifeq ($(BUILD),timing)
475$(eval $(call BothConfigC,TIMING,))
476$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
477else
478$(error BUILD= must be either debug, release or timing)
479endif
480
481# User-configurable options
482#
483$(eval $(call TunableBothConfigC,SUPPORT_PERCONTEXT_PB,1))
484$(eval $(call TunableBothConfigC,SUPPORT_SHARED_PB,))
485$(eval $(call TunableBothConfigC,SUPPORT_HYBRID_PB,))
486$(eval $(call TunableBothConfigC,SUPPORT_HW_RECOVERY,1))
487$(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1))
488$(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1))
489$(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1))
490$(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,))
491$(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1))
492$(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,))
493$(eval $(call TunableBothConfigC,SUPPORT_DBGDRV_EVENT_OBJECTS,1))
494$(eval $(call TunableBothConfigC,SGX_FEATURE_SYSTEM_CACHE,))
495$(eval $(call TunableBothConfigC,SGX_BYPASS_SYSTEM_CACHE,))
496$(eval $(call TunableBothConfigC,SGX_BYPASS_DCU,))
497$(eval $(call TunableBothConfigC,SGX_FAST_DPM_INIT,))
498$(eval $(call TunableBothConfigC,SGX_FEATURE_MP,))
499$(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,))
500$(eval $(call TunableBothConfigC,FPGA,))
501$(eval $(call TunableBothConfigC,PDUMP,))
502$(eval $(call TunableBothConfigC,NO_HARDWARE,))
503$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,))
504$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,))
505$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,))
506$(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,))
507$(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1))
508$(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,))
509$(eval $(call TunableBothConfigC,PVRSRV_NEW_PVR_DPF,))
510$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_DPF,))
511$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_ASSERT,))
512$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,))
513$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,))
514$(eval $(call TunableBothConfigC,SUPPORT_ION,))
515$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,))
516$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1))
517$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,))
518
519$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1))
520$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1))
521$(eval $(call TunableKernelConfigC,SGX_DYNAMIC_TIMING_INFO,))
522$(eval $(call TunableKernelConfigC,SYS_SGX_ACTIVE_POWER_LATENCY_MS,))
523$(eval $(call TunableKernelConfigC,SYS_CUSTOM_POWERLOCK_WRAP,))
524$(eval $(call TunableKernelConfigC,PVR_LINUX_USING_WORKQUEUES,))
525$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_WORKQUEUE,))
526$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE,))
527$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,))
528$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,))
529$(eval $(call TunableKernelConfigC,LDM_PLATFORM,))
530$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,))
531$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,))
532$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\""))
533$(eval $(call TunableKernelConfigC,LDM_PCI,))
534$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_MK_TRACE,))
535$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_KERNEL_CCB,))
536$(eval $(call TunableKernelConfigC,PVRSRV_REFCOUNT_DEBUG,))
537$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,))
538$(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,))
539$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,))
540$(eval $(call TunableKernelConfigC,TTRACE,))
541
542ifeq ($(BUILD),debug)
543$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,1))
544else
545$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,))
546endif
547
548$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS_HEAP_ALLOC_DEBUG,))
549
550$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
551
552
553$(eval $(call TunableBothConfigMake,OPTIM,))
554
555
556$(eval $(call TunableKernelConfigMake,TTRACE,))
557
558endif # INTERNAL_CLOBBER_ONLY
559
560export INTERNAL_CLOBBER_ONLY
561export TOP
562export OUT
563
564MAKE_ETC := -Rr --no-print-directory -C $(TOP) TOP=$(TOP) OUT=$(OUT) \
565 -f eurasiacon/build/linux2/toplevel.mk
566
567# This must match the default value of MAKECMDGOALS below, and the default
568# goal in toplevel.mk
569.DEFAULT_GOAL := build
570
571ifeq ($(MAKECMDGOALS),)
572MAKECMDGOALS := build
573else
574# We can't pass autogen to toplevel.mk
575MAKECMDGOALS := $(filter-out autogen,$(MAKECMDGOALS))
576endif
577
578.PHONY: autogen
579autogen:
580ifeq ($(INTERNAL_CLOBBER_ONLY),)
581 @$(MAKE) -s --no-print-directory -C $(EURASIAROOT) \
582 -f eurasiacon/build/linux2/prepare_tree.mk \
583 LDM_PCI=$(LDM_PCI) LDM_PLATFORM=$(LDM_PLATFORM)
584else
585 @:
586endif
587
588# This deletes built-in suffix rules. Otherwise the submake isn't run when
589# saying e.g. "make thingy.a"
590.SUFFIXES:
591
592# Because we have a match-anything rule below, we'll run the main build when
593# we're actually trying to remake various makefiles after they're read in.
594# These rules try to prevent that
595%.mk: ;
596Makefile%: ;
597Makefile: ;
598
599.PHONY: build kbuild install
600build kbuild install: autogen
601 @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
602
603%: autogen
604 @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
new file mode 100644
index 0000000..621e03e
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
@@ -0,0 +1,140 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41define must-be-defined
42$(if $(filter undefined,$(origin $(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must be defined),)
43endef
44
45define must-be-nonempty
46$(if $(strip $($(1))),,$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain a value))
47endef
48
49define directory-must-exist
50$(if $(wildcard $(abspath $(1)/)),,$(error Directory $(1) must exist))
51endef
52
53define one-word-only
54$(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),)
55endef
56
57define target-intermediates-of
58$(addprefix $(TARGET_OUT)/intermediates/$(1)/,$(2))
59endef
60
61define host-intermediates-of
62$(addprefix $(HOST_OUT)/intermediates/$(1)/,$(2))
63endef
64
65define module-library
66$(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so))
67endef
68
69# This is done to allow module type makefiles to use $(THIS_MAKEFILE)
70define register-module
71INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE)
72endef
73
74define process-module
75THIS_MODULE := $(1)
76THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1))
77include $$(MAKE_TOP)/this_makefile.mk
78$$(call must-be-nonempty,THIS_MAKEFILE)
79$$(call must-be-nonempty,$(1)_type)
80MODULE_HOST_BUILD := $$(if $(filter host_%,$($(1)_type)),true,)
81include $$(MAKE_TOP)/moduledefs.mk
82include $$(MAKE_TOP)/$$(patsubst host_%,%,$($(1)_type)).mk
83INTERNAL_TARGETS_FOR_$(THIS_MODULE) := $(MODULE_TARGETS)
84endef
85
86# This can be used by module_type.mk files to indicate that they can't be
87# built as host_module_type
88define target-build-only
89$(if $(filter true,$(MODULE_HOST_BUILD)),$(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) attempted to build a host $(1), which is not supported))
90endef
91
92define relative-to-top
93$(patsubst $(TOP)/%,%,$(1))
94endef
95
96define cc-check
97$(shell \
98 CC_CHECK=$(patsubst @%,%,$(CC_CHECK)) && \
99 $(patsubst @%,%,$(CHMOD)) +x $$CC_CHECK && \
100 $$CC_CHECK --cc "$(1)" --out "$(2)" $(3))
101endef
102
103define cc-is-64bit
104$(call cc-check,$(1),$(OUT),--64)
105endef
106
107define cc-option
108$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1))
109endef
110
111define cxx-option
112$(call cc-check,$(patsubst @%,%,$(CXX)),$(OUT),$(1))
113endef
114
115define host-cc-option
116$(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1))
117endef
118
119define kernel-cc-option
120$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1))
121endef
122
123# Turn a particular warning on, or explicitly turn it off, depending on
124# the value of W. The "-W" or "-Wno-" part of the warning need not be
125# specified.
126define cc-optional-warning
127$(call cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
128endef
129
130define host-cc-optional-warning
131$(call host-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
132endef
133
134define kernel-cc-optional-warning
135$(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
136endef
137
138define module-info-line
139$(if $(filter modules,$(D)),$(info $(1)),)
140endef
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template
new file mode 100644
index 0000000..9d88941
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template
@@ -0,0 +1,92 @@
1########################################################################### ###
2#@Title Root kernel makefile
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# This top-level kbuild makefile builds all the Linux kernel modules in the
43# DDK. To run kbuild, this makefile is copied to $(TARGET_OUT)/kbuild/Makefile
44# and make is invoked in $(TARGET_OUT)/kbuild.
45
46# This makefile doesn't define any kbuild special variables apart from
47# ccflags-y and obj-m. The variables for objects are picked up by including
48# the kbuild makefile fragments named in $(INTERNAL_KBUILD_MAKEFILES). The
49# list of objects that these fragments make is collected in
50# $(INTERNAL_KBUILD_OBJECTS) and $(INTERNAL_EXTRA_KBUILD_OBJECTS). These
51# variables are set according to the build's $(KERNEL_COMPONENTS) and
52# $(EXTRA_PVRSRVKM_COMPONENTS). To add a new kernel module to the build, edit
53# these variables in the per-build Makefile.
54
55include $(OUT)/config_kernel.mk
56
57.SECONDARY:
58
59$(OUT)/target/kbuild/external/%.c: $(EXTRA_KBUILD_SOURCE)/%.c
60 @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
61 @if [ ! -h $@ ]; then ln -sf $< $@; fi
62
63$(OUT)/target/kbuild/%.c: $(TOP)/%.c
64 @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
65 @if [ ! -h $@ ]; then ln -sf $< $@; fi
66
67ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \
68 -DDEBUG_LOG_PATH_TRUNCATE="\"$(OUT)/target/kbuild\"" \
69 -I$(OUT)/include \
70 -I$(TOP)/include4 \
71 -I$(TOP)/services4/include \
72 -I$(TOP)/services4/system/$(PVR_SYSTEM) \
73 -I$(TOP)/services4/system/include \
74 -I$(TOP)/services4/srvkm/bridged \
75 -I$(TOP)/services4/srvkm/bridged/sgx \
76 -I$(TOP)/services4/srvkm/common \
77 -I$(TOP)/services4/srvkm/devices/sgx \
78 -I$(TOP)/services4/srvkm/env/linux \
79 -I$(TOP)/services4/srvkm/include
80
81ifeq ($(PVR_LOCAL_HWDEFS),)
82ccflags-y += -I$(TOP)/services4/srvkm/hwdefs
83else
84ccflags-y += -I$(TOP)/hwdefs
85endif
86
87include $(INTERNAL_KBUILD_MAKEFILES)
88
89$(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)))
90pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y))
91
92obj-m += $(INTERNAL_KBUILD_OBJECTS)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk
new file mode 100644
index 0000000..d3aa147
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk
@@ -0,0 +1,49 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41ifneq ($(EXTERNAL_3PDD_TARBALL),)
42TAR_OPT_STRIP_COMPONENTS ?= --strip-components
43prepare_tree: $(OUT)/target/kbuild/external
44$(OUT)/target/kbuild/external: eurasiacon/external/$(EXTERNAL_3PDD_TARBALL)
45 @echo "Extracting $<.."
46 @mkdir -p $@
47 @tar $(TAR_OPT_STRIP_COMPONENTS) 1 --touch -jxf $< -C $@
48 @touch $(OUT)/target/kbuild/external
49endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk
new file mode 100644
index 0000000..94e2100
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk
@@ -0,0 +1,91 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(if $(strip $(KERNELDIR)),,$(error KERNELDIR must be set))
42$(call directory-must-exist,$(KERNELDIR))
43
44$(TARGET_OUT)/kbuild/Makefile: $(MAKE_TOP)/kbuild/Makefile.template
45 @[ ! -e $(dir $@) ] && mkdir -p $(dir $@) || true
46 $(CP) -f $< $@
47
48# We need to make INTERNAL_KBUILD_MAKEFILES absolute because the files will be
49# read while chdir'd into $(KERNELDIR)
50INTERNAL_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)"))))
51INTERNAL_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)))
52INTERNAL_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)))
53.PHONY: kbuild kbuild_clean
54
55kbuild: $(TARGET_OUT)/kbuild/Makefile
56 @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
57 INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
58 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
59 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
60 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
61 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
62 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
63 V=$(V) W=$(W) \
64 TOP=$(TOP)
65 @for kernel_module in $(addprefix $(TARGET_OUT)/kbuild/,$(INTERNAL_KBUILD_OBJECTS:.o=.ko)); do \
66 cp $$kernel_module $(TARGET_OUT); \
67 done
68
69kbuild_clean: $(TARGET_OUT)/kbuild/Makefile
70 @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
71 INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
72 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
73 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
74 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
75 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
76 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
77 V=$(V) W=$(W) \
78 TOP=$(TOP) clean
79
80kbuild_install: $(TARGET_OUT)/kbuild/Makefile
81 @: $(if $(strip $(DISCIMAGE)),,$(error $$(DISCIMAGE) was empty or unset while trying to use it to set INSTALL_MOD_PATH for modules_install))
82 @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \
83 INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \
84 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
85 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
86 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
87 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \
88 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
89 INSTALL_MOD_PATH="$(DISCIMAGE)" \
90 V=$(V) W=$(W) \
91 TOP=$(TOP) modules_install
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk
new file mode 100644
index 0000000..a0a1289
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk
@@ -0,0 +1,75 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# Rules for making kernel modules with kbuild. This makefile doesn't define
42# any rules that build the modules, it only copies the kbuild Makefile into
43# the right place and then invokes kbuild to do the actual build
44
45$(call target-build-only,kernel module)
46
47MODULE_KBUILD_DIR := $(MODULE_OUT)/kbuild
48
49# $(THIS_MODULE)_makefile names the kbuild makefile fragment used to build
50# this module's objects
51$(call must-be-nonempty,$(THIS_MODULE)_makefile)
52MODULE_KBUILD_MAKEFILE := $($(THIS_MODULE)_makefile)
53$(if $(wildcard $(abspath $(MODULE_KBUILD_MAKEFILE))),,$(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) requires kbuild makefile $(MODULE_KBUILD_MAKEFILE), which is missing))
54
55# $(THIS_MODULE)_target specifies the name of the kernel module
56$(call must-be-nonempty,$(THIS_MODULE)_target)
57MODULE_KBUILD_OBJECTS := $($(THIS_MODULE)_target:.ko=.o)
58
59# Here we could maybe include $(MODULE_KBUILD_MAKEFILE) and look at
60# $(MODULE_KBUILD_OBJECTS)-y to see which source files might be built
61
62.PHONY: $(THIS_MODULE)
63$(THIS_MODULE): MODULE_KBUILD_MAKEFILE := $(MODULE_KBUILD_MAKEFILE)
64$(THIS_MODULE): MODULE_KBUILD_OBJECTS := $(MODULE_KBUILD_OBJECTS)
65$(THIS_MODULE):
66 @echo "kbuild module '$@'"
67 @echo " MODULE_KBUILD_MAKEFILE := $(MODULE_KBUILD_MAKEFILE)"
68 @echo " MODULE_KBUILD_OBJECTS := $(MODULE_KBUILD_OBJECTS)"
69 @echo ' Being built:' $(if $(filter $@,$(KERNEL_COMPONENTS)),"yes (separate module)",$(if $(filter $@,$(EXTRA_PVRSRVKM_COMPONENTS)),"yes (into pvrsrvkm)","no"))
70 @echo "Module $@ is a kbuild module. Run 'make kbuild' to make it"
71 @false
72
73ALL_KBUILD_MODULES += $(THIS_MODULE)
74INTERNAL_KBUILD_MAKEFILE_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_MAKEFILE)
75INTERNAL_KBUILD_OBJECTS_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_OBJECTS)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_version.mk
new file mode 100644
index 0000000..35ecceb
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_version.mk
@@ -0,0 +1,100 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(if $(KERNELDIR),,$(error KERNELDIR must be set to obtain a version))
42
43override KERNEL_VERSION := \
44 $(shell grep "^VERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
45override KERNEL_PATCHLEVEL := \
46 $(shell grep "^PATCHLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
47override KERNEL_SUBLEVEL := \
48 $(shell grep "^SUBLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
49override KERNEL_EXTRAVERSION := \
50 $(shell grep "^EXTRAVERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ')
51
52# Break the kernel version up into a space separated list
53kernel_version_as_list := $(KERNEL_VERSION) \
54 $(KERNEL_PATCHLEVEL) \
55 $(KERNEL_SUBLEVEL) \
56 $(patsubst .%,%,$(KERNEL_EXTRAVERSION))
57
58# The base ID doesn't have to be accurate; we only use it for
59# feature checks which will not care about extraversion bits
60#
61override KERNEL_BASE_ID := \
62 $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)
63
64# Try to get the kernel ID from the kernel.release file.
65#
66KERNEL_ID ?= \
67 $(shell cat $(KERNELDIR)/include/config/kernel.release 2>/dev/null)
68
69# If the kernel ID isn't set yet, try to set it from the UTS_RELEASE
70# macro.
71#
72ifeq ($(strip $(KERNEL_ID)),)
73KERNEL_ID := \
74 $(shell grep -h '\#define UTS_RELEASE' \
75 $(KERNELDIR)/include/linux/* | cut -f3 -d' ' | sed s/\"//g)
76endif
77
78ifeq ($(strip $(KERNEL_ID)),)
79KERNEL_ID := \
80 $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION)
81endif
82
83# Return 1 if the kernel version is at least the value passed to the
84# function, else return nothing.
85# Examples
86# $(call kernel-version-at-least,2,6,35)
87# $(call kernel-version-at-least,2,6,35,7)
88#
89define kernel-version-at-least
90$(shell set -- $(kernel_version_as_list) 0 0 0 0; \
91 Y=true; \
92 for D in $1 $2 $3 $4; \
93 do \
94 [ $$1 ] || break; \
95 [ $$1 -eq $$D ] && { shift; continue; };\
96 [ $$1 -lt $$D ] && Y=; \
97 break; \
98 done; \
99 echo $$Y)
100endef
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
new file mode 100644
index 0000000..869026f
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
@@ -0,0 +1,96 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41MODULE_TARGETS :=
42MODULE_CFLAGS := $(ALL_CFLAGS) $($(THIS_MODULE)_cflags)
43MODULE_CXXFLAGS := $(ALL_CXXFLAGS) $($(THIS_MODULE)_cxxflags)
44MODULE_HOST_CFLAGS := $(ALL_HOST_CFLAGS) $($(THIS_MODULE)_cflags)
45MODULE_HOST_CXXFLAGS := $(ALL_HOST_CXXFLAGS) $($(THIS_MODULE)_cxxflags)
46MODULE_LDFLAGS := $(ALL_LDFLAGS) $($(THIS_MODULE)_ldflags)
47MODULE_HOST_LDFLAGS := $(ALL_HOST_LDFLAGS) $($(THIS_MODULE)_ldflags)
48MODULE_BISON_FLAGS := $(ALL_BISON_FLAGS) $($(THIS_MODULE)_bisonflags)
49MODULE_FLEX_FLAGS := $(ALL_FLEX_FLAGS) $($(THIS_MODULE)_flexflags)
50
51# -L flags for library search dirs
52MODULE_LIBRARY_DIR_FLAGS := $(foreach _path,$($(THIS_MODULE)_libpaths),$(if $(filter /%,$(_path)),-L$(call relative-to-top,$(_path)),-L$(_path)))
53# -I flags for header search dirs
54MODULE_INCLUDE_FLAGS := $(foreach _path,$($(THIS_MODULE)_includes),$(if $(filter /%,$(_path)),-I$(call relative-to-top,$(_path)),-I$(_path)))
55
56# Variables used to differentiate between host/target builds
57MODULE_OUT := $(if $(MODULE_HOST_BUILD),$(HOST_OUT),$(TARGET_OUT))
58MODULE_INTERMEDIATES_DIR := $(if $(MODULE_HOST_BUILD),$(HOST_INTERMEDIATES)/$(THIS_MODULE),$(TARGET_INTERMEDIATES)/$(THIS_MODULE))
59
60.SECONDARY: $(MODULE_INTERMEDIATES_DIR)
61$(MODULE_INTERMEDIATES_DIR):
62 $(make-directory)
63
64Host_or_target := $(if $(MODULE_HOST_BUILD),Host,Target)
65
66# These define the rules for finding source files.
67# - If a name begins with a slash, we strip $(TOP) off the front if it begins
68# with $(TOP). This is so that we don't get really long error messages from
69# the compiler if the source tree is in a deeply nested directory, but we
70# still do get absolute paths if you say "make OUT=/tmp/somewhere"
71# - Otherwise, if a name contains a slash and begins with $(OUT), we leave it
72# as it is. This is so you can say "module_src :=
73# $(TARGET_INTERMEDIATES)/something/generated.c"
74# - Otherwise, we assume it's a path referring to somewhere under the
75# directory containing Linux.mk, and add $(THIS_DIR) to it
76_SOURCES_WITHOUT_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),,$(_s))))
77_SOURCES_WITH_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),$(_s),)))
78MODULE_SOURCES := $(addprefix $(THIS_DIR)/,$(_SOURCES_WITHOUT_SLASH))
79MODULE_SOURCES += $(call relative-to-top,$(filter /%,$(_SOURCES_WITH_SLASH)))
80_RELATIVE_SOURCES_WITH_SLASH := $(filter-out /%,$(_SOURCES_WITH_SLASH))
81_OUTDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
82_THISDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter-out $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
83MODULE_SOURCES += $(_OUTDIR_RELATIVE_SOURCES_WITH_SLASH)
84MODULE_SOURCES += $(addprefix $(THIS_DIR)/,$(_THISDIR_RELATIVE_SOURCES_WITH_SLASH))
85MODULE_SOURCES += $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_gensrc))
86MODULE_GENERATED_HEADERS := $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_genheaders))
87
88# -l flags for each library
89MODULE_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)))
90
91# pkg-config integration; primarily used by X.org
92# FIXME: We don't support arbitrary CFLAGS yet (just includes)
93$(foreach _package,$($(THIS_MODULE)_packages),\
94 $(eval MODULE_INCLUDE_FLAGS += `pkg-config --cflags-only-I $(_package)`)\
95 $(eval MODULE_LIBRARY_FLAGS += `pkg-config --libs-only-l $(_package)`)\
96 $(eval MODULE_LIBRARY_DIR_FLAGS += `pkg-config --libs-only-L $(_package)`))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk
new file mode 100644
index 0000000..1576590
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk
@@ -0,0 +1,49 @@
1########################################################################### ###
2#@Title Module processing
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# Bits for processing $(modules) after reading in each Linux.mk
43
44#$(info ---- $(modules) ----)
45$(call must-be-nonempty,modules)
46
47$(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)))))
48
49ALL_MODULES += $(modules)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile
new file mode 100644
index 0000000..cf143fe
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile
@@ -0,0 +1,193 @@
1########################################################################### ###
2#@Title Root makefile for omap4430 Android. Builds everything else.
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42ifeq ($(TARGET_SGX),544sc)
43 SGXCORE := 544
44 SGX_CORE_REV := 112
45else ifeq ($(TARGET_SGX),540)
46 SGXCORE := 540
47 SGX_CORE_REV := 120
48else ifeq ($(TARGET_SGX),544)
49 SGXCORE := 544
50 SGX_CORE_REV := 105
51 HAL_VARIANT := omap5
52 SGX_FEATURE_MP := 1
53 SGX_FEATURE_SYSTEM_CACHE := 1
54 SGX_FEATURE_MP_CORE_COUNT := 2
55else ifeq ($(TARGET_SGX),544es2)
56 SGXCORE := 544
57 SGX_CORE_REV := 116
58 HAL_VARIANT := omap5
59 SGX_FEATURE_MP := 1
60 SGX_FEATURE_SYSTEM_CACHE := 1
61 SGX_FEATURE_MP_CORE_COUNT := 2
62else
63 #default config
64 SGXCORE := 540
65 SGX_CORE_REV := 120
66endif
67export SGXCORE
68export SGX_CORE_REV
69
70SGX_DYNAMIC_TIMING_INFO := 1
71SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
72
73SUPPORT_LINUX_USING_WORKQUEUES := 1
74
75DISPLAY_CONTROLLER := omaplfb
76
77PVR_SYSTEM := omap4
78HAL_VARIANT := $(PVR_SYSTEM)
79
80# We have more memory on OMAP platforms, so we can spare to make the
81# pool larger, and have higher resolutions which benefit from it.
82#
83PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 10800
84
85include ../common/android/paths.mk
86include ../common/android/armv7-a.mk
87include ../common/android/features.mk
88
89ifneq ($(strip $(KERNELDIR)),)
90 include ../kernel_version.mk
91 ifeq ($(call kernel-version-at-least,2,6,35),true)
92 PVR_NO_OMAP_TIMER := 1
93 endif
94 ifeq ($(call kernel-version-at-least,2,6,39),true)
95 ifeq ($(LDM_PLATFORM),1)
96 PVR_LDM_PLATFORM_PRE_REGISTERED := 1
97 PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\""
98 endif
99 endif
100 ifeq ($(is_at_least_icecream_sandwich),1)
101 ifeq ($(call kernel-version-at-least,3,0),true)
102 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
103 PVR_ANDROID_NEEDS_ACCUM_SYNC_WORKAROUND := 1
104 SYS_OMAP4_HAS_DVFS_FRAMEWORK := 0
105 endif
106 endif
107else
108 ifeq ($(is_at_least_icecream_sandwich),1)
109 $(warning "KERNELDIR is not set, so can't feature check DVFS or dsscomp.")
110 $(warning "Assuming we want DVFS and dsscomp support.")
111 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
112 PVR_ANDROID_NEEDS_ACCUM_SYNC_WORKAROUND := 1
113 SYS_OMAP4_HAS_DVFS_FRAMEWORK := 0
114 endif
115endif
116
117ifneq ($(LDM_PLATFORM),1)
118SUPPORT_LINUX_USING_WORKQUEUES := 0
119SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1
120SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
121DISPLAY_CONTROLLER := pvrlfb
122DISPLAY_CONTROLLER_COMPONENT := linux_framebuffer
123OMAP_NON_FLIP_DISPLAY := 1
124
125# The code for the omaplfb component is now hosted on a
126# different repository. No need to compile this now
127#
128# DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
129
130endif
131
132ifeq ($(SUPPORT_DRI_DRM),1)
133ifeq ($(PVR_LDM_PLATFORM_PRE_REGISTERED),1)
134PVR_DRI_DRM_PLATFORM_DEV := 1
135PVR_DRI_DRM_STATIC_BUS_ID := 1
136PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\"
137else
138PVR_DRI_DRM_NOT_PCI := 1
139KERNEL_COMPONENTS += linux_drm
140endif
141EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
142EXTRA_KBUILD_SOURCE := $(KERNELDIR)
143# FIXME: Only required for comparison with X's KM
144PVR_SECURE_DRM_AUTH_EXPORT := 1
145ifneq ($(OMAP_NON_FLIP_DISPLAY),1)
146PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1
147endif
148else
149KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
150endif
151
152SUPPORT_ANDROID_OMAP_NV12 := 1
153
154ifeq ($(is_at_least_icecream_sandwich),1)
155ifeq ($(SUPPORT_ANDROID_COMPOSER_HAL),1)
156PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1
157endif
158endif
159
160PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
161
162# FIXME: Remove this once vsync issues are resolved
163PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
164
165ifeq ($(is_at_least_icecream_sandwich),1)
166-include products.mk
167endif
168
169ifeq ($(NO_HARDWARE),1)
170ifeq ($(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED),1)
171$(info WARNING: SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=1 is incompatible with NO_HARDWARE=1)
172$(info WARNING: Setting SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=0 and switching to dc_nohw)
173override SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 0
174override DISPLAY_CONTROLLER := dcnohw
175KERNEL_COMPONENTS += dc_nohw
176endif
177endif
178
179include ../config/core.mk
180include ../common/android/extra_config.mk
181include ../common/dridrm.mk
182include ../common/opencl.mk
183include ../common/omap4.mk
184
185# Not all OMAP4 kernels have a compatible DVFS framework
186#
187$(eval $(call TunableKernelConfigC,SYS_OMAP4_HAS_DVFS_FRAMEWORK,))
188
189# If set, services allows two flips to enter the processing queue,
190# and does not add read dependencies to the set of buffers last
191# flipped to. This is necessary for DSS composition on OMAP4.
192#
193$(eval $(call TunableKernelConfigC,SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/products.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/products.mk
new file mode 100644
index 0000000..53073a9
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/products.mk
@@ -0,0 +1,46 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1
42SGX_DISABLE_VISTEST_SUPPORT ?= 1
43PVRSRV_DUMP_MK_TRACE ?= 1
44PVRSRV_NEED_PVR_DPF ?= 1
45PVRSRV_NEED_PVR_TRACE ?= 1
46PVRSRV_NEED_PVR_ASSERT ?= 1
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk
new file mode 100644
index 0000000..05e4fe3
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk
@@ -0,0 +1,60 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41.PHONY: prepare_tree
42
43-include eurasiacon/build/linux2/kbuild/external_tarball.mk
44
45# If there's no external tarball, there's nothing to do
46#
47prepare_tree:
48
49INTERNAL_INCLUDED_PREPARE_HEADERS :=
50-include eurasiacon/build/linux2/prepare_headers.mk
51ifneq ($(INTERNAL_INCLUDED_PREPARE_HEADERS),true)
52missing_headers := $(strip $(shell test ! -e include4/pvrversion.h && echo true))
53ifdef missing_headers
54$(info )
55$(info ** include4/pvrversion.h is missing, and cannot be rebuilt.)
56$(info ** Cannot continue.)
57$(info )
58$(error Missing headers)
59endif
60endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/this_makefile.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/this_makefile.mk
new file mode 100644
index 0000000..c312001
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/this_makefile.mk
@@ -0,0 +1,68 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# Find out the path of the Linux.mk makefile currently being processed, and
42# set paths used by the build rules
43
44# This magic is used so we can use this_makefile.mk twice: first when reading
45# in each Linux.mk, and then again when generating rules. There we set
46# $(THIS_MAKEFILE), and $(REMAINING_MAKEFILES) should be empty
47ifneq ($(strip $(REMAINING_MAKEFILES)),)
48
49# Absolute path to the Linux.mk being processed
50THIS_MAKEFILE := $(firstword $(REMAINING_MAKEFILES))
51
52# The list of makefiles left to process
53REMAINING_MAKEFILES := $(wordlist 2,$(words $(REMAINING_MAKEFILES)),$(REMAINING_MAKEFILES))
54
55else
56
57# When generating rules, we should have read in every Linux.mk
58$(if $(INTERNAL_INCLUDED_ALL_MAKEFILES),,$(error No makefiles left in $$(REMAINING_MAKEFILES), but $$(INTERNAL_INCLUDED_ALL_MAKEFILES) is not set))
59
60endif
61
62# Path to the directory containing Linux.mk
63THIS_DIR := $(patsubst %/,%,$(dir $(THIS_MAKEFILE)))
64ifeq ($(strip $(THIS_DIR)),)
65$(error Empty $$(THIS_DIR) for makefile "$(THIS_MAKEFILE)")
66endif
67
68modules :=
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh
new file mode 100755
index 0000000..6cef8fa
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh
@@ -0,0 +1,99 @@
1#!/bin/sh
2########################################################################### ###
3#@Title Test the nature of the C compiler.
4#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5#@License Dual MIT/GPLv2
6#
7# The contents of this file are subject to the MIT license as set out below.
8#
9# Permission is hereby granted, free of charge, to any person obtaining a copy
10# of this software and associated documentation files (the "Software"), to deal
11# in the Software without restriction, including without limitation the rights
12# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13# copies of the Software, and to permit persons to whom the Software is
14# furnished to do so, subject to the following conditions:
15#
16# The above copyright notice and this permission notice shall be included in
17# all copies or substantial portions of the Software.
18#
19# Alternatively, the contents of this file may be used under the terms of
20# the GNU General Public License Version 2 ("GPL") in which case the provisions
21# of GPL are applicable instead of those above.
22#
23# If you wish to allow use of your version of this file only under the terms of
24# GPL, and not to allow others to use your version of this file under the terms
25# of the MIT license, indicate your decision by deleting the provisions above
26# and replace them with the notice and other provisions required by GPL as set
27# out in the file called "GPL-COPYING" included in this distribution. If you do
28# not delete the provisions above, a recipient may use your version of this file
29# under the terms of either the MIT license or GPL.
30#
31# This License is also included in this distribution in the file called
32# "MIT-COPYING".
33#
34# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
35# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
36# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
37# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
38# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
39# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
40# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41### ###########################################################################
42
43LANG=C
44export LANG
45
46usage() {
47 echo "usage: $0 [--64] --cc CC --out OUT [cflag]"
48 exit 1
49}
50
51# NOTE: The program passed to the compiler is deliberately incorrect
52# (`return;' should be `return 0;') but we do this to emit a warning.
53#
54# Emitting a warning is necessary to get GCC to print out additional
55# warnings about any unsupported -Wno options, so we can handle these
56# as unsupported by the build.
57#
58do_cc() {
59 echo "int main(void){return;}" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1
60}
61
62while [ 1 ]; do
63 if [ "$1" = "--64" ]; then
64 BIT_CHECK=1
65 elif [ "$1" = "--cc" ]; then
66 [ "x$2" = "x" ] && usage
67 CC="$2" && shift
68 elif [ "$1" = "--out" ]; then
69 [ "x$2" = "x" ] && usage
70 OUT="$2" && shift
71 elif [ "${1#--}" != "$1" ]; then
72 usage
73 else
74 break
75 fi
76 shift
77done
78
79[ "x$CC" = "x" ] && usage
80[ "x$OUT" = "x" ] && usage
81ccof=$OUT/cc-sanity-check
82log=${ccof}.log
83
84if [ "x$BIT_CHECK" = "x1" ]; then
85 do_cc $ccof $log ""
86 file $ccof | grep 64-bit >/dev/null 2>&1
87 [ "$?" = "0" ] && echo true || echo false
88else
89 [ "x$1" = "x" ] && usage
90 do_cc $ccof $log $1
91 if [ "$?" = "0" ]; then
92 # compile passed, but was the warning unrecognized?
93 grep -q "^cc1: warning: unrecognized command line option \"$1\"" $log
94 [ "$?" = "1" ] && echo $1
95 fi
96fi
97
98rm -f $ccof $log
99exit 0
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk
new file mode 100644
index 0000000..26b1198
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk
@@ -0,0 +1,226 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# Define the default goal. This masks a previous definition of the default
42# goal in Makefile.config, which must match this one
43.PHONY: build
44build: components kbuild
45
46ifeq ($(OUT),)
47$(error "Must specify output directory with OUT=")
48endif
49
50ifeq ($(TOP),)
51$(error "Must specify root of source tree with TOP=")
52endif
53$(call directory-must-exist,$(TOP))
54
55# Output directory for configuration, object code,
56# final programs/libraries, and install/rc scripts.
57#
58
59# RELATIVE_OUT is relative only if it's under $(TOP)
60RELATIVE_OUT := $(patsubst $(TOP)/%,%,$(OUT))
61HOST_OUT := $(RELATIVE_OUT)/host
62TARGET_OUT := $(RELATIVE_OUT)/target
63CONFIG_MK := $(RELATIVE_OUT)/config.mk
64CONFIG_H := $(RELATIVE_OUT)/config.h
65CONFIG_KERNEL_MK := $(RELATIVE_OUT)/config_kernel.mk
66CONFIG_KERNEL_H := $(RELATIVE_OUT)/config_kernel.h
67MAKE_TOP := eurasiacon/build/linux2
68THIS_MAKEFILE := (top-level makefiles)
69
70# Convert commas to spaces in $(D). This is so you can say "make
71# D=config-changes,freeze-config" and have $(filter config-changes,$(D))
72# still work.
73comma := ,
74empty :=
75space := $(empty) $(empty)
76override D := $(subst $(comma),$(space),$(D))
77
78include $(MAKE_TOP)/defs.mk
79
80ifneq ($(INTERNAL_CLOBBER_ONLY),true)
81# Create the out directory
82#
83$(shell mkdir -p $(OUT))
84
85# Provide rules to create $(HOST_OUT) and $(TARGET_OUT)
86.SECONDARY: $(HOST_OUT) $(TARGET_OUT)
87$(HOST_OUT) $(TARGET_OUT):
88 $(make-directory)
89
90# If these generated files differ from any pre-existing ones,
91# replace them, causing affected parts of the driver to rebuild.
92#
93_want_config_diff := $(filter config-changes,$(D))
94_freeze_config := $(strip $(filter freeze-config,$(D)))
95_updated_config_files := $(shell \
96 $(if $(_want_config_diff),rm -f $(OUT)/config.diff;,) \
97 for file in $(CONFIG_MK) $(CONFIG_H) \
98 $(CONFIG_KERNEL_MK) $(CONFIG_KERNEL_H); do \
99 diff -U 0 $$file $$file.new \
100 >>$(if $(_want_config_diff),$(OUT)/config.diff,/dev/null) 2>/dev/null \
101 && rm -f $$file.new \
102 || echo $$file; \
103 done)
104
105ifneq ($(_want_config_diff),)
106# We send the diff to stderr so it isn't captured by $(shell)
107$(shell [ -s $(OUT)/config.diff ] && echo >&2 "Configuration changed in $(RELATIVE_OUT):" && cat >&2 $(OUT)/config.diff)
108endif
109
110ifneq ($(_freeze_config),)
111$(if $(_updated_config_files),$(error Configuration change in $(RELATIVE_OUT) prevented by D=freeze-config),)
112endif
113
114# Update the config, if changed
115$(foreach _f,$(_updated_config_files), \
116 $(shell mv -f $(_f).new $(_f) >/dev/null 2>/dev/null))
117
118endif # INTERNAL_CLOBBER_ONLY
119
120MAKEFLAGS := -Rr --no-print-directory
121
122ifneq ($(INTERNAL_CLOBBER_ONLY),true)
123
124# This is so you can say "find $(TOP) -name Linux.mk > /tmp/something; export
125# ALL_MAKEFILES=/tmp/something; make" and avoid having to run find. This is
126# handy if your source tree is mounted over NFS or something
127override 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)))
128ifeq ($(strip $(ALL_MAKEFILES)),)
129$(info ** Unable to find any Linux.mk files under $$(TOP). This could mean that)
130$(info ** there are no makefiles, or that ALL_MAKEFILES is set in the environment)
131$(info ** and points to a nonexistent or empty file.)
132$(error No makefiles)
133endif
134
135else # clobber-only
136ALL_MAKEFILES :=
137endif
138
139unexport ALL_MAKEFILES
140
141REMAINING_MAKEFILES := $(ALL_MAKEFILES)
142ALL_MODULES :=
143INTERNAL_INCLUDED_ALL_MAKEFILES :=
144
145ifneq ($(INTERNAL_CLOBBER_ONLY),true)
146# Please do not change the format of the following lines
147-include $(CONFIG_KERNEL_MK)
148# These files may not exist in GPL km source packages
149-include $(MAKE_TOP)/xorgconf.mk
150-include $(MAKE_TOP)/llvm.mk
151endif
152
153include $(MAKE_TOP)/commands.mk
154include $(MAKE_TOP)/buildvars.mk
155
156HOST_INTERMEDIATES := $(HOST_OUT)/intermediates
157TARGET_INTERMEDIATES := $(TARGET_OUT)/intermediates
158
159# Include each Linux.mk, then include modules.mk to save some information
160# about each module
161include $(foreach _Linux.mk,$(ALL_MAKEFILES),$(MAKE_TOP)/this_makefile.mk $(_Linux.mk) $(MAKE_TOP)/modules.mk)
162
163ifeq ($(strip $(REMAINING_MAKEFILES)),)
164INTERNAL_INCLUDED_ALL_MAKEFILES := true
165else
166$(error Impossible: $(words $(REMAINING_MAKEFILES)) makefiles were mysteriously ignored when reading $$(ALL_MAKEFILES))
167endif
168
169# At this point, all Linux.mks have been included. Now generate rules to build
170# each module: for each module in $(ALL_MODULES), set per-makefile variables
171$(foreach _m,$(ALL_MODULES),$(eval $(call process-module,$(_m))))
172
173.PHONY: kbuild install
174kbuild install:
175
176ifneq ($(INTERNAL_CLOBBER_ONLY),true)
177-include $(MAKE_TOP)/scripts.mk
178-include $(MAKE_TOP)/kbuild/kbuild.mk
179else
180# We won't depend on 'build' here so that people can build subsets of
181# components and still have the install script attempt to install the
182# subset.
183install:
184 @if [ ! -d "$(DISCIMAGE)" ]; then \
185 echo; \
186 echo "** DISCIMAGE was not set or does not point to a valid directory."; \
187 echo "** Cannot continue with install."; \
188 echo; \
189 exit 1; \
190 fi
191 @if [ ! -f $(TARGET_OUT)/install.sh ]; then \
192 echo; \
193 echo "** install.sh not found in $(TARGET_OUT)."; \
194 echo "** Cannot continue with install."; \
195 echo; \
196 exit 1; \
197 fi
198 @cd $(TARGET_OUT) && ./install.sh
199endif
200
201# You can say 'make all_modules' to attempt to make everything, or 'make
202# components' to only make the things which are listed (in the per-build
203# makefiles) as components of the build.
204.PHONY: all_modules components
205all_modules: $(ALL_MODULES)
206components: $(COMPONENTS)
207
208# Cleaning
209.PHONY: clean clobber
210clean: MODULE_DIRS_TO_REMOVE := $(OUT)/host/intermediates $(OUT)/target/intermediates $(OUT)/target/kbuild
211clean:
212 $(clean-dirs)
213clobber: MODULE_DIRS_TO_REMOVE := $(OUT)
214clobber:
215 $(clean-dirs)
216
217# Saying 'make clean-MODULE' removes the intermediates for MODULE.
218# clobber-MODULE deletes the output files as well
219clean-%:
220 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$*))
221 $(RM) -rf $(OUT)/host/intermediates/$*/* $(OUT)/target/intermediates/$*/*
222clobber-%:
223 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)))
224 $(RM) -rf $(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)
225
226include $(MAKE_TOP)/bits.mk