diff options
author | Vishal Mahaveer | 2013-06-10 15:28:26 -0500 |
---|---|---|
committer | Vishal Mahaveer | 2013-06-10 15:28:26 -0500 |
commit | 49290fec5b79ea4464b7b6db018bc1f03e4b6e49 (patch) | |
tree | c3c370a6dd58444d34732f6c475b13c138146ebf /jacinto6/sgx_src/eurasia_km/eurasiacon/build | |
parent | cca3094bfd2e6b9bbad60eb3515347259e3c920d (diff) | |
download | device-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')
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 | |||
42 | ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),) | ||
43 | dumpvar-%: ; | ||
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))))) | ||
45 | endif | ||
46 | |||
47 | ifneq ($(filter whereis-%,$(MAKECMDGOALS)),) | ||
48 | whereis-%: ; | ||
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)))) | ||
50 | endif | ||
51 | |||
52 | ifneq ($(filter whatis-%,$(MAKECMDGOALS)),) | ||
53 | whatis-$(RELATIVE_OUT)/target/%: ; | ||
54 | whatis-$(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)),))))) | ||
56 | endif | ||
57 | |||
58 | .PHONY: ls-modules | ||
59 | ls-modules: | ||
60 | @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))))) | ||
61 | |||
62 | ifeq ($(strip $(MAKECMDGOALS)),visualise) | ||
63 | FORMAT ?= xlib | ||
64 | GRAPHVIZ ?= neato | ||
65 | visualise: $(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 | ||
71 | else | ||
72 | visualise: | ||
73 | @: $(error visualise specified along with other goals. This is not supported) | ||
74 | endif | ||
75 | |||
76 | .PHONY: help | ||
77 | help: | ||
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 | |||
103 | ifneq ($(filter help,$(D)),) | ||
104 | empty := | ||
105 | space := $(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) | ||
112 | endif | ||
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 | |||
45 | ifeq ($(BUILD),debug) | ||
46 | COMMON_USER_FLAGS := -O0 | ||
47 | else | ||
48 | OPTIM ?= -O2 | ||
49 | COMMON_USER_FLAGS := $(OPTIM) | ||
50 | endif | ||
51 | |||
52 | # FIXME: We should probably audit the driver for aliasing | ||
53 | # | ||
54 | COMMON_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 | # | ||
59 | COMMON_USER_FLAGS += -g | ||
60 | |||
61 | # These flags are used for kernel, User C and User C++ | ||
62 | # | ||
63 | COMMON_FLAGS = -W -Wall | ||
64 | |||
65 | # Some GCC warnings are C only, so we must mask them from C++ | ||
66 | # | ||
67 | COMMON_CFLAGS := $(COMMON_FLAGS) \ | ||
68 | -Wdeclaration-after-statement -Wno-format-zero-length \ | ||
69 | -Wmissing-prototypes -Wstrict-prototypes | ||
70 | |||
71 | # Additional warnings, and optional warnings. | ||
72 | # | ||
73 | WARNING_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 | |||
79 | ifeq ($(W),1) | ||
80 | WARNING_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) | ||
100 | endif | ||
101 | |||
102 | WARNING_CFLAGS += \ | ||
103 | $(call cc-optional-warning,-Wunused-but-set-variable) | ||
104 | |||
105 | HOST_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 | |||
111 | ifeq ($(W),1) | ||
112 | HOST_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) | ||
132 | endif | ||
133 | |||
134 | HOST_WARNING_CFLAGS += \ | ||
135 | $(call host-cc-optional-warning,-Wunused-but-set-variable) | ||
136 | |||
137 | KBUILD_WARNING_CFLAGS := \ | ||
138 | -Wno-unused-parameter -Wno-sign-compare | ||
139 | KBUILD_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 | # | ||
163 | ALL_CFLAGS := \ | ||
164 | $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \ | ||
165 | $(SYS_CFLAGS) | ||
166 | |||
167 | ALL_HOST_CFLAGS := \ | ||
168 | $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS) | ||
169 | |||
170 | # User C++ only | ||
171 | # | ||
172 | ALL_CXXFLAGS := \ | ||
173 | $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \ | ||
174 | -fno-rtti -fno-exceptions \ | ||
175 | -Wpointer-arith -Wunused-parameter \ | ||
176 | $(SYS_CXXFLAGS) | ||
177 | |||
178 | ALL_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 | # | ||
189 | ALL_HOST_LDFLAGS := -L$(HOST_OUT) | ||
190 | ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT) | ||
191 | |||
192 | ifneq ($(strip $(TOOLCHAIN)),) | ||
193 | ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib | ||
194 | endif | ||
195 | |||
196 | ifneq ($(strip $(LINKER_RPATH)),) | ||
197 | ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH)) | ||
198 | endif | ||
199 | |||
200 | ALL_LDFLAGS += $(SYS_LDFLAGS) | ||
201 | |||
202 | # Kernel C only | ||
203 | # | ||
204 | ALL_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 | ||
211 | ALL_KBUILD_MODULES := | ||
212 | |||
213 | # This variable contains a list of all modules which contain C++ source files | ||
214 | ALL_CXX_MODULES := | ||
215 | |||
216 | # Toolchain triple for cross environment | ||
217 | CROSS_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 | |||
50 | define 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 $@ | ||
54 | endef | ||
55 | |||
56 | define 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 $@ | ||
60 | endef | ||
61 | |||
62 | # We use $(CC) to compile C++ files, and expect it to detect that it's | ||
63 | # compiling C++ | ||
64 | define 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 $@ | ||
68 | endef | ||
69 | |||
70 | define 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 $@ | ||
74 | endef | ||
75 | |||
76 | define 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) | ||
81 | endef | ||
82 | |||
83 | define 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) | ||
88 | endef | ||
89 | |||
90 | define 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) | ||
96 | endef | ||
97 | |||
98 | define 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) | ||
104 | endef | ||
105 | |||
106 | define 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) | ||
112 | endef | ||
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 | ||
116 | define 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) | ||
122 | endef | ||
123 | |||
124 | define target-copy-debug-information | ||
125 | $(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg | ||
126 | endef | ||
127 | |||
128 | define host-strip-debug-information | ||
129 | $(HOST_STRIP) --strip-unneeded $@ | ||
130 | endef | ||
131 | |||
132 | define target-strip-debug-information | ||
133 | $(STRIP) --strip-unneeded $@ | ||
134 | endef | ||
135 | |||
136 | define target-add-debuglink | ||
137 | $(if $(V),,@echo " DBGLINK " $(call relative-to-top,$(basename $@).dbg)) | ||
138 | $(OBJCOPY) --add-gnu-debuglink=$(basename $@).dbg $@ | ||
139 | endef | ||
140 | |||
141 | define host-static-library-from-o | ||
142 | $(if $(V),,@echo " HOST_AR " $(call relative-to-top,$@)) | ||
143 | $(HOST_AR) cru $@ $(sort $(MODULE_ALL_OBJECTS)) | ||
144 | endef | ||
145 | |||
146 | define target-static-library-from-o | ||
147 | $(if $(V),,@echo " AR " $(call relative-to-top,$@)) | ||
148 | $(AR) cru $@ $(sort $(MODULE_ALL_OBJECTS)) | ||
149 | endef | ||
150 | |||
151 | define tab-c-from-y | ||
152 | $(if $(V),,@echo " BISON " $(call relative-to-top,$<)) | ||
153 | $(BISON) $(MODULE_BISON_FLAGS) -o $@ -d $< | ||
154 | endef | ||
155 | |||
156 | define l-c-from-l | ||
157 | $(if $(V),,@echo " FLEX " $(call relative-to-top,$<)) | ||
158 | $(FLEX) $(MODULE_FLEX_FLAGS) -o$@ $< | ||
159 | endef | ||
160 | |||
161 | define clean-dirs | ||
162 | $(if $(V),,@echo " RM " $(call relative-to-top,$(MODULE_DIRS_TO_REMOVE))) | ||
163 | $(RM) -rf $(MODULE_DIRS_TO_REMOVE) | ||
164 | endef | ||
165 | |||
166 | define make-directory | ||
167 | $(MKDIR) -p $@ | ||
168 | endef | ||
169 | |||
170 | define check-exports | ||
171 | endef | ||
172 | |||
173 | # Programs used in recipes | ||
174 | |||
175 | BISON ?= bison | ||
176 | CC ?= gcc | ||
177 | CXX ?= g++ | ||
178 | HOST_CC ?= gcc | ||
179 | HOST_CXX ?= g++ | ||
180 | JAR ?= jar | ||
181 | JAVA ?= java | ||
182 | JAVAC ?= javac | ||
183 | ZIP ?= zip | ||
184 | |||
185 | override AR := $(if $(V),,@)$(CROSS_COMPILE)ar | ||
186 | override BISON := $(if $(V),,@)$(BISON) | ||
187 | override BZIP2 := $(if $(V),,@)bzip2 -9 | ||
188 | override CC := $(if $(V),,@)$(CROSS_COMPILE)$(CC) | ||
189 | override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh | ||
190 | override CXX := $(if $(V),,@)$(CROSS_COMPILE)$(CXX) | ||
191 | override CHMOD := $(if $(V),,@)chmod | ||
192 | override CP := $(if $(V),,@)cp | ||
193 | override ECHO := $(if $(V),,@)echo | ||
194 | override FLEX := $(if $(V),,@)flex | ||
195 | override GAWK := $(if $(V),,@)gawk | ||
196 | override GREP := $(if $(V),,@)grep | ||
197 | override HOST_AR := $(if $(V),,@)ar | ||
198 | override HOST_CC := $(if $(V),,@)$(HOST_CC) | ||
199 | override HOST_CXX := $(if $(V),,@)$(HOST_CXX) | ||
200 | override HOST_STRIP := $(if $(V),,@)strip | ||
201 | override INSTALL := $(if $(V),,@)install | ||
202 | override JAR := $(if $(V),,@)$(JAR) | ||
203 | override JAVA := $(if $(V),,@)$(JAVA) | ||
204 | override JAVAC := $(if $(V),,@)$(JAVAC) | ||
205 | override M4 := $(if $(V),,@)m4 | ||
206 | override MKDIR := $(if $(V),,@)mkdir | ||
207 | override MV := $(if $(V),,@)mv | ||
208 | override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy | ||
209 | override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm | ||
210 | override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib | ||
211 | override RM := $(if $(V),,@)rm -f | ||
212 | override SED := $(if $(V),,@)sed | ||
213 | override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip | ||
214 | override TAR := $(if $(V),,@)tar | ||
215 | override TOUCH := $(if $(V),,@)touch | ||
216 | override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm | ||
217 | override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink | ||
218 | override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc | ||
219 | override 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 | |||
41 | SYS_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 | |||
57 | SYS_EXE_LDFLAGS := \ | ||
58 | -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \ | ||
59 | -lc -ldl -lcutils | ||
60 | |||
61 | SYS_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 | |||
41 | OPTIM := -Os | ||
42 | |||
43 | ANDROID_ARCH := arm | ||
44 | include ../common/android/arch_common.mk | ||
45 | |||
46 | SYS_CFLAGS += -march=armv7-a | ||
47 | |||
48 | SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o | ||
49 | SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o | ||
50 | |||
51 | # Handle the removal of the armelf.x and armelf.xsc linker scripts. | ||
52 | ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),) | ||
53 | # The linker scripts have been removed. We need to use these options | ||
54 | # instead. | ||
55 | SYS_EXE_LDFLAGS += -Wl,-z,relro -Wl,-z,now | ||
56 | SYS_LIB_LDFLAGS += -Wl,-z,relro -Wl,-z,now | ||
57 | else | ||
58 | # The linker scripts are still present in the Android tree, so we need to | ||
59 | # use them. | ||
60 | SYS_EXE_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.x | ||
61 | SYS_LIB_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.xsc | ||
62 | endif | ||
63 | |||
64 | JNI_CPU_ABI := armeabi | ||
65 | |||
66 | # Android builds are usually GPL | ||
67 | # | ||
68 | LDM_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 | |||
41 | include ../common/android/platform_version.mk | ||
42 | |||
43 | # Basic support option tuning for Android | ||
44 | # | ||
45 | SUPPORT_ANDROID_PLATFORM := 1 | ||
46 | SUPPORT_OPENGLES1_V1_ONLY := 1 | ||
47 | |||
48 | # Meminfo IDs are required for buffer stamps | ||
49 | # | ||
50 | SUPPORT_MEMINFO_IDS := 1 | ||
51 | |||
52 | # Need multi-process support in PDUMP | ||
53 | # | ||
54 | SUPPORT_PDUMP_MULTI_PROCESS := 1 | ||
55 | |||
56 | # Always print debugging after 5 seconds of no activity | ||
57 | # | ||
58 | CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50 | ||
59 | |||
60 | # Android WSEGL is always the same | ||
61 | # | ||
62 | OPK_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 | # | ||
67 | KERNEL_COMPONENTS := srvkm | ||
68 | ifeq ($(is_at_least_honeycomb),0) | ||
69 | KERNEL_COMPONENTS += bufferclass_example | ||
70 | endif | ||
71 | |||
72 | # Kernel modules are always installed here under Android | ||
73 | # | ||
74 | PVRSRV_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 | # | ||
79 | PVRSRV_NEW_PVR_DPF := 1 | ||
80 | |||
81 | # Production Android builds don't want PVRSRVGetDCSystemBuffer | ||
82 | # | ||
83 | SUPPORT_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 | # | ||
89 | SUPPORT_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 | # | ||
100 | PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400 | ||
101 | |||
102 | ############################################################################## | ||
103 | # EGL connect/disconnect hooks only available since Froyo | ||
104 | # Obsolete in future versions | ||
105 | # | ||
106 | ifeq ($(is_at_least_froyo),1) | ||
107 | ifeq ($(is_at_least_icecream_sandwich),0) | ||
108 | PVR_ANDROID_HAS_CONNECT_DISCONNECT := 1 | ||
109 | endif | ||
110 | endif | ||
111 | |||
112 | ############################################################################## | ||
113 | # Override surface field name for older versions | ||
114 | # | ||
115 | ifeq ($(is_at_least_gingerbread),0) | ||
116 | PVR_ANDROID_SURFACE_FIELD_NAME := \"mSurface\" | ||
117 | endif | ||
118 | |||
119 | ############################################################################## | ||
120 | # Provide ANativeWindow{Buffer,} typedefs for older versions | ||
121 | # | ||
122 | ifeq ($(is_at_least_gingerbread),0) | ||
123 | PVR_ANDROID_NEEDS_ANATIVEWINDOW_TYPEDEF := 1 | ||
124 | endif | ||
125 | ifeq ($(is_at_least_icecream_sandwich),0) | ||
126 | PVR_ANDROID_NEEDS_ANATIVEWINDOWBUFFER_TYPEDEF := 1 | ||
127 | endif | ||
128 | |||
129 | ############################################################################## | ||
130 | # Handle various platform includes for unittests | ||
131 | # | ||
132 | UNITTEST_INCLUDES := eurasiacon/android | ||
133 | |||
134 | ifeq ($(is_at_least_gingerbread),1) | ||
135 | UNITTEST_INCLUDES += $(ANDROID_ROOT)/frameworks/base/native/include | ||
136 | endif | ||
137 | |||
138 | ifeq ($(is_at_least_jellybean),1) | ||
139 | UNITTEST_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. | ||
144 | UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include | ||
145 | else | ||
146 | UNITTEST_INCLUDES += \ | ||
147 | $(ANDROID_ROOT)/frameworks/base/opengl/include \ | ||
148 | $(ANDROID_ROOT)/dalvik/libnativehelper/include | ||
149 | endif | ||
150 | |||
151 | # But it doesn't have OpenVG headers | ||
152 | # | ||
153 | UNITTEST_INCLUDES += eurasiacon/unittests/include | ||
154 | |||
155 | ############################################################################## | ||
156 | # Future versions moved proprietary libraries to a vendor directory | ||
157 | # | ||
158 | ifeq ($(is_at_least_gingerbread),1) | ||
159 | SHLIB_DESTDIR := /system/vendor/lib | ||
160 | DEMO_DESTDIR := /system/vendor/bin | ||
161 | else | ||
162 | SHLIB_DESTDIR := /system/lib | ||
163 | DEMO_DESTDIR := /system/bin | ||
164 | endif | ||
165 | |||
166 | # EGL libraries go in a special place | ||
167 | # | ||
168 | EGL_DESTDIR := $(SHLIB_DESTDIR)/egl | ||
169 | |||
170 | ############################################################################## | ||
171 | # We can support OpenCL in the build since Froyo (stlport was added in 2.2) | ||
172 | # | ||
173 | ifeq ($(is_at_least_froyo),1) | ||
174 | SYS_CXXFLAGS := \ | ||
175 | -fuse-cxa-atexit \ | ||
176 | $(SYS_CFLAGS) \ | ||
177 | -I$(ANDROID_ROOT)/bionic \ | ||
178 | -I$(ANDROID_ROOT)/external/stlport/stlport | ||
179 | else | ||
180 | SYS_CXXFLAGS := \ | ||
181 | $(SYS_CFLAGS) \ | ||
182 | -I$(ANDROID_ROOT)/bionic/libstdc++/include | ||
183 | endif | ||
184 | |||
185 | ############################################################################## | ||
186 | # Composition bypass feature, supported since Froyo. | ||
187 | # In ICS, hardware composer (HWC) should be used instead. | ||
188 | # | ||
189 | ifeq ($(is_at_least_froyo),1) | ||
190 | ifeq ($(is_at_least_honeycomb),0) | ||
191 | PVR_ANDROID_HAS_NATIVE_BUFFER_TRANSFORM := 1 | ||
192 | SUPPORT_ANDROID_COMPOSITION_BYPASS := 1 | ||
193 | endif | ||
194 | endif | ||
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 | # | ||
207 | ifeq ($(is_at_least_honeycomb),1) | ||
208 | SUPPORT_ANDROID_COMPOSER_HAL := 1 | ||
209 | endif | ||
210 | |||
211 | ############################################################################## | ||
212 | # We have some extra GRALLOC_USAGE bits we need to handle in ICS | ||
213 | # | ||
214 | ifeq ($(is_at_least_honeycomb),1) | ||
215 | PVR_ANDROID_HAS_GRALLOC_USAGE_EXTERNAL_DISP := 1 | ||
216 | PVR_ANDROID_HAS_GRALLOC_USAGE_PROTECTED := 1 | ||
217 | PVR_ANDROID_HAS_GRALLOC_USAGE_PRIVATE := 1 | ||
218 | endif | ||
219 | |||
220 | ############################################################################## | ||
221 | # Support the new OES_EGL_image_external extension + YV12 buffers | ||
222 | # | ||
223 | ifeq ($(is_at_least_honeycomb),1) | ||
224 | PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YV12 := 1 | ||
225 | GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1 | ||
226 | GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1 | ||
227 | endif | ||
228 | |||
229 | ############################################################################## | ||
230 | # Gingerbread adds the native window cancelBuffer operation | ||
231 | # | ||
232 | ifeq ($(is_at_least_gingerbread),1) | ||
233 | PVR_ANDROID_HAS_CANCELBUFFER := 1 | ||
234 | endif | ||
235 | |||
236 | ############################################################################## | ||
237 | # Versions prior to ICS have another header we must include | ||
238 | # | ||
239 | ifeq ($(is_at_least_icecream_sandwich),0) | ||
240 | PVR_ANDROID_HAS_ANDROID_NATIVE_BUFFER_H := 1 | ||
241 | endif | ||
242 | |||
243 | ############################################################################## | ||
244 | # ICS added dump() hook to gralloc alloc_device_t API | ||
245 | # | ||
246 | ifeq ($(is_at_least_honeycomb),1) | ||
247 | PVR_ANDROID_HAS_GRALLOC_DUMP := 1 | ||
248 | endif | ||
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 | # | ||
257 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
258 | SUPPORT_HAL_PIXEL_FORMAT_BGRX := 1 | ||
259 | endif | ||
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 | # | ||
270 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
271 | PVR_ANDROID_HAS_WINDOW_TRANSFORM_HINT := 1 | ||
272 | endif | ||
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 | # | ||
279 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
280 | EGL_EXTENSION_ANDROID_RECORDABLE := 1 | ||
281 | endif | ||
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 | # | ||
287 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
288 | PVR_ANDROID_HAS_GRALLOC_USAGE_HW_COMPOSER := 1 | ||
289 | endif | ||
290 | |||
291 | ############################################################################## | ||
292 | # ICS added the EGL_ANDROID_blob_cache extension. Enable support for this | ||
293 | # extension in EGL/GLESv2. | ||
294 | # | ||
295 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
296 | EGL_EXTENSION_ANDROID_BLOB_CACHE := 1 | ||
297 | endif | ||
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 | # | ||
303 | ifeq ($(is_at_least_icecream_sandwich_mr1),1) | ||
304 | PVR_ANDROID_HAS_GRALLOC_USAGE_HW_VIDEO_ENCODER := 1 | ||
305 | endif | ||
306 | |||
307 | ############################################################################## | ||
308 | # ICS and earlier should rate-limit composition by waiting for 3D renders | ||
309 | # to complete in the compositor's eglSwapBuffers(). | ||
310 | # | ||
311 | ifeq ($(is_at_least_jellybean),0) | ||
312 | PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1 | ||
313 | endif | ||
314 | |||
315 | ############################################################################## | ||
316 | # JB added a new corkscrew API for userland backtracing. | ||
317 | # | ||
318 | ifeq ($(is_at_least_jellybean),1) | ||
319 | PVR_ANDROID_HAS_CORKSCREW_API := 1 | ||
320 | endif | ||
321 | |||
322 | # Placeholder for future version handling | ||
323 | # | ||
324 | ifeq ($(is_future_version),1) | ||
325 | -include ../common/android/future_version.mk | ||
326 | endif | ||
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 | |||
41 | TARGET_BUILD_TYPE ?= release | ||
42 | |||
43 | OUT_DIR ?= $(ANDROID_ROOT)/out | ||
44 | |||
45 | ifeq ($(TARGET_BUILD_TYPE),debug) | ||
46 | TARGET_ROOT := $(OUT_DIR)/debug/target | ||
47 | else | ||
48 | TARGET_ROOT := $(OUT_DIR)/target | ||
49 | endif | ||
50 | |||
51 | TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/obj | ||
52 | |||
53 | LIBGCC := $(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 | # | ||
43 | PLATFORM_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 | |||
51 | define version-starts-with | ||
52 | $(shell echo $(PLATFORM_VERSION) | grep -q ^$(1); \ | ||
53 | [ "$$?" = "0" ] && echo 1 || echo 0) | ||
54 | endef | ||
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 | # | ||
62 | ifeq ($(call version-starts-with,Eclair),1) | ||
63 | PLATFORM_VERSION := 2.0 | ||
64 | else ifeq ($(call version-starts-with,Froyo),1) | ||
65 | PLATFORM_VERSION := 2.2 | ||
66 | else ifeq ($(call version-starts-with,Gingerbread),1) | ||
67 | PLATFORM_VERSION := 2.3 | ||
68 | else ifeq ($(call version-starts-with,Honeycomb),1) | ||
69 | PLATFORM_VERSION := 3.0 | ||
70 | else ifeq ($(call version-starts-with,IceCreamSandwichMR),1) | ||
71 | PLATFORM_VERSION := 4.0.3 | ||
72 | else ifeq ($(call version-starts-with,IceCreamSandwich),1) | ||
73 | PLATFORM_VERSION := 4.0 | ||
74 | else ifeq ($(call version-starts-with,JellyBean),1) | ||
75 | PLATFORM_VERSION := 4.1 | ||
76 | else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0) | ||
77 | PLATFORM_VERSION := 5.0 | ||
78 | endif | ||
79 | |||
80 | PLATFORM_VERSION_MAJ := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d'.') | ||
81 | PLATFORM_VERSION_MIN := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d'.') | ||
82 | PLATFORM_VERSION_PATCH := $(shell echo $(PLATFORM_VERSION) | cut -f3 -d'.') | ||
83 | |||
84 | # Not all versions have a patchlevel; fix that up here | ||
85 | # | ||
86 | ifeq ($(PLATFORM_VERSION_PATCH),) | ||
87 | PLATFORM_VERSION_PATCH := 0 | ||
88 | endif | ||
89 | |||
90 | # Macros to help categorize support for features and API_LEVEL for tests. | ||
91 | # | ||
92 | is_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) | ||
96 | is_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) | ||
100 | is_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) | ||
104 | is_at_least_honeycomb := \ | ||
105 | $(shell test $(PLATFORM_VERSION_MAJ) -ge 3 && echo 1 || echo 0) | ||
106 | is_at_least_icecream_sandwich := \ | ||
107 | $(shell test $(PLATFORM_VERSION_MAJ) -ge 4 && echo 1 || echo 0) | ||
108 | is_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) | ||
113 | is_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 | ||
119 | is_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 | # | ||
125 | ifeq ($(is_future_version),1) | ||
126 | API_LEVEL := 17 | ||
127 | else ifeq ($(is_at_least_jellybean),1) | ||
128 | API_LEVEL := 16 | ||
129 | else ifeq ($(is_at_least_icecream_sandwich),1) | ||
130 | # MR1 15 | ||
131 | API_LEVEL := 14 | ||
132 | else ifeq ($(is_at_least_honeycomb),1) | ||
133 | # MR2 13 | ||
134 | # MR1 12 | ||
135 | API_LEVEL := 11 | ||
136 | else ifeq ($(is_at_least_gingerbread),1) | ||
137 | # MR1 10 | ||
138 | API_LEVEL := 9 | ||
139 | else ifeq ($(is_at_least_froyo),1) | ||
140 | API_LEVEL := 8 | ||
141 | else ifeq ($(is_at_least_eclair),1) | ||
142 | # MR1 7 | ||
143 | # 2.0.1 6 | ||
144 | API_LEVEL := 5 | ||
145 | else | ||
146 | $(error Must build against Android >= 2.0) | ||
147 | endif | ||
148 | |||
149 | # Each DDK is tested against only a single version of the platform. | ||
150 | # Warn if a different platform version is used. | ||
151 | # | ||
152 | ifeq ($(is_future_version),1) | ||
153 | $(info WARNING: Android version is newer than this DDK supports) | ||
154 | else ifneq ($(is_at_least_icecream_sandwich),1) | ||
155 | $(info WARNING: Android version is older than this DDK supports) | ||
156 | endif | ||
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 | |||
48 | ifeq ($(SUPPORT_DRI_DRM),1) | ||
49 | ifeq ($(SUPPORT_DRI_DRM_NO_LIBDRM),1) | ||
50 | endif | ||
51 | $(eval $(call TunableKernelConfigC,PVR_SECURE_DRM_AUTH_EXPORT,)) | ||
52 | $(eval $(call TunableKernelConfigC,SUPPORT_DRM_MODESET,)) | ||
53 | endif | ||
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 | |||
63 | export 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 | # | ||
57 | define KernelConfigMake | ||
58 | $$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new) | ||
59 | endef | ||
60 | |||
61 | # Write out a GNU make option for both user & kernel | ||
62 | # | ||
63 | define BothConfigMake | ||
64 | $$(eval $$(call KernelConfigMake,$(1),$(2))) | ||
65 | endef | ||
66 | |||
67 | # Conditionally write out a kernel GNU make option | ||
68 | # | ||
69 | define TunableKernelConfigMake | ||
70 | ifneq ($$($(1)),) | ||
71 | ifneq ($$($(1)),0) | ||
72 | $$(eval $$(call KernelConfigMake,$(1),$$($(1)))) | ||
73 | endif | ||
74 | else | ||
75 | ifneq ($(2),) | ||
76 | $$(eval $$(call KernelConfigMake,$(1),$(2))) | ||
77 | endif | ||
78 | endif | ||
79 | endef | ||
80 | |||
81 | # Conditionally write out a GNU make option for both user & kernel | ||
82 | # | ||
83 | define TunableBothConfigMake | ||
84 | $$(eval $$(call TunableKernelConfigMake,$(1),$(2))) | ||
85 | endef | ||
86 | |||
87 | # Write out a kernel-only option | ||
88 | # | ||
89 | define KernelConfigC | ||
90 | $$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new) | ||
91 | endef | ||
92 | |||
93 | # Write out an option for both user & kernel | ||
94 | # | ||
95 | define BothConfigC | ||
96 | $$(eval $$(call KernelConfigC,$(1),$(2))) | ||
97 | endef | ||
98 | |||
99 | # Conditionally write out a kernel-only option | ||
100 | # | ||
101 | define TunableKernelConfigC | ||
102 | ifneq ($$($(1)),) | ||
103 | ifneq ($$($(1)),0) | ||
104 | ifeq ($$($(1)),1) | ||
105 | $$(eval $$(call KernelConfigC,$(1),)) | ||
106 | else | ||
107 | $$(eval $$(call KernelConfigC,$(1),$$($(1)))) | ||
108 | endif | ||
109 | endif | ||
110 | else | ||
111 | ifneq ($(2),) | ||
112 | ifeq ($(2),1) | ||
113 | $$(eval $$(call KernelConfigC,$(1),)) | ||
114 | else | ||
115 | $$(eval $$(call KernelConfigC,$(1),$(2))) | ||
116 | endif | ||
117 | endif | ||
118 | endif | ||
119 | endef | ||
120 | |||
121 | # Conditionally write out an option for both user & kernel | ||
122 | # | ||
123 | define TunableBothConfigC | ||
124 | $$(eval $$(call TunableKernelConfigC,$(1),$(2))) | ||
125 | endef | ||
126 | |||
127 | ############################### END MACROS ################################## | ||
128 | |||
129 | # Check we have a new enough version of GNU make. | ||
130 | # | ||
131 | need := 3.81 | ||
132 | ifeq ($(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))),) | ||
133 | $(error A version of GNU make >= $(need) is required - this is version $(MAKE_VERSION)) | ||
134 | endif | ||
135 | |||
136 | # Try to guess EURASIAROOT if it wasn't set. Check this location. | ||
137 | # | ||
138 | _GUESSED_EURASIAROOT := $(abspath ../../../..) | ||
139 | ifneq ($(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. | ||
144 | ifneq ($(strip $(EURASIAROOT)),$(_GUESSED_EURASIAROOT)) | ||
145 | nothing := | ||
146 | space := $(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) | ||
152 | endif | ||
153 | # else, EURASIAROOT matched the actual root of the source tree: don't warn | ||
154 | endif | ||
155 | override EURASIAROOT := $(_GUESSED_EURASIAROOT) | ||
156 | TOP := $(EURASIAROOT) | ||
157 | |||
158 | ifneq ($(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)) | ||
163 | endif | ||
164 | |||
165 | $(call directory-must-exist,$(TOP)) | ||
166 | |||
167 | include ../defs.mk | ||
168 | |||
169 | # Infer PVR_BUILD_DIR from the directory configuration is launched from. | ||
170 | # Check anyway that such a directory exists. | ||
171 | # | ||
172 | PVR_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 | # | ||
178 | BUILD ?= 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 | ||
181 | OUT ?= $(TOP)/eurasiacon/binary2_$(SGXCORE)_$(SGX_CORE_REV)_$(PVR_BUILD_DIR)_$(BUILD) | ||
182 | override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT)) | ||
183 | |||
184 | CONFIG_MK := $(OUT)/config.mk | ||
185 | CONFIG_H := $(OUT)/config.h | ||
186 | CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk | ||
187 | CONFIG_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 | ||
201 | CLOBBER_ONLY_TARGETS := clean clobber help install | ||
202 | INTERNAL_CLOBBER_ONLY := | ||
203 | ifneq ($(strip $(MAKECMDGOALS)),) | ||
204 | INTERNAL_CLOBBER_ONLY := \ | ||
205 | $(if \ | ||
206 | $(strip $(foreach _cmdgoal,$(MAKECMDGOALS),\ | ||
207 | $(if $(filter $(_cmdgoal),$(CLOBBER_ONLY_TARGETS)),,x))),,true) | ||
208 | endif | ||
209 | |||
210 | # For a clobber-only build, we shouldn't regenerate any config files, or | ||
211 | # require things like SGXCORE to be set | ||
212 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) | ||
213 | |||
214 | -include ../config/user-defs.mk | ||
215 | |||
216 | # FIXME: Backwards compatibility remaps. | ||
217 | # | ||
218 | ifeq ($(SUPPORT_SLC),1) | ||
219 | SGX_FEATURE_SYSTEM_CACHE := 1 | ||
220 | endif | ||
221 | ifeq ($(BYPASS_SLC),1) | ||
222 | SGX_BYPASS_SYSTEM_CACHE := 1 | ||
223 | endif | ||
224 | ifeq ($(BYPASS_DCU),1) | ||
225 | SGX_BYPASS_DCU := 1 | ||
226 | endif | ||
227 | ifneq ($(SGXCOREREV),) | ||
228 | SGX_CORE_REV := $(SGXCOREREV) | ||
229 | endif | ||
230 | |||
231 | # Core handling | ||
232 | # | ||
233 | ifeq ($(SGXCORE),) | ||
234 | $(error Must specify SGXCORE) | ||
235 | endif | ||
236 | ifeq ($(SGX_CORE_REV),) | ||
237 | override USE_SGX_CORE_REV_HEAD := 1 | ||
238 | else ifeq ($(SGX_CORE_REV),000) | ||
239 | override USE_SGX_CORE_REV_HEAD := 1 | ||
240 | override SGX_CORE_REV := | ||
241 | else | ||
242 | override USE_SGX_CORE_REV_HEAD := 0 | ||
243 | endif | ||
244 | |||
245 | # Enforced dependencies. Move this to an include. | ||
246 | # | ||
247 | ifeq ($(SUPPORT_LINUX_USING_WORKQUEUES),1) | ||
248 | override PVR_LINUX_USING_WORKQUEUES := 1 | ||
249 | override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1 | ||
250 | override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1 | ||
251 | override SYS_CUSTOM_POWERLOCK_WRAP := 1 | ||
252 | else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1) | ||
253 | override PVR_LINUX_USING_WORKQUEUES := 1 | ||
254 | override PVR_LINUX_MISR_USING_WORKQUEUE := 1 | ||
255 | override PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE := 1 | ||
256 | override SYS_CUSTOM_POWERLOCK_WRAP := 1 | ||
257 | endif | ||
258 | |||
259 | ifneq ($(PDUMP),1) | ||
260 | override SUPPORT_PDUMP_MULTI_PROCESS := 0 | ||
261 | endif | ||
262 | |||
263 | ifeq ($(SUPPORT_HYBRID_PB),1) | ||
264 | override SUPPORT_SHARED_PB := 1 | ||
265 | override SUPPORT_PERCONTEXT_PB := 1 | ||
266 | else ifeq ($(SUPPORT_PERCONTEXT_PB),1) | ||
267 | override SUPPORT_SHARED_PB := 0 | ||
268 | endif | ||
269 | |||
270 | ifeq ($(NO_HARDWARE),1) | ||
271 | override SYS_USING_INTERRUPTS := 0 | ||
272 | override SUPPORT_HW_RECOVERY := 0 | ||
273 | override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 | ||
274 | endif | ||
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 | # | ||
283 | ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),) | ||
284 | ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1) | ||
285 | SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden | ||
286 | ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden) | ||
287 | $(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1) | ||
288 | SGX_DISABLE_VISTEST_SUPPORT := 1 | ||
289 | endif | ||
290 | endif | ||
291 | endif | ||
292 | |||
293 | ifeq ($(SGXCORE),535) | ||
294 | ifeq ($(PVRSRV_USSE_EDM_STATUS_DEBUG),1) | ||
295 | SUPPORT_SGX_HWPERF ?= not-overridden | ||
296 | ifeq ($(SUPPORT_SGX_HWPERF),not-overridden) | ||
297 | $(warning Setting SUPPORT_SGX_HWPERF=0 because PVRSRV_USSE_EDM_STATUS_DEBUG=1) | ||
298 | SUPPORT_SGX_HWPERF := 0 | ||
299 | endif | ||
300 | endif | ||
301 | PVR2D_ALT_2DHW ?= 0 | ||
302 | endif | ||
303 | |||
304 | # Multi-core handling must be done separately to other options | ||
305 | # Also do some sanity checks | ||
306 | # | ||
307 | ifeq ($(SGX_FEATURE_MP),1) | ||
308 | ifeq ($(SGX_FEATURE_MP_CORE_COUNT),) | ||
309 | ifeq ($(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) | ||
311 | else | ||
312 | $(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_TA,$(SGX_FEATURE_MP_CORE_COUNT_TA))) | ||
313 | endif | ||
314 | ifeq ($(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) | ||
316 | else | ||
317 | $(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_3D,$(SGX_FEATURE_MP_CORE_COUNT_3D))) | ||
318 | endif | ||
319 | else | ||
320 | $(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT,$(SGX_FEATURE_MP_CORE_COUNT))) | ||
321 | endif | ||
322 | endif | ||
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 | # | ||
328 | PVRSRV_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 | # | ||
333 | ifeq ($(CROSS_COMPILE),) | ||
334 | $(warning CROSS_COMPILE is not set. Target components will be built with the host compiler) | ||
335 | endif | ||
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. | ||
342 | define sanity-check-support-option-origin | ||
343 | ifeq ($$(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") | ||
346 | endif | ||
347 | endef | ||
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))) | ||
355 | ifneq ($(_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)) | ||
359 | endif | ||
360 | |||
361 | # Build's selected list of components | ||
362 | # | ||
363 | -include components.mk | ||
364 | |||
365 | # PDUMP needs extra components | ||
366 | # | ||
367 | ifeq ($(PDUMP),1) | ||
368 | ifneq ($(COMPONENTS),) | ||
369 | COMPONENTS += pdump | ||
370 | endif | ||
371 | ifeq ($(SUPPORT_DRI_DRM),1) | ||
372 | EXTRA_PVRSRVKM_COMPONENTS += dbgdrv | ||
373 | else | ||
374 | KERNEL_COMPONENTS += dbgdrv | ||
375 | endif | ||
376 | endif | ||
377 | |||
378 | ifeq ($(SUPPORT_PVR_REMOTE),1) | ||
379 | ifneq ($(filter pvr2d,$(COMPONENTS)),) | ||
380 | COMPONENTS += null_pvr2d_remote | ||
381 | endif | ||
382 | COMPONENTS += pvrvncsrv | ||
383 | endif | ||
384 | |||
385 | # If KERNELDIR is set, write it out to the config.mk, with | ||
386 | # KERNEL_COMPONENTS and KERNEL_ID | ||
387 | # | ||
388 | ifneq ($(strip $(KERNELDIR)),) | ||
389 | include ../kernel_version.mk | ||
390 | PVRSRV_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. | ||
400 | ifneq ($(KERNEL_CROSS_COMPILE),undef) | ||
401 | KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE) | ||
402 | $(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) | ||
403 | endif | ||
404 | |||
405 | # Check the KERNELDIR has a kernel built and also check that it is | ||
406 | # not 64-bit, which we do not support. | ||
407 | VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux)) | ||
408 | ifneq ($(VMLINUX),) | ||
409 | VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false) | ||
410 | ifneq ($(VMLINUX_IS_64BIT),false) | ||
411 | $(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.) | ||
412 | endif | ||
413 | else | ||
414 | $(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) | ||
415 | endif | ||
416 | endif | ||
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 | |||
441 | ifneq ($(DISPLAY_CONTROLLER),) | ||
442 | $(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) | ||
443 | endif | ||
444 | |||
445 | PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0 | ||
446 | ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0) | ||
447 | PVR_LINUX_MEM_AREA_USE_VMAP ?= 1 | ||
448 | include ../kernel_version.mk | ||
449 | ifeq ($(call kernel-version-at-least,3,0),true) | ||
450 | PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1 | ||
451 | endif | ||
452 | endif | ||
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 | |||
465 | ifeq ($(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,)) | ||
471 | else ifeq ($(BUILD),release) | ||
472 | $(eval $(call BothConfigC,RELEASE,)) | ||
473 | $(eval $(call TunableBothConfigMake,DEBUGLINK,1)) | ||
474 | else ifeq ($(BUILD),timing) | ||
475 | $(eval $(call BothConfigC,TIMING,)) | ||
476 | $(eval $(call TunableBothConfigMake,DEBUGLINK,1)) | ||
477 | else | ||
478 | $(error BUILD= must be either debug, release or timing) | ||
479 | endif | ||
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 | |||
542 | ifeq ($(BUILD),debug) | ||
543 | $(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,1)) | ||
544 | else | ||
545 | $(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,)) | ||
546 | endif | ||
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 | |||
558 | endif # INTERNAL_CLOBBER_ONLY | ||
559 | |||
560 | export INTERNAL_CLOBBER_ONLY | ||
561 | export TOP | ||
562 | export OUT | ||
563 | |||
564 | MAKE_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 | |||
571 | ifeq ($(MAKECMDGOALS),) | ||
572 | MAKECMDGOALS := build | ||
573 | else | ||
574 | # We can't pass autogen to toplevel.mk | ||
575 | MAKECMDGOALS := $(filter-out autogen,$(MAKECMDGOALS)) | ||
576 | endif | ||
577 | |||
578 | .PHONY: autogen | ||
579 | autogen: | ||
580 | ifeq ($(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) | ||
584 | else | ||
585 | @: | ||
586 | endif | ||
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: ; | ||
596 | Makefile%: ; | ||
597 | Makefile: ; | ||
598 | |||
599 | .PHONY: build kbuild install | ||
600 | build 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 | |||
41 | define must-be-defined | ||
42 | $(if $(filter undefined,$(origin $(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must be defined),) | ||
43 | endef | ||
44 | |||
45 | define must-be-nonempty | ||
46 | $(if $(strip $($(1))),,$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain a value)) | ||
47 | endef | ||
48 | |||
49 | define directory-must-exist | ||
50 | $(if $(wildcard $(abspath $(1)/)),,$(error Directory $(1) must exist)) | ||
51 | endef | ||
52 | |||
53 | define one-word-only | ||
54 | $(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),) | ||
55 | endef | ||
56 | |||
57 | define target-intermediates-of | ||
58 | $(addprefix $(TARGET_OUT)/intermediates/$(1)/,$(2)) | ||
59 | endef | ||
60 | |||
61 | define host-intermediates-of | ||
62 | $(addprefix $(HOST_OUT)/intermediates/$(1)/,$(2)) | ||
63 | endef | ||
64 | |||
65 | define module-library | ||
66 | $(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so)) | ||
67 | endef | ||
68 | |||
69 | # This is done to allow module type makefiles to use $(THIS_MAKEFILE) | ||
70 | define register-module | ||
71 | INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE) | ||
72 | endef | ||
73 | |||
74 | define process-module | ||
75 | THIS_MODULE := $(1) | ||
76 | THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1)) | ||
77 | include $$(MAKE_TOP)/this_makefile.mk | ||
78 | $$(call must-be-nonempty,THIS_MAKEFILE) | ||
79 | $$(call must-be-nonempty,$(1)_type) | ||
80 | MODULE_HOST_BUILD := $$(if $(filter host_%,$($(1)_type)),true,) | ||
81 | include $$(MAKE_TOP)/moduledefs.mk | ||
82 | include $$(MAKE_TOP)/$$(patsubst host_%,%,$($(1)_type)).mk | ||
83 | INTERNAL_TARGETS_FOR_$(THIS_MODULE) := $(MODULE_TARGETS) | ||
84 | endef | ||
85 | |||
86 | # This can be used by module_type.mk files to indicate that they can't be | ||
87 | # built as host_module_type | ||
88 | define 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)) | ||
90 | endef | ||
91 | |||
92 | define relative-to-top | ||
93 | $(patsubst $(TOP)/%,%,$(1)) | ||
94 | endef | ||
95 | |||
96 | define cc-check | ||
97 | $(shell \ | ||
98 | CC_CHECK=$(patsubst @%,%,$(CC_CHECK)) && \ | ||
99 | $(patsubst @%,%,$(CHMOD)) +x $$CC_CHECK && \ | ||
100 | $$CC_CHECK --cc "$(1)" --out "$(2)" $(3)) | ||
101 | endef | ||
102 | |||
103 | define cc-is-64bit | ||
104 | $(call cc-check,$(1),$(OUT),--64) | ||
105 | endef | ||
106 | |||
107 | define cc-option | ||
108 | $(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1)) | ||
109 | endef | ||
110 | |||
111 | define cxx-option | ||
112 | $(call cc-check,$(patsubst @%,%,$(CXX)),$(OUT),$(1)) | ||
113 | endef | ||
114 | |||
115 | define host-cc-option | ||
116 | $(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1)) | ||
117 | endef | ||
118 | |||
119 | define kernel-cc-option | ||
120 | $(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1)) | ||
121 | endef | ||
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. | ||
126 | define cc-optional-warning | ||
127 | $(call cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) | ||
128 | endef | ||
129 | |||
130 | define host-cc-optional-warning | ||
131 | $(call host-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) | ||
132 | endef | ||
133 | |||
134 | define kernel-cc-optional-warning | ||
135 | $(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) | ||
136 | endef | ||
137 | |||
138 | define module-info-line | ||
139 | $(if $(filter modules,$(D)),$(info $(1)),) | ||
140 | endef | ||
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 | |||
55 | include $(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 | |||
67 | ccflags-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 | |||
81 | ifeq ($(PVR_LOCAL_HWDEFS),) | ||
82 | ccflags-y += -I$(TOP)/services4/srvkm/hwdefs | ||
83 | else | ||
84 | ccflags-y += -I$(TOP)/hwdefs | ||
85 | endif | ||
86 | |||
87 | include $(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))) | ||
90 | pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y)) | ||
91 | |||
92 | obj-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 | |||
41 | ifneq ($(EXTERNAL_3PDD_TARBALL),) | ||
42 | TAR_OPT_STRIP_COMPONENTS ?= --strip-components | ||
43 | prepare_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 | ||
49 | endif | ||
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) | ||
50 | INTERNAL_KBUILD_MAKEFILES := $(abspath $(foreach _m,$(KERNEL_COMPONENTS) $(EXTRA_PVRSRVKM_COMPONENTS),$(if $(INTERNAL_KBUILD_MAKEFILE_FOR_$(_m)),$(INTERNAL_KBUILD_MAKEFILE_FOR_$(_m)),$(error Unknown kbuild module "$(_m)")))) | ||
51 | INTERNAL_KBUILD_OBJECTS := $(foreach _m,$(KERNEL_COMPONENTS),$(if $(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(error BUG: Unknown kbuild module "$(_m)" should have been caught earlier))) | ||
52 | INTERNAL_EXTRA_KBUILD_OBJECTS := $(foreach _m,$(EXTRA_PVRSRVKM_COMPONENTS),$(if $(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(INTERNAL_KBUILD_OBJECTS_FOR_$(_m)),$(error BUG: Unknown kbuild module "$(_m)" should have been caught earlier))) | ||
53 | .PHONY: kbuild kbuild_clean | ||
54 | |||
55 | kbuild: $(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 | |||
69 | kbuild_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 | |||
80 | kbuild_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 | |||
47 | MODULE_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) | ||
52 | MODULE_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) | ||
57 | MODULE_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 | |||
73 | ALL_KBUILD_MODULES += $(THIS_MODULE) | ||
74 | INTERNAL_KBUILD_MAKEFILE_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_MAKEFILE) | ||
75 | INTERNAL_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 | |||
43 | override KERNEL_VERSION := \ | ||
44 | $(shell grep "^VERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ') | ||
45 | override KERNEL_PATCHLEVEL := \ | ||
46 | $(shell grep "^PATCHLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ') | ||
47 | override KERNEL_SUBLEVEL := \ | ||
48 | $(shell grep "^SUBLEVEL = " $(KERNELDIR)/Makefile | cut -f3 -d' ') | ||
49 | override KERNEL_EXTRAVERSION := \ | ||
50 | $(shell grep "^EXTRAVERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ') | ||
51 | |||
52 | # Break the kernel version up into a space separated list | ||
53 | kernel_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 | # | ||
61 | override KERNEL_BASE_ID := \ | ||
62 | $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL) | ||
63 | |||
64 | # Try to get the kernel ID from the kernel.release file. | ||
65 | # | ||
66 | KERNEL_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 | # | ||
72 | ifeq ($(strip $(KERNEL_ID)),) | ||
73 | KERNEL_ID := \ | ||
74 | $(shell grep -h '\#define UTS_RELEASE' \ | ||
75 | $(KERNELDIR)/include/linux/* | cut -f3 -d' ' | sed s/\"//g) | ||
76 | endif | ||
77 | |||
78 | ifeq ($(strip $(KERNEL_ID)),) | ||
79 | KERNEL_ID := \ | ||
80 | $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION) | ||
81 | endif | ||
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 | # | ||
89 | define 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) | ||
100 | endef | ||
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 | |||
41 | MODULE_TARGETS := | ||
42 | MODULE_CFLAGS := $(ALL_CFLAGS) $($(THIS_MODULE)_cflags) | ||
43 | MODULE_CXXFLAGS := $(ALL_CXXFLAGS) $($(THIS_MODULE)_cxxflags) | ||
44 | MODULE_HOST_CFLAGS := $(ALL_HOST_CFLAGS) $($(THIS_MODULE)_cflags) | ||
45 | MODULE_HOST_CXXFLAGS := $(ALL_HOST_CXXFLAGS) $($(THIS_MODULE)_cxxflags) | ||
46 | MODULE_LDFLAGS := $(ALL_LDFLAGS) $($(THIS_MODULE)_ldflags) | ||
47 | MODULE_HOST_LDFLAGS := $(ALL_HOST_LDFLAGS) $($(THIS_MODULE)_ldflags) | ||
48 | MODULE_BISON_FLAGS := $(ALL_BISON_FLAGS) $($(THIS_MODULE)_bisonflags) | ||
49 | MODULE_FLEX_FLAGS := $(ALL_FLEX_FLAGS) $($(THIS_MODULE)_flexflags) | ||
50 | |||
51 | # -L flags for library search dirs | ||
52 | MODULE_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 | ||
54 | MODULE_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 | ||
57 | MODULE_OUT := $(if $(MODULE_HOST_BUILD),$(HOST_OUT),$(TARGET_OUT)) | ||
58 | MODULE_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 | |||
64 | Host_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),))) | ||
78 | MODULE_SOURCES := $(addprefix $(THIS_DIR)/,$(_SOURCES_WITHOUT_SLASH)) | ||
79 | MODULE_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)) | ||
83 | MODULE_SOURCES += $(_OUTDIR_RELATIVE_SOURCES_WITH_SLASH) | ||
84 | MODULE_SOURCES += $(addprefix $(THIS_DIR)/,$(_THISDIR_RELATIVE_SOURCES_WITH_SLASH)) | ||
85 | MODULE_SOURCES += $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_gensrc)) | ||
86 | MODULE_GENERATED_HEADERS := $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_genheaders)) | ||
87 | |||
88 | # -l flags for each library | ||
89 | MODULE_LIBRARY_FLAGS := $(addprefix -l, $($(THIS_MODULE)_staticlibs)) $(addprefix -l,$($(THIS_MODULE)_libs)) $(foreach _lib,$($(THIS_MODULE)_extlibs),$(if $(filter undefined,$(origin lib$(_lib)_ldflags)),-l$(_lib),$(lib$(_lib)_ldflags))) | ||
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 | |||
49 | ALL_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 | |||
42 | ifeq ($(TARGET_SGX),544sc) | ||
43 | SGXCORE := 544 | ||
44 | SGX_CORE_REV := 112 | ||
45 | else ifeq ($(TARGET_SGX),540) | ||
46 | SGXCORE := 540 | ||
47 | SGX_CORE_REV := 120 | ||
48 | else 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 | ||
55 | else 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 | ||
62 | else | ||
63 | #default config | ||
64 | SGXCORE := 540 | ||
65 | SGX_CORE_REV := 120 | ||
66 | endif | ||
67 | export SGXCORE | ||
68 | export SGX_CORE_REV | ||
69 | |||
70 | SGX_DYNAMIC_TIMING_INFO := 1 | ||
71 | SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 | ||
72 | |||
73 | SUPPORT_LINUX_USING_WORKQUEUES := 1 | ||
74 | |||
75 | DISPLAY_CONTROLLER := omaplfb | ||
76 | |||
77 | PVR_SYSTEM := omap4 | ||
78 | HAL_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 | # | ||
83 | PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 10800 | ||
84 | |||
85 | include ../common/android/paths.mk | ||
86 | include ../common/android/armv7-a.mk | ||
87 | include ../common/android/features.mk | ||
88 | |||
89 | ifneq ($(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 | ||
107 | else | ||
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 | ||
115 | endif | ||
116 | |||
117 | ifneq ($(LDM_PLATFORM),1) | ||
118 | SUPPORT_LINUX_USING_WORKQUEUES := 0 | ||
119 | SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1 | ||
120 | SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 | ||
121 | DISPLAY_CONTROLLER := pvrlfb | ||
122 | DISPLAY_CONTROLLER_COMPONENT := linux_framebuffer | ||
123 | OMAP_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 | |||
130 | endif | ||
131 | |||
132 | ifeq ($(SUPPORT_DRI_DRM),1) | ||
133 | ifeq ($(PVR_LDM_PLATFORM_PRE_REGISTERED),1) | ||
134 | PVR_DRI_DRM_PLATFORM_DEV := 1 | ||
135 | PVR_DRI_DRM_STATIC_BUS_ID := 1 | ||
136 | PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\" | ||
137 | else | ||
138 | PVR_DRI_DRM_NOT_PCI := 1 | ||
139 | KERNEL_COMPONENTS += linux_drm | ||
140 | endif | ||
141 | EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) | ||
142 | EXTRA_KBUILD_SOURCE := $(KERNELDIR) | ||
143 | # FIXME: Only required for comparison with X's KM | ||
144 | PVR_SECURE_DRM_AUTH_EXPORT := 1 | ||
145 | ifneq ($(OMAP_NON_FLIP_DISPLAY),1) | ||
146 | PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1 | ||
147 | endif | ||
148 | else | ||
149 | KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) | ||
150 | endif | ||
151 | |||
152 | SUPPORT_ANDROID_OMAP_NV12 := 1 | ||
153 | |||
154 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
155 | ifeq ($(SUPPORT_ANDROID_COMPOSER_HAL),1) | ||
156 | PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1 | ||
157 | endif | ||
158 | endif | ||
159 | |||
160 | PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1 | ||
161 | |||
162 | # FIXME: Remove this once vsync issues are resolved | ||
163 | PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1 | ||
164 | |||
165 | ifeq ($(is_at_least_icecream_sandwich),1) | ||
166 | -include products.mk | ||
167 | endif | ||
168 | |||
169 | ifeq ($(NO_HARDWARE),1) | ||
170 | ifeq ($(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) | ||
173 | override SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 0 | ||
174 | override DISPLAY_CONTROLLER := dcnohw | ||
175 | KERNEL_COMPONENTS += dc_nohw | ||
176 | endif | ||
177 | endif | ||
178 | |||
179 | include ../config/core.mk | ||
180 | include ../common/android/extra_config.mk | ||
181 | include ../common/dridrm.mk | ||
182 | include ../common/opencl.mk | ||
183 | include ../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 | |||
41 | PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1 | ||
42 | SGX_DISABLE_VISTEST_SUPPORT ?= 1 | ||
43 | PVRSRV_DUMP_MK_TRACE ?= 1 | ||
44 | PVRSRV_NEED_PVR_DPF ?= 1 | ||
45 | PVRSRV_NEED_PVR_TRACE ?= 1 | ||
46 | PVRSRV_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 | # | ||
47 | prepare_tree: | ||
48 | |||
49 | INTERNAL_INCLUDED_PREPARE_HEADERS := | ||
50 | -include eurasiacon/build/linux2/prepare_headers.mk | ||
51 | ifneq ($(INTERNAL_INCLUDED_PREPARE_HEADERS),true) | ||
52 | missing_headers := $(strip $(shell test ! -e include4/pvrversion.h && echo true)) | ||
53 | ifdef 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) | ||
59 | endif | ||
60 | endif | ||
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 | ||
47 | ifneq ($(strip $(REMAINING_MAKEFILES)),) | ||
48 | |||
49 | # Absolute path to the Linux.mk being processed | ||
50 | THIS_MAKEFILE := $(firstword $(REMAINING_MAKEFILES)) | ||
51 | |||
52 | # The list of makefiles left to process | ||
53 | REMAINING_MAKEFILES := $(wordlist 2,$(words $(REMAINING_MAKEFILES)),$(REMAINING_MAKEFILES)) | ||
54 | |||
55 | else | ||
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 | |||
60 | endif | ||
61 | |||
62 | # Path to the directory containing Linux.mk | ||
63 | THIS_DIR := $(patsubst %/,%,$(dir $(THIS_MAKEFILE))) | ||
64 | ifeq ($(strip $(THIS_DIR)),) | ||
65 | $(error Empty $$(THIS_DIR) for makefile "$(THIS_MAKEFILE)") | ||
66 | endif | ||
67 | |||
68 | modules := | ||
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 | |||
43 | LANG=C | ||
44 | export LANG | ||
45 | |||
46 | usage() { | ||
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 | # | ||
58 | do_cc() { | ||
59 | echo "int main(void){return;}" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1 | ||
60 | } | ||
61 | |||
62 | while [ 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 | ||
77 | done | ||
78 | |||
79 | [ "x$CC" = "x" ] && usage | ||
80 | [ "x$OUT" = "x" ] && usage | ||
81 | ccof=$OUT/cc-sanity-check | ||
82 | log=${ccof}.log | ||
83 | |||
84 | if [ "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 | ||
88 | else | ||
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 | ||
96 | fi | ||
97 | |||
98 | rm -f $ccof $log | ||
99 | exit 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 | ||
44 | build: components kbuild | ||
45 | |||
46 | ifeq ($(OUT),) | ||
47 | $(error "Must specify output directory with OUT=") | ||
48 | endif | ||
49 | |||
50 | ifeq ($(TOP),) | ||
51 | $(error "Must specify root of source tree with TOP=") | ||
52 | endif | ||
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) | ||
60 | RELATIVE_OUT := $(patsubst $(TOP)/%,%,$(OUT)) | ||
61 | HOST_OUT := $(RELATIVE_OUT)/host | ||
62 | TARGET_OUT := $(RELATIVE_OUT)/target | ||
63 | CONFIG_MK := $(RELATIVE_OUT)/config.mk | ||
64 | CONFIG_H := $(RELATIVE_OUT)/config.h | ||
65 | CONFIG_KERNEL_MK := $(RELATIVE_OUT)/config_kernel.mk | ||
66 | CONFIG_KERNEL_H := $(RELATIVE_OUT)/config_kernel.h | ||
67 | MAKE_TOP := eurasiacon/build/linux2 | ||
68 | THIS_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. | ||
73 | comma := , | ||
74 | empty := | ||
75 | space := $(empty) $(empty) | ||
76 | override D := $(subst $(comma),$(space),$(D)) | ||
77 | |||
78 | include $(MAKE_TOP)/defs.mk | ||
79 | |||
80 | ifneq ($(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 | |||
105 | ifneq ($(_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) | ||
108 | endif | ||
109 | |||
110 | ifneq ($(_freeze_config),) | ||
111 | $(if $(_updated_config_files),$(error Configuration change in $(RELATIVE_OUT) prevented by D=freeze-config),) | ||
112 | endif | ||
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 | |||
118 | endif # INTERNAL_CLOBBER_ONLY | ||
119 | |||
120 | MAKEFLAGS := -Rr --no-print-directory | ||
121 | |||
122 | ifneq ($(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 | ||
127 | override ALL_MAKEFILES := $(call relative-to-top,$(if $(strip $(ALL_MAKEFILES)),$(shell cat $(ALL_MAKEFILES)),$(shell find $(TOP) -type f -name Linux.mk -print -o -type d -name '.*' -prune))) | ||
128 | ifeq ($(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) | ||
133 | endif | ||
134 | |||
135 | else # clobber-only | ||
136 | ALL_MAKEFILES := | ||
137 | endif | ||
138 | |||
139 | unexport ALL_MAKEFILES | ||
140 | |||
141 | REMAINING_MAKEFILES := $(ALL_MAKEFILES) | ||
142 | ALL_MODULES := | ||
143 | INTERNAL_INCLUDED_ALL_MAKEFILES := | ||
144 | |||
145 | ifneq ($(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 | ||
151 | endif | ||
152 | |||
153 | include $(MAKE_TOP)/commands.mk | ||
154 | include $(MAKE_TOP)/buildvars.mk | ||
155 | |||
156 | HOST_INTERMEDIATES := $(HOST_OUT)/intermediates | ||
157 | TARGET_INTERMEDIATES := $(TARGET_OUT)/intermediates | ||
158 | |||
159 | # Include each Linux.mk, then include modules.mk to save some information | ||
160 | # about each module | ||
161 | include $(foreach _Linux.mk,$(ALL_MAKEFILES),$(MAKE_TOP)/this_makefile.mk $(_Linux.mk) $(MAKE_TOP)/modules.mk) | ||
162 | |||
163 | ifeq ($(strip $(REMAINING_MAKEFILES)),) | ||
164 | INTERNAL_INCLUDED_ALL_MAKEFILES := true | ||
165 | else | ||
166 | $(error Impossible: $(words $(REMAINING_MAKEFILES)) makefiles were mysteriously ignored when reading $$(ALL_MAKEFILES)) | ||
167 | endif | ||
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 | ||
174 | kbuild install: | ||
175 | |||
176 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) | ||
177 | -include $(MAKE_TOP)/scripts.mk | ||
178 | -include $(MAKE_TOP)/kbuild/kbuild.mk | ||
179 | else | ||
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. | ||
183 | install: | ||
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 | ||
199 | endif | ||
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 | ||
205 | all_modules: $(ALL_MODULES) | ||
206 | components: $(COMPONENTS) | ||
207 | |||
208 | # Cleaning | ||
209 | .PHONY: clean clobber | ||
210 | clean: MODULE_DIRS_TO_REMOVE := $(OUT)/host/intermediates $(OUT)/target/intermediates $(OUT)/target/kbuild | ||
211 | clean: | ||
212 | $(clean-dirs) | ||
213 | clobber: MODULE_DIRS_TO_REMOVE := $(OUT) | ||
214 | clobber: | ||
215 | $(clean-dirs) | ||
216 | |||
217 | # Saying 'make clean-MODULE' removes the intermediates for MODULE. | ||
218 | # clobber-MODULE deletes the output files as well | ||
219 | clean-%: | ||
220 | $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$*)) | ||
221 | $(RM) -rf $(OUT)/host/intermediates/$*/* $(OUT)/target/intermediates/$*/* | ||
222 | clobber-%: | ||
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 | |||
226 | include $(MAKE_TOP)/bits.mk | ||