diff options
author | Andrew F. Davis | 2018-02-14 11:59:52 -0600 |
---|---|---|
committer | Andrew F. Davis | 2018-03-13 10:39:56 -0500 |
commit | c82d194b93d36baf4772503e7ff8b8d6d9a1cc4b (patch) | |
tree | a403207522485634edc10a2399e9c1fa6454c6b0 | |
parent | 86d145b73c81ad8580d243d11dacd310dec7a9f4 (diff) | |
download | device-ti-proprietary-open-c82d194b93d36baf4772503e7ff8b8d6d9a1cc4b.tar.gz device-ti-proprietary-open-c82d194b93d36baf4772503e7ff8b8d6d9a1cc4b.tar.xz device-ti-proprietary-open-c82d194b93d36baf4772503e7ff8b8d6d9a1cc4b.zip |
jacinto6: Update SGX KM source to DDK 1.17
Signed-off-by: Andrew F. Davis <afd@ti.com>
115 files changed, 10754 insertions, 2334 deletions
diff --git a/jacinto6/sgx/Android.mk b/jacinto6/sgx/Android.mk index bfb50e3..9c6aa1b 100644 --- a/jacinto6/sgx/Android.mk +++ b/jacinto6/sgx/Android.mk | |||
@@ -28,7 +28,7 @@ LOCAL_PATH := $$(img-sgx.untarred_bin) | |||
28 | include $$(BUILD_SYSTEM)/base_rules.mk | 28 | include $$(BUILD_SYSTEM)/base_rules.mk |
29 | $$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 | 29 | $$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 |
30 | $$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) | 30 | $$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) |
31 | $(eval FIXED_SRC := $$(img-sgx.untarred_bin)/$(subst $(TARGET_BOARD_PLATFORM),jacinto6,$1)) | 31 | $(eval FIXED_SRC := $$(img-sgx.untarred_bin)/$1) |
32 | @echo "Copy $$@ <- $(FIXED_SRC)" | 32 | @echo "Copy $$@ <- $(FIXED_SRC)" |
33 | @mkdir -p $(dir $$@) | 33 | @mkdir -p $(dir $$@) |
34 | $$(hide) $$(ACP) -fp $(FIXED_SRC) $$@ | 34 | $$(hide) $$(ACP) -fp $(FIXED_SRC) $$@ |
diff --git a/jacinto6/sgx_src/Android.mk b/jacinto6/sgx_src/Android.mk index 663404c..b5c011d 100644 --- a/jacinto6/sgx_src/Android.mk +++ b/jacinto6/sgx_src/Android.mk | |||
@@ -36,7 +36,7 @@ $(PVRSRVKM): $(local-build)/Makefile $(KERNELDIR)/.version | |||
36 | ANDROID_ROOT=$(ANDROID_BUILD_TOP) \ | 36 | ANDROID_ROOT=$(ANDROID_BUILD_TOP) \ |
37 | PLATFORM_RELEASE="8.0" \ | 37 | PLATFORM_RELEASE="8.0" \ |
38 | OUT=$(ANDROID_BUILD_TOP)/$(out-intermediates) | 38 | OUT=$(ANDROID_BUILD_TOP)/$(out-intermediates) |
39 | @$(ACP) -fp $(ANDROID_BUILD_TOP)/$(out-intermediates)/target/$(MODULE_TARGET) $@ | 39 | @$(ACP) -fp $(ANDROID_BUILD_TOP)/$(out-intermediates)/target_armv7-a/$(MODULE_TARGET) $@ |
40 | @echo "Finished building $@" | 40 | @echo "Finished building $@" |
41 | 41 | ||
42 | GEN := $(out-intermediates)/$(MODULE_TARGET) | 42 | GEN := $(out-intermediates)/$(MODULE_TARGET) |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/_objects.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/_objects.mk new file mode 100644 index 0000000..82da9d6 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/_objects.mk | |||
@@ -0,0 +1,121 @@ | |||
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 | #@Description Common processing for all modules that compile code. | ||
40 | ### ########################################################################### | ||
41 | |||
42 | # Filter for source types | ||
43 | MODULE_C_SOURCES := $(filter %.c,$(MODULE_SOURCES)) | ||
44 | MODULE_CXX_SOURCES := $(filter %.cpp,$(MODULE_SOURCES)) | ||
45 | |||
46 | MODULE_UNRECOGNISED_SOURCES := $(filter-out %.c %.cpp, $(MODULE_SOURCES)) | ||
47 | |||
48 | ifneq ($(strip $(MODULE_UNRECOGNISED_SOURCES)),) | ||
49 | $(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) specified source files with unrecognised suffixes: $(MODULE_UNRECOGNISED_SOURCES)) | ||
50 | endif | ||
51 | |||
52 | # Objects built from MODULE_SOURCES | ||
53 | # Objects built from MODULE_C_SOURCES and MODULE_CXX_SOURCES | ||
54 | MODULE_C_OBJECTS := $(addprefix $(MODULE_INTERMEDIATES_DIR)/,$(foreach _cobj,$(MODULE_C_SOURCES:.c=.o),$(notdir $(_cobj)))) | ||
55 | MODULE_CXX_OBJECTS := $(addprefix $(MODULE_INTERMEDIATES_DIR)/,$(foreach _cxxobj,$(MODULE_CXX_SOURCES:.cpp=.o),$(notdir $(_cxxobj)))) | ||
56 | |||
57 | # MODULE_GENERATED_DEPENDENCIES are generated as a side effect of running the | ||
58 | # rules below, but if we wanted to generate .d files for things that GCC | ||
59 | # couldn't handle, we could add a rule with $(MODULE_GENERATED_DEPENDENCIES) | ||
60 | # as a target | ||
61 | MODULE_GENERATED_DEPENDENCIES := $(MODULE_C_OBJECTS:.o=.d) $(MODULE_CXX_OBJECTS:.o=.d) | ||
62 | -include $(MODULE_GENERATED_DEPENDENCIES) | ||
63 | |||
64 | MODULE_DEPENDS := $(addprefix $(MODULE_OUT)/,$($(THIS_MODULE)_depends)) | ||
65 | MODULE_DEPENDS += $(addprefix $(GENERATED_CODE_OUT)/,$($(THIS_MODULE)_genheaders)) | ||
66 | |||
67 | # Add any MODULE_OUT relative include flags here | ||
68 | MODULE_INCLUDE_FLAGS += $(addprefix -I $(MODULE_OUT)/, $($(THIS_MODULE)_includes_relative)) | ||
69 | |||
70 | define rule-for-objects-o-from-one-c | ||
71 | $(1): MODULE_CC := $$(MODULE_CC) | ||
72 | $(1): MODULE_CFLAGS := $$(MODULE_CFLAGS) | ||
73 | $(1): MODULE_HOST_CFLAGS := $$(MODULE_HOST_CFLAGS) | ||
74 | $(1): MODULE_INCLUDE_FLAGS := $$(MODULE_INCLUDE_FLAGS) | ||
75 | $(1): MODULE_ALLOWED_CFLAGS := $$(MODULE_ALLOWED_CFLAGS) | ||
76 | $(1): THIS_MODULE := $$(THIS_MODULE) | ||
77 | ifneq ($(PKG_CONFIG_ENV_VAR),) | ||
78 | $(1): export PKG_CONFIG_TOP_BUILD_DIR := $(abspath $(MODULE_OUT)) | ||
79 | $(1): export $(PKG_CONFIG_ENV_VAR) := $(abspath $(MODULE_OUT)/pkgconfig) | ||
80 | endif | ||
81 | $(1): export PKG_CONFIG_SYSROOT_DIR := $(PKG_CONFIG_SYSROOT_DIR) | ||
82 | $(1): $$(MODULE_DEPENDS) $$(THIS_MAKEFILE) | ||
83 | $(1): | $$(MODULE_INTERMEDIATES_DIR) | ||
84 | $(1): $(2) | ||
85 | @: $(if $(MODULE_CHECK_CFLAGS), | ||
86 | $(if $(filter-out $(MODULE_ALLOWED_CFLAGS),$($(THIS_MODULE)_cflags)),\ | ||
87 | $(error $(THIS_MODULE): LTO-incompatible cflag(s) used: \ | ||
88 | $(filter-out $(MODULE_ALLOWED_CFLAGS),$($(THIS_MODULE)_cflags))))) | ||
89 | $$(check-src) | ||
90 | ifeq ($(MODULE_HOST_BUILD),true) | ||
91 | $$(host-o-from-one-c) | ||
92 | else | ||
93 | $$(target-o-from-one-c) | ||
94 | endif | ||
95 | endef | ||
96 | |||
97 | # This rule is used to compile C++ source files | ||
98 | define rule-for-objects-o-from-one-cxx | ||
99 | $(1): MODULE_CXX := $$(MODULE_CXX) | ||
100 | $(1): MODULE_CXXFLAGS := $$(MODULE_CXXFLAGS) | ||
101 | $(1): MODULE_HOST_CXXFLAGS := $$(MODULE_HOST_CXXFLAGS) | ||
102 | $(1): MODULE_INCLUDE_FLAGS := $$(MODULE_INCLUDE_FLAGS) | ||
103 | $(1): MODULE_ALLOWED_CFLAGS := $$(MODULE_ALLOWED_CFLAGS) | ||
104 | $(1): THIS_MODULE := $$(THIS_MODULE) | ||
105 | ifneq ($(PKG_CONFIG_ENV_VAR),) | ||
106 | $(1): export PKG_CONFIG_TOP_BUILD_DIR := $(abspath $(MODULE_OUT)) | ||
107 | $(1): export $(PKG_CONFIG_ENV_VAR) := $(abspath $(MODULE_OUT)/pkgconfig) | ||
108 | endif | ||
109 | $(1): $$(MODULE_DEPENDS) $$(THIS_MAKEFILE) | ||
110 | $(1): | $$(MODULE_INTERMEDIATES_DIR) | ||
111 | $(1): $(2) | ||
112 | @: $(if $(MODULE_CHECK_CFLAGS), | ||
113 | $(if $(filter-out $(MODULE_ALLOWED_CFLAGS),$($(THIS_MODULE)_cxxflags)),\ | ||
114 | $(error $(THIS_MODULE): LTO-incompatible cxxflag(s) used: \ | ||
115 | $(filter-out $(MODULE_ALLOWED_CFLAGS),$($(THIS_MODULE)_cxxflags))))) | ||
116 | ifeq ($(MODULE_HOST_BUILD),true) | ||
117 | $$(host-o-from-one-cxx) | ||
118 | else | ||
119 | $$(target-o-from-one-cxx) | ||
120 | endif | ||
121 | endef | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk index d04aa7b..b6bcbbc 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk | |||
@@ -50,8 +50,9 @@ $(foreach _module_to_find,$(patsubst whereis-%,%,$(filter whereis-%,$(MAKECMDGOA | |||
50 | endif | 50 | endif |
51 | 51 | ||
52 | ifneq ($(filter whatis-%,$(MAKECMDGOALS)),) | 52 | ifneq ($(filter whatis-%,$(MAKECMDGOALS)),) |
53 | whatis-$(RELATIVE_OUT)/target/%: ; | 53 | whatis-$(HOST_OUT)/%: ; |
54 | whatis-$(RELATIVE_OUT)/host/%: ; | 54 | whatis-$(TARGET_PRIMARY_OUT)/%: ; |
55 | whatis-$(TARGET_NEUTRAL_OUT)/%: ; | ||
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 | $(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 | endif |
57 | 58 | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk index f20ee5b..4d4afa6 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk | |||
@@ -46,6 +46,9 @@ | |||
46 | # COMMON_CFLAGS or COMMON_USER_FLAGS. These flags are shared between | 46 | # COMMON_CFLAGS or COMMON_USER_FLAGS. These flags are shared between |
47 | # host and target, which might use compilers with different capabilities. | 47 | # host and target, which might use compilers with different capabilities. |
48 | 48 | ||
49 | # ANOTHER NOTE: All flags here must be architecture-independent (i.e. no | ||
50 | # -march or toolchain include paths) | ||
51 | |||
49 | # These flags are used for kernel, User C and User C++ | 52 | # These flags are used for kernel, User C and User C++ |
50 | # | 53 | # |
51 | COMMON_FLAGS := -W -Wall | 54 | COMMON_FLAGS := -W -Wall |
@@ -54,7 +57,7 @@ COMMON_FLAGS := -W -Wall | |||
54 | # | 57 | # |
55 | COMMON_CFLAGS := $(COMMON_FLAGS) \ | 58 | COMMON_CFLAGS := $(COMMON_FLAGS) \ |
56 | -Wdeclaration-after-statement -Wno-format-zero-length \ | 59 | -Wdeclaration-after-statement -Wno-format-zero-length \ |
57 | -Wstrict-prototypes | 60 | -Wmissing-prototypes -Wstrict-prototypes |
58 | 61 | ||
59 | # User C and User C++ optimization control. Does not affect kernel. | 62 | # User C and User C++ optimization control. Does not affect kernel. |
60 | # | 63 | # |
@@ -76,7 +79,7 @@ COMMON_USER_FLAGS += -fno-strict-aliasing | |||
76 | # We always enable debugging. Either the release binaries are stripped | 79 | # We always enable debugging. Either the release binaries are stripped |
77 | # and the symbols put in the symbolpackage, or we're building debug. | 80 | # and the symbols put in the symbolpackage, or we're building debug. |
78 | # | 81 | # |
79 | COMMON_USER_FLAGS += -g $(ANDROID_FPGA_FORCE_32BIT) | 82 | COMMON_USER_FLAGS += -g |
80 | 83 | ||
81 | # User C and User C++ warning flags | 84 | # User C and User C++ warning flags |
82 | # | 85 | # |
@@ -164,6 +167,7 @@ KBUILD_FLAGS := \ | |||
164 | # androideabi toolchain adds `pic` by default, disable it | 167 | # androideabi toolchain adds `pic` by default, disable it |
165 | # for kernel module build | 168 | # for kernel module build |
166 | KBUILD_FLAGS += -fno-pic | 169 | KBUILD_FLAGS += -fno-pic |
170 | KBUILD_FLAGS += -fstack-protector-strong | ||
167 | 171 | ||
168 | TESTED_KBUILD_FLAGS := \ | 172 | TESTED_KBUILD_FLAGS := \ |
169 | $(call kernel-cc-option,-Wmissing-include-dirs) \ | 173 | $(call kernel-cc-option,-Wmissing-include-dirs) \ |
@@ -171,6 +175,7 @@ TESTED_KBUILD_FLAGS := \ | |||
171 | $(call kernel-cc-option,-Wno-pointer-arith) \ | 175 | $(call kernel-cc-option,-Wno-pointer-arith) \ |
172 | $(call kernel-cc-option,-Wno-aggregate-return) \ | 176 | $(call kernel-cc-option,-Wno-aggregate-return) \ |
173 | $(call kernel-cc-option,-Wno-unused-but-set-variable) \ | 177 | $(call kernel-cc-option,-Wno-unused-but-set-variable) \ |
178 | $(call kernel-cc-option,-Wno-ignored-qualifiers) \ | ||
174 | $(call kernel-cc-option,-Wno-old-style-declaration) \ | 179 | $(call kernel-cc-option,-Wno-old-style-declaration) \ |
175 | $(call kernel-cc-optional-warning,-Wbad-function-cast) \ | 180 | $(call kernel-cc-optional-warning,-Wbad-function-cast) \ |
176 | $(call kernel-cc-optional-warning,-Wcast-qual) \ | 181 | $(call kernel-cc-optional-warning,-Wcast-qual) \ |
@@ -233,25 +238,18 @@ ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_FLAGS) $(TESTED_KBUILD_FLAGS) | |||
233 | # For the same reason (Darwin 'ld') don't bother checking for text | 238 | # For the same reason (Darwin 'ld') don't bother checking for text |
234 | # relocations in host binaries. | 239 | # relocations in host binaries. |
235 | # | 240 | # |
236 | ALL_HOST_LDFLAGS := -L$(HOST_OUT) | 241 | ALL_HOST_LDFLAGS := |
237 | ALL_LDFLAGS := \ | 242 | ALL_LDFLAGS := -Wl,--warn-shared-textrel |
238 | -Wl,--warn-shared-textrel \ | ||
239 | -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT) | ||
240 | |||
241 | ifneq ($(strip $(TOOLCHAIN)),) | ||
242 | ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib | ||
243 | endif | ||
244 | 243 | ||
245 | ifneq ($(strip $(TOOLCHAIN2)),) | 244 | ALL_LDFLAGS += $(SYS_LDFLAGS) |
246 | ALL_LDFLAGS += -L$(TOOLCHAIN2)/lib -Xlinker -rpath-link=$(TOOLCHAIN2)/lib | ||
247 | endif | ||
248 | 245 | ||
249 | ifneq ($(strip $(LINKER_RPATH)),) | 246 | # Optional security hardening features. |
250 | ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH)) | 247 | ifneq ($(FORTIFY),) |
248 | ALL_CFLAGS += -fstack-protector -Wa,--noexecstack -D_FORTIFY_SOURCE=2 | ||
249 | ALL_CXXFLAGS += -fstack-protector -Wa,--noexecstack -D_FORTIFY_SOURCE=2 | ||
250 | ALL_LDFLAGS += -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now | ||
251 | endif | 251 | endif |
252 | 252 | ||
253 | ALL_LDFLAGS += $(SYS_LDFLAGS) | ||
254 | |||
255 | # This variable contains a list of all modules built by kbuild | 253 | # This variable contains a list of all modules built by kbuild |
256 | ALL_KBUILD_MODULES := | 254 | ALL_KBUILD_MODULES := |
257 | 255 | ||
@@ -259,4 +257,11 @@ ALL_KBUILD_MODULES := | |||
259 | ALL_CXX_MODULES := | 257 | ALL_CXX_MODULES := |
260 | 258 | ||
261 | # Toolchain triple for cross environment | 259 | # Toolchain triple for cross environment |
262 | CROSS_TRIPLE := $(patsubst %-,%,$(CROSS_COMPILE)) | 260 | CROSS_TRIPLE := $(patsubst %-,%,$(notdir $(CROSS_COMPILE))) |
261 | |||
262 | ifneq ($(TOOLCHAIN),) | ||
263 | $(warning **********************************************) | ||
264 | $(warning The TOOLCHAIN option has been removed, but) | ||
265 | $(warning you have it set (via $(origin TOOLCHAIN))) | ||
266 | $(warning **********************************************) | ||
267 | endif | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk index ab7a0e9..d4876c9 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk | |||
@@ -49,79 +49,79 @@ | |||
49 | 49 | ||
50 | define host-o-from-one-c | 50 | define host-o-from-one-c |
51 | $(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<)) | 51 | $(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<)) |
52 | $(HOST_CC) -MD -c $(MODULE_HOST_CFLAGS) $(MODULE_INCLUDE_FLAGS) \ | 52 | $(MODULE_CC) -MD -c $(MODULE_HOST_CFLAGS) $(MODULE_INCLUDE_FLAGS) \ |
53 | -include $(CONFIG_H) $< -o $@ | 53 | -include $(CONFIG_H) $< -o $@ |
54 | endef | 54 | endef |
55 | 55 | ||
56 | define target-o-from-one-c | 56 | define target-o-from-one-c |
57 | $(if $(V),,@echo " CC " $(call relative-to-top,$<)) | 57 | $(if $(V),,@echo " CC " $(call relative-to-top,$<)) |
58 | $(CC) -MD -c $(MODULE_CFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \ | 58 | $(MODULE_CC) -MD -c $(MODULE_CFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \ |
59 | -include $(CONFIG_H) $< -o $@ | 59 | -include $(CONFIG_H) $< -o $@ |
60 | endef | 60 | endef |
61 | 61 | ||
62 | define host-o-from-one-cxx | 62 | define host-o-from-one-cxx |
63 | $(if $(V),,@echo " HOST_CXX" $(call relative-to-top,$<)) | 63 | $(if $(V),,@echo " HOST_CXX" $(call relative-to-top,$<)) |
64 | $(HOST_CXX) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \ | 64 | $(MODULE_CXX) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \ |
65 | -include $(CONFIG_H) $< -o $@ | 65 | -include $(CONFIG_H) $< -o $@ |
66 | endef | 66 | endef |
67 | 67 | ||
68 | define target-o-from-one-cxx | 68 | define target-o-from-one-cxx |
69 | $(if $(V),,@echo " CXX " $(call relative-to-top,$<)) | 69 | $(if $(V),,@echo " CXX " $(call relative-to-top,$<)) |
70 | $(CXX) -MD -c $(MODULE_CXXFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \ | 70 | $(MODULE_CXX) -MD -c $(MODULE_CXXFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \ |
71 | -include $(CONFIG_H) $< -o $@ | 71 | -include $(CONFIG_H) $< -o $@ |
72 | endef | 72 | endef |
73 | 73 | ||
74 | define host-executable-from-o | 74 | define host-executable-from-o |
75 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) | 75 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) |
76 | $(HOST_CC) $(MODULE_HOST_LDFLAGS) \ | 76 | $(MODULE_CC) $(MODULE_HOST_LDFLAGS) \ |
77 | -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \ | 77 | -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \ |
78 | $(MODULE_LIBRARY_FLAGS) | 78 | $(MODULE_LIBRARY_FLAGS) |
79 | endef | 79 | endef |
80 | 80 | ||
81 | define host-executable-cxx-from-o | 81 | define host-executable-cxx-from-o |
82 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) | 82 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) |
83 | $(HOST_CXX) $(MODULE_HOST_LDFLAGS) \ | 83 | $(MODULE_CXX) $(MODULE_HOST_LDFLAGS) \ |
84 | -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \ | 84 | -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \ |
85 | $(MODULE_LIBRARY_FLAGS) | 85 | $(MODULE_LIBRARY_FLAGS) |
86 | endef | 86 | endef |
87 | 87 | ||
88 | define target-executable-from-o | 88 | define target-executable-from-o |
89 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) | 89 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) |
90 | $(CC) \ | 90 | $(MODULE_CC) \ |
91 | $(SYS_EXE_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ | 91 | $(MODULE_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ |
92 | $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ | 92 | $(MODULE_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_EXE_CRTEND) \ |
93 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) | 93 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(MODULE_LIBGCC) |
94 | endef | 94 | endef |
95 | 95 | ||
96 | define target-executable-cxx-from-o | 96 | define target-executable-cxx-from-o |
97 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) | 97 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) |
98 | $(CXX) \ | 98 | $(MODULE_CXX) \ |
99 | $(SYS_EXE_LDFLAGS_CXX) $(SYS_EXE_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ | 99 | $(MODULE_EXE_LDFLAGS_CXX) $(MODULE_LDFLAGS) -o $@ \ |
100 | $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ | 100 | $(MODULE_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_EXE_CRTEND) \ |
101 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) | 101 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(MODULE_LIBGCC) |
102 | endef | 102 | endef |
103 | 103 | ||
104 | define target-shared-library-from-o | 104 | define target-shared-library-from-o |
105 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) | 105 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) |
106 | $(CC) -shared -Wl,-Bsymbolic \ | 106 | $(MODULE_CC) -shared -Wl,-Bsymbolic \ |
107 | $(SYS_LIB_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ | 107 | $(MODULE_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ |
108 | $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ | 108 | $(MODULE_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIB_CRTEND) \ |
109 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) | 109 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(MODULE_LIBGCC) |
110 | endef | 110 | endef |
111 | 111 | ||
112 | # If there were any C++ source files in a shared library, we use this recipe, | 112 | # If there were any C++ source files in a shared library, we use this recipe, |
113 | # which runs the C++ compiler to link the final library | 113 | # which runs the C++ compiler to link the final library |
114 | define target-shared-library-cxx-from-o | 114 | define target-shared-library-cxx-from-o |
115 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) | 115 | $(if $(V),,@echo " LD " $(call relative-to-top,$@)) |
116 | $(CXX) -shared -Wl,-Bsymbolic \ | 116 | $(MODULE_CXX) -shared -Wl,-Bsymbolic \ |
117 | $(SYS_LIB_LDFLAGS_CXX) $(SYS_LIB_LDFLAGS) $(SYS_COMMON_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ | 117 | $(MODULE_LIB_LDFLAGS_CXX) $(MODULE_LDFLAGS) -o $@ \ |
118 | $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ | 118 | $(MODULE_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIB_CRTEND) \ |
119 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) | 119 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(MODULE_LIBGCC) |
120 | endef | 120 | endef |
121 | 121 | ||
122 | define host-shared-library-from-o | 122 | define host-shared-library-from-o |
123 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) | 123 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) |
124 | $(HOST_CC) -shared -Wl,-Bsymbolic \ | 124 | $(MODULE_CC) -shared -Wl,-Bsymbolic \ |
125 | $(MODULE_HOST_LDFLAGS) -o $@ \ | 125 | $(MODULE_HOST_LDFLAGS) -o $@ \ |
126 | $(sort $(MODULE_ALL_OBJECTS)) \ | 126 | $(sort $(MODULE_ALL_OBJECTS)) \ |
127 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) | 127 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) |
@@ -131,7 +131,7 @@ endef | |||
131 | # which runs the C++ compiler to link the final library | 131 | # which runs the C++ compiler to link the final library |
132 | define host-shared-library-cxx-from-o | 132 | define host-shared-library-cxx-from-o |
133 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) | 133 | $(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@)) |
134 | $(HOST_CXX) -shared -Wl,-Bsymbolic \ | 134 | $(MODULE_CXX) -shared -Wl,-Bsymbolic \ |
135 | $(MODULE_HOST_LDFLAGS) -o $@ \ | 135 | $(MODULE_HOST_LDFLAGS) -o $@ \ |
136 | $(sort $(MODULE_ALL_OBJECTS)) \ | 136 | $(sort $(MODULE_ALL_OBJECTS)) \ |
137 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) | 137 | $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) |
@@ -194,7 +194,10 @@ endef | |||
194 | 194 | ||
195 | BISON ?= bison | 195 | BISON ?= bison |
196 | CC ?= gcc | 196 | CC ?= gcc |
197 | CC_SECONDARY ?= $(CC) | ||
198 | CROSS_COMPILE_SECONDARY ?= $(CROSS_COMPILE) | ||
197 | CXX ?= g++ | 199 | CXX ?= g++ |
200 | CXX_SECONDARY ?= $(CXX) | ||
198 | HOST_CC ?= gcc | 201 | HOST_CC ?= gcc |
199 | HOST_CXX ?= g++ | 202 | HOST_CXX ?= g++ |
200 | JAR ?= jar | 203 | JAR ?= jar |
@@ -216,26 +219,68 @@ override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh | |||
216 | # is reflected in the use of -target. For GCC this is always encoded into | 219 | # is reflected in the use of -target. For GCC this is always encoded into |
217 | # the binary. If CROSS_COMPILE is not set we can skip this. | 220 | # the binary. If CROSS_COMPILE is not set we can skip this. |
218 | # | 221 | # |
219 | ifneq ($(CROSS_COMPILE),) | 222 | # If we're doing a build with multiple target architectures, we might need |
220 | ifeq ($(cc-is-clang),true) | 223 | # two separate compilers to build binaries for each architecture. In this |
221 | override CC := $(if $(V),,@)$(CCACHE) $(CC) \ | 224 | # case, CROSS_COMPILE and CROSS_COMPILE_SECONDARY are the cross compiler |
222 | -target $(patsubst %-,%,$(CROSS_COMPILE)) \ | 225 | # prefix for the two compilers - $(CC) and $(CC_SECONDARY). |
223 | -B$(dir $(shell which $(CROSS_COMPILE)gcc)) | 226 | # |
224 | override CXX := $(if $(V),,@)$(CCACHE) $(CXX) \ | 227 | # Set the secondary compiler first before we overwrite $(CC). |
225 | -target $(patsubst %-,%,$(CROSS_COMPILE)) \ | 228 | # |
226 | -B$(dir $(shell which $(CROSS_COMPILE)gcc)) | 229 | |
227 | else | 230 | ifneq ($(CROSS_COMPILE_SECONDARY),) |
228 | override CC := $(if $(V),,@)$(CCACHE) $(CROSS_COMPILE)$(CC) | 231 | ifeq ($(cc-is-clang),true) |
229 | override CXX := $(if $(V),,@)$(CCACHE) $(CROSS_COMPILE)$(CXX) | 232 | override CC_SECONDARY := \ |
233 | $(CC_SECONDARY) \ | ||
234 | -target $(patsubst %-,%,$(CROSS_COMPILE_SECONDARY)) \ | ||
235 | -B$(dir $(shell which $(CROSS_COMPILE_SECONDARY)gcc)) | ||
236 | override CXX_SECONDARY := \ | ||
237 | $(CXX_SECONDARY) \ | ||
238 | -target $(patsubst %-,%,$(CROSS_COMPILE_SECONDARY)) \ | ||
239 | -B$(dir $(shell which $(CROSS_COMPILE_SECONDARY)gcc)) | ||
240 | else | ||
241 | ifeq ($(origin CC_SECONDARY),file) | ||
242 | override CC_SECONDARY := $(CROSS_COMPILE_SECONDARY)$(CC_SECONDARY) | ||
243 | endif | ||
244 | ifeq ($(origin CXX_SECONDARY),file) | ||
245 | override CXX_SECONDARY := $(CROSS_COMPILE_SECONDARY)$(CXX_SECONDARY) | ||
246 | endif | ||
247 | endif | ||
230 | endif | 248 | endif |
249 | |||
250 | # Apply compiler wrappers and V=1 handling | ||
251 | override CC_SECONDARY := $(if $(V),,@)$(CCACHE)$(DISTCC) $(CC_SECONDARY) | ||
252 | override CXX_SECONDARY := $(if $(V),,@)$(CCACHE)$(DISTCC) $(CXX_SECONDARY) | ||
253 | |||
254 | ifneq ($(CROSS_COMPILE),) | ||
255 | ifeq ($(cc-is-clang),true) | ||
256 | override CC := \ | ||
257 | $(CC) \ | ||
258 | -target $(patsubst %-,%,$(CROSS_COMPILE)) \ | ||
259 | -B$(dir $(shell which $(CROSS_COMPILE)gcc)) | ||
260 | override CXX := \ | ||
261 | $(CXX) \ | ||
262 | -target $(patsubst %-,%,$(CROSS_COMPILE)) \ | ||
263 | -B$(dir $(shell which $(CROSS_COMPILE)gcc)) | ||
264 | else | ||
265 | ifeq ($(origin CC),file) | ||
266 | override CC := $(CROSS_COMPILE)$(CC) | ||
267 | endif | ||
268 | ifeq ($(origin CXX),file) | ||
269 | override CXX := $(CROSS_COMPILE)$(CXX) | ||
270 | endif | ||
271 | endif | ||
231 | else | 272 | else |
232 | override CC := $(if $(V),,@)$(CCACHE) $(CC) | 273 | $(if $(CROSS_COMPILE_SECONDARY),$(error CROSS_COMPILE_SECONDARY is set but CROSS_COMPILE is empty)) |
233 | override CXX := $(if $(V),,@)$(CCACHE) $(CXX) | ||
234 | endif | 274 | endif |
235 | 275 | ||
276 | # Apply compiler wrappers and V=1 handling | ||
277 | override CC := $(if $(V),,@)$(CCACHE)$(DISTCC) $(CC) | ||
278 | override CXX := $(if $(V),,@)$(CCACHE)$(DISTCC) $(CXX) | ||
279 | |||
236 | override AR := $(if $(V),,@)$(CROSS_COMPILE)ar | 280 | override AR := $(if $(V),,@)$(CROSS_COMPILE)ar |
237 | override BISON := $(if $(V),,@)$(BISON) | 281 | override BISON := $(if $(V),,@)$(BISON) |
238 | override BZIP2 := $(if $(V),,@)bzip2 -9 | 282 | override BZIP2 := $(if $(V),,@)bzip2 -9 |
283 | override CAT := $(if $(V),,@)cat | ||
239 | override CP := $(if $(V),,@)cp | 284 | override CP := $(if $(V),,@)cp |
240 | override ECHO := $(if $(V),,@)echo | 285 | override ECHO := $(if $(V),,@)echo |
241 | override FLEX := $(if $(V),,@)flex | 286 | override FLEX := $(if $(V),,@)flex |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch.mk new file mode 100644 index 0000000..7b41576 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch.mk | |||
@@ -0,0 +1,107 @@ | |||
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 | # Now we have included the platform_version.mk file, we know we have a | ||
44 | # correctly configured OUT_DIR and can probe it to figure out our | ||
45 | # architecture. | ||
46 | |||
47 | $(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \ | ||
48 | grep '^ro.product.cpu.abilist=\|^ro.product.cpu.abilist32=' | \ | ||
49 | sed -e 's,ro.product.cpu.abilist=,JNI_CPU_ABI=,' \ | ||
50 | -e 's,ro.product.cpu.abilist32=,JNI_CPU_ABI_2ND=,' | \ | ||
51 | tr ',' ' ' | tr '\n' '#'))) | ||
52 | |||
53 | # If ARCH is set, use that to remap to an "Android" ARCH.. | ||
54 | ANDROID_ARCH := $(filter arm arm64 x86 x86_64,$(ARCH)) | ||
55 | |||
56 | # x86 is special and has another legacy ARCH name which is remapped | ||
57 | ifeq ($(ARCH),i386) | ||
58 | TARGET_ARCH := x86 | ||
59 | endif | ||
60 | |||
61 | ifeq ($(ANDROID_ARCH),) | ||
62 | # ..otherwise, try to use the ABI list to figure it out. | ||
63 | # We check 64-bit variants before 32, as a 64-build may be backwards compatible, | ||
64 | # so the abilist contain both 64- and 32-bit variants | ||
65 | ifneq ($(filter arm64-v8a,$(JNI_CPU_ABI)),) | ||
66 | TARGET_ARCH=arm64 | ||
67 | else ifneq ($(filter armeabi-v7a armeabi,$(JNI_CPU_ABI)),) | ||
68 | TARGET_ARCH=arm | ||
69 | else ifneq ($(filter mips64,$(JNI_CPU_ABI)),) | ||
70 | TARGET_ARCH=mips64 | ||
71 | else ifneq ($(filter mips,$(JNI_CPU_ABI)),) | ||
72 | TARGET_ARCH=mips | ||
73 | else ifneq ($(filter x86_64,$(JNI_CPU_ABI)),) | ||
74 | TARGET_ARCH=x86_64 | ||
75 | else ifneq ($(filter x86,$(JNI_CPU_ABI)),) | ||
76 | TARGET_ARCH=x86 | ||
77 | else | ||
78 | $(error ARCH not set and JNI_CPU_ABI=$(JNI_CPU_ABI) was not remappable) | ||
79 | endif | ||
80 | else | ||
81 | TARGET_ARCH := $(ANDROID_ARCH) | ||
82 | endif | ||
83 | |||
84 | JNI_CPU_ABI := $(word 1,$(JNI_CPU_ABI)) | ||
85 | JNI_CPU_ABI_2ND := $(word 1,$(JNI_CPU_ABI_2ND)) | ||
86 | |||
87 | include ../common/android/arch_common.mk | ||
88 | |||
89 | ifneq ($(filter arm arm64 mips mips64,$(TARGET_ARCH)),) | ||
90 | LDM_PLATFORM ?= 1 | ||
91 | endif | ||
92 | |||
93 | ifneq ($(filter x86 x86_64,$(TARGET_ARCH)),) | ||
94 | LDM_PCI ?= 1 | ||
95 | endif | ||
96 | |||
97 | ifneq ($(filter x86 x86_64,$(TARGET_ARCH)),) | ||
98 | KERNEL_CROSS_COMPILE ?= undef | ||
99 | endif | ||
100 | |||
101 | ifneq ($(filter arm64 mips64 x86_64,$(TARGET_ARCH)),) | ||
102 | ifeq ($(MULTIARCH),) | ||
103 | $(warning *** 64-bit architecture detected. Enabling MULTIARCH=1.) | ||
104 | $(warning *** If you want a 64-bit only build, use MULTIARCH=64only.) | ||
105 | export MULTIARCH := 1 | ||
106 | endif | ||
107 | endif | ||
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 index bf3fe11..2cd272e 100644 --- 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 | |||
@@ -38,72 +38,121 @@ | |||
38 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 38 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
39 | ### ########################################################################### | 39 | ### ########################################################################### |
40 | 40 | ||
41 | ifeq ($(USE_CLANG),1) | ||
42 | export CC := $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/bin/clang | ||
43 | export CXX := $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/bin/clang++ | ||
44 | endif | ||
45 | |||
46 | # FIXME: We need to run this early because config/core.mk hasn't been | ||
47 | # included yet. Use the same variable names as in that makefile. | ||
48 | # | ||
49 | _CC := $(if $(filter default,$(origin CC)),gcc,$(CC)) | ||
50 | _CLANG := $(shell ../tools/cc-check.sh --clang --cc $(_CC)) | ||
51 | |||
52 | SYS_CFLAGS := \ | 41 | SYS_CFLAGS := \ |
53 | -fno-short-enums \ | 42 | -fno-short-enums \ |
54 | -funwind-tables \ | 43 | -funwind-tables \ |
55 | -D__linux__ | 44 | -D__linux__ |
56 | SYS_INCLUDES := \ | ||
57 | -isystem $(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \ | ||
58 | -isystem $(ANDROID_ROOT)/bionic/libc/include \ | ||
59 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi \ | ||
60 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi/asm-$(ANDROID_ARCH) \ | ||
61 | -isystem $(ANDROID_ROOT)/bionic/libm/include \ | ||
62 | -isystem $(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \ | ||
63 | -isystem $(ANDROID_ROOT)/bionic/libthread_db/include \ | ||
64 | -isystem $(ANDROID_ROOT)/external/libunwind/include \ | ||
65 | -isystem $(ANDROID_ROOT)/frameworks/base/include \ | ||
66 | -isystem $(ANDROID_ROOT)/hardware/libhardware/include \ | ||
67 | -isystem $(ANDROID_ROOT)/hardware/libhardware_legacy/include \ | ||
68 | -isystem $(ANDROID_ROOT)/system/core/include \ | ||
69 | -isystem $(ANDROID_ROOT)/system/core/libsync/include \ | ||
70 | -isystem $(ANDROID_ROOT)/system/media/camera/include \ | ||
71 | -isystem $(ANDROID_ROOT)/external/libdrm \ | ||
72 | -isystem $(ANDROID_ROOT)/external/libdrm/include/drm | ||
73 | |||
74 | ifneq ($(wildcard $(ANDROID_ROOT)/external/boringssl/src/include),) | ||
75 | SYS_INCLUDES += \ | ||
76 | -isystem $(ANDROID_ROOT)/external/boringssl/src/include | ||
77 | else | ||
78 | SYS_INCLUDES += \ | ||
79 | -isystem $(ANDROID_ROOT)/external/openssl/include | ||
80 | endif | ||
81 | 45 | ||
82 | # Obsolete libc includes | 46 | SYS_INCLUDES := |
83 | SYS_INCLUDES += \ | 47 | |
84 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/common \ | 48 | ifneq ($(TARGET_PLATFORM),) |
85 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) | 49 | |
50 | # Support for building with the Android NDK >= r15b. | ||
51 | # The NDK provides only the most basic includes and libraries. | ||
52 | |||
53 | SYS_INCLUDES += \ | ||
54 | -isystem $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH)/usr/include \ | ||
55 | -isystem $(NDK_SYSROOT)/usr/include/drm \ | ||
56 | -isystem $(NDK_SYSROOT)/usr/include | ||
57 | |||
58 | else # !TARGET_PLATFORM | ||
59 | |||
60 | # These libraries are not coming from the NDK now, so we need to include them | ||
61 | # from the ANDROID_ROOT source tree. | ||
62 | |||
63 | SYS_INCLUDES += \ | ||
64 | -isystem $(ANDROID_ROOT)/bionic/libc/include \ | ||
65 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/android/uapi \ | ||
66 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi \ | ||
67 | -isystem $(ANDROID_ROOT)/bionic/libm/include \ | ||
68 | -isystem $(ANDROID_ROOT)/external/libdrm/include/drm \ | ||
69 | -isystem $(ANDROID_ROOT)/external/zlib/src \ | ||
70 | -isystem $(ANDROID_ROOT)/frameworks/native/include | ||
71 | |||
72 | ifeq ($(is_future_version),1) | ||
73 | SYS_INCLUDES += \ | ||
74 | -isystem $(ANDROID_ROOT)/libnativehelper/include_jni | ||
75 | else ifeq ($(is_aosp_master),1) | ||
76 | SYS_INCLUDES += \ | ||
77 | -isystem $(ANDROID_ROOT)/libnativehelper/include_jni | ||
78 | else | ||
79 | SYS_INCLUDES += \ | ||
80 | -isystem $(ANDROID_ROOT)/libnativehelper/include/nativehelper | ||
81 | endif | ||
82 | |||
83 | endif # !TARGET_PLATFORM | ||
84 | |||
85 | # These components aren't in the NDK. They *are* in the VNDK. If this is an | ||
86 | # NDK or non-NDK build, but not a VNDK build, include the needed bits from | ||
87 | # the ANDROID_ROOT source tree. We put libsync first because the NDK copy | ||
88 | # of the sync headers have been stripped in an unsupported way. | ||
89 | |||
90 | SYS_INCLUDES := \ | ||
91 | -isystem $(ANDROID_ROOT)/system/core/libsync/include \ | ||
92 | $(SYS_INCLUDES) \ | ||
93 | -isystem $(ANDROID_ROOT)/external/libdrm \ | ||
94 | -isystem $(ANDROID_ROOT)/external/libpng \ | ||
95 | -isystem $(ANDROID_ROOT)/external/libunwind/include \ | ||
96 | -isystem $(ANDROID_ROOT)/hardware/libhardware/include \ | ||
97 | -isystem $(ANDROID_ROOT)/system/media/camera/include | ||
98 | |||
99 | # boringssl replaced openssl from Marshmallow | ||
100 | ifeq ($(is_at_least_marshmallow),1) | ||
101 | SYS_INCLUDES += \ | ||
102 | -isystem $(ANDROID_ROOT)/external/boringssl/src/include | ||
103 | else | ||
104 | SYS_INCLUDES += \ | ||
105 | -isystem $(ANDROID_ROOT)/external/openssl/include | ||
106 | endif | ||
107 | |||
108 | # libjpeg-turbo replaced libjpeg from Nougat | ||
109 | ifeq ($(is_at_least_nougat),1) | ||
110 | SYS_INCLUDES += \ | ||
111 | -isystem $(ANDROID_ROOT)/external/libjpeg-turbo | ||
112 | else | ||
113 | SYS_INCLUDES += \ | ||
114 | -isystem $(ANDROID_ROOT)/external/jpeg | ||
115 | endif | ||
116 | |||
117 | # Handle upstream includes refactoring | ||
118 | ifeq ($(is_at_least_oreo),1) | ||
119 | SYS_INCLUDES += \ | ||
120 | -isystem $(ANDROID_ROOT)/frameworks/native/libs/nativewindow/include \ | ||
121 | -isystem $(ANDROID_ROOT)/system/core/libbacktrace/include \ | ||
122 | -isystem $(ANDROID_ROOT)/system/core/libsystem/include \ | ||
123 | -isystem $(ANDROID_ROOT)/system/core/libutils/include | ||
124 | ifeq ($(NDK_ROOT),) | ||
125 | SYS_INCLUDES += \ | ||
126 | -isystem $(ANDROID_ROOT)/frameworks/native/libs/arect/include \ | ||
127 | -isystem $(ANDROID_ROOT)/system/core/liblog/include | ||
128 | endif | ||
129 | else | ||
130 | SYS_INCLUDES += \ | ||
131 | -isystem $(ANDROID_ROOT)/frameworks/base/include \ | ||
132 | -isystem $(ANDROID_ROOT)/system/core/include | ||
133 | endif | ||
86 | 134 | ||
87 | # This is comparing PVR_BUILD_DIR to see if it is omap and adding | 135 | # This is comparing PVR_BUILD_DIR to see if it is omap and adding |
88 | # includes required for it's HWC | 136 | # includes required for it's HWC. |
89 | ifeq ($(notdir $(abspath .)),omap_android) | 137 | ifeq ($(notdir $(abspath .)),omap_android) |
90 | SYS_INCLUDES += \ | 138 | SYS_INCLUDES += \ |
91 | -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/kernel-headers \ | 139 | -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/kernel-headers \ |
92 | -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/ion | 140 | -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/ion |
93 | endif | 141 | endif |
94 | 142 | ||
95 | ifeq ($(_CLANG),true) | 143 | # Always include the NDK compatibility directory, because it allows us to |
96 | SYS_INCLUDES := \ | 144 | # compile in inline versions of simple functions to eliminate dependencies, |
97 | -nostdinc $(SYS_INCLUDES) \ | 145 | # and we can also constrain the available APIs. Do this last, so we can |
98 | -isystem $(ANDROID_ROOT)/external/clang/lib/include | 146 | # make sure it is always first on the include list. |
99 | endif | ||
100 | 147 | ||
101 | SYS_EXE_LDFLAGS := \ | 148 | SYS_INCLUDES := -isystem eurasiacon/android/ndk $(SYS_INCLUDES) |
102 | -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \ | ||
103 | -lc -ldl -lcutils | ||
104 | 149 | ||
105 | SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS) | 150 | # Android enables build-id sections to allow mapping binaries to debug |
151 | # information for symbol resolution | ||
152 | SYS_LDFLAGS += -Wl,--build-id=md5 | ||
106 | 153 | ||
107 | SYS_EXE_LDFLAGS_CXX := -lstdc++ | 154 | SYS_EXE_LDFLAGS_CXX := -lstdc++ |
108 | 155 | ||
109 | SYS_LIB_LDFLAGS_CXX := $(SYS_EXE_LDFLAGS_CXX) | 156 | SYS_LIB_LDFLAGS_CXX := $(SYS_EXE_LDFLAGS_CXX) |
157 | |||
158 | OPTIM := -O2 | ||
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 index b8b97e2..5cb8d84 100644 --- 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 | |||
@@ -39,12 +39,6 @@ | |||
39 | ### ########################################################################### | 39 | ### ########################################################################### |
40 | 40 | ||
41 | 41 | ||
42 | # On versions of Android prior to L, remap the use of libc++ to a combination | ||
43 | # of stlport and libstdc++. Not every module written in C++ in the DDK needs | ||
44 | # the STL, but linking it should be harmless (and most modules do need it). | ||
45 | ifneq ($(is_at_least_lollipop),1) | ||
46 | endif | ||
47 | |||
48 | 42 | ||
49 | $(eval $(call BothConfigC,ANDROID,)) | 43 | $(eval $(call BothConfigC,ANDROID,)) |
50 | 44 | ||
@@ -52,11 +46,15 @@ $(eval $(call BothConfigC,ANDROID,)) | |||
52 | 46 | ||
53 | $(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_ANDROID_SYSTRACE,)) | 47 | $(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_ANDROID_SYSTRACE,)) |
54 | 48 | ||
49 | $(eval $(call TunableBothConfigMake,SUPPORT_ANDROID_PLATFORM,)) | ||
55 | $(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_ANDROID_SYSTRACE,)) | 50 | $(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_ANDROID_SYSTRACE,)) |
56 | 51 | ||
57 | $(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) | 52 | $(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) |
58 | $(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) | 53 | $(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,)) |
59 | 54 | ||
55 | $(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_FENCE,)) | ||
56 | $(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_FENCE,)) | ||
57 | |||
60 | ifeq ($(NO_HARDWARE),1) | 58 | ifeq ($(NO_HARDWARE),1) |
61 | override PVR_ANDROID_COMPOSERHAL := null | 59 | override PVR_ANDROID_COMPOSERHAL := null |
62 | endif | 60 | endif |
@@ -68,4 +66,50 @@ ifneq ($(PVR_ANDROID_COMPOSERHAL),drm) | |||
68 | endif | 66 | endif |
69 | 67 | ||
70 | 68 | ||
69 | # Most development systems will have at least one copy of java, but some may | ||
70 | # have more. If the build system detected that a specific 'forced' version | ||
71 | # of java should be used, and the user didn't override JAVAC, try to set it | ||
72 | # up here. We'll use JAVA_HOME if it's set, falling back to PATH if it is | ||
73 | # not. | ||
74 | ifeq ($(JAVAC),) | ||
75 | # If JAVA_HOME is unset, implement some assumed paths taken from Android's | ||
76 | # build/envsetup.sh script (these are intentionally Ubuntu centric). | ||
77 | ifeq ($(JAVA_HOME),) | ||
78 | ifeq ($(LEGACY_USE_JAVA7),1) | ||
79 | JAVA_HOME ?= /usr/lib/jvm/java-7-openjdk-amd64 | ||
80 | else | ||
81 | JAVA_HOME ?= /usr/lib/jvm/java-8-openjdk-amd64 | ||
82 | endif | ||
83 | ifeq ($(wildcard $(JAVA_HOME)),) | ||
84 | JAVA_HOME := | ||
85 | endif | ||
86 | endif | ||
87 | |||
88 | ifeq ($(JAVA_HOME),) | ||
89 | JAVA ?= java | ||
90 | JAVAC ?= javac | ||
91 | else | ||
92 | JAVA := $(JAVA_HOME)/bin/java | ||
93 | JAVAC := $(JAVA_HOME)/bin/javac | ||
94 | ifeq ($(wildcard $(JAVAC)),) | ||
95 | $(error JAVA_HOME does not point to a valid java installation) | ||
96 | endif | ||
97 | endif | ||
98 | |||
99 | # Test the configured JDK for validity | ||
100 | ifeq ($(LEGACY_USE_JAVA6),1) | ||
101 | ifeq ($(shell $(JAVA) -version 2>&1 | grep -qe 'Java(TM).*1\.6\.0' && echo 1 || echo 0),0) | ||
102 | $(error '$(JAVA) -version' was not for Oracle JDK 6) | ||
103 | endif | ||
104 | else ifeq ($(LEGACY_USE_JAVA7),1) | ||
105 | ifeq ($(shell $(JAVA) -version 2>&1 | grep -qe 'OpenJDK.*7u' && echo 1 || echo 0),0) | ||
106 | $(error '$(JAVA) -version' was not for OpenJDK 7) | ||
107 | endif | ||
108 | else | ||
109 | ifeq ($(shell $(JAVA) -version 2>&1 | grep -qe 'OpenJDK.*1\.8\.' && echo 1 || echo 0),0) | ||
110 | $(error '$(JAVA) -version' was not for OpenJDK 8) | ||
111 | endif | ||
112 | endif | ||
113 | endif | ||
114 | |||
71 | include ../common/ion.mk | 115 | include ../common/ion.mk |
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 index ba37064..bc92a6f 100644 --- 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 | |||
@@ -38,8 +38,6 @@ | |||
38 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 38 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
39 | ### ########################################################################### | 39 | ### ########################################################################### |
40 | 40 | ||
41 | include ../common/android/platform_version.mk | ||
42 | |||
43 | # Basic support option tuning for Android | 41 | # Basic support option tuning for Android |
44 | # | 42 | # |
45 | SUPPORT_ANDROID_PLATFORM := 1 | 43 | SUPPORT_ANDROID_PLATFORM := 1 |
@@ -72,10 +70,6 @@ OPK_DEFAULT := libpvrANDROID_WSEGL.so | |||
72 | # | 70 | # |
73 | KERNEL_COMPONENTS := srvkm | 71 | KERNEL_COMPONENTS := srvkm |
74 | 72 | ||
75 | # Kernel modules are always installed here under Android | ||
76 | # | ||
77 | PVRSRV_MODULE_BASEDIR := /system/modules/ | ||
78 | |||
79 | # Use the new PVR_DPF implementation to allow lower message levels | 73 | # Use the new PVR_DPF implementation to allow lower message levels |
80 | # to be stripped from production drivers | 74 | # to be stripped from production drivers |
81 | # | 75 | # |
@@ -102,6 +96,12 @@ SUPPORT_LARGE_GENERAL_HEAP := 1 | |||
102 | # | 96 | # |
103 | PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400 | 97 | PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400 |
104 | 98 | ||
99 | ############################################################################## | ||
100 | # Enable source fortification by default | ||
101 | # | ||
102 | FORTIFY ?= 1 | ||
103 | |||
104 | ############################################################################## | ||
105 | # Unless overridden by the user, assume the RenderScript Compute API level | 105 | # Unless overridden by the user, assume the RenderScript Compute API level |
106 | # matches that of the SDK API_LEVEL. | 106 | # matches that of the SDK API_LEVEL. |
107 | # | 107 | # |
@@ -126,36 +126,35 @@ UNITTEST_INCLUDES := \ | |||
126 | $(ANDROID_ROOT)/frameworks/native/opengl/include \ | 126 | $(ANDROID_ROOT)/frameworks/native/opengl/include \ |
127 | $(ANDROID_ROOT)/libnativehelper/include/nativehelper | 127 | $(ANDROID_ROOT)/libnativehelper/include/nativehelper |
128 | 128 | ||
129 | # But it doesn't have OpenVG headers | ||
130 | # | ||
131 | UNITTEST_INCLUDES += eurasiacon/unittests/include | 129 | UNITTEST_INCLUDES += eurasiacon/unittests/include |
132 | 130 | ||
133 | ############################################################################## | 131 | ############################################################################## |
134 | # Future versions moved proprietary libraries to a vendor directory | 132 | # Future versions moved proprietary libraries to a vendor directory |
135 | # | 133 | # |
136 | SHLIB_DESTDIR := /system/vendor/lib | 134 | ifeq ($(wildcard $(TARGET_ROOT)/product/$(TARGET_DEVICE)/vendor),) |
137 | DEMO_DESTDIR := /system/vendor/bin | 135 | PVRSRV_MODULE_BASEDIR := /system/lib/modules/ |
138 | 136 | BIN_DESTDIR := /system/vendor/bin | |
139 | # EGL libraries go in a special place | 137 | APP_DESTDIR := /data/app |
140 | # | 138 | else |
141 | EGL_DESTDIR := $(SHLIB_DESTDIR)/egl | 139 | PVR_ANDROID_FORCE_APP_NATIVE_UNPACKED := 1 |
140 | PVRSRV_MODULE_BASEDIR := /vendor/lib/modules/ | ||
141 | BIN_DESTDIR := /vendor/bin | ||
142 | APP_DESTDIR := /vendor/app | ||
143 | endif | ||
142 | 144 | ||
143 | ############################################################################## | 145 | ############################################################################## |
144 | # In K and older, augment the libstdc++ includes with stlport includes. Any | 146 | # Android doesn't use these install script variables. They're still in place |
145 | # part of the C++ library not implemented by stlport will be handled by | 147 | # because the Linux install scripts use them. |
146 | # linking in libstdc++ too (see extra_config.mk). | ||
147 | # | 148 | # |
148 | # On L and newer, don't use stlport OR libstdc++ at all; just use libc++. | 149 | SHLIB_DESTDIR := not-used |
150 | EGL_DESTDIR := not-used | ||
151 | |||
152 | # Must give our EGL/GLES libraries a globally unique name | ||
149 | # | 153 | # |
154 | EGL_BASENAME_SUFFIX := _POWERVR_SGX$(SGXCORE)_$(SGX_CORE_REV) | ||
155 | |||
150 | SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS) | 156 | SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS) |
151 | ifeq ($(is_at_least_lollipop),1) | 157 | SYS_INCLUDES += -isystem $(LIBCXX_INCLUDE_PATH) |
152 | SYS_INCLUDES += \ | ||
153 | -isystem $(ANDROID_ROOT)/external/libcxx/include | ||
154 | else | ||
155 | SYS_INCLUDES += \ | ||
156 | -isystem $(ANDROID_ROOT)/bionic \ | ||
157 | -isystem $(ANDROID_ROOT)/external/stlport/stlport | ||
158 | endif | ||
159 | 158 | ||
160 | ############################################################################## | 159 | ############################################################################## |
161 | # Support the OES_EGL_image_external extensions in the client drivers. | 160 | # Support the OES_EGL_image_external extensions in the client drivers. |
@@ -177,32 +176,28 @@ EGL_EXTENSION_ANDROID_RECORDABLE := 1 | |||
177 | EGL_EXTENSION_ANDROID_BLOB_CACHE := 1 | 176 | EGL_EXTENSION_ANDROID_BLOB_CACHE := 1 |
178 | 177 | ||
179 | ############################################################################## | 178 | ############################################################################## |
180 | # JB added a new corkscrew API for userland backtracing. | ||
181 | # | ||
182 | ifeq ($(is_at_least_lollipop),0) | ||
183 | PVR_ANDROID_HAS_CORKSCREW_API := 1 | ||
184 | endif | ||
185 | |||
186 | ############################################################################## | ||
187 | # JB MR1 introduces cross-process syncs associated with a fd. | 179 | # JB MR1 introduces cross-process syncs associated with a fd. |
188 | # This requires a new enough kernel version to have the base/sync driver. | 180 | # This requires a new enough kernel version to have the base/sync driver. |
189 | # | 181 | # |
190 | EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC ?= 1 | 182 | EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC ?= 1 |
191 | PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC ?= 1 | ||
192 | 183 | ||
193 | ############################################################################## | 184 | ############################################################################## |
194 | # Versions of Android between Cupcake and KitKat MR1 required Java 6. | 185 | # Kernel 4.9 introduces new sync framework for cross-process sync |
195 | # | 186 | # |
196 | ifeq ($(is_at_least_lollipop),0) | 187 | ifneq ($(strip $(KERNELDIR)),) |
197 | LEGACY_USE_JAVA6 ?= 1 | 188 | include ../kernel_version.mk |
189 | ifeq ($(call kernel-version-at-least,4,9,27),true) | ||
190 | PVR_ANDROID_NATIVE_WINDOW_HAS_FENCE ?= 1 | ||
191 | else | ||
192 | PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC ?= 1 | ||
193 | endif | ||
198 | endif | 194 | endif |
199 | 195 | ||
200 | ############################################################################## | 196 | ############################################################################## |
201 | # Versions of Android between ICS and KitKat MR1 used ion .heap_mask instead | 197 | # Versions of Android prior to Nougat required Java 7 (OpenJDK). |
202 | # of .heap_id_mask. | ||
203 | # | 198 | # |
204 | ifeq ($(is_at_least_lollipop),0) | 199 | ifeq ($(is_at_least_nougat),0) |
205 | PVR_ANDROID_HAS_ION_FIELD_HEAP_MASK := 1 | 200 | LEGACY_USE_JAVA7 ?= 1 |
206 | endif | 201 | endif |
207 | 202 | ||
208 | ############################################################################## | 203 | ############################################################################## |
@@ -214,20 +209,12 @@ PVR_ANDROID_BCC_MULTIARCH_SUPPORT := 1 | |||
214 | endif | 209 | endif |
215 | 210 | ||
216 | ############################################################################## | 211 | ############################################################################## |
217 | # Lollipop annotates the cursor allocation with USAGE_CURSOR to enable it to | 212 | # Versions of Android prior to Nougat required .apk files to be processed with |
218 | # be accelerated with special cursor hardware (rather than wasting an | 213 | # zipalign. Using this tool on Nougat or greater will corrupt the .apk file, |
219 | # overlay). This flag stops the DDK from blocking the allocation. | 214 | # as alignment is already done by signapk.jar, so we must disable it. |
220 | # | 215 | # |
221 | ifeq ($(is_at_least_lollipop),1) | 216 | ifeq ($(is_at_least_nougat),0) |
222 | PVR_ANDROID_HAS_GRALLOC_USAGE_CURSOR := 1 | 217 | LEGACY_USE_ZIPALIGN ?= 1 |
223 | endif | ||
224 | |||
225 | ############################################################################## | ||
226 | # Lollipop changed the camera HAL metadata specification to require that | ||
227 | # CONTROL_MAX_REGIONS specifies 3 integers (instead of 1). | ||
228 | # | ||
229 | ifeq ($(is_at_least_lollipop),1) | ||
230 | PVR_ANDROID_CAMERA_CONTROL_MAX_REGIONS_HAS_THREE := 1 | ||
231 | endif | 218 | endif |
232 | 219 | ||
233 | ############################################################################## | 220 | ############################################################################## |
@@ -252,6 +239,14 @@ ifeq ($(is_at_least_marshmallow),1) | |||
252 | PVR_ANDROID_HAS_GRALLOC_USAGE_RENDERSCRIPT := 1 | 239 | PVR_ANDROID_HAS_GRALLOC_USAGE_RENDERSCRIPT := 1 |
253 | endif | 240 | endif |
254 | 241 | ||
242 | # On Android O, the <sync/sync.h> file was moved to <android/sync.h> for | ||
243 | # DDK use. A symlink was left for legacy reasons, but it conflicts with | ||
244 | # the NDK. Tell the driver to avoid using the symlink compatibility. | ||
245 | # | ||
246 | ifeq ($(is_at_least_oreo),1) | ||
247 | override PVR_ANDROID_HAS_ANDROID_SYNC_H := 1 | ||
248 | endif | ||
249 | |||
255 | # Placeholder for future version handling | 250 | # Placeholder for future version handling |
256 | # | 251 | # |
257 | ifeq ($(is_future_version),1) | 252 | ifeq ($(is_future_version),1) |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/install.sh.tpl b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/install.sh.tpl new file mode 100644 index 0000000..bc9fa24 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/install.sh.tpl | |||
@@ -0,0 +1,315 @@ | |||
1 | #!/bin/bash | ||
2 | ############################################################################ ### | ||
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 | # Help on how to invoke | ||
42 | # | ||
43 | function usage { | ||
44 | echo "usage: $0 [options...]" | ||
45 | echo "" | ||
46 | echo "Options: -v Verbose mode." | ||
47 | echo " -n Dry-run mode." | ||
48 | echo " -u Uninstall-only mode." | ||
49 | echo " --root <path> Use <path> as the root of the install file system." | ||
50 | echo " (Overrides the DISCIMAGE environment variable.)" | ||
51 | exit 1 | ||
52 | } | ||
53 | |||
54 | WD=`pwd` | ||
55 | SCRIPT_ROOT=`dirname $0` | ||
56 | cd $SCRIPT_ROOT | ||
57 | |||
58 | PVRVERSION=[PVRVERSION] | ||
59 | PVRBUILD=[PVRBUILD] | ||
60 | PRIMARY_ARCH="[PRIMARY_ARCH]" | ||
61 | ARCHITECTURES="[ARCHITECTURES]" | ||
62 | |||
63 | APP_DESTDIR=[APP_DESTDIR] | ||
64 | BIN_DESTDIR=[BIN_DESTDIR] | ||
65 | DATA_DESTDIR=[BIN_DESTDIR] | ||
66 | |||
67 | # Exit with an error messages. | ||
68 | # $1=blurb | ||
69 | # | ||
70 | function bail { | ||
71 | if [ ! -z "$1" ]; then | ||
72 | echo "$1" >&2 | ||
73 | fi | ||
74 | |||
75 | echo "" >&2 | ||
76 | echo "Installation failed" >&2 | ||
77 | exit 1 | ||
78 | } | ||
79 | |||
80 | # Copy all the required files into their appropriate places on the local machine. | ||
81 | function install_locally { | ||
82 | # Define functions required for local installs | ||
83 | |||
84 | # basic installation function | ||
85 | # $1=fromfile, $2=destfilename, $3=blurb, $4=chmod-flags, $5=chown-flags | ||
86 | # | ||
87 | function install_file { | ||
88 | if [ -z "$DDK_INSTALL_LOG" ]; then | ||
89 | bail "INTERNAL ERROR: Invoking install without setting logfile name" | ||
90 | fi | ||
91 | DESTFILE=${DISCIMAGE}$2 | ||
92 | DESTDIR=`dirname $DESTFILE` | ||
93 | |||
94 | if [ ! -e $1 ]; then | ||
95 | [ -n "$VERBOSE" ] && echo "skipping file $1 -> $2" | ||
96 | return | ||
97 | fi | ||
98 | |||
99 | # Destination directory - make sure it's there and writable | ||
100 | # | ||
101 | if [ -d "${DESTDIR}" ]; then | ||
102 | if [ ! -w "${DESTDIR}" ]; then | ||
103 | bail "${DESTDIR} is not writable." | ||
104 | fi | ||
105 | else | ||
106 | $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}" | ||
107 | [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`" | ||
108 | fi | ||
109 | |||
110 | # Delete the original so that permissions don't persist. | ||
111 | # | ||
112 | $DOIT rm -f $DESTFILE | ||
113 | |||
114 | $DOIT cp -f $1 $DESTFILE || bail "Couldn't copy $1 to $DESTFILE" | ||
115 | $DOIT chmod $4 ${DESTFILE} | ||
116 | |||
117 | echo "$3 `basename $1` -> $2" | ||
118 | $DOIT echo "file $2" >> $DDK_INSTALL_LOG | ||
119 | } | ||
120 | |||
121 | # If we install to an empty $DISCIMAGE, then we need to create some | ||
122 | # dummy directories, even if they contain no files, otherwise 'adb | ||
123 | # sync' may fail. (It allows '/vendor' to not exist currently.) | ||
124 | [ ! -d ${DISCIMAGE}/data ] && mkdir ${DISCIMAGE}/data | ||
125 | [ ! -d ${DISCIMAGE}/system ] && mkdir ${DISCIMAGE}/system | ||
126 | |||
127 | for arch in $ARCHITECTURES; do | ||
128 | if [ ! -d $arch ]; then | ||
129 | echo "Missing architecture $arch" | ||
130 | if [ "$arch" = "$PRIMARY_ARCH" ]; then | ||
131 | echo "Primary architecture is missing, aborting!" | ||
132 | exit 1 | ||
133 | else | ||
134 | continue | ||
135 | fi | ||
136 | fi | ||
137 | |||
138 | BASE_DESTDIR=`dirname ${BIN_DESTDIR}` | ||
139 | case $arch in | ||
140 | target*64* ) | ||
141 | SHLIB_DESTDIR=${BASE_DESTDIR}/lib64 | ||
142 | ;; | ||
143 | *) | ||
144 | SHLIB_DESTDIR=${BASE_DESTDIR}/lib | ||
145 | esac | ||
146 | EGL_DESTDIR=${SHLIB_DESTDIR}/egl | ||
147 | |||
148 | pushd $arch > /dev/null | ||
149 | # Install UM components | ||
150 | if [ -f install_um.sh ]; then | ||
151 | DDK_INSTALL_LOG=$UMLOG | ||
152 | echo "Installing User components for architecture $arch" | ||
153 | $DOIT echo "version $PVRVERSION" > $DDK_INSTALL_LOG | ||
154 | source install_um.sh | ||
155 | echo | ||
156 | fi | ||
157 | popd > /dev/null | ||
158 | done | ||
159 | |||
160 | pushd $PRIMARY_ARCH > /dev/null | ||
161 | # Install KM components | ||
162 | if [ -f install_km.sh ]; then | ||
163 | DDK_INSTALL_LOG=$KMLOG | ||
164 | echo "Installing Kernel components for architecture $PRIMARY_ARCH" | ||
165 | $DOIT echo "version $PVRVERSION" > $DDK_INSTALL_LOG | ||
166 | source install_km.sh | ||
167 | echo | ||
168 | fi | ||
169 | popd > /dev/null | ||
170 | |||
171 | # Create an OLDLOG so old versions of the driver can uninstall. | ||
172 | $DOIT echo "version $PVRVERSION" > $OLDLOG | ||
173 | if [ -f $KMLOG ]; then | ||
174 | tail -n +2 $KMLOG >> $OLDLOG | ||
175 | fi | ||
176 | if [ -f $UMLOG ]; then | ||
177 | tail -n +2 $UMLOG >> $OLDLOG | ||
178 | fi | ||
179 | |||
180 | # Make sure new logs are newer than $OLDLOG | ||
181 | touch -m -d "last sunday" $OLDLOG | ||
182 | } | ||
183 | |||
184 | # Read the appropriate install log and delete anything therein. | ||
185 | function uninstall_locally { | ||
186 | # Function to uninstall something. | ||
187 | function do_uninstall { | ||
188 | LOG=$1 | ||
189 | |||
190 | if [ ! -f $LOG ]; then | ||
191 | echo "Nothing to un-install." | ||
192 | return; | ||
193 | fi | ||
194 | |||
195 | BAD=0 | ||
196 | VERSION="" | ||
197 | while read type data; do | ||
198 | case $type in | ||
199 | version) | ||
200 | echo "Uninstalling existing version $data" | ||
201 | VERSION="$data" | ||
202 | ;; | ||
203 | link|file) | ||
204 | if [ -z "$VERSION" ]; then | ||
205 | BAD=1; | ||
206 | echo "No version record at head of $LOG" | ||
207 | elif ! $DOIT rm -f ${DISCIMAGE}${data}; then | ||
208 | BAD=1; | ||
209 | else | ||
210 | [ -n "$VERBOSE" ] && echo "Deleted $type $data" | ||
211 | fi | ||
212 | ;; | ||
213 | tree) | ||
214 | ;; | ||
215 | esac | ||
216 | done < $1; | ||
217 | |||
218 | if [ $BAD = 0 ]; then | ||
219 | echo "Uninstallation completed." | ||
220 | $DOIT rm -f $LOG | ||
221 | else | ||
222 | echo "Uninstallation failed!!!" | ||
223 | fi | ||
224 | } | ||
225 | |||
226 | if [ -z "$OLDLOG" -o -z "$KMLOG" -o -z "$UMLOG" ]; then | ||
227 | bail "INTERNAL ERROR: Invoking uninstall without setting logfile name" | ||
228 | fi | ||
229 | |||
230 | # Uninstall anything installed using the old-style install scripts. | ||
231 | LEGACY_LOG=0 | ||
232 | if [ -f $OLDLOG ]; then | ||
233 | if [ -f $KMLOG -a $KMLOG -nt $OLDLOG ]; then | ||
234 | # Last install was new scheme. | ||
235 | rm $OLDLOG | ||
236 | elif [ -f $UMLOG -a $UMLOG -nt $OLDLOG ]; then | ||
237 | # Last install was new scheme. | ||
238 | rm $OLDLOG | ||
239 | else | ||
240 | echo "Uninstalling all components from legacy log." | ||
241 | do_uninstall $OLDLOG | ||
242 | LEGACY_LOG=1 | ||
243 | echo | ||
244 | fi | ||
245 | fi | ||
246 | |||
247 | if [ $LEGACY_LOG = 0 ]; then | ||
248 | # Uninstall KM components if we are doing a KM install. | ||
249 | if [ -f install_km.sh -a -f $KMLOG ]; then | ||
250 | echo "Uninstalling Kernel components" | ||
251 | do_uninstall $KMLOG | ||
252 | echo | ||
253 | fi | ||
254 | # Uninstall UM components if we are doing a UM install. | ||
255 | if [ -f install_um.sh -a -f $UMLOG ]; then | ||
256 | echo "Uninstalling User components" | ||
257 | do_uninstall $UMLOG | ||
258 | echo | ||
259 | fi | ||
260 | fi | ||
261 | } | ||
262 | |||
263 | # Work out if there are any special instructions. | ||
264 | # | ||
265 | while [ "$1" ]; do | ||
266 | case "$1" in | ||
267 | -v|--verbose) | ||
268 | VERBOSE=v | ||
269 | ;; | ||
270 | -r|--root) | ||
271 | DISCIMAGE=$2 | ||
272 | shift; | ||
273 | ;; | ||
274 | -u|--uninstall) | ||
275 | UNINSTALL_ONLY=y | ||
276 | ;; | ||
277 | -n) | ||
278 | DOIT=echo | ||
279 | ;; | ||
280 | -h | --help | *) | ||
281 | usage | ||
282 | ;; | ||
283 | esac | ||
284 | shift | ||
285 | done | ||
286 | |||
287 | if [ ! -z "$DISCIMAGE" ]; then | ||
288 | |||
289 | if [ ! -d "$DISCIMAGE" ]; then | ||
290 | bail "$0: $DISCIMAGE does not exist." | ||
291 | fi | ||
292 | |||
293 | echo | ||
294 | if [ $DISCIMAGE == "/" ]; then | ||
295 | echo "Installing PowerVR '$PVRVERSION ($PVRBUILD)' locally" | ||
296 | else | ||
297 | echo "Installing PowerVR '$PVRVERSION ($PVRBUILD)' on $DISCIMAGE" | ||
298 | fi | ||
299 | echo | ||
300 | echo "File system installation root is $DISCIMAGE" | ||
301 | echo | ||
302 | |||
303 | OLDLOG=$DISCIMAGE/powervr_ddk_install.log | ||
304 | KMLOG=$DISCIMAGE/powervr_ddk_install_km.log | ||
305 | UMLOG=$DISCIMAGE/powervr_ddk_install_um.log | ||
306 | |||
307 | uninstall_locally | ||
308 | |||
309 | if [ "$UNINSTALL_ONLY" != "y" ]; then | ||
310 | install_locally | ||
311 | fi | ||
312 | |||
313 | else | ||
314 | bail "DISCIMAGE must be set for installation to be possible." | ||
315 | fi | ||
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 index 4309c72..4debd7c 100644 --- 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 | |||
@@ -46,12 +46,13 @@ HOST_ARCH ?= x86 | |||
46 | OUT_DIR ?= $(ANDROID_ROOT)/out | 46 | OUT_DIR ?= $(ANDROID_ROOT)/out |
47 | 47 | ||
48 | ifeq ($(TARGET_BUILD_TYPE),debug) | 48 | ifeq ($(TARGET_BUILD_TYPE),debug) |
49 | TARGET_ROOT := $(OUT_DIR)/debug/target | 49 | TARGET_ROOT := $(ANDROID_ROOT)/out/debug/target |
50 | else | 50 | else |
51 | TARGET_ROOT := $(OUT_DIR)/target | 51 | TARGET_ROOT := $(ANDROID_ROOT)/out/target |
52 | endif | 52 | endif |
53 | 53 | ||
54 | TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/obj | 54 | ifeq ($(NDK_ROOT),) |
55 | TOOLCHAIN2 ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system | 55 | LIBCXX_INCLUDE_PATH := $(ANDROID_ROOT)/external/libcxx/include |
56 | 56 | else | |
57 | LIBGCC := $(shell $(CROSS_COMPILE)gcc -m32 -print-libgcc-file-name 2>/dev/null) | 57 | LIBCXX_INCLUDE_PATH := $(NDK_ROOT)/sources/cxx-stl/llvm-libc++/include |
58 | endif | ||
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 index b99d976..0a91f6b 100644 --- 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 | |||
@@ -41,25 +41,25 @@ | |||
41 | # If there's no build.prop file in the expected location, bail out. Tell the | 41 | # If there's no build.prop file in the expected location, bail out. Tell the |
42 | # user which file we were trying to read in case TARGET_DEVICE was not set. | 42 | # user which file we were trying to read in case TARGET_DEVICE was not set. |
43 | # | 43 | # |
44 | #BUILD_PROP := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop | 44 | BUILD_PROP := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/vendor/build.prop |
45 | #ifeq ($(wildcard $(BUILD_PROP)),) | 45 | ifeq ($(wildcard $(BUILD_PROP)),) |
46 | #$(warning *** Could not determine Android version. Did you set ANDROID_ROOT,\ | 46 | $(warning *** Could not determine Android version. Did you set ANDROID_ROOT,\ |
47 | #OUT_DIR and TARGET_DEVICE in your environment correctly?) | 47 | OUT_DIR and TARGET_DEVICE in your environment correctly?) |
48 | #$(error Error reading $(BUILD_PROP)) | 48 | $(error Error reading $(BUILD_PROP)) |
49 | #endif | 49 | endif |
50 | 50 | ||
51 | # Extract version.release and version.codename from the build.prop file. | 51 | # Extract version.release and version.codename from the build.prop file. |
52 | # If either of the values aren't in the build.prop, the Make variables won't | 52 | # If either of the values aren't in the build.prop, the Make variables won't |
53 | # be defined, and fallback handling will take place. | 53 | # be defined, and fallback handling will take place. |
54 | # | 54 | # |
55 | #define newline | 55 | define newline |
56 | # | 56 | |
57 | # | 57 | |
58 | #endef | 58 | endef |
59 | #$(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \ | 59 | $(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \ |
60 | # grep '^ro.build.version.release=\|^ro.build.version.codename=' | \ | 60 | grep '^ro.build.version.release=\|^ro.build.id=' | \ |
61 | # sed -e 's,ro.build.version.release=,PLATFORM_RELEASE=,' \ | 61 | sed -e 's,ro.build.version.release=,PLATFORM_RELEASE=,' \ |
62 | # -e 's,ro.build.version.codename=,PLATFORM_CODENAME=,' | tr '\n' '#'))) | 62 | -e 's,ro.build.id=,PLATFORM_BUILDID=,' | tr '\n' '#'))) |
63 | 63 | ||
64 | define release-starts-with | 64 | define release-starts-with |
65 | $(shell echo $(PLATFORM_RELEASE) | grep -q ^$(1); \ | 65 | $(shell echo $(PLATFORM_RELEASE) | grep -q ^$(1); \ |
@@ -76,33 +76,32 @@ endef | |||
76 | # ordering. You need to make sure that strings that are sub-strings of other | 76 | # ordering. You need to make sure that strings that are sub-strings of other |
77 | # checked strings appear _later_ in this list. | 77 | # checked strings appear _later_ in this list. |
78 | # | 78 | # |
79 | # e.g. 'KitKatMR' starts with 'KitKat', but it is not KitKat. | 79 | # e.g. 'LollipopMR1' starts with 'Lollipop', but it is not Lollipop. |
80 | # | 80 | # |
81 | # NOTE: The version codenames for Android stopped after KitKat, don't read | 81 | # NOTE: The version codenames for Android stopped after KitKat, don't read |
82 | # too much into the below names. They are mostly placeholders/reminders. | 82 | # too much into the below names. They are mostly placeholders/reminders. |
83 | # | 83 | # |
84 | ifeq ($(call release-starts-with,KitKatMR),1) | 84 | ifeq ($(call release-starts-with,LollipopMR1),1) |
85 | PLATFORM_RELEASE := 4.4.1 | 85 | override PLATFORM_RELEASE := 5.1 |
86 | else ifeq ($(call release-starts-with,KitKat),1) | ||
87 | PLATFORM_RELEASE := 4.4 | ||
88 | else ifeq ($(call release-starts-with,LollipopMR1),1) | ||
89 | PLATFORM_RELEASE := 5.1 | ||
90 | else ifeq ($(call release-starts-with,Lollipop),1) | ||
91 | PLATFORM_RELEASE := 5.0 | ||
92 | else ifeq ($(call release-starts-with,Marshmallow),1) | 86 | else ifeq ($(call release-starts-with,Marshmallow),1) |
93 | PLATFORM_RELEASE := 6.0 | 87 | override PLATFORM_RELEASE := 6.0 |
94 | else ifeq ($(PLATFORM_CODENAME),AOSP) | 88 | else ifeq ($(call release-starts-with,NougatMR),1) |
95 | # AOSP (master) will normally have PLATFORM_CODENAME set to AOSP | 89 | override PLATFORM_RELEASE := 7.1 |
96 | PLATFORM_RELEASE := 6.0.60 | 90 | else ifeq ($(call release-starts-with,Nougat),1) |
91 | override PLATFORM_RELEASE := 7.0 | ||
92 | else ifeq ($(call release-starts-with,Oreo),1) | ||
93 | override PLATFORM_RELEASE := 8.0 | ||
94 | else ifeq ($(PLATFORM_BUILDID),OC) | ||
95 | override PLATFORM_RELEASE := 8.0.80 | ||
97 | else ifeq ($(shell echo $(PLATFORM_RELEASE) | grep -qE "[A-Za-z]+"; echo $$?),0) | 96 | else ifeq ($(shell echo $(PLATFORM_RELEASE) | grep -qE "[A-Za-z]+"; echo $$?),0) |
98 | PLATFORM_RELEASE := 6.1 | 97 | override PLATFORM_RELEASE := 8.2 |
99 | endif | 98 | endif |
100 | 99 | ||
101 | # Workaround for master. Sometimes there is an AOSP version ahead of | 100 | # Workaround for master. Sometimes there is an AOSP version ahead of |
102 | # the current master version number, but master still has more features. | 101 | # the current master version number, but master still has more features. |
103 | # | 102 | # |
104 | ifeq ($(PLATFORM_RELEASE),6.0.60) | 103 | ifeq ($(PLATFORM_RELEASE),8.0.80) |
105 | PLATFORM_RELEASE := 6.1 | 104 | override PLATFORM_RELEASE := 8.0 |
106 | is_aosp_master := 1 | 105 | is_aosp_master := 1 |
107 | endif | 106 | endif |
108 | 107 | ||
@@ -118,37 +117,69 @@ endif | |||
118 | 117 | ||
119 | # Macros to help categorize support for features and API_LEVEL for tests. | 118 | # Macros to help categorize support for features and API_LEVEL for tests. |
120 | # | 119 | # |
121 | is_at_least_lollipop := \ | ||
122 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 5 ) && echo 1 || echo 0) | ||
123 | is_at_least_lollipop_mr1 := \ | 120 | is_at_least_lollipop_mr1 := \ |
124 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 5 || \ | 121 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 5 || \ |
125 | ( test $(PLATFORM_RELEASE_MAJ) -eq 5 && \ | 122 | ( test $(PLATFORM_RELEASE_MAJ) -eq 5 && \ |
126 | test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0) | 123 | test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0) |
127 | is_at_least_marshmallow := \ | 124 | is_at_least_marshmallow := \ |
128 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 6 ) && echo 1 || echo 0) | 125 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 6 ) && echo 1 || echo 0) |
126 | is_at_least_nougat := \ | ||
127 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 7 ) && echo 1 || echo 0) | ||
128 | is_at_least_nougat_mr1 := \ | ||
129 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 7 || \ | ||
130 | ( test $(PLATFORM_RELEASE_MAJ) -eq 7 && \ | ||
131 | test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0) | ||
132 | is_at_least_oreo := \ | ||
133 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -ge 8 ) && echo 1 || echo 0) | ||
129 | 134 | ||
130 | # Assume "future versions" are >6.0, but we don't really know | 135 | # Assume "future versions" are >7.1, but we don't really know |
131 | is_future_version := \ | 136 | is_future_version := \ |
132 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 6 || \ | 137 | $(shell ( test $(PLATFORM_RELEASE_MAJ) -gt 8 || \ |
133 | ( test $(PLATFORM_RELEASE_MAJ) -eq 6 && \ | 138 | ( test $(PLATFORM_RELEASE_MAJ) -eq 8 && \ |
134 | test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0) | 139 | test $(PLATFORM_RELEASE_MIN) -gt 0 ) ) && echo 1 || echo 0) |
135 | 140 | ||
136 | # Picking an exact match of API_LEVEL for the platform we're building | 141 | # Picking an exact match of API_LEVEL for the platform we're building |
137 | # against can avoid compatibility theming and affords better integration. | 142 | # against can avoid compatibility theming and affords better integration. |
138 | # | 143 | # |
144 | # This is also a good place to select the right jack toolchain. | ||
145 | # | ||
139 | ifeq ($(is_future_version),1) | 146 | ifeq ($(is_future_version),1) |
140 | API_LEVEL := 23 | 147 | JACK_VERSION ?= 4.32.CANDIDATE |
148 | API_LEVEL := 26 | ||
149 | else ifeq ($(is_at_least_oreo),1) | ||
150 | ifeq ($(is_aosp_master),1) | ||
151 | override JACK_VERSION := | ||
152 | else | ||
153 | JACK_VERSION ?= 4.31.CANDIDATE | ||
154 | endif | ||
155 | API_LEVEL := 26 | ||
156 | else ifeq ($(is_at_least_nougat_mr1),1) | ||
157 | JACK_VERSION ?= 3.36.CANDIDATE | ||
158 | API_LEVEL := 25 | ||
159 | else ifeq ($(is_at_least_nougat),1) | ||
160 | JACK_VERSION ?= 3.36.CANDIDATE | ||
161 | API_LEVEL := 24 | ||
141 | else ifeq ($(is_at_least_marshmallow),1) | 162 | else ifeq ($(is_at_least_marshmallow),1) |
163 | JACK_VERSION ?= 2.21.RELEASE | ||
142 | API_LEVEL := 23 | 164 | API_LEVEL := 23 |
143 | else ifeq ($(is_at_least_lollipop_mr1),1) | 165 | else ifeq ($(is_at_least_lollipop_mr1),1) |
166 | # This early version had no version-file.version.code; fake it | ||
167 | JACK_VERSION ?= 1.0.RELEASE | ||
144 | API_LEVEL := 22 | 168 | API_LEVEL := 22 |
145 | else ifeq ($(is_at_least_lollipop),1) | ||
146 | API_LEVEL := 21 | ||
147 | #API_LEVEL := 20 was l-preview | ||
148 | else ifeq ($(is_at_least_kitkat),1) | ||
149 | API_LEVEL := 19 | ||
150 | else | 169 | else |
151 | $(error Must build against Android >= 4.4) | 170 | $(error Must build against Android >= 5.1) |
171 | endif | ||
172 | |||
173 | # If the NDK is enabled, check it has API_LEVEL support for us | ||
174 | ifneq ($(NDK_ROOT),) | ||
175 | NDK_PLATFORMS_ROOT ?= $(NDK_ROOT)/platforms | ||
176 | ifeq ($(strip $(wildcard $(NDK_PLATFORMS_ROOT)/android-*)),) | ||
177 | $(error NDK_PLATFORMS_ROOT does not point to a valid location) | ||
178 | endif | ||
179 | override TARGET_PLATFORM := android-$(API_LEVEL) | ||
180 | ifeq ($(strip $(wildcard $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM))),) | ||
181 | $(error NDK support for $(TARGET_PLATFORM) is missing) | ||
182 | endif | ||
152 | endif | 183 | endif |
153 | 184 | ||
154 | # Each DDK is tested against only a single version of the platform. | 185 | # Each DDK is tested against only a single version of the platform. |
@@ -156,6 +187,6 @@ endif | |||
156 | # | 187 | # |
157 | ifeq ($(is_future_version),1) | 188 | ifeq ($(is_future_version),1) |
158 | $(info WARNING: Android version is newer than this DDK supports) | 189 | $(info WARNING: Android version is newer than this DDK supports) |
159 | else ifneq ($(is_at_least_lollipop_mr1),1) | 190 | else ifneq ($(is_at_least_marshmallow),1) |
160 | $(info WARNING: Android version is older than this DDK supports) | 191 | $(info WARNING: Android version is older than this DDK supports) |
161 | endif | 192 | 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 index b6f945f..dfe3018 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk | |||
@@ -61,18 +61,3 @@ $(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) | |||
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | ifeq ($(SUPPORT_DRI_DRM_PLUGIN),1) | ||
65 | PVR_DRI_CLIENT_DRIVER := pvrsrvkm | ||
66 | else | ||
67 | # The X and Wayland window systems derive the client driver name from a | ||
68 | # display driver DRM device node. The Surfaceless window system derives it | ||
69 | # from a render node. | ||
70 | ifeq ($(WINDOW_SYSTEM),surfaceless) | ||
71 | PVR_DRI_CLIENT_DRIVER := pvr | ||
72 | else | ||
73 | PVR_DRI_CLIENT_DRIVER := $(if $(PVR_DRM_MODESET_DRIVER_NAME),$(PVR_DRM_MODESET_DRIVER_NAME),pvr) | ||
74 | endif | ||
75 | endif | ||
76 | |||
77 | PVR_DRI_GET_EXTENSIONS_ENTRY_POINT := __driDriverGetExtensions_$(PVR_DRI_CLIENT_DRIVER) | ||
78 | |||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compiler.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compiler.mk new file mode 100644 index 0000000..82c9d44 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compiler.mk | |||
@@ -0,0 +1,240 @@ | |||
1 | ########################################################################### ### | ||
2 | #@File | ||
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 | # Check for valid values of $(MULTIARCH). | ||
43 | ifeq ($(strip $(MULTIARCH)),0) | ||
44 | $(error MULTIARCH must be empty to disable multiarch) | ||
45 | endif | ||
46 | |||
47 | define calculate-compiler-preferred-target | ||
48 | ifeq ($(2),qcc) | ||
49 | $(1)_compiler_preferred_target := qcc | ||
50 | else | ||
51 | $(1)_compiler_preferred_target := $$(subst --,-,$$(shell $(2) -dumpmachine)) | ||
52 | ifeq ($$($(1)_compiler_preferred_target),) | ||
53 | $$(warning No output from '$(2) -dumpmachine') | ||
54 | $$(warning Check that the compiler is in your PATH and CROSS_COMPILE is) | ||
55 | $$(warning set correctly.) | ||
56 | $$(error Unable to run compiler '$(2)') | ||
57 | endif | ||
58 | ifneq ($$(filter x86_64-%,$$($(1)_compiler_preferred_target)),) | ||
59 | $(1)_compiler_preferred_target := x86_64-linux-gnu | ||
60 | endif | ||
61 | ifneq ($$(filter i386-% i486-% i586-% i686-%,$$($(1)_compiler_preferred_target)),) | ||
62 | $(1)_compiler_preferred_target := i386-linux-gnu | ||
63 | endif | ||
64 | ifneq ($$(filter arm-linux-android,$$($(1)_compiler_preferred_target)),) | ||
65 | $(1)_compiler_preferred_target := arm-linux-androideabi | ||
66 | endif | ||
67 | endif | ||
68 | endef | ||
69 | |||
70 | define cross-compiler-name | ||
71 | ifeq ($$(origin CC),file) | ||
72 | $(1) := $(2)$(3) | ||
73 | else | ||
74 | $(1) := $(3) | ||
75 | ifeq ($$(_CLANG),true) | ||
76 | ifneq ($(strip $(2)),) | ||
77 | $(1) := $(3) -target $$(patsubst %-,%,$(2)) -Qunused-arguments -fcolor-diagnostics | ||
78 | else | ||
79 | $(1) := $(3) -Qunused-arguments -fcolor-diagnostics | ||
80 | endif | ||
81 | endif | ||
82 | endif | ||
83 | endef | ||
84 | |||
85 | # Work out the host compiler architecture | ||
86 | $(eval $(call calculate-compiler-preferred-target,host,$(HOST_CC))) | ||
87 | |||
88 | ifeq ($(host_compiler_preferred_target),x86_64-linux-gnu) | ||
89 | ifeq ($(ARCH),i386) | ||
90 | HOST_PRIMARY_ARCH := host_i386 | ||
91 | HOST_FORCE_32BIT := -m32 | ||
92 | else | ||
93 | HOST_PRIMARY_ARCH := host_x86_64 | ||
94 | HOST_32BIT_ARCH := host_i386 | ||
95 | HOST_FORCE_32BIT := -m32 | ||
96 | endif | ||
97 | else | ||
98 | ifeq ($(host_compiler_preferred_target),i386-linux-gnu) | ||
99 | HOST_PRIMARY_ARCH := host_i386 | ||
100 | HOST_32BIT_ARCH := host_i386 | ||
101 | else | ||
102 | ifeq ($(host_compiler_preferred_target),arm-linux-gnueabihf) | ||
103 | HOST_PRIMARY_ARCH := host_armhf | ||
104 | HOST_32BIT_ARCH := host_armhf | ||
105 | else | ||
106 | ifeq ($(host_compiler_preferred_target),aarch64-linux-gnu) | ||
107 | HOST_PRIMARY_ARCH := host_aarch64 | ||
108 | HOST_32BIT_ARCH := host_armhf | ||
109 | else | ||
110 | $(error Unknown host compiler target architecture $(host_compiler_preferred_target)) | ||
111 | endif | ||
112 | endif | ||
113 | endif | ||
114 | endif | ||
115 | |||
116 | # Workaround our lack of support for non-Linux HOST_CCs | ||
117 | ifneq ($(HOST_CC_IS_LINUX),1) | ||
118 | $(warning $$(HOST_CC) is non-Linux. Trying to work around.) | ||
119 | override HOST_CC := $(HOST_CC) -D__linux__ | ||
120 | $(eval $(call BothConfigMake,HOST_CC,$(HOST_CC))) | ||
121 | endif | ||
122 | |||
123 | $(eval $(call BothConfigMake,HOST_PRIMARY_ARCH,$(HOST_PRIMARY_ARCH))) | ||
124 | $(eval $(call BothConfigMake,HOST_32BIT_ARCH,$(HOST_32BIT_ARCH))) | ||
125 | $(eval $(call BothConfigMake,HOST_FORCE_32BIT,$(HOST_FORCE_32BIT))) | ||
126 | |||
127 | TARGET_ALL_ARCH := | ||
128 | TARGET_PRIMARY_ARCH := | ||
129 | TARGET_SECONDARY_ARCH := | ||
130 | |||
131 | # Work out the target compiler cross triple, and include the corresponding | ||
132 | # compilers/*.mk file, which sets TARGET_PRIMARY_ARCH and | ||
133 | # TARGET_SECONDARY_ARCH for that compiler. | ||
134 | # | ||
135 | compilers := ../config/compilers | ||
136 | define include-compiler-file | ||
137 | ifeq ($(strip $(1)),) | ||
138 | $$(error empty arg passed to include-compiler-file) | ||
139 | endif | ||
140 | ifeq ($$(wildcard $$(compilers)/$(1).mk),) | ||
141 | $$(warning ******************************************************) | ||
142 | $$(warning Compiler target '$(1)' not recognised) | ||
143 | $$(warning (missing $$(compilers)/$(1).mk file)) | ||
144 | $$(warning ******************************************************) | ||
145 | $$(error Compiler '$(1)' not recognised) | ||
146 | endif | ||
147 | include $$(compilers)/$(1).mk | ||
148 | endef | ||
149 | |||
150 | # Check the kernel cross compiler to work out which architecture it targets. | ||
151 | # We can then tell if CROSS_COMPILE targets a different architecture. | ||
152 | ifneq ($(origin KERNEL_CROSS_COMPILE),undefined) | ||
153 | # First, calculate the value of KERNEL_CROSS_COMPILE as it would be seen by | ||
154 | # the main build, so we can check it here in the config stage. | ||
155 | $(call one-word-only,KERNEL_CROSS_COMPILE) | ||
156 | _kernel_cross_compile := $(if $(filter undef,$(KERNEL_CROSS_COMPILE)),,$(KERNEL_CROSS_COMPILE)) | ||
157 | # We can take shortcuts with KERNEL_CROSS_COMPILE, as we don't want to | ||
158 | # respect CC and we don't support clang in that part currently. | ||
159 | _kernel_cross_compile := $(_kernel_cross_compile)gcc | ||
160 | # Then check the compiler. | ||
161 | $(eval $(call calculate-compiler-preferred-target,target,$(_kernel_cross_compile))) | ||
162 | $(eval $(call include-compiler-file,$(target_compiler_preferred_target))) | ||
163 | _kernel_primary_arch := $(TARGET_PRIMARY_ARCH) | ||
164 | else | ||
165 | # We can take shortcuts with KERNEL_CROSS_COMPILE, as we don't want to | ||
166 | # respect CC and we don't support clang in that part currently. | ||
167 | _kernel_cross_compile := $(CROSS_COMPILE)gcc | ||
168 | # KERNEL_CROSS_COMPILE will be the same as CROSS_COMPILE, so we don't need | ||
169 | # to do the compatibility check. | ||
170 | _kernel_primary_arch := | ||
171 | endif | ||
172 | |||
173 | $(eval $(call cross-compiler-name,_cc,$(CROSS_COMPILE),$(CC))) | ||
174 | $(eval $(call cross-compiler-name,_cc_secondary,$(if $(CROSS_COMPILE_SECONDARY),$(CROSS_COMPILE_SECONDARY),$(CROSS_COMPILE)),$(CC_SECONDARY))) | ||
175 | $(eval $(call calculate-compiler-preferred-target,target,$(_cc))) | ||
176 | $(eval $(call include-compiler-file,$(target_compiler_preferred_target))) | ||
177 | |||
178 | ifneq ($(SUPPORT_ANDROID_PLATFORM),1) | ||
179 | ifeq ($(MULTIARCH),1) | ||
180 | ifneq ($(MAKECMDGOALS),kbuild) | ||
181 | ifneq ($(COMPONENTS),) | ||
182 | $(eval $(call calculate-compiler-preferred-target,target_secondary,$(_cc_secondary))) | ||
183 | ifneq ($(target_compiler_preferred_target),$(target_secondary_compiler_preferred_target)) | ||
184 | $(eval $(call include-compiler-file,$(target_secondary_compiler_preferred_target))) | ||
185 | |||
186 | ifeq ($(TARGET_SECONDARY_ARCH),) | ||
187 | $(error $(CROSS_COMPILE_SECONDARY) not supported for MULTIARCH builds) | ||
188 | endif | ||
189 | endif | ||
190 | endif | ||
191 | endif | ||
192 | endif | ||
193 | endif | ||
194 | |||
195 | define remap-arch | ||
196 | $(if $(INTERNAL_ARCH_REMAP_$(1)),$(INTERNAL_ARCH_REMAP_$(1)),$(1)) | ||
197 | endef | ||
198 | |||
199 | # Remap 'essentially compatible' architectures so the KM vs UM check | ||
200 | # isn't too strict. These mixtures are widely supported. | ||
201 | INTERNAL_ARCH_REMAP_target_armhf := target_armv7-a | ||
202 | INTERNAL_ARCH_REMAP_target_armel := target_armv7-a | ||
203 | INTERNAL_ARCH_REMAP_target_mips32r2el := target_mips32el | ||
204 | INTERNAL_ARCH_REMAP_target_mips32r6el := target_mips32el | ||
205 | |||
206 | # Sanity check: if KERNEL_CROSS_COMPILE was set, it has to target the same | ||
207 | # architecture as CROSS_COMPILE. | ||
208 | ifneq ($(_kernel_primary_arch),) | ||
209 | ifneq ($(call remap-arch,$(TARGET_PRIMARY_ARCH)),$(call remap-arch,$(_kernel_primary_arch))) | ||
210 | $(warning ********************************************************) | ||
211 | $(warning Error: Kernel and user-mode cross compilers build for) | ||
212 | $(warning different targets) | ||
213 | $(warning $(space)$(space)CROSS_COMPILE=$(CROSS_COMPILE)) | ||
214 | $(warning $(space)$(space)$(space)builds for $(TARGET_PRIMARY_ARCH)) | ||
215 | $(warning $(space)$(space)KERNEL_CROSS_COMPILE=$(KERNEL_CROSS_COMPILE)) | ||
216 | $(warning $(space)$(space)$(space)builds for $(_kernel_primary_arch)) | ||
217 | $(warning ********************************************************) | ||
218 | $(error Mismatching kernel and user-mode cross compilers) | ||
219 | endif | ||
220 | endif | ||
221 | |||
222 | ifneq ($(MULTIARCH),32only) | ||
223 | TARGET_ALL_ARCH += $(TARGET_PRIMARY_ARCH) | ||
224 | endif | ||
225 | ifneq ($(MULTIARCH),64only) | ||
226 | TARGET_ALL_ARCH += $(TARGET_SECONDARY_ARCH) | ||
227 | endif | ||
228 | |||
229 | $(eval $(call BothConfigMake,TARGET_PRIMARY_ARCH,$(TARGET_PRIMARY_ARCH))) | ||
230 | $(eval $(call BothConfigMake,TARGET_SECONDARY_ARCH,$(TARGET_SECONDARY_ARCH))) | ||
231 | $(eval $(call BothConfigMake,TARGET_ALL_ARCH,$(TARGET_ALL_ARCH))) | ||
232 | $(eval $(call BothConfigMake,TARGET_FORCE_32BIT,$(TARGET_FORCE_32BIT))) | ||
233 | |||
234 | $(info ******* Multiarch build: $(if $(MULTIARCH),yes,no)) | ||
235 | $(info ******* Primary arch: $(if $(TARGET_PRIMARY_ARCH),$(TARGET_PRIMARY_ARCH),none)) | ||
236 | $(info ******* Secondary arch: $(if $(TARGET_SECONDARY_ARCH),$(TARGET_SECONDARY_ARCH),none)) | ||
237 | |||
238 | # Find the paths to libgcc for the primary and secondary architectures. | ||
239 | LIBGCC := $(shell $(_cc) -print-libgcc-file-name) | ||
240 | LIBGCC_SECONDARY := $(shell $(_cc_secondary) $(TARGET_FORCE_32BIT) -print-libgcc-file-name) | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-eabi.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-eabi.mk new file mode 100644 index 0000000..d671ba9 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-eabi.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | # 32-bit ARM EABI compiler | ||
2 | TARGET_PRIMARY_ARCH := target_armv7-a | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-linux-androideabi.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-linux-androideabi.mk new file mode 100644 index 0000000..8aaeaad --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-linux-androideabi.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | # 32-bit Android ARM compiler | ||
2 | include $(compilers)/arm-eabi.mk | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/mips64el-linux-android.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/mips64el-linux-android.mk new file mode 100644 index 0000000..8777b2a --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/compilers/mips64el-linux-android.mk | |||
@@ -0,0 +1,29 @@ | |||
1 | # 64-bit MIPS R6 little-endian compiler | ||
2 | IS_KERNEL_32 := 0 | ||
3 | ifneq ($(KERNELDIR),) | ||
4 | IS_KERNEL_32 = ($(shell grep -q "CONFIG_MIPS=y" $(KERNELDIR)/.config && echo 1 || echo 0)) | ||
5 | ifneq ($(ARCH),mips) | ||
6 | ifeq ($(IS_KERNEL_32),1) | ||
7 | $(warning ******************************************************) | ||
8 | $(warning Your kernel appears to be configured for 32-bit MIPS,) | ||
9 | $(warning but CROSS_COMPILE (or KERNEL_CROSS_COMPILE) points) | ||
10 | $(warning to a 64-bit compiler.) | ||
11 | $(warning If you want a 32-bit build, either set CROSS_COMPILE) | ||
12 | $(warning to point to a 32-bit compiler, or build with ARCH=mips) | ||
13 | $(warning to force 32-bit mode with your existing compiler.) | ||
14 | $(warning ******************************************************) | ||
15 | $(error Invalid CROSS_COMPILE / kernel architecture combination) | ||
16 | endif # CONFIG_X86_32 | ||
17 | endif # ARCH=mips | ||
18 | endif # KERNELDIR | ||
19 | |||
20 | # If ARCH=mips is set, force a build for 32-bit only, even though we're | ||
21 | # using a 64-bit compiler. | ||
22 | ifeq ($(ARCH),mips) | ||
23 | TARGET_PRIMARY_ARCH := target_mips32r6el | ||
24 | ifeq ($(IS_KERNEL_32),0) | ||
25 | USE_64BIT_COMPAT := 1 | ||
26 | endif | ||
27 | else | ||
28 | $(error MIPS64 build is not supported) | ||
29 | endif | ||
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 index 5cd7a47..dc8c9e7 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk | |||
@@ -223,18 +223,55 @@ endif | |||
223 | # require things like SGXCORE to be set | 223 | # require things like SGXCORE to be set |
224 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) | 224 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) |
225 | 225 | ||
226 | # These are defined by the core build system, but we might need them | 226 | # GNU Make has builtin values for CC/CXX which we don't want to trust. This |
227 | # earlier to feature-check the compilers | 227 | # is because $(CROSS_COMPILE)$(CC) doesn't always expand to a cross compiler |
228 | # | 228 | # toolchain binary name (e.g. most toolchains have 'gcc' but not 'cc'). |
229 | _CC := $(if $(filter default,$(origin CC)),gcc,$(CC)) | 229 | |
230 | _CLANG := \ | 230 | ifeq ($(origin CC),default) |
231 | $(shell $(TOP)/eurasiacon/build/linux2/tools/cc-check.sh --clang --cc $(_CC)) | 231 | _CC := $(CROSS_COMPILE)gcc |
232 | ifeq ($(_CLANG),true) | 232 | CC := gcc |
233 | _CC := $(_CC) -target $(patsubst %-,%,$(CROSS_COMPILE)) | ||
234 | else | 233 | else |
235 | _CC := $(CROSS_COMPILE)$(_CC) | 234 | _CLANG := $(shell $(TOP)/eurasiacon/build/linux2/tools/cc-check.sh --clang --cc $(CC)) |
235 | _CC := $(CC) | ||
236 | ifeq ($(_CLANG),true) | ||
237 | ifneq ($(strip $(CROSS_COMPILE)),) | ||
238 | _CC := $(CC) -target $(patsubst %-,%,$(CROSS_COMPILE)) -Qunused-arguments -fcolor-diagnostics | ||
239 | else | ||
240 | _CC := $(CC) -Qunused-arguments -fcolor-diagnostics | ||
241 | endif | ||
242 | endif | ||
236 | endif | 243 | endif |
237 | HOST_CC ?= gcc | 244 | |
245 | ifeq ($(origin CXX),default) | ||
246 | _CXX := $(CROSS_COMPILE)g++ | ||
247 | CXX := g++ | ||
248 | else | ||
249 | _CLANGXX := $(shell $(TOP)/eurasiacon/build/linux2/tools/cc-check.sh --clang --cc $(CXX)) | ||
250 | _CXX := $(CXX) | ||
251 | ifeq ($(_CLANGXX),true) | ||
252 | ifneq ($(strip $(CROSS_COMPILE)),) | ||
253 | _CXX := $(CXX) -target $(patsubst %-,%,$(CROSS_COMPILE)) -Qunused-arguments -fcolor-diagnostics | ||
254 | else | ||
255 | _CXX := $(CXX) -Qunused-arguments -fcolor-diagnostics | ||
256 | endif | ||
257 | endif | ||
258 | endif | ||
259 | |||
260 | CC_SECONDARY ?= $(CC) | ||
261 | HOST_CC ?= gcc | ||
262 | |||
263 | # Work out if we are targeting ARM before we start tweaking _CC. | ||
264 | TARGETING_AARCH64 := $(shell \ | ||
265 | $(_CC) -dM -E - </dev/null | grep -q __aarch64__ && echo 1) | ||
266 | |||
267 | TARGETING_ARM := $(shell \ | ||
268 | $(_CC) -dM -E - </dev/null | grep __arm__ >/dev/null 2>&1 && echo 1) | ||
269 | |||
270 | TARGETING_MIPS := $(shell \ | ||
271 | $(_CC) -dM -E - </dev/null | grep __mips__ >/dev/null 2>&1 && echo 1) | ||
272 | |||
273 | HOST_CC_IS_LINUX := $(shell \ | ||
274 | $(HOST_CC) -dM -E - </dev/null | grep __linux__ >/dev/null 2>&1 && echo 1) | ||
238 | 275 | ||
239 | -include ../config/user-defs.mk | 276 | -include ../config/user-defs.mk |
240 | 277 | ||
@@ -348,6 +385,11 @@ PVRSRV_MODNAME ?= pvrsrvkm | |||
348 | # | 385 | # |
349 | SUPPORT_PVRSRV_DEVICE_CLASS ?= 1 | 386 | SUPPORT_PVRSRV_DEVICE_CLASS ?= 1 |
350 | 387 | ||
388 | # Default place for binaries and shared libraries | ||
389 | BIN_DESTDIR ?= /usr/local/bin | ||
390 | SHARE_DESTDIR ?= /usr/local/share | ||
391 | SHLIB_DESTDIR ?= /usr/lib | ||
392 | |||
351 | # The user didn't set CROSS_COMPILE. There's probably nothing wrong | 393 | # The user didn't set CROSS_COMPILE. There's probably nothing wrong |
352 | # with that, but we'll let them know anyway. | 394 | # with that, but we'll let them know anyway. |
353 | # | 395 | # |
@@ -366,12 +408,12 @@ $$(warning *** Setting $(1) via $$(origin $(1)) is deprecated) | |||
366 | $$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl") | 408 | $$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl") |
367 | endif | 409 | endif |
368 | endef | 410 | endef |
369 | $(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_INCLUDES SYS_COMMON_LDFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SYS_EXE_LDFLAGS_CXX SYS_LIB_LDFLAGS_CXX SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENCL SUPPORT_RSCOMPUTE SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o)))) | 411 | $(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_INCLUDES SYS_COMMON_LDFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SYS_EXE_LDFLAGS_CXX SYS_LIB_LDFLAGS_CXX SUPPORT_EWS SUPPORT_NULLWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENCL SUPPORT_OPENGL SUPPORT_SURFACELESS SUPPORT_UNITTESTS SUPPORT_XORG SUPPORT_WAYLAND,$(eval $(call sanity-check-support-option-origin,$(_o)))) |
370 | 412 | ||
371 | # Check for words in EXCLUDED_APIS that aren't understood by the | 413 | # Check for words in EXCLUDED_APIS that aren't understood by the |
372 | # common/apis/*.mk files. This should be kept in sync with all the tests on | 414 | # common/apis/*.mk files. This should be kept in sync with all the tests on |
373 | # EXCLUDED_APIS in those files | 415 | # EXCLUDED_APIS in those files |
374 | _excludable_apis := rscompute opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts composerhal camerahal memtrackhal | 416 | _excludable_apis := opencl opengl opengles1 opengles2 unittests scripts composerhal camerahal memtrackhal sensorhal |
375 | _excluded_apis := $(subst $(comma),$(space),$(EXCLUDED_APIS)) | 417 | _excluded_apis := $(subst $(comma),$(space),$(EXCLUDED_APIS)) |
376 | _unrecognised := $(strip $(filter-out $(_excludable_apis),$(_excluded_apis))) | 418 | _unrecognised := $(strip $(filter-out $(_excludable_apis),$(_excluded_apis))) |
377 | ifneq ($(_unrecognised),) | 419 | ifneq ($(_unrecognised),) |
@@ -386,6 +428,9 @@ override EXCLUDED_APIS := $(filter $(_excludable_apis), $(_excluded_apis)) | |||
386 | # | 428 | # |
387 | -include components.mk | 429 | -include components.mk |
388 | 430 | ||
431 | # Set up the host and target compiler. | ||
432 | include ../config/compiler.mk | ||
433 | |||
389 | # PDUMP needs extra components | 434 | # PDUMP needs extra components |
390 | # | 435 | # |
391 | ifeq ($(PDUMP),1) | 436 | ifeq ($(PDUMP),1) |
@@ -399,27 +444,6 @@ KERNEL_COMPONENTS += dbgdrv | |||
399 | endif | 444 | endif |
400 | endif | 445 | endif |
401 | 446 | ||
402 | ifeq ($(SUPPORT_PVR_REMOTE),1) | ||
403 | ifneq ($(filter pvr2d,$(COMPONENTS)),) | ||
404 | COMPONENTS += null_pvr2d_remote | ||
405 | endif | ||
406 | COMPONENTS += pvrvncsrv | ||
407 | COMPONENTS += pvrvncinput | ||
408 | endif | ||
409 | |||
410 | ifeq ($(HAVE_WINDOW_SYSTEM_MAKEFILE),) | ||
411 | ifeq ($(WINDOW_SYSTEM_SET_INTERNALLY),) | ||
412 | ifneq ($(WINDOW_SYSTEM),) | ||
413 | $(error "The WINDOW_SYSTEM build variable is not supported on this platform") | ||
414 | endif | ||
415 | endif | ||
416 | ifneq ($(MESA_EGL),) | ||
417 | $(error "The MESA_EGL build variable is not supported on this platform") | ||
418 | endif | ||
419 | PVR_LWS_NODC := | ||
420 | PVR_LWS_NOBC := | ||
421 | endif | ||
422 | |||
423 | ifneq ($(WINDOW_SYSTEM),) | 447 | ifneq ($(WINDOW_SYSTEM),) |
424 | endif | 448 | endif |
425 | ifeq ($(MESA_EGL),1) | 449 | ifeq ($(MESA_EGL),1) |
@@ -427,11 +451,18 @@ ifeq ($(MESA_EGL),1) | |||
427 | GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1 | 451 | GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1 |
428 | GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1 | 452 | GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1 |
429 | else | 453 | else |
430 | ifeq ($(SUPPORT_BUILD_LWS),1) | 454 | endif |
431 | else | 455 | |
456 | ifneq ($(SUPPORT_BUILD_LWS),) | ||
457 | ifneq ($(SYSROOT),) | ||
458 | $(info WARNING: You have specified a SYSROOT (or are using a buildroot compiler) and enabled SUPPORT_BUILD_LWS.) | ||
459 | $(info We will ignore the sysroot and will build all required LWS components.) | ||
460 | $(info Unset SUPPORT_BUILD_LWS if this is not what you want.) | ||
432 | endif | 461 | endif |
462 | override SYSROOT:= | ||
433 | endif | 463 | endif |
434 | 464 | ||
465 | |||
435 | $(if $(filter config,$(D)),$(info Build configuration:)) | 466 | $(if $(filter config,$(D)),$(info Build configuration:)) |
436 | 467 | ||
437 | ################################# CONFIG #################################### | 468 | ################################# CONFIG #################################### |
@@ -441,9 +472,11 @@ $(if $(filter config,$(D)),$(info Build configuration:)) | |||
441 | # | 472 | # |
442 | ifneq ($(strip $(KERNELDIR)),) | 473 | ifneq ($(strip $(KERNELDIR)),) |
443 | include ../kernel_version.mk | 474 | include ../kernel_version.mk |
444 | PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/ | 475 | PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra |
445 | $(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR))) | 476 | $(eval $(call BothConfigMake,KERNELDIR,$(KERNELDIR))) |
446 | # Needed only by install script | 477 | # Needed only by install script |
478 | $(eval $(call BothConfigMake,KERNEL_ID,$(KERNEL_ID))) | ||
479 | $(eval $(call KernelConfigMake,PVRSRV_MODULE_BASEDIR,$(PVRSRV_MODULE_BASEDIR))) | ||
447 | $(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS))) | 480 | $(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS))) |
448 | $(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,)) | 481 | $(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,)) |
449 | $(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,)) | 482 | $(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,)) |
@@ -456,34 +489,35 @@ KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE) | |||
456 | $(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) | 489 | $(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) |
457 | endif | 490 | endif |
458 | 491 | ||
492 | # Alternatively, allow the CC used for kbuild to be overridden | ||
493 | # exactly, bypassing any KERNEL_CROSS_COMPILE configuration. | ||
494 | $(eval $(call TunableBothConfigMake,KERNEL_CC,)) | ||
495 | |||
459 | # Check the KERNELDIR has a kernel built. | 496 | # Check the KERNELDIR has a kernel built. |
460 | VMLINUX := | 497 | VMLINUX := |
461 | LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config)) | 498 | #$(strip $(wildcard $(KERNELDIR)/vmlinux)) |
462 | 499 | ||
463 | ifneq ($(VMLINUX),) | 500 | ifneq ($(wildcard $(VMLINUX)),) |
464 | ifneq ($(shell file $(KERNELDIR)/vmlinux | grep 64-bit >/dev/null && echo 1),$(shell $(_CC) -dM -E - </dev/null | grep __x86_64__ >/dev/null && echo 1)) | 501 | ifneq ($(shell file $(KERNELDIR)/vmlinux | grep 64-bit >/dev/null && echo 1),$(shell $(_CC) -dM -E - </dev/null | grep __x86_64__ >/dev/null && echo 1)) |
465 | $(error Attempting to build 64-bit DDK against 32-bit kernel, or 32-bit DDK against 64-bit kernel. This is not allowed.) | 502 | $(error Attempting to build 64-bit DDK against 32-bit kernel, or 32-bit DDK against 64-bit kernel. This is not allowed.) |
466 | endif | 503 | endif |
467 | VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo false) | 504 | LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config)) |
468 | VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false) | 505 | VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo false) |
469 | VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false) | 506 | VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false) |
470 | VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false) | 507 | VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false) |
471 | VMLINUX_HAS_DMA := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA=y >/dev/null || echo false) | 508 | VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false) |
472 | 509 | ifneq ($(VMLINUX_IS_64BIT),false) | |
473 | 510 | $(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.) | |
474 | # $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA=$(VMLINUX_HAS_DMA) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU)) | 511 | endif |
475 | |||
476 | ifneq ($(VMLINUX_IS_64BIT),false) | ||
477 | $(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.) | ||
478 | endif | ||
479 | else | 512 | else |
480 | $(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) | 513 | $(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) |
481 | endif | ||
482 | endif | 514 | endif |
483 | 515 | ||
516 | endif # KERNELDIR | ||
517 | |||
484 | ifneq ($(VMLINUX_HAS_PAE40),false) | 518 | ifneq ($(VMLINUX_HAS_PAE40),false) |
485 | ifeq ($(VMLINUX_HAS_DMA),false) | 519 | ifeq ($(VMLINUX_HAS_DMA32),false) |
486 | $(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA.) | 520 | $(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA32.) |
487 | $(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) | 521 | $(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) |
488 | endif | 522 | endif |
489 | endif | 523 | endif |
@@ -498,8 +532,8 @@ endif | |||
498 | else | 532 | else |
499 | # Kernel is 32-bit | 533 | # Kernel is 32-bit |
500 | ifneq ($(VMLINUX_HAS_PAE36),false) | 534 | ifneq ($(VMLINUX_HAS_PAE36),false) |
501 | ifeq ($(VMLINUX_HAS_DMA),false) | 535 | ifeq ($(VMLINUX_HAS_DMA32),false) |
502 | $(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA. ) | 536 | $(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA32. ) |
503 | $(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) | 537 | $(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...) |
504 | endif | 538 | endif |
505 | endif | 539 | endif |
@@ -509,6 +543,7 @@ endif | |||
509 | 543 | ||
510 | # Ideally configured by platform Makefiles, as necessary | 544 | # Ideally configured by platform Makefiles, as necessary |
511 | # | 545 | # |
546 | SHADER_DESTDIR := $(SHARE_DESTDIR)/pvr/shaders/ | ||
512 | 547 | ||
513 | # Invariant options for Linux | 548 | # Invariant options for Linux |
514 | # | 549 | # |
@@ -517,7 +552,11 @@ $(eval $(call BothConfigC,LINUX,)) | |||
517 | $(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\"")) | 552 | $(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\"")) |
518 | $(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\"")) | 553 | $(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\"")) |
519 | $(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\"")) | 554 | $(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\"")) |
555 | $(eval $(call BothConfigMake,PVRSRV_MODNAME,$(PVRSRV_MODNAME))) | ||
556 | $(eval $(call BothConfigMake,PVR_BUILD_DIR,$(PVR_BUILD_DIR))) | ||
557 | $(eval $(call BothConfigMake,PVR_BUILD_TYPE,$(BUILD))) | ||
520 | 558 | ||
559 | $(eval $(call TunableBothConfigC,USE_64BIT_COMPAT,)) | ||
521 | $(eval $(call TunableBothConfigC,SGXCORE,)) | 560 | $(eval $(call TunableBothConfigC,SGXCORE,)) |
522 | $(eval $(call BothConfigC,SGX$(SGXCORE),)) | 561 | $(eval $(call BothConfigC,SGX$(SGXCORE),)) |
523 | $(eval $(call BothConfigC,SUPPORT_SGX$(SGXCORE),)) | 562 | $(eval $(call BothConfigC,SUPPORT_SGX$(SGXCORE),)) |
@@ -529,6 +568,7 @@ $(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,)) | |||
529 | $(eval $(call BothConfigC,TRANSFER_QUEUE,)) | 568 | $(eval $(call BothConfigC,TRANSFER_QUEUE,)) |
530 | $(eval $(call BothConfigC,PVR_SECURE_HANDLES,)) | 569 | $(eval $(call BothConfigC,PVR_SECURE_HANDLES,)) |
531 | 570 | ||
571 | |||
532 | # Support syncing LISR & MISR. This is required for OS's where | 572 | # Support syncing LISR & MISR. This is required for OS's where |
533 | # on SPM platforms the LISR and MISR can run at the same time and | 573 | # on SPM platforms the LISR and MISR can run at the same time and |
534 | # thus during powerdown we need to drain all pending LISRs before | 574 | # thus during powerdown we need to drain all pending LISRs before |
@@ -537,9 +577,15 @@ $(eval $(call KernelConfigC,SUPPORT_LISR_MISR_SYNC)) | |||
537 | 577 | ||
538 | ifneq ($(DISPLAY_CONTROLLER),) | 578 | ifneq ($(DISPLAY_CONTROLLER),) |
539 | $(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) | 579 | $(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) |
580 | $(eval $(call BothConfigMake,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) | ||
540 | endif | 581 | endif |
541 | 582 | ||
542 | ifneq ($(DRM_DISPLAY_CONTROLLER),) | 583 | ifneq ($(DRM_DISPLAY_CONTROLLER),) |
584 | $(eval $(call KernelConfigMake,DRM_DISPLAY_CONTROLLER,$(DRM_DISPLAY_CONTROLLER))) | ||
585 | endif | ||
586 | |||
587 | ifneq ($(BUFFERCLASS_MODULE),) | ||
588 | $(eval $(call BothConfigMake,BUFFERCLASS_MODULE,$(BUFFERCLASS_MODULE))) | ||
543 | endif | 589 | endif |
544 | 590 | ||
545 | ifneq ($(strip $(KERNELDIR)),) | 591 | ifneq ($(strip $(KERNELDIR)),) |
@@ -590,6 +636,8 @@ $(eval $(call TunableBothConfigC,SUPPORT_HW_RECOVERY,1)) | |||
590 | $(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1)) | 636 | $(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1)) |
591 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1)) | 637 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1)) |
592 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1)) | 638 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1)) |
639 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_CONTEXT_PRIORITY_PER_THREAD,)) | ||
640 | |||
593 | $(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,)) | 641 | $(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,)) |
594 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1)) | 642 | $(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1)) |
595 | $(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,)) | 643 | $(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,)) |
@@ -655,6 +703,15 @@ $(eval $(call TunableKernelConfigC,SUPPORT_PDUMP_SYNC_DEBUG,)) | |||
655 | $(eval $(call TunableKernelConfigC,SUPPORT_PER_SYNC_DEBUG,)) | 703 | $(eval $(call TunableKernelConfigC,SUPPORT_PER_SYNC_DEBUG,)) |
656 | $(eval $(call TunableKernelConfigC,SUPPORT_FORCE_SYNC_DUMP,)) | 704 | $(eval $(call TunableKernelConfigC,SUPPORT_FORCE_SYNC_DUMP,)) |
657 | 705 | ||
706 | ifneq ($(filter opengl,$(COMPONENTS)),) | ||
707 | SUPPORT_OPENGL = 1 | ||
708 | endif | ||
709 | ifneq ($(filter opengles1,$(COMPONENTS)),) | ||
710 | endif | ||
711 | ifneq ($(filter opengles2,$(COMPONENTS)),) | ||
712 | endif | ||
713 | ifneq ($(filter opencl,$(COMPONENTS)),) | ||
714 | endif | ||
658 | 715 | ||
659 | 716 | ||
660 | $(eval $(call TunableBothConfigMake,OPTIM,)) | 717 | $(eval $(call TunableBothConfigMake,OPTIM,)) |
@@ -665,6 +722,25 @@ $(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_DEVICE_CLASS,)) | |||
665 | 722 | ||
666 | $(eval $(call TunableKernelConfigMake,TTRACE,)) | 723 | $(eval $(call TunableKernelConfigMake,TTRACE,)) |
667 | 724 | ||
725 | |||
726 | $(if $(USE_CCACHE),$(if $(USE_DISTCC),$(error\ | ||
727 | Enabling both USE_CCACHE and USE_DISTCC at the same time is not supported))) | ||
728 | |||
729 | SUPPORT_SGX_LOW_LATENCY_SCHEDULING ?= 1 | ||
730 | SUPPORT_SGX_CONTEXT_PRIORITY_PER_THREAD ?= 0 | ||
731 | |||
732 | ifeq ($(SUPPORT_SGX_CONTEXT_PRIORITY_PER_THREAD),1) | ||
733 | ifeq ($(SUPPORT_OPENGL),) | ||
734 | ifeq ($(SUPPORT_SGX_LOW_LATENCY_SCHEDULING),1) | ||
735 | $(eval $(call BothConfigC,SGX_FEATURE_CONTEXT_PRIORITY_PER_THREAD,)) | ||
736 | else | ||
737 | $(info SGX_CONTEXT_PRIORITY_PER_THREAD requires Low latency scheduling to be enabled) | ||
738 | endif | ||
739 | else | ||
740 | $(info SGX_CONTEXT_PRIORITY_PER_THREAD requires OpenGL support to be disabled) | ||
741 | endif | ||
742 | endif | ||
743 | |||
668 | endif # INTERNAL_CLOBBER_ONLY | 744 | endif # INTERNAL_CLOBBER_ONLY |
669 | 745 | ||
670 | export INTERNAL_CLOBBER_ONLY | 746 | export INTERNAL_CLOBBER_ONLY |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk index 311bbb0..29fc365 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk | |||
@@ -54,14 +54,6 @@ define one-word-only | |||
54 | $(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),) | 54 | $(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),) |
55 | endef | 55 | endef |
56 | 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 | 57 | define module-library |
66 | $(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so)) | 58 | $(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so)) |
67 | endef | 59 | endef |
@@ -71,16 +63,69 @@ define register-module | |||
71 | INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE) | 63 | INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE) |
72 | endef | 64 | endef |
73 | 65 | ||
66 | define process-module-arch | ||
67 | MODULE_ARCH := $$(strip $(2)) | ||
68 | include $$(MAKE_TOP)/moduledefs_common.mk | ||
69 | include $$(MAKE_TOP)/moduledefs/$$(MODULE_ARCH).mk | ||
70 | include $$(MAKE_TOP)/$$(strip $$($$(THIS_MODULE)_type)).mk | ||
71 | .SECONDARY: $$(MODULE_INTERMEDIATES_DIR) | ||
72 | $$(MODULE_INTERMEDIATES_DIR): | ||
73 | $$(make-directory) | ||
74 | MODULE_CLEAN_TARGETS += $$(MODULE_INTERMEDIATES_DIR) | ||
75 | INTERNAL_TARGETS_FOR_$(1) += $$(MODULE_TARGETS) | ||
76 | INTERNAL_CLEAN_TARGETS_FOR_$(1) += $$(MODULE_CLEAN_TARGETS) | ||
77 | INTERNAL_CLOBBER_TARGETS_FOR_$(1) += $$(MODULE_CLEAN_TARGETS) $$(MODULE_CLOBBER_TARGETS) $$(MODULE_TARGETS) | ||
78 | endef | ||
79 | |||
80 | target_neutral_types := \ | ||
81 | apk \ | ||
82 | bison_parser \ | ||
83 | copy_files \ | ||
84 | custom \ | ||
85 | flex_lexer \ | ||
86 | dex \ | ||
87 | gen_dispatch \ | ||
88 | image_header \ | ||
89 | inline_shaders \ | ||
90 | java_archive \ | ||
91 | module_group \ | ||
92 | pds_header \ | ||
93 | use_header | ||
94 | |||
95 | doc_types := doc | ||
96 | |||
97 | define calculate-arch-list | ||
98 | # Work out the target platforms for this module | ||
99 | MODULE_ARCH_LIST := $(2) | ||
100 | ifeq ($$(MODULE_ARCH_LIST),) | ||
101 | ifneq ($$(filter $(1),$(doc_types)),) | ||
102 | MODULE_ARCH_LIST := doc | ||
103 | else | ||
104 | ifneq ($$(filter $(1),$(target_neutral_types)),) | ||
105 | MODULE_ARCH_LIST := target_neutral | ||
106 | else | ||
107 | ifneq ($$(filter $(1),kernel_module),) | ||
108 | MODULE_ARCH_LIST := $(TARGET_PRIMARY_ARCH) | ||
109 | else | ||
110 | MODULE_ARCH_LIST := $(TARGET_ALL_ARCH) | ||
111 | endif | ||
112 | endif | ||
113 | endif | ||
114 | endif | ||
115 | endef | ||
116 | |||
74 | define process-module | 117 | define process-module |
75 | THIS_MODULE := $(1) | 118 | THIS_MODULE := $(1) |
76 | THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1)) | 119 | THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1)) |
120 | INTERNAL_TARGETS_FOR_$(1) := | ||
121 | INTERNAL_CLEAN_TARGETS_FOR_$(1) := | ||
122 | INTERNAL_CLOBBER_TARGETS_FOR_$(1) := | ||
77 | include $$(MAKE_TOP)/this_makefile.mk | 123 | include $$(MAKE_TOP)/this_makefile.mk |
78 | $$(call must-be-nonempty,THIS_MAKEFILE) | 124 | $$(call must-be-nonempty,THIS_MAKEFILE) |
79 | $$(call must-be-nonempty,$(1)_type) | 125 | $$(call must-be-nonempty,$(1)_type) |
80 | MODULE_HOST_BUILD := $$(if $(filter host_%,$($(1)_type)),true,) | 126 | $$(eval $$(call calculate-arch-list,$$($(1)_type),$$($(1)_arch))) |
81 | include $$(MAKE_TOP)/moduledefs.mk | 127 | INTERNAL_ARCH_LIST_FOR_$(1) := $$(MODULE_ARCH_LIST) |
82 | include $$(MAKE_TOP)/$$(patsubst host_%,%,$($(1)_type)).mk | 128 | $$(foreach _m,$$(MODULE_ARCH_LIST),$$(eval $$(call process-module-arch,$(1),$$(_m)))) |
83 | INTERNAL_TARGETS_FOR_$(THIS_MODULE) := $(MODULE_TARGETS) | ||
84 | endef | 129 | endef |
85 | 130 | ||
86 | # This can be used by module_type.mk files to indicate that they can't be | 131 | # This can be used by module_type.mk files to indicate that they can't be |
@@ -100,10 +145,6 @@ $(shell \ | |||
100 | $$CC_CHECK --cc "$(1)" --out "$(2)" $(3)) | 145 | $$CC_CHECK --cc "$(1)" --out "$(2)" $(3)) |
101 | endef | 146 | endef |
102 | 147 | ||
103 | define cc-is-64bit | ||
104 | $(call cc-check,$(1),$(OUT),--64) | ||
105 | endef | ||
106 | |||
107 | define cc-is-clang | 148 | define cc-is-clang |
108 | $(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),--clang) | 149 | $(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),--clang) |
109 | endef | 150 | endef |
@@ -144,10 +185,14 @@ $(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$( | |||
144 | endef | 185 | endef |
145 | 186 | ||
146 | define module-info-line | 187 | define module-info-line |
147 | $(if $(filter modules,$(D)),$(info $(1)),) | 188 | $(if $(filter modules,$(D)),$(info [$(THIS_MODULE)] <$(MODULE_ARCH)> $(1)),) |
148 | endef | 189 | endef |
149 | 190 | ||
150 | # $(call if-exists,A,B) => A if A is a file which exists, otherwise B | 191 | # $(call if-exists,A,B) => A if A is a file which exists, otherwise B |
151 | define if-exists | 192 | define if-exists |
152 | $(if $(wildcard $(1)),$(1),$(2)) | 193 | $(if $(wildcard $(1)),$(1),$(2)) |
153 | endef | 194 | endef |
195 | |||
196 | define unsupported-module-var | ||
197 | $(if $(strip $($(THIS_MODULE)_$(1))),$(error In makefile $(THIS_MAKEFILE): Setting '$(THIS_MODULE)_$(1)' has no effect, because $(THIS_MODULE) has type $($(THIS_MODULE)_type))) | ||
198 | endef | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/jz4780_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/jz4780_android/Makefile new file mode 100644 index 0000000..999c7bf --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/jz4780_android/Makefile | |||
@@ -0,0 +1,62 @@ | |||
1 | # Copyright (C) Imagination Technologies Limited. All rights reserved. | ||
2 | # | ||
3 | # No part of this software, either material or conceptual may be | ||
4 | # copied or distributed, transmitted, transcribed, stored in a | ||
5 | # retrieval system or translated into any human or computer | ||
6 | # language in any form by any means, electronic, mechanical, | ||
7 | # manual or other-wise, or disclosed to third parties without | ||
8 | # the express written permission of: Imagination Technologies | ||
9 | # Limited, HomePark Industrial Estate, Kings Langley, | ||
10 | # Hertfordshire, WD4 8LZ, UK | ||
11 | # | ||
12 | # $Log: $ | ||
13 | # | ||
14 | |||
15 | TARGET_DEVICE ?= ci20 | ||
16 | |||
17 | override SGXCORE := 540 | ||
18 | override SGX_CORE_REV := 130 | ||
19 | override SUPPORT_SLC := 1 | ||
20 | |||
21 | SGX_DYNAMIC_TIMING_INFO ?= 1 | ||
22 | SGX_FAST_DPM_INIT ?= 1 | ||
23 | |||
24 | override SUPPORT_LINUX_USING_WORKQUEUES := 1 | ||
25 | |||
26 | PVR_SYSTEM := sgx_jz4780 | ||
27 | HAL_VARIANT := xb4780 | ||
28 | |||
29 | # Force-disable camerahal on this board | ||
30 | override EXCLUDED_APIS := $(EXCLUDED_APIS) camerahal | ||
31 | |||
32 | include ../common/android/paths.mk | ||
33 | include ../common/android/arch.mk | ||
34 | include ../common/android/features.mk | ||
35 | |||
36 | # Switch on USSE EDM status debug by default | ||
37 | PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1 | ||
38 | PVRSRV_DUMP_MK_TRACE ?= 1 | ||
39 | |||
40 | # Pre-rotate surfaces in non-screen orientations | ||
41 | PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT ?= 1 | ||
42 | |||
43 | # Disable legacy displayclass support, we will use DRM | ||
44 | override SUPPORT_PVRSRV_DEVICE_CLASS := 0 | ||
45 | override PVR_LDM_DEVICE_TREE := 1 | ||
46 | override SUPPORT_DMABUF := 1 | ||
47 | |||
48 | PVR_ANDROID_COMPOSERHAL ?= drm | ||
49 | |||
50 | include ../config/core.mk | ||
51 | include ../common/android/extra_config.mk | ||
52 | |||
53 | # Until dri/drm is officially supported, hide the setup in this file | ||
54 | $(eval $(call BothConfigC,SUPPORT_DRI_DRM,)) | ||
55 | $(eval $(call BothConfigMake,SUPPORT_DRI_DRM,1)) | ||
56 | $(eval $(call KernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) | ||
57 | $(eval $(call UserConfigC,PVR_DRM_MODESET_DRIVER_NAME,jz4780)) | ||
58 | $(eval $(call UserConfigC,PVR_DRM_MODESET_MODULE_NAME,dumb)) | ||
59 | $(eval $(call UserConfigMake,PVR_DRM_MODESET_MODULE_NAME,dumb)) | ||
60 | |||
61 | # Compile in interception code for USAGE_FB buffers so they use CMA/DMA | ||
62 | $(eval $(call UserConfigMake,SUPPORT_ANDROID_JZ4780,1)) | ||
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 index 2b49f50..822c3df 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template | |||
@@ -40,8 +40,8 @@ | |||
40 | ### ########################################################################### | 40 | ### ########################################################################### |
41 | 41 | ||
42 | # This top-level kbuild makefile builds all the Linux kernel modules in the | 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 | 43 | # DDK. To run kbuild, this makefile is copied to $(TARGET_PRIMARY_OUT)/kbuild/Makefile |
44 | # and make is invoked in $(TARGET_OUT)/kbuild. | 44 | # and make is invoked in $(TARGET_PRIMARY_OUT)/kbuild. |
45 | 45 | ||
46 | # This makefile doesn't define any kbuild special variables apart from | 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 | 47 | # ccflags-y and obj-m. The variables for objects are picked up by including |
@@ -56,11 +56,11 @@ include $(OUT)/config_kernel.mk | |||
56 | 56 | ||
57 | .SECONDARY: | 57 | .SECONDARY: |
58 | 58 | ||
59 | $(OUT)/target/kbuild/external/%.c: $(EXTRA_KBUILD_SOURCE)/%.c | 59 | $(OUT)/$(TARGET_PRIMARY_ARCH)/kbuild/external/%.c: $(EXTRA_KBUILD_SOURCE)/%.c |
60 | @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi | 60 | @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi |
61 | @if [ ! -h $@ ]; then ln -sf $< $@; fi | 61 | @if [ ! -h $@ ]; then ln -sf $< $@; fi |
62 | 62 | ||
63 | $(OUT)/target/kbuild/%.c: $(TOP)/%.c | 63 | $(OUT)/$(TARGET_PRIMARY_ARCH)/kbuild/%.c: $(TOP)/%.c |
64 | @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi | 64 | @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi |
65 | @if [ ! -h $@ ]; then ln -sf $< $@; fi | 65 | @if [ ! -h $@ ]; then ln -sf $< $@; fi |
66 | 66 | ||
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 index 63542f0..e289a25 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk | |||
@@ -41,7 +41,7 @@ | |||
41 | $(if $(strip $(KERNELDIR)),,$(error KERNELDIR must be set)) | 41 | $(if $(strip $(KERNELDIR)),,$(error KERNELDIR must be set)) |
42 | $(call directory-must-exist,$(KERNELDIR)) | 42 | $(call directory-must-exist,$(KERNELDIR)) |
43 | 43 | ||
44 | $(TARGET_OUT)/kbuild/Makefile: $(MAKE_TOP)/kbuild/Makefile.template | 44 | $(TARGET_PRIMARY_OUT)/kbuild/Makefile: $(MAKE_TOP)/kbuild/Makefile.template |
45 | @[ ! -e $(dir $@) ] && mkdir -p $(dir $@) || true | 45 | @[ ! -e $(dir $@) ] && mkdir -p $(dir $@) || true |
46 | $(CP) -f $< $@ | 46 | $(CP) -f $< $@ |
47 | 47 | ||
@@ -52,40 +52,36 @@ INTERNAL_KBUILD_OBJECTS := $(foreach _m,$(KERNEL_COMPONENTS),$(if $(INTERNAL_KBU | |||
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))) | 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 | 53 | .PHONY: kbuild kbuild_clean |
54 | 54 | ||
55 | kbuild: $(TARGET_OUT)/kbuild/Makefile | 55 | kbuild: $(TARGET_PRIMARY_OUT)/kbuild/Makefile |
56 | @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \ | 56 | $(if $(V),,@)$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) \ |
57 | M=$(abspath $(TARGET_PRIMARY_OUT)/kbuild) \ | ||
57 | INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \ | 58 | INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \ |
58 | INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ | 59 | INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ |
59 | INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ | 60 | INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ |
60 | EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ | 61 | EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ |
62 | TARGET_PRIMARY_ARCH=$(TARGET_PRIMARY_ARCH) \ | ||
61 | CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \ | 63 | CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \ |
62 | EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ | 64 | EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ |
65 | CC=$(if $(KERNEL_CC),$(KERNEL_CC),$(KERNEL_CROSS_COMPILE)gcc) \ | ||
63 | V=$(V) W=$(W) \ | 66 | V=$(V) W=$(W) \ |
64 | TOP=$(TOP) | 67 | TOP=$(TOP) |
65 | @for kernel_module in $(addprefix $(TARGET_OUT)/kbuild/,$(INTERNAL_KBUILD_OBJECTS:.o=.ko)); do \ | 68 | @for kernel_module in $(addprefix $(TARGET_PRIMARY_OUT)/kbuild/,$(INTERNAL_KBUILD_OBJECTS:.o=.ko)); do \ |
66 | cp $$kernel_module $(TARGET_OUT); \ | 69 | cp $$kernel_module $(TARGET_PRIMARY_OUT); \ |
67 | done | 70 | done |
68 | 71 | ||
69 | kbuild_clean: $(TARGET_OUT)/kbuild/Makefile | 72 | kbuild_clean: $(TARGET_PRIMARY_OUT)/kbuild/Makefile |
70 | @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \ | 73 | $(if $(V),,@)$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) \ |
74 | M=$(abspath $(TARGET_PRIMARY_OUT)/kbuild) \ | ||
71 | INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \ | 75 | INTERNAL_KBUILD_MAKEFILES="$(INTERNAL_KBUILD_MAKEFILES)" \ |
72 | INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ | 76 | INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ |
73 | INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ | 77 | INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ |
74 | EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ | 78 | EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ |
79 | TARGET_PRIMARY_ARCH=$(TARGET_PRIMARY_ARCH) \ | ||
75 | CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \ | 80 | CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \ |
76 | EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ | 81 | EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ |
82 | CC=$(if $(KERNEL_CC),$(KERNEL_CC),$(KERNEL_CROSS_COMPILE)gcc) \ | ||
77 | V=$(V) W=$(W) \ | 83 | V=$(V) W=$(W) \ |
78 | TOP=$(TOP) clean | 84 | TOP=$(TOP) clean |
79 | 85 | ||
80 | kbuild_install: $(TARGET_OUT)/kbuild/Makefile | 86 | kbuild_install: install |
81 | @: $(if $(strip $(DISCIMAGE)),,$(error $$(DISCIMAGE) was empty or unset while trying to use it to set INSTALL_MOD_PATH for modules_install)) | 87 | kbuild: install_script_km |
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="$(CCACHE) $(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 index a0a1289..095fb02 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk | |||
@@ -54,8 +54,20 @@ $(if $(wildcard $(abspath $(MODULE_KBUILD_MAKEFILE))),,$(error In makefile $(THI | |||
54 | 54 | ||
55 | # $(THIS_MODULE)_target specifies the name of the kernel module | 55 | # $(THIS_MODULE)_target specifies the name of the kernel module |
56 | $(call must-be-nonempty,$(THIS_MODULE)_target) | 56 | $(call must-be-nonempty,$(THIS_MODULE)_target) |
57 | MODULE_TARGETS := $($(THIS_MODULE)_target) | ||
57 | MODULE_KBUILD_OBJECTS := $($(THIS_MODULE)_target:.ko=.o) | 58 | MODULE_KBUILD_OBJECTS := $($(THIS_MODULE)_target:.ko=.o) |
58 | 59 | ||
60 | $(call module-info-line,kernel module: $(MODULE_TARGETS)) | ||
61 | |||
62 | # Unusually, we define $(THIS_MODULE)_install_path if the user didn't, as we | ||
63 | # can't use MODULE_INSTALL_PATH in the scripts.mk logic. | ||
64 | ifeq ($($(THIS_MODULE)_install_path),) | ||
65 | $(THIS_MODULE)_install_path := \ | ||
66 | $${MOD_DESTDIR}/$(patsubst $(MODULE_OUT)/%,%,$(MODULE_TARGETS)) | ||
67 | endif | ||
68 | |||
69 | MODULE_INSTALL_PATH := $($(THIS_MODULE)_install_path) | ||
70 | |||
59 | # Here we could maybe include $(MODULE_KBUILD_MAKEFILE) and look at | 71 | # Here we could maybe include $(MODULE_KBUILD_MAKEFILE) and look at |
60 | # $(MODULE_KBUILD_OBJECTS)-y to see which source files might be built | 72 | # $(MODULE_KBUILD_OBJECTS)-y to see which source files might be built |
61 | 73 | ||
@@ -70,6 +82,12 @@ $(THIS_MODULE): | |||
70 | @echo "Module $@ is a kbuild module. Run 'make kbuild' to make it" | 82 | @echo "Module $@ is a kbuild module. Run 'make kbuild' to make it" |
71 | @false | 83 | @false |
72 | 84 | ||
85 | $(MODULE_INTERMEDIATES_DIR)/.install: MODULE_TYPE := $($(THIS_MODULE)_type) | ||
86 | $(MODULE_INTERMEDIATES_DIR)/.install: MODULE_INSTALL_PATH := $(MODULE_INSTALL_PATH) | ||
87 | $(MODULE_INTERMEDIATES_DIR)/.install: MODULE_TARGETS := $(patsubst $(MODULE_OUT)/%,%,$(MODULE_TARGETS)) | ||
88 | $(MODULE_INTERMEDIATES_DIR)/.install: $(THIS_MAKEFILE) | $(MODULE_INTERMEDIATES_DIR) | ||
89 | @echo 'install_file $(MODULE_TARGETS) $(MODULE_INSTALL_PATH) "$(MODULE_TYPE)" 0644 0:0' >$@ | ||
90 | |||
73 | ALL_KBUILD_MODULES += $(THIS_MODULE) | 91 | ALL_KBUILD_MODULES += $(THIS_MODULE) |
74 | INTERNAL_KBUILD_MAKEFILE_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_MAKEFILE) | 92 | INTERNAL_KBUILD_MAKEFILE_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_MAKEFILE) |
75 | INTERNAL_KBUILD_OBJECTS_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_OBJECTS) | 93 | INTERNAL_KBUILD_OBJECTS_FOR_$(THIS_MODULE) := $(MODULE_KBUILD_OBJECTS) |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/host_x86_64.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/host_x86_64.mk new file mode 100644 index 0000000..1130045 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/host_x86_64.mk | |||
@@ -0,0 +1,57 @@ | |||
1 | ########################################################################### ### | ||
2 | #@File | ||
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 | MODULE_HOST_BUILD := true | ||
43 | |||
44 | MODULE_CC := $(HOST_CC) | ||
45 | MODULE_CXX := $(HOST_CXX) | ||
46 | |||
47 | MODULE_HOST_CFLAGS := $(ALL_HOST_CFLAGS) $($(THIS_MODULE)_cflags) | ||
48 | MODULE_HOST_CXXFLAGS := $(ALL_HOST_CXXFLAGS) $($(THIS_MODULE)_cxxflags) | ||
49 | MODULE_HOST_LDFLAGS := $(ALL_HOST_LDFLAGS) -L$(MODULE_OUT) $($(THIS_MODULE)_ldflags) | ||
50 | |||
51 | ifneq ($(BUILD),debug) | ||
52 | ifeq ($(USE_LTO),1) | ||
53 | MODULE_HOST_LDFLAGS := \ | ||
54 | $(sort $(filter-out -W% -D%,$(ALL_HOST_CFLAGS) $(ALL_HOST_CXXFLAGS))) \ | ||
55 | $(MODULE_HOST_LDFLAGS) | ||
56 | endif | ||
57 | endif | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_armv7-a.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_armv7-a.mk new file mode 100644 index 0000000..bf0979e --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_armv7-a.mk | |||
@@ -0,0 +1,130 @@ | |||
1 | ########################################################################### ### | ||
2 | #@File | ||
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 | MODULE_HOST_BUILD := | ||
43 | |||
44 | MODULE_CC := $(CC_SECONDARY) -march=armv7-a -mfloat-abi=softfp | ||
45 | MODULE_CXX := $(CXX_SECONDARY) -march=armv7-a -mfloat-abi=softfp | ||
46 | |||
47 | ifneq ($(BUILD),debug) | ||
48 | MODULE_CC := $(MODULE_CC) -mthumb | ||
49 | MODULE_CXX := $(MODULE_CXX) -mthumb | ||
50 | endif | ||
51 | |||
52 | MODULE_CFLAGS := $(ALL_CFLAGS) $($(THIS_MODULE)_cflags) | ||
53 | MODULE_CXXFLAGS := $(ALL_CXXFLAGS) $($(THIS_MODULE)_cxxflags) | ||
54 | MODULE_LDFLAGS := $($(THIS_MODULE)_ldflags) -L$(MODULE_OUT) -Xlinker -rpath-link=$(MODULE_OUT) $(ALL_LDFLAGS) | ||
55 | |||
56 | # Since this is a target module, add system-specific include flags. | ||
57 | MODULE_INCLUDE_FLAGS := \ | ||
58 | $(SYS_INCLUDES_RESIDUAL) \ | ||
59 | $(addprefix -isystem ,$(filter-out $(patsubst -I%,%,$(filter -I%,$(MODULE_INCLUDE_FLAGS))),$(SYS_INCLUDES_ISYSTEM))) \ | ||
60 | $(MODULE_INCLUDE_FLAGS) | ||
61 | |||
62 | ifneq ($(SUPPORT_ANDROID_PLATFORM),) | ||
63 | |||
64 | _obj := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/obj$(if $(MULTIARCH),_arm,) | ||
65 | |||
66 | # Linker flags used to find system libraries. | ||
67 | MODULE_SYSTEM_LIBRARY_DIR_FLAGS += \ | ||
68 | -L$(_obj)/lib \ | ||
69 | -Xlinker -rpath-link=$(_obj)/lib \ | ||
70 | -L$(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/lib \ | ||
71 | -Xlinker -rpath-link=$(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/lib | ||
72 | ifneq ($(wildcard $(TARGET_ROOT)/product/$(TARGET_DEVICE)/vendor),) | ||
73 | MODULE_SYSTEM_LIBRARY_DIR_FLAGS += \ | ||
74 | -L$(TARGET_ROOT)/product/$(TARGET_DEVICE)/vendor/lib \ | ||
75 | -Xlinker -rpath-link=$(TARGET_ROOT)/product/$(TARGET_DEVICE)/vendor/lib | ||
76 | else | ||
77 | MODULE_SYSTEM_LIBRARY_DIR_FLAGS += \ | ||
78 | -L$(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/vendor/lib \ | ||
79 | -Xlinker -rpath-link=$(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/vendor/lib | ||
80 | endif | ||
81 | |||
82 | ifeq ($(NDK_ROOT),) | ||
83 | |||
84 | MODULE_INCLUDE_FLAGS := \ | ||
85 | -isystem $(ANDROID_ROOT)/bionic/libc/arch-arm/include \ | ||
86 | -isystem $(ANDROID_ROOT)/bionic/libc/kernel/uapi/asm-arm \ | ||
87 | -isystem $(ANDROID_ROOT)/bionic/libm/include/arm \ | ||
88 | $(MODULE_INCLUDE_FLAGS) | ||
89 | |||
90 | else # NDK_ROOT | ||
91 | |||
92 | _obj := $(NDK_ROOT)/platforms/$(TARGET_PLATFORM)/arch-arm/usr | ||
93 | |||
94 | MODULE_SYSTEM_LIBRARY_DIR_FLAGS := \ | ||
95 | -L$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a \ | ||
96 | $(MODULE_SYSTEM_LIBRARY_DIR_FLAGS) | ||
97 | |||
98 | endif # NDK_ROOT | ||
99 | |||
100 | MODULE_LDFLAGS += $(MODULE_SYSTEM_LIBRARY_DIR_FLAGS) | ||
101 | |||
102 | MODULE_EXE_LDFLAGS := \ | ||
103 | -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker -lc | ||
104 | |||
105 | MODULE_LIB_LDFLAGS := $(MODULE_EXE_LDFLAGS) | ||
106 | |||
107 | # Keeping it same as C for now | ||
108 | MODULE_LIB_LDFLAGS_CXX := $(MODULE_EXE_LDFLAGS) | ||
109 | |||
110 | MODULE_EXE_CRTBEGIN := $(_obj)/lib/crtbegin_dynamic.o | ||
111 | MODULE_EXE_CRTEND := $(_obj)/lib/crtend_android.o | ||
112 | |||
113 | MODULE_LIB_CRTBEGIN := $(_obj)/lib/crtbegin_so.o | ||
114 | MODULE_LIB_CRTEND := $(_obj)/lib/crtend_so.o | ||
115 | |||
116 | MODULE_LIBGCC := -Wl,--version-script,$(MAKE_TOP)/common/libgcc.lds $(LIBGCC_SECONDARY) | ||
117 | |||
118 | MODULE_ARCH_TAG := $(_obj) | ||
119 | |||
120 | endif # SUPPORT_ANDROID_PLATFORM | ||
121 | |||
122 | ifneq ($(BUILD),debug) | ||
123 | ifeq ($(USE_LTO),1) | ||
124 | MODULE_LDFLAGS := \ | ||
125 | $(sort $(filter-out -W% -D%,$(ALL_CFLAGS) $(ALL_CXXFLAGS))) \ | ||
126 | $(MODULE_LDFLAGS) | ||
127 | endif | ||
128 | endif | ||
129 | |||
130 | MODULE_ARCH_BITNESS := 32 | ||
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_mips32r6el.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_mips32r6el.mk new file mode 100644 index 0000000..0891966 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs/target_mips32r6el.mk | |||
@@ -0,0 +1,134 @@ | |||
1 | ########################################################################### ### | ||
2 | #@File | ||
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 | ||