summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2014-02-05 09:33:26 -0600
committerVishal Mahaveer2014-02-06 11:50:10 -0600
commit0fa0e9c6c0b7225917d0766b1bb7e7f05f414f8c (patch)
treecfba2b7276fa8acd1c683024c008593878e65f2b
parentbd8746b7062c01b9fe47de5094cda2f865fe833c (diff)
downloaddevice-ti-proprietary-open-0fa0e9c6c0b7225917d0766b1bb7e7f05f414f8c.tar.gz
device-ti-proprietary-open-0fa0e9c6c0b7225917d0766b1bb7e7f05f414f8c.tar.xz
device-ti-proprietary-open-0fa0e9c6c0b7225917d0766b1bb7e7f05f414f8c.zip
jacinto6: sgx: update DDK version to 1.12/2701748
Initial DDK 1.12 content Change-Id: I7159467651bf4db8cc92563f7309e4191a448e48 Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com> Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--jacinto6/README.SGX13
-rw-r--r--jacinto6/sgx.tgzbin2638674 -> 3917162 bytes
-rw-r--r--jacinto6/sgx/Android.mk24
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk11
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk130
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk132
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk53
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk9
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk5
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk224
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk6
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk89
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk48
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk2
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk1
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk48
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk51
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk139
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk8
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template3
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk6
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk43
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile2
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile221
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile261
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk4
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile123
-rwxr-xr-xjacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh44
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk23
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/img_defs.h65
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/img_types.h54
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pdumpdefs.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h55
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvr_sync_user.h125
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvrversion.h17
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/services.h374
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/servicesext.h16
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgx_options.h13
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h60
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgxscript.h8
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/Kbuild.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example.c626
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example.h238
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example_linux.c610
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example_linux.h67
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example_private.c432
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/bufferclass_example/bufferclass_example_private.h49
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c147
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/3rdparty_dc_drm_shared.h66
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb.h12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c641
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c313
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_sunxi/Kbuild.mk46
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_sunxi/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_sunxi/dc_sunxi_displayclass.c1765
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/linux_drm/Kbuild.mk86
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/linux_drm/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/linux_drm/pvr_drm_mod.h49
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/linux_drm/pvr_drm_stubs.c220
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/env/linux/pvr_drm_shared.h76
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h12
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h531
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h61
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvrmmap.h8
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h76
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_bridge.h170
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h7
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h29
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h164
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c1107
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_support.c6
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_support.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c708
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/buffer_manager.c744
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c381
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/devicemem.c1045
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/handle.c157
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/hash.c40
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/lists.c3
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/mem_debug.c28
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pdump_common.c623
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c131
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/queue.c301
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/ra.c650
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/refcount.c97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/resman.c72
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/ttrace.c18
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/mmu.c237
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/pb.c2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgx_bridge_km.h25
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxconfig.h48
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinfokm.h49
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c632
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxkick.c304
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxpower.c4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxreset.c18
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxtransfer.c246
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c80
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/Kbuild.mk30
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/Linux.mk2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/env_perproc.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/event.c3
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c508
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h35
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.c697
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.h146
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c375
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.h28
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c72
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutex.c2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h13
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c858
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c17
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pdump.c59
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/private_data.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/proc.c808
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/proc.h110
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_bridge_k.c11
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_debug.c230
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c739
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.h184
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_sync.c1766
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_sync.h78
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/systrace.c282
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/systrace.h68
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h72
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxfeaturedefs.h21
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxmpdefs.h22
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/buffer_manager.h57
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/devicemem.h52
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/handle.h26
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ion_sync.h73
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/lists.h4
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/osfunc.h126
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/pdump_km.h11
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/pdump_osfunc.h60
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/perproc.h9
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/queue.h21
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ra.h3
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/refcount.h43
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/srvkm.h144
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ttrace_common.h5
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ttrace_tokens.h66
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/include/syscommon.h7
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/oemfuncs.h80
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c764
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.h97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq_activeidle.c181
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq_cool.c191
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq_on3demand.c270
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq_onoff.c180
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq_userspace.c124
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.c1278
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysconfig.h109
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysinfo.h70
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/syslocal.h269
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysutils.c63
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap/sysutils_linux.c721
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysconfig.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/oemfuncs.h79
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/sysconfig.c1156
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/sysconfig.h82
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/sysinfo.h57
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/syslocal.h189
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/sysutils.c45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/sunxi/sysutils_linux.c509
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.c12
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.h2
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/linux/main.c1
172 files changed, 22608 insertions, 8835 deletions
diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX
index 17f1f79..54df572 100644
--- a/jacinto6/README.SGX
+++ b/jacinto6/README.SGX
@@ -12,16 +12,13 @@
12#========================================================================== 12#==========================================================================
13 13
14sgx.tgz a set of binaries built for SGX544. 14sgx.tgz a set of binaries built for SGX544.
15The SGXCORE and SGC_CORE_REV is appended to the end of each file. pvrsrvinit is
16now a wrapper which detects the current processor and loads the corresponding
17core specific pvrsrvinit.
18 15
19[DDK Version] 16[DDK Version]
20 1.9/2291151 17 1.12/2701748
21[DDK commit ID] 18[DDK commit ID]
22 e7405ce SGX-UM-Fix for graphics init race condition. 19 03b9484 build: Set correct load directory for kernel modules.
23[Branch] 20[Branch]
24 origin/1.9/2291151_k3.8 21 android/1.12/2701748
25[Kernel modules built against] 22[Kernel modules built against]
26 Kernel Version: 3.8.y with CONFIG_MODVERSIONS=y 23 Kernel Version: 3.8.y with CONFIG_MODVERSIONS=y
27 24
@@ -32,11 +29,11 @@ SGX kernel modules source is located in sgx_src/eurasia_km/
32 29
33Make sure kernel is built before building modules 30Make sure kernel is built before building modules
34 31
35# cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/ 32# cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/
36# export KERNELDIR=path_to_kernel 33# export KERNELDIR=path_to_kernel
37 34
38To build for OMAP5 (SGX 544 multi core): 35To build for OMAP5 (SGX 544 multi core):
39# make ARCH=arm CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="omap5sevm" BUILD=release TARGET_SGX=544es2 36# make ARCH=arm CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="jacinto6evm" BUILD=release
40 37
41Once the .ko is built, install it onto device (/system/lib/modules) 38Once the .ko is built, install it onto device (/system/lib/modules)
42 39
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index 9d1683b..abe7a53 100644
--- a/jacinto6/sgx.tgz
+++ b/jacinto6/sgx.tgz
Binary files differ
diff --git a/jacinto6/sgx/Android.mk b/jacinto6/sgx/Android.mk
index 128a06d..aa082fa 100644
--- a/jacinto6/sgx/Android.mk
+++ b/jacinto6/sgx/Android.mk
@@ -94,28 +94,28 @@ $$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
94endef 94endef
95 95
96prebuilt_sgx_vendor_libs := \ 96prebuilt_sgx_vendor_libs := \
97 lib/libIMGegl_SGX544_116.so \ 97 lib/libIMGegl.so \
98 lib/libglslcompiler_SGX544_116.so \ 98 lib/libglslcompiler.so \
99 lib/libusc_SGX544_116.so \ 99 lib/libusc.so \
100 lib/libPVRScopeServices_SGX544_116.so \ 100 lib/libPVRScopeServices.so \
101 lib/libsrv_um_SGX544_116.so \ 101 lib/libsrv_um.so \
102 lib/hw/gralloc.jacinto6.so \ 102 lib/hw/gralloc.jacinto6.so \
103 lib/libpvrANDROID_WSEGL_SGX544_116.so \ 103 lib/libpvrANDROID_WSEGL.so \
104 lib/libpvr2d_SGX544_116.so \ 104 lib/libpvr2d.so \
105 lib/libsrv_init_SGX544_116.so \ 105 lib/libsrv_init.so \
106 lib/egl/libGLESv1_CM_POWERVR_SGX544_116.so \ 106 lib/egl/libGLESv1_CM_POWERVR_SGX544_116.so \
107 lib/egl/libGLESv2_POWERVR_SGX544_116.so \ 107 lib/egl/libGLESv2_POWERVR_SGX544_116.so \
108 lib/egl/libEGL_POWERVR_SGX544_116.so 108 lib/egl/libEGL_POWERVR_SGX544_116.so
109 109
110prebuilt_sgx_vendor_bins := \ 110prebuilt_sgx_vendor_bins := \
111 bin/pvrsrvinit \ 111 bin/pvrsrvinit \
112 bin/pvrsrvctl_SGX544_116 112 bin/pvrsrvctl
113 113
114prebuilt_sgx_vendor_etc := \ 114#prebuilt_sgx_vendor_etc := \
115 etc/powervr.ini 115# etc/powervr.ini
116 116
117prebuilt_sgx_vendor_km := \ 117prebuilt_sgx_vendor_km := \
118 modules/pvrsrvkm_sgx544_116.ko 118 modules/pvrsrvkm.ko
119 119
120prebuilt_sgx_modules := \ 120prebuilt_sgx_modules := \
121 $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc) $(prebuilt_sgx_vendor_km),\ 121 $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc) $(prebuilt_sgx_vendor_km),\
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 a1a7eef..d04aa7b 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
@@ -79,6 +79,7 @@ help:
79 @echo ' make, make build Build all components of the build' 79 @echo ' make, make build Build all components of the build'
80 @echo ' make components Build only the user-mode components' 80 @echo ' make components Build only the user-mode components'
81 @echo ' make kbuild Build only the kernel-mode components' 81 @echo ' make kbuild Build only the kernel-mode components'
82 @echo ' make docs Build the build's supporting documentation'
82 @echo ' make MODULE Build the module MODULE and all of its dependencies' 83 @echo ' make MODULE Build the module MODULE and all of its dependencies'
83 @echo ' make eurasiacon/binary2_.../target/libsomething.so' 84 @echo ' make eurasiacon/binary2_.../target/libsomething.so'
84 @echo ' Build a particular file (including intermediates)' 85 @echo ' Build a particular file (including intermediates)'
@@ -104,9 +105,11 @@ ifneq ($(filter help,$(D)),)
104empty := 105empty :=
105space := $(empty) $(empty) 106space := $(empty) $(empty)
106$(info Debug options) 107$(info Debug options)
107$(info $(space)D=modules dump module info) 108$(info $(space)D=modules dump module info)
108$(info $(space)D=freeze-config prevent config changes) 109$(info $(space)D=config dump all config options + type and origin)
109$(info $(space)D=config-changes dump diffs when config changes) 110$(info $(space)D=freeze-config prevent config changes)
110$(info Options may be combined: make D=freeze-config,config-changes) 111$(info $(space)D=config-changes dump diffs when config changes)
112$(info $(space)D=nobuild stop before running the main build)
113$(info Options can be combined: make D=freeze-config,config-changes)
111$(error D=help given) 114$(error D=help given)
112endif 115endif
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 24fa829..ce0608c 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
@@ -42,12 +42,32 @@
42# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 42# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43### ########################################################################### 43### ###########################################################################
44 44
45# NOTE: You must *not* use the cc-option et al macros in COMMON_FLAGS,
46# COMMON_CFLAGS or COMMON_USER_FLAGS. These flags are shared between
47# host and target, which might use compilers with different capabilities.
48
49# These flags are used for kernel, User C and User C++
50#
51COMMON_FLAGS := -W -Wall
52
53# Some GCC warnings are C only, so we must mask them from C++
54#
55COMMON_CFLAGS := $(COMMON_FLAGS) \
56 -Wdeclaration-after-statement -Wno-format-zero-length \
57 -Wstrict-prototypes
58
59# User C and User C++ optimization control. Does not affect kernel.
60#
45ifeq ($(BUILD),debug) 61ifeq ($(BUILD),debug)
46COMMON_USER_FLAGS := -O0 62COMMON_USER_FLAGS := -O0
47else 63else
48OPTIM ?= -O2 64OPTIM ?= -O2
65ifeq ($(USE_LTO),1)
66COMMON_USER_FLAGS := $(OPTIM) -flto
67else
49COMMON_USER_FLAGS := $(OPTIM) 68COMMON_USER_FLAGS := $(OPTIM)
50endif 69endif
70endif
51 71
52# FIXME: We should probably audit the driver for aliasing 72# FIXME: We should probably audit the driver for aliasing
53# 73#
@@ -58,26 +78,40 @@ COMMON_USER_FLAGS += -fno-strict-aliasing
58# 78#
59COMMON_USER_FLAGS += -g 79COMMON_USER_FLAGS += -g
60 80
61# These flags are used for kernel, User C and User C++ 81# User C and User C++ warning flags
62#
63COMMON_FLAGS = -W -Wall
64
65# Some GCC warnings are C only, so we must mask them from C++
66# 82#
67COMMON_CFLAGS := $(COMMON_FLAGS) \ 83COMMON_USER_FLAGS += \
68 -Wdeclaration-after-statement -Wno-format-zero-length \ 84 -Wpointer-arith -Wunused-parameter \
69 -Wmissing-prototypes -Wstrict-prototypes 85 -Wmissing-format-attribute
70 86
71# Additional warnings, and optional warnings. 87# Additional warnings, and optional warnings.
72# 88#
73WARNING_CFLAGS := \ 89TESTED_TARGET_USER_FLAGS := \
74 -Wpointer-arith -Wunused-parameter \
75 -Wmissing-format-attribute \
76 $(call cc-option,-Wno-missing-field-initializers) \ 90 $(call cc-option,-Wno-missing-field-initializers) \
77 $(call cc-option,-fdiagnostics-show-option) 91 $(call cc-option,-fdiagnostics-show-option) \
92 $(call cc-option,-Wno-self-assign) \
93 $(call cc-option,-Wno-parentheses-equality)
94TESTED_HOST_USER_FLAGS := \
95 $(call host-cc-option,-Wno-missing-field-initializers) \
96 $(call host-cc-option,-fdiagnostics-show-option) \
97 $(call host-cc-option,-Wno-self-assign) \
98 $(call host-cc-option,-Wno-parentheses-equality)
99
100# These flags are clang-specific.
101# -Wno-unused-command-line-argument works around a buggy interaction
102# with ccache, see https://bugzilla.samba.org/show_bug.cgi?id=8118
103# -fcolor-diagnostics force-enables colored error messages which
104# get disabled when ccache is piped through ccache.
105#
106TESTED_TARGET_USER_FLAGS += \
107 $(call cc-option,-Qunused-arguments) \
108 $(call cc-option,-fcolor-diagnostics)
109TESTED_HOST_USER_FLAGS += \
110 $(call host-cc-option,-Qunused-arguments) \
111 $(call host-cc-option,-fcolor-diagnostics)
78 112
79ifeq ($(W),1) 113ifeq ($(W),1)
80WARNING_CFLAGS += \ 114TESTED_TARGET_USER_FLAGS += \
81 $(call cc-option,-Wbad-function-cast) \ 115 $(call cc-option,-Wbad-function-cast) \
82 $(call cc-option,-Wcast-qual) \ 116 $(call cc-option,-Wcast-qual) \
83 $(call cc-option,-Wcast-align) \ 117 $(call cc-option,-Wcast-align) \
@@ -97,19 +131,7 @@ WARNING_CFLAGS += \
97 $(call cc-option,-Wswitch-default) \ 131 $(call cc-option,-Wswitch-default) \
98 $(call cc-option,-Wvla) \ 132 $(call cc-option,-Wvla) \
99 $(call cc-option,-Wwrite-strings) 133 $(call cc-option,-Wwrite-strings)
100endif 134TESTED_HOST_USER_FLAGS += \
101
102WARNING_CFLAGS += \
103 $(call cc-optional-warning,-Wunused-but-set-variable)
104
105HOST_WARNING_CFLAGS := \
106 -Wpointer-arith -Wunused-parameter \
107 -Wmissing-format-attribute \
108 $(call host-cc-option,-Wno-missing-field-initializers) \
109 $(call host-cc-option,-fdiagnostics-show-option)
110
111ifeq ($(W),1)
112HOST_WARNING_CFLAGS += \
113 $(call host-cc-option,-Wbad-function-cast) \ 135 $(call host-cc-option,-Wbad-function-cast) \
114 $(call host-cc-option,-Wcast-qual) \ 136 $(call host-cc-option,-Wcast-qual) \
115 $(call host-cc-option,-Wcast-align) \ 137 $(call host-cc-option,-Wcast-align) \
@@ -131,12 +153,20 @@ HOST_WARNING_CFLAGS += \
131 $(call host-cc-option,-Wwrite-strings) 153 $(call host-cc-option,-Wwrite-strings)
132endif 154endif
133 155
134HOST_WARNING_CFLAGS += \ 156TESTED_TARGET_USER_FLAGS += \
157 $(call cc-optional-warning,-Wunused-but-set-variable)
158TESTED_HOST_USER_FLAGS += \
135 $(call host-cc-optional-warning,-Wunused-but-set-variable) 159 $(call host-cc-optional-warning,-Wunused-but-set-variable)
136 160
137KBUILD_WARNING_CFLAGS := \ 161KBUILD_FLAGS := \
138 -Wno-unused-parameter -Wno-sign-compare 162 -Wno-unused-parameter -Wno-sign-compare
139KBUILD_WARNING_CFLAGS += \ 163
164TESTED_KBUILD_FLAGS := \
165 $(call kernel-cc-option,-Wmissing-include-dirs) \
166 $(call kernel-cc-option,-Wno-type-limits) \
167 $(call kernel-cc-option,-Wno-pointer-arith) \
168 $(call kernel-cc-option,-Wno-aggregate-return) \
169 $(call kernel-cc-option,-Wno-unused-but-set-variable) \
140 $(call kernel-cc-optional-warning,-Wbad-function-cast) \ 170 $(call kernel-cc-optional-warning,-Wbad-function-cast) \
141 $(call kernel-cc-optional-warning,-Wcast-qual) \ 171 $(call kernel-cc-optional-warning,-Wcast-qual) \
142 $(call kernel-cc-optional-warning,-Wcast-align) \ 172 $(call kernel-cc-optional-warning,-Wcast-align) \
@@ -161,22 +191,31 @@ KBUILD_WARNING_CFLAGS += \
161# User C only 191# User C only
162# 192#
163ALL_CFLAGS := \ 193ALL_CFLAGS := \
164 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \ 194 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(TESTED_TARGET_USER_FLAGS) \
165 $(SYS_CFLAGS) 195 $(SYS_CFLAGS)
166
167ALL_HOST_CFLAGS := \ 196ALL_HOST_CFLAGS := \
168 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS) 197 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(TESTED_HOST_USER_FLAGS)
169 198
170# User C++ only 199# User C++ only
171# 200#
172ALL_CXXFLAGS := \ 201ALL_CXXFLAGS := \
173 $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \
174 -fno-rtti -fno-exceptions \ 202 -fno-rtti -fno-exceptions \
175 -Wpointer-arith -Wunused-parameter \ 203 $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_TARGET_USER_FLAGS) \
176 $(SYS_CXXFLAGS) 204 $(SYS_CXXFLAGS)
177
178ALL_HOST_CXXFLAGS := \ 205ALL_HOST_CXXFLAGS := \
179 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall 206 -fno-rtti -fno-exceptions \
207 $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_HOST_USER_FLAGS)
208
209# Workaround for some target clangs that don't support -O0 w/ PIC.
210#
211ifeq ($(cc-is-clang),true)
212ALL_CFLAGS := $(patsubst -O0,-O1,$(ALL_CFLAGS))
213ALL_CXXFLAGS := $(patsubst -O0,-O1,$(ALL_CXXFLAGS))
214endif
215
216# Kernel C only
217#
218ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_FLAGS) $(TESTED_KBUILD_FLAGS)
180 219
181# User C and C++ 220# User C and C++
182# 221#
@@ -186,27 +225,28 @@ ALL_HOST_CXXFLAGS := \
186# We can't use it right now because we want to support non-GNU-compatible 225# We can't use it right now because we want to support non-GNU-compatible
187# linkers like the Darwin 'ld' which doesn't support -rpath-link. 226# linkers like the Darwin 'ld' which doesn't support -rpath-link.
188# 227#
228# For the same reason (Darwin 'ld') don't bother checking for text
229# relocations in host binaries.
230#
189ALL_HOST_LDFLAGS := -L$(HOST_OUT) 231ALL_HOST_LDFLAGS := -L$(HOST_OUT)
190ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT) 232ALL_LDFLAGS := \
233 -Wl,--warn-shared-textrel \
234 -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
191 235
192ifneq ($(strip $(TOOLCHAIN)),) 236ifneq ($(strip $(TOOLCHAIN)),)
193ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib 237ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib
194endif 238endif
195 239
240ifneq ($(strip $(TOOLCHAIN2)),)
241ALL_LDFLAGS += -L$(TOOLCHAIN2)/lib -Xlinker -rpath-link=$(TOOLCHAIN2)/lib
242endif
243
196ifneq ($(strip $(LINKER_RPATH)),) 244ifneq ($(strip $(LINKER_RPATH)),)
197ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH)) 245ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH))
198endif 246endif
199 247
200ALL_LDFLAGS += $(SYS_LDFLAGS) 248ALL_LDFLAGS += $(SYS_LDFLAGS)
201 249
202# Kernel C only
203#
204ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_WARNING_CFLAGS) \
205 $(call kernel-cc-option,-Wno-type-limits) \
206 $(call kernel-cc-option,-Wno-pointer-arith) \
207 $(call kernel-cc-option,-Wno-aggregate-return) \
208 $(call kernel-cc-option,-Wno-unused-but-set-variable)
209
210# This variable contains a list of all modules built by kbuild 250# This variable contains a list of all modules built by kbuild
211ALL_KBUILD_MODULES := 251ALL_KBUILD_MODULES :=
212 252
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 25e5ed1..093bb1c 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
@@ -55,22 +55,20 @@ endef
55 55
56define target-o-from-one-c 56define 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) $(MODULE_INCLUDE_FLAGS) \ 58$(CC) -MD -c $(MODULE_CFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \
59 -include $(CONFIG_H) $< -o $@ 59 -include $(CONFIG_H) $< -o $@
60endef 60endef
61 61
62# We use $(CC) to compile C++ files, and expect it to detect that it's
63# compiling C++
64define host-o-from-one-cxx 62define host-o-from-one-cxx
65$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<)) 63$(if $(V),,@echo " HOST_CXX" $(call relative-to-top,$<))
66$(HOST_CC) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \ 64$(HOST_CXX) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
67 -include $(CONFIG_H) $< -o $@ 65 -include $(CONFIG_H) $< -o $@
68endef 66endef
69 67
70define target-o-from-one-cxx 68define target-o-from-one-cxx
71$(if $(V),,@echo " CC " $(call relative-to-top,$<)) 69$(if $(V),,@echo " CXX " $(call relative-to-top,$<))
72$(CC) -MD -c $(MODULE_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \ 70$(CXX) -MD -c $(MODULE_CXXFLAGS) $(SYS_INCLUDES) $(MODULE_INCLUDE_FLAGS) \
73 -include $(CONFIG_H) $< -o $@ 71 -include $(CONFIG_H) $< -o $@
74endef 72endef
75 73
76define host-executable-from-o 74define host-executable-from-o
@@ -98,7 +96,7 @@ endef
98define target-executable-cxx-from-o 96define target-executable-cxx-from-o
99$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 97$(if $(V),,@echo " LD " $(call relative-to-top,$@))
100$(CXX) \ 98$(CXX) \
101 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 99 $(SYS_EXE_LDFLAGS_CXX) $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
102 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \ 100 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
103 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 101 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
104endef 102endef
@@ -116,11 +114,29 @@ endef
116define target-shared-library-cxx-from-o 114define target-shared-library-cxx-from-o
117$(if $(V),,@echo " LD " $(call relative-to-top,$@)) 115$(if $(V),,@echo " LD " $(call relative-to-top,$@))
118$(CXX) -shared -Wl,-Bsymbolic \ 116$(CXX) -shared -Wl,-Bsymbolic \
119 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \ 117 $(SYS_LIB_LDFLAGS_CXX) $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
120 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \ 118 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
121 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC) 119 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
122endef 120endef
123 121
122define host-shared-library-from-o
123$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
124$(HOST_CC) -shared -Wl,-Bsymbolic \
125 $(MODULE_HOST_LDFLAGS) -o $@ \
126 $(sort $(MODULE_ALL_OBJECTS)) \
127 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS)
128endef
129
130# If there were any C++ source files in a shared library, we use this recipe,
131# which runs the C++ compiler to link the final library
132define host-shared-library-cxx-from-o
133$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
134$(HOST_CXX) -shared -Wl,-Bsymbolic \
135 $(MODULE_HOST_LDFLAGS) -o $@ \
136 $(sort $(MODULE_ALL_OBJECTS)) \
137 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS)
138endef
139
124define target-copy-debug-information 140define target-copy-debug-information
125$(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg 141$(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg
126endef 142endef
@@ -182,38 +198,64 @@ JAVA ?= java
182JAVAC ?= javac 198JAVAC ?= javac
183ZIP ?= zip 199ZIP ?= zip
184 200
185override AR := $(if $(V),,@)$(CROSS_COMPILE)ar 201ifeq ($(USE_CCACHE),1)
186override BISON := $(if $(V),,@)$(BISON) 202CCACHE ?= ccache
187override BZIP2 := $(if $(V),,@)bzip2 -9 203endif
188override CC := $(if $(V),,@)$(CROSS_COMPILE)$(CC) 204
189override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh 205# Define CHMOD and CC_CHECK first so we can use cc-is-clang
190override CXX := $(if $(V),,@)$(CROSS_COMPILE)$(CXX) 206#
191override CHMOD := $(if $(V),,@)chmod 207override CHMOD := $(if $(V),,@)chmod
192override CP := $(if $(V),,@)cp 208override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh
193override ECHO := $(if $(V),,@)echo 209
194override FLEX := $(if $(V),,@)flex 210# If clang is detected, the compiler name is invariant but CROSS_COMPILE
195override GAWK := $(if $(V),,@)gawk 211# is reflected in the use of -target. For GCC this is always encoded into
196override GREP := $(if $(V),,@)grep 212# the binary. If CROSS_COMPILE is not set we can skip this.
197override HOST_AR := $(if $(V),,@)ar 213#
198override HOST_CC := $(if $(V),,@)$(HOST_CC) 214ifneq ($(CROSS_COMPILE),)
199override HOST_CXX := $(if $(V),,@)$(HOST_CXX) 215ifeq ($(cc-is-clang),true)
200override HOST_STRIP := $(if $(V),,@)strip 216override CC := $(if $(V),,@)$(CCACHE) $(CC) \
201override INSTALL := $(if $(V),,@)install 217 -target $(patsubst %-,%,$(CROSS_COMPILE)) \
202override JAR := $(if $(V),,@)$(JAR) 218 -B$(dir $(shell which $(CROSS_COMPILE)gcc))
203override JAVA := $(if $(V),,@)$(JAVA) 219override CXX := $(if $(V),,@)$(CCACHE) $(CXX) \
204override JAVAC := $(if $(V),,@)$(JAVAC) 220 -target $(patsubst %-,%,$(CROSS_COMPILE)) \
205override M4 := $(if $(V),,@)m4 221 -B$(dir $(shell which $(CROSS_COMPILE)gcc))
206override MKDIR := $(if $(V),,@)mkdir 222else
207override MV := $(if $(V),,@)mv 223override CC := $(if $(V),,@)$(CCACHE) $(CROSS_COMPILE)$(CC)
208override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy 224override CXX := $(if $(V),,@)$(CCACHE) $(CROSS_COMPILE)$(CXX)
209override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm 225endif
210override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib 226else
211override RM := $(if $(V),,@)rm -f 227override CC := $(if $(V),,@)$(CCACHE) $(CC)
212override SED := $(if $(V),,@)sed 228override CXX := $(if $(V),,@)$(CCACHE) $(CXX)
213override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip 229endif
214override TAR := $(if $(V),,@)tar 230
215override TOUCH := $(if $(V),,@)touch 231override AR := $(if $(V),,@)$(CROSS_COMPILE)ar
216override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm 232override BISON := $(if $(V),,@)$(BISON)
217override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink 233override BZIP2 := $(if $(V),,@)bzip2 -9
218override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc 234override CP := $(if $(V),,@)cp
219override ZIP := $(if $(V),,@)$(ZIP) 235override ECHO := $(if $(V),,@)echo
236override FLEX := $(if $(V),,@)flex
237override GAWK := $(if $(V),,@)gawk
238override GREP := $(if $(V),,@)grep
239override HOST_AR := $(if $(V),,@)ar
240override HOST_CC := $(if $(V),,@)$(CCACHE) $(HOST_CC)
241override HOST_CXX := $(if $(V),,@)$(CCACHE) $(HOST_CXX)
242override HOST_STRIP := $(if $(V),,@)strip
243override INSTALL := $(if $(V),,@)install
244override JAR := $(if $(V),,@)$(JAR)
245override JAVA := $(if $(V),,@)$(JAVA)
246override JAVAC := $(if $(V),,@)$(JAVAC)
247override M4 := $(if $(V),,@)m4
248override MKDIR := $(if $(V),,@)mkdir
249override MV := $(if $(V),,@)mv
250override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy
251override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm
252override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib
253override RM := $(if $(V),,@)rm -f
254override SED := $(if $(V),,@)sed
255override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip
256override TAR := $(if $(V),,@)tar
257override TOUCH := $(if $(V),,@)touch
258override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm
259override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink
260override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc
261override ZIP := $(if $(V),,@)$(ZIP)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
index 23f9175..d658679 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,24 +38,55 @@
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
41ifeq ($(USE_CLANG),1)
42export CC := $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/bin/clang
43export CXX := $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/bin/clang++
44endif
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
41SYS_CFLAGS := \ 52SYS_CFLAGS := \
42 -fno-short-enums \ 53 -fno-short-enums \
43 -funwind-tables \ 54 -funwind-tables \
44 -D__linux__ \ 55 -D__linux__
45 -I$(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \ 56SYS_INCLUDES := \
46 -I$(ANDROID_ROOT)/bionic/libc/include \ 57 -isystem $(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
47 -I$(ANDROID_ROOT)/bionic/libc/kernel/common \ 58 -isystem $(ANDROID_ROOT)/bionic/libc/include \
48 -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \ 59 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/common \
49 -I$(ANDROID_ROOT)/bionic/libm/include \ 60 -isystem $(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \
50 -I$(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \ 61 -isystem $(ANDROID_ROOT)/bionic/libm/include \
51 -I$(ANDROID_ROOT)/bionic/libthread_db/include \ 62 -isystem $(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \
52 -I$(ANDROID_ROOT)/frameworks/base/include \ 63 -isystem $(ANDROID_ROOT)/bionic/libthread_db/include \
64 -isystem $(ANDROID_ROOT)/frameworks/base/include \
53 -isystem $(ANDROID_ROOT)/system/core/include \ 65 -isystem $(ANDROID_ROOT)/system/core/include \
54 -I$(ANDROID_ROOT)/hardware/libhardware/include \ 66 -isystem $(ANDROID_ROOT)/hardware/libhardware/include \
55 -I$(ANDROID_ROOT)/external/openssl/include 67 -isystem $(ANDROID_ROOT)/external/openssl/include \
68 -isystem $(ANDROID_ROOT)/system/media/camera/include \
69 -isystem $(ANDROID_ROOT)/hardware/libhardware_legacy/include
70
71# This is comparing PVR_BUILD_DIR to see if it is omap and adding
72# includes required for it's HWC
73ifeq ($(notdir $(abspath .)),omap_android)
74SYS_INCLUDES += \
75 -isystem $(ANDROID_ROOT)/hardware/ti/omap4xxx/kernel-headers
76endif
77
78ifeq ($(_CLANG),true)
79SYS_INCLUDES := \
80 -nostdinc $(SYS_INCLUDES) \
81 -isystem $(ANDROID_ROOT)/external/clang/lib/include
82endif
56 83
57SYS_EXE_LDFLAGS := \ 84SYS_EXE_LDFLAGS := \
58 -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \ 85 -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \
59 -lc -ldl -lcutils 86 -lc -ldl -lcutils
60 87
61SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS) 88SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS)
89
90SYS_EXE_LDFLAGS_CXX := -lstdc++
91
92SYS_LIB_LDFLAGS_CXX := $(SYS_EXE_LDFLAGS_CXX)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
index 8c3f937..7718aa9 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
@@ -38,16 +38,23 @@
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
41OPTIM := -Os 41OPTIM := -O2
42 42
43ANDROID_ARCH := arm 43ANDROID_ARCH := arm
44include ../common/android/arch_common.mk 44include ../common/android/arch_common.mk
45 45
46SYS_CFLAGS += -march=armv7-a 46SYS_CFLAGS += -march=armv7-a
47 47
48ifneq ($(BUILD),debug)
49SYS_CFLAGS += -mthumb
50endif
51
48SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o 52SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o
49SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o 53SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o
50 54
55SYS_LIB_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_so.o
56SYS_LIB_CRTEND := $(TOOLCHAIN)/lib/crtend_so.o
57
51# Handle the removal of the armelf.x and armelf.xsc linker scripts. 58# Handle the removal of the armelf.x and armelf.xsc linker scripts.
52ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),) 59ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),)
53# The linker scripts have been removed. We need to use these options 60# The linker scripts have been removed. We need to use these options
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 320804e..b5dd754 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
@@ -44,4 +44,9 @@ $(eval $(call BothConfigC,ANDROID,))
44 44
45 45
46 46
47$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_ANDROID_SYSTRACE,))
47 48
49$(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_ANDROID_SYSTRACE,))
50
51$(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
52$(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
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 8a60fb7..3de2205 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
@@ -49,6 +49,10 @@ SUPPORT_OPENGLES1_V1_ONLY := 1
49# 49#
50SUPPORT_MEMINFO_IDS := 1 50SUPPORT_MEMINFO_IDS := 1
51 51
52# Enable services ion support by default
53#
54#SUPPORT_ION ?= 1
55
52# Need multi-process support in PDUMP 56# Need multi-process support in PDUMP
53# 57#
54SUPPORT_PDUMP_MULTI_PROCESS := 1 58SUPPORT_PDUMP_MULTI_PROCESS := 1
@@ -65,9 +69,6 @@ OPK_DEFAULT := libpvrANDROID_WSEGL.so
65# before EGL_image_external was generally available. 69# before EGL_image_external was generally available.
66# 70#
67KERNEL_COMPONENTS := srvkm 71KERNEL_COMPONENTS := srvkm
68ifeq ($(is_at_least_honeycomb),0)
69KERNEL_COMPONENTS += bufferclass_example
70endif
71 72
72# Kernel modules are always installed here under Android 73# Kernel modules are always installed here under Android
73# 74#
@@ -100,52 +101,27 @@ SUPPORT_LARGE_GENERAL_HEAP := 1
100PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400 101PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
101 102
102############################################################################## 103##############################################################################
103# EGL connect/disconnect hooks only available since Froyo 104# Framebuffer target extension is used to find configs compatible with
104# Obsolete in future versions 105# the framebuffer (added in JB MR1).
105#
106ifeq ($(is_at_least_froyo),1)
107ifeq ($(is_at_least_icecream_sandwich),0)
108PVR_ANDROID_HAS_CONNECT_DISCONNECT := 1
109endif
110endif
111
112##############################################################################
113# Override surface field name for older versions
114# 106#
115ifeq ($(is_at_least_gingerbread),0) 107EGL_EXTENSION_ANDROID_FRAMEBUFFER_TARGET := 1
116PVR_ANDROID_SURFACE_FIELD_NAME := \"mSurface\"
117endif
118
119##############################################################################
120# Provide ANativeWindow{Buffer,} typedefs for older versions
121#
122ifeq ($(is_at_least_gingerbread),0)
123PVR_ANDROID_NEEDS_ANATIVEWINDOW_TYPEDEF := 1
124endif
125ifeq ($(is_at_least_icecream_sandwich),0)
126PVR_ANDROID_NEEDS_ANATIVEWINDOWBUFFER_TYPEDEF := 1
127endif
128 108
129############################################################################## 109##############################################################################
130# Handle various platform includes for unittests 110# Handle various platform includes for unittests
131# 111#
132UNITTEST_INCLUDES := eurasiacon/android 112UNITTEST_INCLUDES := \
133 113 eurasiacon/android \
134ifeq ($(is_at_least_gingerbread),1) 114 $(ANDROID_ROOT)/frameworks/base/native/include
135UNITTEST_INCLUDES += $(ANDROID_ROOT)/frameworks/base/native/include
136endif
137 115
138ifeq ($(is_at_least_jellybean),1) 116ifeq ($(is_at_least_jellybean),1)
139UNITTEST_INCLUDES += \ 117UNITTEST_INCLUDES += \
140 $(ANDROID_ROOT)/frameworks/native/include \ 118 $(ANDROID_ROOT)/frameworks/native/include \
141 $(ANDROID_ROOT)/frameworks/native/opengl/include \ 119 $(ANDROID_ROOT)/frameworks/native/opengl/include \
142 $(ANDROID_ROOT)/libnativehelper/include 120 $(ANDROID_ROOT)/libnativehelper/include/nativehelper
143# FIXME: This is the old location for the JNI header.
144UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include
145else 121else
146UNITTEST_INCLUDES += \ 122UNITTEST_INCLUDES += \
147 $(ANDROID_ROOT)/frameworks/base/opengl/include \ 123 $(ANDROID_ROOT)/frameworks/base/opengl/include \
148 $(ANDROID_ROOT)/dalvik/libnativehelper/include 124 $(ANDROID_ROOT)/dalvik/libnativehelper/include/nativehelper
149endif 125endif
150 126
151# But it doesn't have OpenVG headers 127# But it doesn't have OpenVG headers
@@ -155,13 +131,8 @@ UNITTEST_INCLUDES += eurasiacon/unittests/include
155############################################################################## 131##############################################################################
156# Future versions moved proprietary libraries to a vendor directory 132# Future versions moved proprietary libraries to a vendor directory
157# 133#
158ifeq ($(is_at_least_gingerbread),1)
159SHLIB_DESTDIR := /system/vendor/lib 134SHLIB_DESTDIR := /system/vendor/lib
160DEMO_DESTDIR := /system/vendor/bin 135DEMO_DESTDIR := /system/vendor/bin
161else
162SHLIB_DESTDIR := /system/lib
163DEMO_DESTDIR := /system/bin
164endif
165 136
166# EGL libraries go in a special place 137# EGL libraries go in a special place
167# 138#
@@ -170,153 +141,154 @@ EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
170############################################################################## 141##############################################################################
171# We can support OpenCL in the build since Froyo (stlport was added in 2.2) 142# We can support OpenCL in the build since Froyo (stlport was added in 2.2)
172# 143#
173ifeq ($(is_at_least_froyo),1) 144SYS_CXXFLAGS := -fuse-cxa-atexit $(SYS_CFLAGS)
174SYS_CXXFLAGS := \ 145SYS_INCLUDES += \
175 -fuse-cxa-atexit \ 146 -isystem $(ANDROID_ROOT)/bionic \
176 $(SYS_CFLAGS) \ 147 -isystem $(ANDROID_ROOT)/external/stlport/stlport
177 -I$(ANDROID_ROOT)/bionic \
178 -I$(ANDROID_ROOT)/external/stlport/stlport
179else
180SYS_CXXFLAGS := \
181 $(SYS_CFLAGS) \
182 -I$(ANDROID_ROOT)/bionic/libstdc++/include
183endif
184 148
185############################################################################## 149##############################################################################
186# Composition bypass feature, supported since Froyo. 150# Support the OES_EGL_image_external extensions in the client drivers.
187# In ICS, hardware composer (HWC) should be used instead.
188# 151#
189ifeq ($(is_at_least_froyo),1) 152GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
190ifeq ($(is_at_least_honeycomb),0) 153GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
191PVR_ANDROID_HAS_NATIVE_BUFFER_TRANSFORM := 1
192SUPPORT_ANDROID_COMPOSITION_BYPASS := 1
193endif
194endif
195 154
196############################################################################## 155##############################################################################
197# In ICS, we have hardware composer (HWC) support. 156# ICS requires that at least one driver EGLConfig advertises the
157# EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
158# rendered with this config can be consumed by an OMX video encoder.
198# 159#
199# SUPPORT_ANDROID_COMPOSER_HAL adds Post2() to the framebuffer HAL interface 160EGL_EXTENSION_ANDROID_RECORDABLE := 1
200# and is intended for inter-op with external HWC modules. It is always 161
201# enabled (but we allow it to be compiled out just in case). 162##############################################################################
163# ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
164# extension in EGL/GLESv2.
202# 165#
203# SUPPORT_ANDROID_COMPOSITION_BYPASS adds a new buffer type (client buffers 166EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
204# allocated from the framebuffer pool) which maximizes compatibility with 167
205# most 3rdparty display controllers. It is orthogonal to HWC support. 168##############################################################################
169# ICS and earlier should rate-limit composition by waiting for 3D renders
170# to complete in the compositor's eglSwapBuffers().
206# 171#
207ifeq ($(is_at_least_honeycomb),1) 172ifeq ($(is_at_least_jellybean),0)
208SUPPORT_ANDROID_COMPOSER_HAL := 1 173PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
209endif 174endif
210 175
211############################################################################## 176##############################################################################
212# We have some extra GRALLOC_USAGE bits we need to handle in ICS 177# JB added a new corkscrew API for userland backtracing.
213# 178#
214ifeq ($(is_at_least_honeycomb),1) 179ifeq ($(is_at_least_jellybean),1)
215PVR_ANDROID_HAS_GRALLOC_USAGE_EXTERNAL_DISP := 1 180PVR_ANDROID_HAS_CORKSCREW_API := 1
216PVR_ANDROID_HAS_GRALLOC_USAGE_PROTECTED := 1
217PVR_ANDROID_HAS_GRALLOC_USAGE_PRIVATE := 1
218endif 181endif
219 182
220############################################################################## 183##############################################################################
221# Support the new OES_EGL_image_external extension + YV12 buffers 184# JB MR1 makes the framebuffer HAL obsolete.
222# 185#
223ifeq ($(is_at_least_honeycomb),1) 186# We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
224PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YV12 := 1 187# framebuffers and GPU buffers in a 'preferred' format.
225GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1 188#
226GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1 189ifeq ($(is_at_least_jellybean_mr1),0)
190SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
191else
192PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
227endif 193endif
228 194
229############################################################################## 195##############################################################################
230# Gingerbread adds the native window cancelBuffer operation 196# JB MR1 introduces cross-process syncs associated with a fd.
197# This requires a new enough kernel version to have the base/sync driver.
231# 198#
232ifeq ($(is_at_least_gingerbread),1) 199ifeq ($(is_at_least_jellybean_mr1),1)
233PVR_ANDROID_HAS_CANCELBUFFER := 1 200EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC := 0
201PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC := 0
234endif 202endif
235 203
236############################################################################## 204##############################################################################
237# Versions prior to ICS have another header we must include 205# JB MR1 introduces new usage bits for the camera HAL and some new formats.
238# 206#
239ifeq ($(is_at_least_icecream_sandwich),0) 207ifeq ($(is_at_least_jellybean_mr1),1)
240PVR_ANDROID_HAS_ANDROID_NATIVE_BUFFER_H := 1 208PVR_ANDROID_HAS_GRALLOC_USAGE_HW_CAMERA := 1
209PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAW_SENSOR := 1
210PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_BLOB := 1
241endif 211endif
242 212
243############################################################################## 213##############################################################################
244# ICS added dump() hook to gralloc alloc_device_t API 214# JB MR2 adds a new graphics HAL (gralloc) API function, lock_ycbcr(), and
215# a so-called "flexible" YUV format enum.
245# 216#
246ifeq ($(is_at_least_honeycomb),1) 217ifeq ($(is_at_least_jellybean_mr2),1)
247PVR_ANDROID_HAS_GRALLOC_DUMP := 1 218PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YCbCr_420_888 := 1
219PVR_ANDROID_GRALLOC_HAS_0_2_FEATURES := 1
248endif 220endif
249 221
250############################################################################## 222##############################################################################
251# ICS added support for the BGRX pixel format, and allows drivers to advertise 223# In JB MR2 we can use a native helper library for the unittest wrapper.
252# configs in this format instead of RGBX. 224# In earlier versions, we must use a less ideal approach.
253# 225#
254# The DDK provides a private definition of HAL_PIXEL_FORMAT_BGRX_8888. This 226ifeq ($(is_at_least_jellybean_mr2),0)
255# option exposes it as the native visual for 8888 configs with alpha ignored 227PVR_ANDROID_SURFACE_FIELD_NAME := \"mNativeSurface\"
228endif
229
230##############################################################################
231# JB MR2 introduces two new camera HAL formats (Y8, Y16)
256# 232#
257ifeq ($(is_at_least_icecream_sandwich),1) 233ifeq ($(is_at_least_jellybean_mr2),1)
258SUPPORT_HAL_PIXEL_FORMAT_BGRX := 1 234PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y8 := 1
235PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y16 := 1
259endif 236endif
260 237
261############################################################################## 238##############################################################################
262# ICS added the ability for GL clients to pre-rotate their rendering to the 239# KK's EGL wrapper remaps EGLConfigs in the BGRA and BGRX formats to RGBA and
263# orientation desired by the compositor. The SGX DDK can use TRANSFORM_HINT 240# RGBX respectively, for CpuConsumer compatibility. It does this because the
264# to access this functionality. 241# usage bits for the gralloc allocation are not available to EGL.
265# 242#
266# This is required by some HWC implementations that cannot use the display 243# In this newer platform version, gralloc has been redefined to allow the
267# to rotate buffers, otherwise the HWC optimization cannot be used when 244# 'format' parameter to gralloc->alloc() to be ignored for non-USAGE_SW
268# rotating the device. 245# allocations, so long as the bits per channel and sRGB-ness are preserved.
269# 246#
270ifeq ($(is_at_least_icecream_sandwich),1) 247ifeq ($(is_at_least_kitkat),1)
271PVR_ANDROID_HAS_WINDOW_TRANSFORM_HINT := 1 248PVR_ANDROID_REMAP_HW_ONLY_PIXEL_FORMATS := 1
272endif 249endif
273 250
274############################################################################## 251##############################################################################
275# ICS requires that at least one driver EGLConfig advertises the 252# Workaround for texture atlas "double registerBuffer" issue in KK
276# EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
277# rendered with this config can be consumed by an OMX video encoder.
278# 253#
279ifeq ($(is_at_least_icecream_sandwich),1) 254ifeq ($(is_at_least_kitkat),1)
280EGL_EXTENSION_ANDROID_RECORDABLE := 1 255PVR_ANDROID_DONT_ENFORCE_SINGLE_REGISTER := 1
281endif 256endif
282 257
283############################################################################## 258##############################################################################
284# ICS added a new usage bit. USAGE_HW_COMPOSER indicates that a buffer might 259# Support newer HWC features in KK
285# be used with HWComposer. In practice this is all non-MM buffers.
286# 260#
287ifeq ($(is_at_least_icecream_sandwich),1) 261ifeq ($(is_at_least_kitkat),1)
288PVR_ANDROID_HAS_GRALLOC_USAGE_HW_COMPOSER := 1 262PVR_ANDROID_HWC_HAS_1_3_FEATURES := 1
289endif 263endif
290 264
291############################################################################## 265##############################################################################
292# ICS added the EGL_ANDROID_blob_cache extension. Enable support for this 266# KK eliminated egl.cfg. Only create for older versions.
293# extension in EGL/GLESv2.
294# 267#
295ifeq ($(is_at_least_icecream_sandwich),1) 268ifeq ($(is_at_least_kitkat),0)
296EGL_EXTENSION_ANDROID_BLOB_CACHE := 1 269PVR_ANDROID_HAS_EGL_CFG := 1
297endif 270endif
298 271
299############################################################################## 272##############################################################################
300# ICS MR1 added a new usage bit. USAGE_HW_VIDEO_ENCODER indicates that a 273# KK has a bug in its browser that we need to work around.
301# buffer might be used with the video encoder.
302# 274#
303ifeq ($(is_at_least_icecream_sandwich_mr1),1) 275ifeq ($(is_at_least_kitkat),1)
304PVR_ANDROID_HAS_GRALLOC_USAGE_HW_VIDEO_ENCODER := 1 276PVR_ANDROID_RELAX_GRALLOC_MODULE_MAP_CHECKS := 1
305endif 277endif
306 278
307############################################################################## 279##############################################################################
308# ICS and earlier should rate-limit composition by waiting for 3D renders 280# KK's Camera HAL requires that ACTIVE_ARRAY_SIZE specify xmin/ymin first
309# to complete in the compositor's eglSwapBuffers().
310# 281#
311ifeq ($(is_at_least_jellybean),0) 282ifeq ($(is_at_least_kitkat),1)
312PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1 283PVR_ANDROID_CAMERA_ACTIVE_ARRAY_SIZE_HAS_XMIN_YMIN := 1
313endif 284endif
314 285
315############################################################################## 286##############################################################################
316# JB added a new corkscrew API for userland backtracing. 287# KitKat added a new memory tracking HAL. This enables gralloc support for
288# the GRAPHICS/GL memtrack types.
317# 289#
318ifeq ($(is_at_least_jellybean),1) 290ifeq ($(is_at_least_kitkat),1)
319PVR_ANDROID_HAS_CORKSCREW_API := 1 291SUPPORT_ANDROID_MEMTRACK_HAL := 1
320endif 292endif
321 293
322# Placeholder for future version handling 294# Placeholder for future version handling
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 5c8f000..9717ca9 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
@@ -40,6 +40,9 @@
40 40
41TARGET_BUILD_TYPE ?= release 41TARGET_BUILD_TYPE ?= release
42 42
43HOST_OS ?= linux
44HOST_ARCH ?= x86
45
43OUT_DIR ?= $(ANDROID_ROOT)/out 46OUT_DIR ?= $(ANDROID_ROOT)/out
44 47
45ifeq ($(TARGET_BUILD_TYPE),debug) 48ifeq ($(TARGET_BUILD_TYPE),debug)
@@ -48,6 +51,7 @@ else
48TARGET_ROOT := $(OUT_DIR)/target 51TARGET_ROOT := $(OUT_DIR)/target
49endif 52endif
50 53
51TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/obj 54TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/obj
55TOOLCHAIN2 ?= $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system
52 56
53LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name) 57LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
index 698efa3..482fd19 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,11 +41,11 @@
41# Figure out the version of Android we're building against. 41# Figure out the version of Android we're building against.
42# 42#
43PLATFORM_VERSION := $(shell \ 43PLATFORM_VERSION := $(shell \
44 if [ -f $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop ]; then \ 44 if [ -f $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop ]; then \
45 cat $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop | \ 45 cat $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop | \
46 grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \ 46 grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \
47 else \ 47 else \
48 echo 4.0.3; \ 48 echo 1.6; \
49 fi) 49 fi)
50 50
51define version-starts-with 51define version-starts-with
@@ -59,20 +59,22 @@ endef
59# final release of that version, so we set PLATFORM_VERSION to the 59# final release of that version, so we set PLATFORM_VERSION to the
60# corresponding release number. 60# corresponding release number.
61# 61#
62ifeq ($(call version-starts-with,Eclair),1) 62# NOTE: It's the _string_ ordering that matters here, not the version number
63PLATFORM_VERSION := 2.0 63# ordering. You need to make sure that strings that are sub-strings of other
64else ifeq ($(call version-starts-with,Froyo),1) 64# checked strings appear _later_ in this list.
65PLATFORM_VERSION := 2.2 65#
66else ifeq ($(call version-starts-with,Gingerbread),1) 66# e.g. 'JellyBeanMR' starts with 'JellyBean', but it is not JellyBean.
67PLATFORM_VERSION := 2.3 67#
68else ifeq ($(call version-starts-with,Honeycomb),1) 68ifeq ($(call version-starts-with,JellyBeanMR1),1)
69PLATFORM_VERSION := 3.0 69PLATFORM_VERSION := 4.2
70else ifeq ($(call version-starts-with,IceCreamSandwichMR),1) 70else ifeq ($(call version-starts-with,JellyBeanMR),1)
71PLATFORM_VERSION := 4.0.3 71PLATFORM_VERSION := 4.3
72else ifeq ($(call version-starts-with,IceCreamSandwich),1)
73PLATFORM_VERSION := 4.0
74else ifeq ($(call version-starts-with,JellyBean),1) 72else ifeq ($(call version-starts-with,JellyBean),1)
75PLATFORM_VERSION := 4.1 73PLATFORM_VERSION := 4.1
74else ifeq ($(call version-starts-with,KeyLimePie),1)
75PLATFORM_VERSION := 4.4
76else ifeq ($(call version-starts-with,KitKat),1)
77PLATFORM_VERSION := 4.4
76else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0) 78else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
77PLATFORM_VERSION := 5.0 79PLATFORM_VERSION := 5.0
78endif 80endif
@@ -89,31 +91,22 @@ endif
89 91
90# Macros to help categorize support for features and API_LEVEL for tests. 92# Macros to help categorize support for features and API_LEVEL for tests.
91# 93#
92is_at_least_eclair := \ 94is_at_least_jellybean := \
93 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \ 95 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
94 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \ 96 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
95 test $(PLATFORM_VERSION_MIN) -ge 0 ) ) && echo 1 || echo 0) 97 test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0)
96is_at_least_froyo := \ 98is_at_least_jellybean_mr1 := \
97 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \ 99 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
98 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \ 100 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
99 test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0) 101 test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0)
100is_at_least_gingerbread := \ 102is_at_least_jellybean_mr2 := \
101 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
102 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
103 test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
104is_at_least_honeycomb := \
105 $(shell test $(PLATFORM_VERSION_MAJ) -ge 3 && echo 1 || echo 0)
106is_at_least_icecream_sandwich := \
107 $(shell test $(PLATFORM_VERSION_MAJ) -ge 4 && echo 1 || echo 0)
108is_at_least_icecream_sandwich_mr1 := \
109 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \ 103 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
110 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \ 104 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
111 ( test $(PLATFORM_VERSION_MIN) -ge 1 || \ 105 test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
112 test $(PLATFORM_VERSION_PATCH) -ge 3 ) ) ) && echo 1 || echo 0) 106is_at_least_kitkat := \
113is_at_least_jellybean := \
114 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \ 107 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
115 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \ 108 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
116 test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0) 109 test $(PLATFORM_VERSION_MIN) -ge 4 ) ) && echo 1 || echo 0)
117 110
118# FIXME: Assume "future versions" are >=5.0, but we don't really know 111# FIXME: Assume "future versions" are >=5.0, but we don't really know
119is_future_version := \ 112is_future_version := \
@@ -123,27 +116,17 @@ is_future_version := \
123# against can avoid compatibility theming and affords better integration. 116# against can avoid compatibility theming and affords better integration.
124# 117#
125ifeq ($(is_future_version),1) 118ifeq ($(is_future_version),1)
119API_LEVEL := 20
120else ifeq ($(is_at_least_kitkat),1)
121API_LEVEL := 19
122else ifeq ($(is_at_least_jellybean_mr2),1)
123API_LEVEL := 18
124else ifeq ($(is_at_least_jellybean_mr1),1)
126API_LEVEL := 17 125API_LEVEL := 17
127else ifeq ($(is_at_least_jellybean),1) 126else ifeq ($(is_at_least_jellybean),1)
128API_LEVEL := 16 127API_LEVEL := 16
129else ifeq ($(is_at_least_icecream_sandwich),1)
130# MR1 15
131API_LEVEL := 14
132else ifeq ($(is_at_least_honeycomb),1)
133# MR2 13
134# MR1 12
135API_LEVEL := 11
136else ifeq ($(is_at_least_gingerbread),1)
137# MR1 10
138API_LEVEL := 9
139else ifeq ($(is_at_least_froyo),1)
140API_LEVEL := 8
141else ifeq ($(is_at_least_eclair),1)
142# MR1 7
143# 2.0.1 6
144API_LEVEL := 5
145else 128else
146$(error Must build against Android >= 2.0) 129$(error Must build against Android >= 4.1)
147endif 130endif
148 131
149# Each DDK is tested against only a single version of the platform. 132# Each DDK is tested against only a single version of the platform.
@@ -151,6 +134,6 @@ endif
151# 134#
152ifeq ($(is_future_version),1) 135ifeq ($(is_future_version),1)
153$(info WARNING: Android version is newer than this DDK supports) 136$(info WARNING: Android version is newer than this DDK supports)
154else ifneq ($(is_at_least_icecream_sandwich),1) 137else ifneq ($(is_at_least_jellybean_mr2),1)
155$(info WARNING: Android version is older than this DDK supports) 138$(info WARNING: Android version is older than this DDK supports)
156endif 139endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk
new file mode 100644
index 0000000..c779e9d
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/apis/xorg.mk
@@ -0,0 +1,48 @@
1########################################################################### ###
2#@Title XOrg root makefile
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42ifeq ($(filter xorg,$(EXCLUDED_APIS)),)
43 COMPONENTS += xorg pvr_conf pvr_video wsegl_dri2_linux
44 -include ../common/apis/xorg_opengl.mk
45ifeq ($(SUPPORT_PVR_REMOTE),1)
46 COMPONENTS += pvr_input
47endif
48endif
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 5d0289f..4097e7a 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
@@ -59,5 +59,3 @@ $(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI))
59 59
60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) 60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,))
61 61
62
63export EXTERNAL_3PDD_TARBALL
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
index 153159a..9a2cdd5 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
@@ -41,3 +41,4 @@
41$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,)) 41$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,))
42$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,)) 42$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,))
43$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,)) 43$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,))
44$(eval $(call TunableKernelConfigC,VS_PRODUCT_VERSION,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk
new file mode 100644
index 0000000..27c77a3
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg.mk
@@ -0,0 +1,48 @@
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
41PVR_SECURE_DRM_AUTH_EXPORT := 1
42
43$(eval $(call TunableKernelConfigC,XPROC_WORKAROUND_NUM_SHAREABLES,4095))
44
45ifeq ($(SUPPORT_PVR_REMOTE),1)
46else
47endif
48
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk
new file mode 100644
index 0000000..fe10742
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/xorg_test.mk
@@ -0,0 +1,51 @@
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# FIXME: Will go away when SUPPORT_DRI_DRM is untangled from
42# the old meaning of SUPPORT_XORG=1.
43
44ifeq ($(filter xorg,$(EXCLUDED_APIS)),)
45ifneq ($(wildcard ../common/apis/xorg.mk),)
46SUPPORT_BUILD_XORG := 1
47ifeq ($(PDUMP),1)
48SUPPORT_PDUMP_MULTI_PROCESS := 1
49endif
50endif
51endif
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 247d1e1..3f761cf 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
@@ -56,6 +56,7 @@
56# 56#
57define KernelConfigMake 57define KernelConfigMake
58$$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new) 58$$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new)
59$(if $(filter config,$(D)),$(info KernelConfigMake $(1) := $(2) # $(if $($(1)),$(origin $(1)),default)))
59endef 60endef
60 61
61# Write out a GNU make option for both user & kernel 62# Write out a GNU make option for both user & kernel
@@ -88,6 +89,7 @@ endef
88# 89#
89define KernelConfigC 90define KernelConfigC
90$$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new) 91$$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new)
92$(if $(filter config,$(D)),$(info KernelConfigC #define $(1) $(2) /* $(if $($(1)),$(origin $(1)),default) */),)
91endef 93endef
92 94
93# Write out an option for both user & kernel 95# Write out an option for both user & kernel
@@ -176,9 +178,7 @@ $(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR))
176# final programs/libraries, and install/rc scripts. 178# final programs/libraries, and install/rc scripts.
177# 179#
178BUILD ?= release 180BUILD ?= release
179# TI: Added SGX type to binary build location so builds for different GPUs 181OUT ?= $(TOP)/eurasiacon/binary2_$(PVR_BUILD_DIR)_$(BUILD)
180# with the same build directory are put in different places
181OUT ?= $(TOP)/eurasiacon/binary2_$(SGXCORE)_$(SGX_CORE_REV)_$(PVR_BUILD_DIR)_$(BUILD)
182override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT)) 182override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT))
183 183
184CONFIG_MK := $(OUT)/config.mk 184CONFIG_MK := $(OUT)/config.mk
@@ -186,6 +186,14 @@ CONFIG_H := $(OUT)/config.h
186CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk 186CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk
187CONFIG_KERNEL_H := $(OUT)/config_kernel.h 187CONFIG_KERNEL_H := $(OUT)/config_kernel.h
188 188
189# Convert commas to spaces in $(D). This is so you can say "make
190# D=config-changes,freeze-config" and have $(filter config-changes,$(D))
191# still work.
192comma := ,
193empty :=
194space := $(empty) $(empty)
195override D := $(subst $(comma),$(space),$(D))
196
189# Create the OUT directory and delete any previous intermediary files 197# Create the OUT directory and delete any previous intermediary files
190# 198#
191$(shell mkdir -p $(OUT)) 199$(shell mkdir -p $(OUT))
@@ -211,6 +219,19 @@ endif
211# require things like SGXCORE to be set 219# require things like SGXCORE to be set
212ifneq ($(INTERNAL_CLOBBER_ONLY),true) 220ifneq ($(INTERNAL_CLOBBER_ONLY),true)
213 221
222# These are defined by the core build system, but we might need them
223# earlier to feature-check the compilers
224#
225_CC := $(if $(filter default,$(origin CC)),gcc,$(CC))
226_CLANG := \
227 $(shell $(TOP)/eurasiacon/build/linux2/tools/cc-check.sh --clang --cc $(_CC))
228ifeq ($(_CLANG),true)
229_CC := $(_CC) -target $(patsubst %-,%,$(CROSS_COMPILE))
230else
231_CC := $(CROSS_COMPILE)$(_CC)
232endif
233HOST_CC ?= gcc
234
214-include ../config/user-defs.mk 235-include ../config/user-defs.mk
215 236
216# FIXME: Backwards compatibility remaps. 237# FIXME: Backwards compatibility remaps.
@@ -273,21 +294,10 @@ override SUPPORT_HW_RECOVERY := 0
273override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 294override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
274endif 295endif
275 296
276# We're bumping against USSE limits on older cores because the ukernel 297ifeq ($(SGX_FEATURE_36BIT_MMU),1)
277# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and 298override IMG_ADDRSPACE_PHYSADDR_BITS := 64
278# PVRSRV_USSE_EDM_STATUS_DEBUG=1. 299else
279# 300override IMG_ADDRSPACE_PHYSADDR_BITS := 32
280# Automatically disable vistest support if debugging the ukernel to
281# prevent build failures.
282#
283ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),)
284ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1)
285SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden
286ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden)
287$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
288SGX_DISABLE_VISTEST_SUPPORT := 1
289endif
290endif
291endif 301endif
292 302
293ifeq ($(SGXCORE),535) 303ifeq ($(SGXCORE),535)
@@ -327,6 +337,11 @@ endif
327# 337#
328PVRSRV_MODNAME ?= pvrsrvkm 338PVRSRV_MODNAME ?= pvrsrvkm
329 339
340# Normally builds don't touch this, but we use it to influence the components
341# list. Make sure it is defined early enough to make this possible.
342#
343SUPPORT_PVRSRV_DEVICE_CLASS ?= 1
344
330# The user didn't set CROSS_COMPILE. There's probably nothing wrong 345# The user didn't set CROSS_COMPILE. There's probably nothing wrong
331# with that, but we'll let them know anyway. 346# with that, but we'll let them know anyway.
332# 347#
@@ -345,19 +360,22 @@ $$(warning *** Setting $(1) via $$(origin $(1)) is deprecated)
345$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl") 360$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl")
346endif 361endif
347endef 362endef
348$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENVG SUPPORT_OPENCL SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o)))) 363$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_INCLUDES 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))))
349 364
350# Check for words in EXCLUDED_APIS that aren't understood by the 365# Check for words in EXCLUDED_APIS that aren't understood by the
351# common/apis/*.mk files. This should be kept in sync with all the tests on 366# common/apis/*.mk files. This should be kept in sync with all the tests on
352# EXCLUDED_APIS in those files 367# EXCLUDED_APIS in those files
353_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts 368_excludable_apis := rscompute opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts composerhal camerahal memtrackhal
354_unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS))) 369_excluded_apis := $(subst $(comma),$(space),$(EXCLUDED_APIS))
370_unrecognised := $(strip $(filter-out $(_excludable_apis),$(_excluded_apis)))
355ifneq ($(_unrecognised),) 371ifneq ($(_unrecognised),)
356$(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised)) 372$(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised))
357$(warning *** EXCLUDED_APIS was set via: $(origin EXCLUDED_APIS)) 373$(warning *** EXCLUDED_APIS was set via: $(origin EXCLUDED_APIS))
358$(error Excludable APIs are: $(_excludable_apis)) 374$(error Excludable APIs are: $(_excludable_apis))
359endif 375endif
360 376
377override EXCLUDED_APIS := $(filter $(_excludable_apis), $(_excluded_apis))
378
361# Build's selected list of components 379# Build's selected list of components
362# 380#
363-include components.mk 381-include components.mk
@@ -380,8 +398,13 @@ ifneq ($(filter pvr2d,$(COMPONENTS)),)
380COMPONENTS += null_pvr2d_remote 398COMPONENTS += null_pvr2d_remote
381endif 399endif
382COMPONENTS += pvrvncsrv 400COMPONENTS += pvrvncsrv
401COMPONENTS += pvrvncinput
383endif 402endif
384 403
404$(if $(filter config,$(D)),$(info Build configuration:))
405
406################################# CONFIG ####################################
407
385# If KERNELDIR is set, write it out to the config.mk, with 408# If KERNELDIR is set, write it out to the config.mk, with
386# KERNEL_COMPONENTS and KERNEL_ID 409# KERNEL_COMPONENTS and KERNEL_ID
387# 410#
@@ -402,19 +425,54 @@ KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE)
402$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) 425$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,))
403endif 426endif
404 427
405# Check the KERNELDIR has a kernel built and also check that it is 428# Check the KERNELDIR has a kernel built.
406# not 64-bit, which we do not support.
407VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux)) 429VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux))
430LINUXCFG := $(strip $(wildcard $(KERNELDIR)/.config))
431
408ifneq ($(VMLINUX),) 432ifneq ($(VMLINUX),)
409VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false) 433ifneq ($(shell file $(KERNELDIR)/vmlinux | grep 64-bit >/dev/null && echo 1),$(shell $(_CC) -dM -E - </dev/null | grep __x86_64__ >/dev/null && echo 1))
434$(error Attempting to build 64-bit DDK against 32-bit kernel, or 32-bit DDK against 64-bit kernel. This is not allowed.)
435endif
436VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo false)
437VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false)
438VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false)
439VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false)
440
441# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU))
442
410ifneq ($(VMLINUX_IS_64BIT),false) 443ifneq ($(VMLINUX_IS_64BIT),false)
411$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.) 444$(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.)
412endif 445endif
413else 446else
414$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) 447$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.)
415endif 448endif
416endif 449endif
417 450
451ifneq ($(VMLINUX_HAS_PAE40),false)
452ifeq ($(VMLINUX_HAS_DMA32),false)
453$(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.)
454$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
455endif
456endif
457
458ifneq ($(SGX_FEATURE_36BIT_MMU),1)
459ifneq ($(VMLINUX_IS_64BIT),false)
460# Kernel is 64-bit
461ifeq ($(VMLINUX_HAS_DMA32),false)
462$(warning SGX is configured with 32-bit MMU. Your Kernel is 64-bit but does not have CONFIG_ZONE_DMA32.)
463$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
464endif
465else
466 # Kernel is 32-bit
467ifneq ($(VMLINUX_HAS_PAE36),false)
468ifeq ($(VMLINUX_HAS_DMA32),false)
469$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA32. )
470$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
471endif
472endif
473endif
474endif
475
418 476
419# Ideally configured by platform Makefiles, as necessary 477# Ideally configured by platform Makefiles, as necessary
420# 478#
@@ -438,10 +496,17 @@ $(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,))
438$(eval $(call BothConfigC,TRANSFER_QUEUE,)) 496$(eval $(call BothConfigC,TRANSFER_QUEUE,))
439$(eval $(call BothConfigC,PVR_SECURE_HANDLES,)) 497$(eval $(call BothConfigC,PVR_SECURE_HANDLES,))
440 498
499# Support syncing LISR & MISR. This is required for OS's where
500# on SPM platforms the LISR and MISR can run at the same time and
501# thus during powerdown we need to drain all pending LISRs before
502# proceeding to do the actual powerdown
503$(eval $(call KernelConfigC,SUPPORT_LISR_MISR_SYNC))
504
441ifneq ($(DISPLAY_CONTROLLER),) 505ifneq ($(DISPLAY_CONTROLLER),)
442$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) 506$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER)))
443endif 507endif
444 508
509ifneq ($(strip $(KERNELDIR)),)
445PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0 510PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0
446ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0) 511ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
447PVR_LINUX_MEM_AREA_USE_VMAP ?= 1 512PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
@@ -453,6 +518,7 @@ endif
453$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES))) 518$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
454$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,)) 519$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,))
455$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,)) 520$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,))
521endif
456 522
457 523
458$(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM))) 524$(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM)))
@@ -499,10 +565,10 @@ $(eval $(call TunableBothConfigC,SGX_FEATURE_MP,))
499$(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,)) 565$(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,))
500$(eval $(call TunableBothConfigC,FPGA,)) 566$(eval $(call TunableBothConfigC,FPGA,))
501$(eval $(call TunableBothConfigC,PDUMP,)) 567$(eval $(call TunableBothConfigC,PDUMP,))
568$(eval $(call TunableBothConfigC,MEM_TRACK_INFO_DEBUG,))
502$(eval $(call TunableBothConfigC,NO_HARDWARE,)) 569$(eval $(call TunableBothConfigC,NO_HARDWARE,))
503$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,)) 570$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,))
504$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,)) 571$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,))
505$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,))
506$(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,)) 572$(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,))
507$(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1)) 573$(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1))
508$(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,)) 574$(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,))
@@ -513,8 +579,13 @@ $(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,))
513$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,)) 579$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,))
514$(eval $(call TunableBothConfigC,SUPPORT_ION,)) 580$(eval $(call TunableBothConfigC,SUPPORT_ION,))
515$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,)) 581$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,))
582$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_DEVICE_CLASS,))
516$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1)) 583$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1))
517$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,)) 584$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,))
585$(eval $(call TunableBothConfigC,SGX_FEATURE_36BIT_MMU,))
586$(eval $(call TunableBothConfigC,IMG_ADDRSPACE_PHYSADDR_BITS,))
587$(eval $(call TunableBothConfigC,PVRSRV_EXTRA_PB_DEBUG,))
588$(eval $(call TunableBothConfigC,PVRSRV_DEBUG_CCB_MAX,))
518 589
519$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1)) 590$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1))
520$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1)) 591$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1))
@@ -537,20 +608,18 @@ $(eval $(call TunableKernelConfigC,PVRSRV_REFCOUNT_DEBUG,))
537$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,)) 608$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,))
538$(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,)) 609$(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,))
539$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,)) 610$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,))
611$(eval $(call TunableKernelConfigC,SUPPORT_OLD_ION_API,))
540$(eval $(call TunableKernelConfigC,TTRACE,)) 612$(eval $(call TunableKernelConfigC,TTRACE,))
613$(eval $(call TunableKernelConfigC,TTRACE_LARGE_BUFFER,))
614$(eval $(call TunableKernelConfigC,SUPPORT_PDUMP_SYNC_DEBUG,))
615$(eval $(call TunableKernelConfigC,SUPPORT_PER_SYNC_DEBUG,))
616$(eval $(call TunableKernelConfigC,SUPPORT_FORCE_SYNC_DUMP,))
541 617
542ifeq ($(BUILD),debug)
543$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,1))
544else
545$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,))
546endif
547
548$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS_HEAP_ALLOC_DEBUG,))
549
550$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
551 618
552 619
553$(eval $(call TunableBothConfigMake,OPTIM,)) 620$(eval $(call TunableBothConfigMake,OPTIM,))
621$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
622$(eval $(call TunableBothConfigMake,SUPPORT_PVRSRV_DEVICE_CLASS,))
554 623
555 624
556$(eval $(call TunableKernelConfigMake,TTRACE,)) 625$(eval $(call TunableKernelConfigMake,TTRACE,))
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 621e03e..dee740f 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
@@ -104,6 +104,10 @@ define cc-is-64bit
104$(call cc-check,$(1),$(OUT),--64) 104$(call cc-check,$(1),$(OUT),--64)
105endef 105endef
106 106
107define cc-is-clang
108$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),--clang)
109endef
110
107define cc-option 111define cc-option
108$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1)) 112$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1))
109endef 113endef
@@ -116,6 +120,10 @@ define host-cc-option
116$(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1)) 120$(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1))
117endef 121endef
118 122
123define host-cxx-option
124$(call cc-check,$(patsubst @%,%,$(HOST_CXX)),$(OUT),$(1))
125endef
126
119define kernel-cc-option 127define kernel-cc-option
120$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1)) 128$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1))
121endef 129endef
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 9d88941..2b49f50 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
@@ -65,7 +65,6 @@ $(OUT)/target/kbuild/%.c: $(TOP)/%.c
65 @if [ ! -h $@ ]; then ln -sf $< $@; fi 65 @if [ ! -h $@ ]; then ln -sf $< $@; fi
66 66
67ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \ 67ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \
68 -DDEBUG_LOG_PATH_TRUNCATE="\"$(OUT)/target/kbuild\"" \
69 -I$(OUT)/include \ 68 -I$(OUT)/include \
70 -I$(TOP)/include4 \ 69 -I$(TOP)/include4 \
71 -I$(TOP)/services4/include \ 70 -I$(TOP)/services4/include \
@@ -86,7 +85,7 @@ endif
86 85
87include $(INTERNAL_KBUILD_MAKEFILES) 86include $(INTERNAL_KBUILD_MAKEFILES)
88 87
89$(if $(pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y),,$(error pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y was empty, which could mean that srvkm is missing from $$(KERNEL_COMPONENTS))) 88$(if $(pvrsrvkm-y),,$(error pvrsrvkm-y was empty, which could mean that srvkm is missing from $$(KERNEL_COMPONENTS)))
90pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y)) 89pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y))
91 90
92obj-m += $(INTERNAL_KBUILD_OBJECTS) 91obj-m += $(INTERNAL_KBUILD_OBJECTS)
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 94e2100..63542f0 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
@@ -58,7 +58,7 @@ kbuild: $(TARGET_OUT)/kbuild/Makefile
58 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ 58 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
59 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ 59 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
60 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ 60 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
61 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \ 61 CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \
62 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ 62 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
63 V=$(V) W=$(W) \ 63 V=$(V) W=$(W) \
64 TOP=$(TOP) 64 TOP=$(TOP)
@@ -72,7 +72,7 @@ kbuild_clean: $(TARGET_OUT)/kbuild/Makefile
72 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ 72 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
73 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ 73 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
74 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ 74 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
75 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \ 75 CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \
76 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ 76 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
77 V=$(V) W=$(W) \ 77 V=$(V) W=$(W) \
78 TOP=$(TOP) clean 78 TOP=$(TOP) clean
@@ -84,7 +84,7 @@ kbuild_install: $(TARGET_OUT)/kbuild/Makefile
84 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \ 84 INTERNAL_KBUILD_OBJECTS="$(INTERNAL_KBUILD_OBJECTS)" \
85 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ 85 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \
86 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \ 86 EXTRA_KBUILD_SOURCE="$(EXTRA_KBUILD_SOURCE)" \
87 CROSS_COMPILE="$(KERNEL_CROSS_COMPILE)" \ 87 CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \
88 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ 88 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \
89 INSTALL_MOD_PATH="$(DISCIMAGE)" \ 89 INSTALL_MOD_PATH="$(DISCIMAGE)" \
90 V=$(V) W=$(W) \ 90 V=$(V) W=$(W) \
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
index 869026f..ef4596c 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk
@@ -48,20 +48,47 @@ MODULE_HOST_LDFLAGS := $(ALL_HOST_LDFLAGS) $($(THIS_MODULE)_ldflags)
48MODULE_BISON_FLAGS := $(ALL_BISON_FLAGS) $($(THIS_MODULE)_bisonflags) 48MODULE_BISON_FLAGS := $(ALL_BISON_FLAGS) $($(THIS_MODULE)_bisonflags)
49MODULE_FLEX_FLAGS := $(ALL_FLEX_FLAGS) $($(THIS_MODULE)_flexflags) 49MODULE_FLEX_FLAGS := $(ALL_FLEX_FLAGS) $($(THIS_MODULE)_flexflags)
50 50
51# -L flags for library search dirs 51ifneq ($(BUILD),debug)
52ifeq ($(USE_LTO),1)
53MODULE_HOST_LDFLAGS := \
54 $(sort $(filter-out -W% -D%,$(ALL_HOST_CFLAGS) $(ALL_HOST_CXXFLAGS))) \
55 $(MODULE_HOST_LDFLAGS)
56MODULE_LDFLAGS := \
57 $(sort $(filter-out -W% -D%,$(ALL_CFLAGS) $(ALL_CXXFLAGS))) \
58 $(MODULE_LDFLAGS)
59endif
60endif
61
62# Only allow cflags that do not affect code generation. This is to ensure
63# proper binary compatibility when LTO (Link-Time Optimization) is enabled.
64# We make exceptions for -fPIC, -fPIE and -m32 which will all fail linkage
65# in non-LTO mode if incorrectly specified.
66#
67# NOTE: Only used by static_library and objects right now. Other module
68# types should not be affected by complex code generation flags w/ LTO.
69MODULE_ALLOWED_CFLAGS := -W% -D% -std=% -fPIC -fPIE -m32
70
71# -L flags for library search dirs: these are relative to $(TOP), unless
72# they're absolute paths
52MODULE_LIBRARY_DIR_FLAGS := $(foreach _path,$($(THIS_MODULE)_libpaths),$(if $(filter /%,$(_path)),-L$(call relative-to-top,$(_path)),-L$(_path))) 73MODULE_LIBRARY_DIR_FLAGS := $(foreach _path,$($(THIS_MODULE)_libpaths),$(if $(filter /%,$(_path)),-L$(call relative-to-top,$(_path)),-L$(_path)))
53# -I flags for header search dirs 74# -I flags for header search dirs (same rules as for -L)
54MODULE_INCLUDE_FLAGS := $(foreach _path,$($(THIS_MODULE)_includes),$(if $(filter /%,$(_path)),-I$(call relative-to-top,$(_path)),-I$(_path))) 75MODULE_INCLUDE_FLAGS := $(foreach _path,$($(THIS_MODULE)_includes),$(if $(filter /%,$(_path)),-I$(call relative-to-top,$(_path)),-I$(_path)))
55 76
56# Variables used to differentiate between host/target builds 77# Variables used to differentiate between host/target builds
57MODULE_OUT := $(if $(MODULE_HOST_BUILD),$(HOST_OUT),$(TARGET_OUT)) 78MODULE_OUT := $(if $(MODULE_HOST_BUILD),$(HOST_OUT),$(TARGET_OUT))
79# For documentation modules, this variable is overridden by the module type
80# makefile to place the intermediates in $(DOCS_OUT)/intermediates.
58MODULE_INTERMEDIATES_DIR := $(if $(MODULE_HOST_BUILD),$(HOST_INTERMEDIATES)/$(THIS_MODULE),$(TARGET_INTERMEDIATES)/$(THIS_MODULE)) 81MODULE_INTERMEDIATES_DIR := $(if $(MODULE_HOST_BUILD),$(HOST_INTERMEDIATES)/$(THIS_MODULE),$(TARGET_INTERMEDIATES)/$(THIS_MODULE))
59 82
60.SECONDARY: $(MODULE_INTERMEDIATES_DIR) 83.SECONDARY: $(MODULE_INTERMEDIATES_DIR)
61$(MODULE_INTERMEDIATES_DIR): 84$(MODULE_INTERMEDIATES_DIR):
62 $(make-directory) 85 $(make-directory)
63 86
87# These are used for messages and variable names where we need to say "host"
88# or "target" according to the module build type.
64Host_or_target := $(if $(MODULE_HOST_BUILD),Host,Target) 89Host_or_target := $(if $(MODULE_HOST_BUILD),Host,Target)
90host_or_target := $(if $(MODULE_HOST_BUILD),host,target)
91HOST_OR_TARGET := $(if $(MODULE_HOST_BUILD),HOST,TARGET)
65 92
66# These define the rules for finding source files. 93# These define the rules for finding source files.
67# - If a name begins with a slash, we strip $(TOP) off the front if it begins 94# - If a name begins with a slash, we strip $(TOP) off the front if it begins
@@ -77,18 +104,26 @@ _SOURCES_WITHOUT_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(find
77_SOURCES_WITH_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),$(_s),))) 104_SOURCES_WITH_SLASH := $(strip $(foreach _s,$($(THIS_MODULE)_src),$(if $(findstring /,$(_s)),$(_s),)))
78MODULE_SOURCES := $(addprefix $(THIS_DIR)/,$(_SOURCES_WITHOUT_SLASH)) 105MODULE_SOURCES := $(addprefix $(THIS_DIR)/,$(_SOURCES_WITHOUT_SLASH))
79MODULE_SOURCES += $(call relative-to-top,$(filter /%,$(_SOURCES_WITH_SLASH))) 106MODULE_SOURCES += $(call relative-to-top,$(filter /%,$(_SOURCES_WITH_SLASH)))
107
80_RELATIVE_SOURCES_WITH_SLASH := $(filter-out /%,$(_SOURCES_WITH_SLASH)) 108_RELATIVE_SOURCES_WITH_SLASH := $(filter-out /%,$(_SOURCES_WITH_SLASH))
81_OUTDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH)) 109_OUTDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
82_THISDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter-out $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH)) 110_THISDIR_RELATIVE_SOURCES_WITH_SLASH := $(filter-out $(RELATIVE_OUT)/%,$(_RELATIVE_SOURCES_WITH_SLASH))
83MODULE_SOURCES += $(_OUTDIR_RELATIVE_SOURCES_WITH_SLASH) 111MODULE_SOURCES += $(_OUTDIR_RELATIVE_SOURCES_WITH_SLASH)
84MODULE_SOURCES += $(addprefix $(THIS_DIR)/,$(_THISDIR_RELATIVE_SOURCES_WITH_SLASH)) 112MODULE_SOURCES += $(addprefix $(THIS_DIR)/,$(_THISDIR_RELATIVE_SOURCES_WITH_SLASH))
113
114# Generated sources and headers. We use $(MODULE_OUT) because it encourages
115# correctly marking modules which generate headers as host/target.
85MODULE_SOURCES += $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_gensrc)) 116MODULE_SOURCES += $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_gensrc))
86MODULE_GENERATED_HEADERS := $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_genheaders)) 117MODULE_GENERATED_HEADERS := $(addprefix $(MODULE_OUT)/intermediates/,$($(THIS_MODULE)_genheaders))
87 118
88# -l flags for each library 119# -l flags for each library. The rules are:
120# - for all static libs, use -lfoo
121# - for all in-tree or external libs, use $(libfoo_ldflags) if that
122# variable is defined (empty counts as defined). Otherwise use
123# -lfoo.
89MODULE_LIBRARY_FLAGS := $(addprefix -l, $($(THIS_MODULE)_staticlibs)) $(addprefix -l,$($(THIS_MODULE)_libs)) $(foreach _lib,$($(THIS_MODULE)_extlibs),$(if $(filter undefined,$(origin lib$(_lib)_ldflags)),-l$(_lib),$(lib$(_lib)_ldflags))) 124MODULE_LIBRARY_FLAGS := $(addprefix -l, $($(THIS_MODULE)_staticlibs)) $(addprefix -l,$($(THIS_MODULE)_libs)) $(foreach _lib,$($(THIS_MODULE)_extlibs),$(if $(filter undefined,$(origin lib$(_lib)_ldflags)),-l$(_lib),$(lib$(_lib)_ldflags)))
90 125
91# pkg-config integration; primarily used by X.org 126# pkg-config integration; primarily used by X.Org
92# FIXME: We don't support arbitrary CFLAGS yet (just includes) 127# FIXME: We don't support arbitrary CFLAGS yet (just includes)
93$(foreach _package,$($(THIS_MODULE)_packages),\ 128$(foreach _package,$($(THIS_MODULE)_packages),\
94 $(eval MODULE_INCLUDE_FLAGS += `pkg-config --cflags-only-I $(_package)`)\ 129 $(eval MODULE_INCLUDE_FLAGS += `pkg-config --cflags-only-I $(_package)`)\
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile
index 45cdb6f..0d9ba11 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile
@@ -67,7 +67,7 @@ endif
67export SGXCORE 67export SGXCORE
68export SGX_CORE_REV 68export SGX_CORE_REV
69 69
70SUPPORT_ACTIVE_POWER_MANAGEMENT := 1 70SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
71 71
72SGX_DYNAMIC_TIMING_INFO := 1 72SGX_DYNAMIC_TIMING_INFO := 1
73 73
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
new file mode 100644
index 0000000..35d9fd1
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
@@ -0,0 +1,221 @@
1########################################################################### ###
2#@Title Root makefile for omap4430 Android. Builds everything else.
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# If a TARGET_PRODUCT is specified but not a TARGET_DEVICE, try to
43# derive the TARGET_DEVICE from TARGET_PRODUCT.
44#
45ifeq ($(TARGET_DEVICE),)
46override TARGET_DEVICE := \
47 $(patsubst mini_%,%,$(patsubst full_%,%,$(TARGET_PRODUCT)))
48endif
49
50ifeq ($(TARGET_DEVICE),)
51override TARGET_DEVICE := jacinto6evm
52endif
53
54# Customize this build as per the TARGET_DEVICE setting
55#
56ifneq ($(filter blaze blaze_tablet panda tuna maguro toro mysid yakju,$(TARGET_DEVICE)),)
57SGXCORE := 540
58SGX_CORE_REV := 120
59HAL_VARIANT := omap4
60endif
61ifneq ($(filter blaze.4470 blaze_tablet.4470,$(TARGET_DEVICE)),)
62SGXCORE := 544
63SGX_CORE_REV := 112
64HAL_VARIANT := omap4
65endif
66ifneq ($(filter jacinto6evm omap5sevm panda5,$(TARGET_DEVICE)),)
67SGXCORE := 544
68SGX_CORE_REV := 116
69SGX_FEATURE_MP := 1
70SGX_FEATURE_SYSTEM_CACHE := 1
71SGX_FEATURE_MP_CORE_COUNT := 2
72HAL_VARIANT := jacinto6
73
74# OMAP Product Version
75VS_PRODUCT_VERSION := 5
76
77# FIXME: Re-enable this ASAP
78SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
79endif
80
81# Handle any TARGET_DEVICE remapping. Not all DDK TARGET_DEVICEs
82# require new Android TARGET_DEVICE builds.
83#
84ifeq ($(TARGET_DEVICE),blaze.4470)
85override TARGET_DEVICE := blaze
86endif
87ifeq ($(TARGET_DEVICE),blaze_tablet.4470)
88override TARGET_DEVICE := blaze_tablet
89endif
90
91SGX_DYNAMIC_TIMING_INFO := 1
92
93SUPPORT_LINUX_USING_WORKQUEUES := 1
94
95SUPPORT_PVRSRV_ANDROID_SYSTRACE := 0
96
97ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
98#DISPLAY_CONTROLLER := omaplfb
99endif
100
101PVR_SYSTEM := omap
102
103KERNEL_CROSS_COMPILE ?= arm-none-linux-gnueabi-
104
105# We have more memory on OMAP platforms, so we can spare to make the
106# pool larger, and have higher resolutions which benefit from it.
107#
108PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 10800
109
110include ../common/android/paths.mk
111include ../common/android/armv7-a.mk
112include ../common/android/features.mk
113
114ifneq ($(strip $(KERNELDIR)),)
115 include ../kernel_version.mk
116 ifeq ($(call kernel-version-at-least,2,6,35),true)
117 PVR_NO_OMAP_TIMER := 1
118 endif
119 ifeq ($(call kernel-version-at-least,2,6,39),true)
120 ifeq ($(LDM_PLATFORM),1)
121 PVR_LDM_PLATFORM_PRE_REGISTERED := 1
122 PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\""
123 endif
124 endif
125 ifeq ($(call kernel-version-at-least,3,0),true)
126 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
127 SYS_OMAP_HAS_DVFS_FRAMEWORK := 1
128 endif
129else
130 $(warning "KERNELDIR is not set, so can't feature check DVFS or dsscomp.")
131 $(warning "Assuming we want DVFS and dsscomp support.")
132 SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
133 SYS_OMAP_HAS_DVFS_FRAMEWORK := 1
134endif
135
136ifneq ($(LDM_PLATFORM),1)
137SUPPORT_LINUX_USING_WORKQUEUES := 0
138SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1
139SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
140ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
141DISPLAY_CONTROLLER := pvrlfb
142DISPLAY_CONTROLLER_COMPONENT := linux_framebuffer
143OMAP_NON_FLIP_DISPLAY := 1
144endif
145else # LDM_PLATFORM != 1
146ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
147#DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
148endif
149endif # LDM_PLATFORM != 1
150
151ifeq ($(SUPPORT_DRI_DRM),1)
152ifeq ($(PVR_LDM_PLATFORM_PRE_REGISTERED),1)
153PVR_DRI_DRM_PLATFORM_DEV := 1
154PVR_DRI_DRM_STATIC_BUS_ID := 1
155PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\"
156else
157PVR_DRI_DRM_NOT_PCI := 1
158KERNEL_COMPONENTS += linux_drm
159endif
160ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
161EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
162endif
163EXTRA_KBUILD_SOURCE := $(KERNELDIR)
164# FIXME: Only required for comparison with X's KM
165PVR_SECURE_DRM_AUTH_EXPORT := 1
166ifneq ($(OMAP_NON_FLIP_DISPLAY),1)
167PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1
168endif
169else # SUPPORT_DRI_DRM == 1
170ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
171KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
172endif
173endif # SUPPORT_DRI_DRM == 1
174
175SUPPORT_ANDROID_OMAP_NV12 := 1
176
177PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1
178
179PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
180
181# Handle Google's OMAP-based products
182#
183ifneq ($(filter tuna maguro toro mysid yakju,$(TARGET_DEVICE)),)
184# These default on in tuna_defconfig
185PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1
186PVRSRV_DUMP_MK_TRACE ?= 1
187# Go back to the old compiler for tuna kernel modules
188KERNEL_CROSS_COMPILE := arm-eabi-
189endif
190
191ifeq ($(NO_HARDWARE),1)
192ifeq ($(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED),1)
193$(info WARNING: SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=1 is incompatible with NO_HARDWARE=1)
194$(info WARNING: Setting SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=0 and switching to dc_nohw)
195override SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 0
196ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
197override DISPLAY_CONTROLLER := dcnohw
198KERNEL_COMPONENTS += dc_nohw
199endif
200endif # SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED == 1
201endif # NO_HARDWARE == 1
202
203include ../config/core.mk
204include ../common/android/extra_config.mk
205include ../common/dridrm.mk
206include ../common/opencl.mk
207include ../common/omap4.mk
208
209# Not all OMAP kernels have a compatible DVFS framework
210#
211$(eval $(call TunableKernelConfigC,SYS_OMAP_HAS_DVFS_FRAMEWORK,))
212
213# If set, services allows two flips to enter the processing queue,
214# and does not add read dependencies to the set of buffers last
215# flipped to. This is necessary for DSS composition on OMAP.
216#
217$(eval $(call TunableKernelConfigC,SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED,))
218
219# On OMAP a TILER-specific NV12 format is supported.
220#
221$(eval $(call TunableUserConfigMake,SUPPORT_ANDROID_OMAP_NV12,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile
new file mode 100644
index 0000000..8a65e7d
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile
@@ -0,0 +1,261 @@
1########################################################################### ###
2#@Title Root makefile for OMAP4430 Linux. Builds everything else.
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# If a product wasn't specified, we're an OMAP4430 blaze.
43#
44TARGET_PRODUCT ?= jacinto6evm
45
46# Customize this build as per the TARGET_PRODUCT setting
47#
48ifneq ($(filter blaze blaze_tablet panda,$(TARGET_PRODUCT)),)
49SGXCORE := 540
50SGX_CORE_REV := 120
51endif
52ifneq ($(filter blaze.4470 blaze_tablet.4470,$(TARGET_PRODUCT)),)
53SGXCORE := 544
54SGX_CORE_REV := 112
55endif
56ifneq ($(filter omap5sevm panda5,$(TARGET_PRODUCT)),)
57SGXCORE := 544
58SGX_CORE_REV := 105
59SGX_FEATURE_MP := 1
60SGX_FEATURE_SYSTEM_CACHE := 1
61SGX_FEATURE_MP_CORE_COUNT := 2
62PVR_OMAPLFB_DRM_FB := 0
63SYS_OMAP_HAS_DVFS_FRAMEWORK := 1
64
65# OMAP Product Version
66VS_PRODUCT_VERSION := 5
67
68# FIXME: Re-enable this ASAP
69SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
70endif
71ifneq ($(filter jacinto6evm omap5uevm,$(TARGET_PRODUCT)),)
72SGXCORE := 544
73SGX_CORE_REV := 116
74SGX_FEATURE_MP := 1
75SGX_FEATURE_SYSTEM_CACHE := 1
76SGX_FEATURE_MP_CORE_COUNT := 2
77
78SYS_OMAP5_UEVM := 1
79
80# OMAP Product Version
81VS_PRODUCT_VERSION := 5
82endif
83
84PVR_SYSTEM := omap
85
86KERNEL_COMPONENTS := srvkm bufferclass_example
87
88SUPPORT_OLD_ION_API := 1
89
90include ../kernel_version.mk
91
92# Only enable active power management if passive power management is
93# enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP,
94# the system can suspend in the case where active power management is
95# enabled in the SGX driver, but passive power management isn't. As
96# passive power management isn't enabled, the driver won't see the
97# system suspend/resume events, and so won't take appropriate action.
98LDM_PLATFORM ?= 1
99
100ifeq ($(LDM_PLATFORM),1)
101SUPPORT_LINUX_USING_WORKQUEUES := 1
102DISPLAY_CONTROLLER_COMPONENT += dc_omapfb3_linux
103DISPLAY_CONTROLLER := omaplfb
104else
105SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1
106OMAP_NON_FLIP_DISPLAY := 1
107DISPLAY_CONTROLLER_COMPONENT += linux_framebuffer
108DISPLAY_CONTROLLER := pvrlfb
109endif
110
111SYS_CFLAGS := -march=armv7-a
112
113UBUNTU_TOOLCHAIN :=
114ifeq ($(CROSS_COMPILE),)
115UBUNTU_TOOLCHAIN = 1
116endif
117ifeq ($(CROSS_COMPILE),arm-linux-gnueabi-)
118UBUNTU_TOOLCHAIN = 1
119endif
120ifeq ($(CROSS_COMPILE),arm-linux-gnueabihf-)
121UBUNTU_TOOLCHAIN = 1
122endif
123
124ifeq ($(UBUNTU_TOOLCHAIN),)
125OPTIM := -Os
126
127ifneq ($(CROSS_COMPILE),)
128SYS_CFLAGS += -mtls-dialect=arm
129endif
130
131SUPPORT_OMAP4430_NEON ?= 1
132
133ifeq ($(SUPPORT_OMAP4430_NEON),1)
134SYS_CFLAGS += -ftree-vectorize -mfpu=neon -mfloat-abi=softfp
135endif
136endif # UBUNTU_TOOLCHAIN
137
138LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name)
139
140SGX_DYNAMIC_TIMING_INFO := 1
141SYS_CUSTOM_POWERLOCK_WRAP := 1
142
143ifeq ($(OMAP_NON_FLIP_DISPLAY),1)
144OPK_DEFAULT := libpvrPVR2D_BLITWSEGL.so
145else
146OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so
147endif
148
149ifeq ($(SYS_OMAP5_UEVM),1)
150PVR_LDM_PLATFORM_PRE_REGISTERED := 1
151PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"omapdrm_pvr\""
152XORG_EXPLICIT_PVR_SERVICES_LOAD := 1
153PVR_OMAPLFB_DRM_FB := 0
154PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY := 1
155else
156ifeq ($(call kernel-version-at-least,2,6,35),true)
157# Work around flipping problems seen with the Taal LCDs on Blaze.
158# The work around is safe to use with other types of screen on Blaze
159# (e.g. HDMI) and on other platforms (e.g. Panda board).
160PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY := 1
161ifeq ($(LDM_PLATFORM),1)
162PVR_LDM_PLATFORM_PRE_REGISTERED := 1
163ifeq ($(call kernel-version-at-least,2,6,35,7),true)
164# Not all variants of the OMAP4 kernel have a DRM based framebuffer.
165# Note that a non-X.Org version of the driver does not have to be built
166# with DRM support if the kernel has a DRM based framebuffer.
167PVR_OMAPLFB_DRM_FB ?= 1
168ifeq ($(PVR_OMAPLFB_DRM_FB),1)
169PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm_pvr\""
170# There is already a "pvrsrvkm" driver (part of the DRM framebuffer code),
171# so use the pre-registered device name instead.
172PVR_LDM_DRIVER_REGISTRATION_NAME := "\"pvrsrvkm_pvr"\"
173# The DRM library will not load the Services module on behalf of the X Server,
174# as a DRM module has already been loaded (the DRM based framebuffer), so
175# load the Services module before starting the X Server.
176XORG_EXPLICIT_PVR_SERVICES_LOAD := 1
177else
178PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\""
179endif
180endif
181endif
182endif
183endif
184
185include ../common/xorg_test.mk
186ifeq ($(SUPPORT_BUILD_XORG),1)
187SUPPORT_DRI_DRM := 1
188endif
189
190ifeq ($(SUPPORT_DRI_DRM),1)
191ifeq ($(SYS_OMAP5_UEVM),1)
192PVR_DRI_DRM_PLATFORM_DEV := 1
193PVR_DRI_DRM_STATIC_BUS_ID := 1
194PVR_DRI_DRM_DEV_BUS_ID := "\"platform:omapdrm_pvr:00"\"
195else
196ifeq ($(call kernel-version-at-least,2,6,35),true)
197PVR_DRI_DRM_PLATFORM_DEV := 1
198PVR_DRI_DRM_STATIC_BUS_ID := 1
199ifeq ($(call kernel-version-at-least,2,6,35,7),true)
200ifeq ($(PVR_OMAPLFB_DRM_FB),1)
201SUPPORT_DRI_DRM_PLUGIN := 1
202endif
203ifeq ($(call kernel-version-at-least,2,6,36),true)
204PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm"\"
205else
206PVR_DRI_DRM_DEV_BUS_ID := "\"platform:pvrsrvkm:00"\"
207endif # kernel-version-at-least,2,6,36
208endif # kernel-version-at-least,2,6,35,7
209else # kernel-version-at-least,2,6,35
210PVR_DRI_DRM_NOT_PCI := 1
211endif # kernel-version-at-least,2,6,35
212endif # ($(SYS_OMAP5_UEVM),1)
213endif # SUPPORT_DRI_DRM
214
215ifeq ($(SUPPORT_BUILD_XORG),1)
216ifeq ($(call kernel-version-at-least,2,6,35,7),true)
217# A client DRI authorisation failure, whilst switched away from the X Server
218# VT, prevents all other attempts at DRI authorisation, even after
219# switching back to the X server VT, so don't perform a DRM drop master
220# call.
221PVR_XORG_DONT_DROP_MASTER_IN_LEAVE_VT := 1
222endif
223XORG_PVR_VIDEO ?= omap4
224
225OPK_FALLBACK := libpvrPVR2D_DRIWSEGL.so
226
227ifneq ($(OMAP_NON_FLIP_DISPLAY),1)
228PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1
229endif
230
231else # xorg isn't excluded
232
233OPK_FALLBACK := libpvrPVR2D_BLITWSEGL.so
234
235endif # xorg isn't excluded
236
237ifeq ($(SUPPORT_DRI_DRM),1)
238ifeq ($(PVR_DRI_DRM_NOT_PCI),1)
239KERNEL_COMPONENTS += linux_drm
240EXTRA_KBUILD_SOURCE := $(KERNELDIR)
241endif
242EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
243else
244KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT)
245endif
246
247include ../config/core.mk
248include ../common/xorg.mk
249include ../common/dridrm.mk
250include ../common/opencl.mk
251include ../common/omap4.mk
252
253# We only need this for pvr_video's includes, which should
254# really be done differently, as DISPLAY_CONTROLLER_DIR is
255# now obsolete..
256#
257$(eval $(call UserConfigMake,DISPLAY_CONTROLLER_DIR,3rdparty/$(DISPLAY_CONTROLLER_COMPONENT)))
258
259$(eval $(call TunableKernelConfigC,SYS_OMAP5_UEVM,))
260
261$(eval $(call TunableKernelConfigC,SYS_OMAP_HAS_DVFS_FRAMEWORK,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk
index 05e4fe3..75dcca6 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk
@@ -40,10 +40,6 @@
40 40
41.PHONY: prepare_tree 41.PHONY: prepare_tree
42 42
43-include eurasiacon/build/linux2/kbuild/external_tarball.mk
44
45# If there's no external tarball, there's nothing to do
46#
47prepare_tree: 43prepare_tree:
48 44
49INTERNAL_INCLUDED_PREPARE_HEADERS := 45INTERNAL_INCLUDED_PREPARE_HEADERS :=
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile
new file mode 100644
index 0000000..4473d62
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/sunxi_android/Makefile
@@ -0,0 +1,123 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# If a TARGET_PRODUCT is specified but not a TARGET_DEVICE, try to
42# derive the TARGET_DEVICE from TARGET_PRODUCT.
43#
44ifeq ($(TARGET_DEVICE),)
45override TARGET_DEVICE := \
46 $(patsubst mini_%,%,$(patsubst full_%,%,$(TARGET_PRODUCT)))
47ifneq ($(filter fiber_w02 v972v1 v972v2 novo9spark,$(TARGET_DEVICE)),)
48override TARGET_DEVICE := sun6i
49endif
50endif
51
52ifeq ($(TARGET_DEVICE),)
53override TARGET_DEVICE := sun6i
54endif
55
56SGXCORE := 544
57SGX_CORE_REV := 115
58SUPPORT_SLC := 1
59SGX_FEATURE_MP := 1
60SGX_FEATURE_MP_CORE_COUNT := 2
61
62PVR_SYSTEM := sunxi
63HAL_VARIANT := sun6i
64DISPLAY_CONTROLLER := dc_sunxi
65
66LDM_PLATFORM := 1
67
68SUPPORT_LINUX_USING_WORKQUEUES := 1
69SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 1
70
71PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT ?= 1
72PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
73
74PVRSRV_USSE_EDM_STATUS_DEBUG ?= 1
75PVRSRV_DUMP_MK_TRACE ?= 1
76
77SUPPORT_ANDROID_SUNXI ?= 1
78
79ION_DEFAULT_HEAP_MASK := ION_HEAP_CARVEOUT_MASK
80
81# We have more memory on the sun6i platform, so we can spare to make
82# the pool larger, and have higher resolutions which benefit from it.
83#
84PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 10800
85
86SGX_DYNAMIC_TIMING_INFO := 1
87
88SUPPORT_PVRSRV_ANDROID_SYSTRACE := 1
89
90KERNEL_CROSS_COMPILE ?= arm-eabi-
91
92include ../common/android/paths.mk
93include ../common/android/armv7-a.mk
94include ../common/android/features.mk
95
96ifneq ($(strip $(KERNELDIR)),)
97 include ../kernel_version.mk
98 KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER)
99endif
100
101ifeq ($(NO_HARDWARE),1)
102ifeq ($(SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED),1)
103$(info WARNING: SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=1 is incompatible with NO_HARDWARE=1)
104$(info WARNING: Setting SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED=0 and switching to dc_nohw)
105override SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED := 0
106override DISPLAY_CONTROLLER := dcnohw
107KERNEL_COMPONENTS += dc_nohw
108endif
109endif
110
111include ../config/core.mk
112include ../common/android/extra_config.mk
113include ../common/opencl.mk
114
115# If set, services allows two flips to enter the processing queue,
116# and does not add read dependencies to the set of buffers last
117# flipped to.
118#
119$(eval $(call TunableKernelConfigC,SUPPORT_DC_CMDCOMPLETE_WHEN_NO_LONGER_DISPLAYED,))
120
121# On sun6i, A31-specific NV12 and NV21 formats are supported.
122#
123$(eval $(call TunableUserConfigMake,SUPPORT_ANDROID_SUNXI,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh
index 6cef8fa..9566c73 100755
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh
@@ -44,24 +44,36 @@ LANG=C
44export LANG 44export LANG
45 45
46usage() { 46usage() {
47 echo "usage: $0 [--64] --cc CC --out OUT [cflag]" 47 echo "usage: $0 [--64] [--clang] --cc CC [--out OUT] [cflag]"
48 exit 1 48 exit 1
49} 49}
50 50
51# NOTE: The program passed to the compiler is deliberately incorrect 51check_clang() {
52# (`return;' should be `return 0;') but we do this to emit a warning. 52 $CC -dM -E - </dev/null | grep __clang__ >/dev/null 2>&1
53# 53 if [ "$?" = "0" ]; then
54# Emitting a warning is necessary to get GCC to print out additional 54 # Clang must be passed a program with a main() that returns 0.
55# warnings about any unsupported -Wno options, so we can handle these 55 # It will produce an error if main() is improperly specified.
56# as unsupported by the build. 56 IS_CLANG=1
57# 57 TEST_PROGRAM="int main(void){return 0;}"
58 else
59 # If we're not clang, assume we're GCC. GCC needs to be passed
60 # a program with a faulty return in main() so that another
61 # warning (unrelated to the flag being tested) is emitted.
62 # This will cause GCC to warn about the unsupported warning flag.
63 IS_CLANG=0
64 TEST_PROGRAM="int main(void){return;}"
65 fi
66}
67
58do_cc() { 68do_cc() {
59 echo "int main(void){return;}" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1 69 echo "$TEST_PROGRAM" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1
60} 70}
61 71
62while [ 1 ]; do 72while [ 1 ]; do
63 if [ "$1" = "--64" ]; then 73 if [ "$1" = "--64" ]; then
64 BIT_CHECK=1 74 [ -z $CLANG ] && BIT_CHECK=1
75 elif [ "$1" = "--clang" ]; then
76 [ -z $BIT_CHECK ] && CLANG=1
65 elif [ "$1" = "--cc" ]; then 77 elif [ "$1" = "--cc" ]; then
66 [ "x$2" = "x" ] && usage 78 [ "x$2" = "x" ] && usage
67 CC="$2" && shift 79 CC="$2" && shift
@@ -77,20 +89,28 @@ while [ 1 ]; do
77done 89done
78 90
79[ "x$CC" = "x" ] && usage 91[ "x$CC" = "x" ] && usage
80[ "x$OUT" = "x" ] && usage 92[ "x$CLANG" = "x" -a "x$OUT" = "x" ] && usage
81ccof=$OUT/cc-sanity-check 93ccof=$OUT/cc-sanity-check
82log=${ccof}.log 94log=${ccof}.log
83 95
96check_clang
97
84if [ "x$BIT_CHECK" = "x1" ]; then 98if [ "x$BIT_CHECK" = "x1" ]; then
85 do_cc $ccof $log "" 99 do_cc $ccof $log ""
86 file $ccof | grep 64-bit >/dev/null 2>&1 100 file $ccof | grep 64-bit >/dev/null 2>&1
87 [ "$?" = "0" ] && echo true || echo false 101 [ "$?" = "0" ] && echo true || echo false
102elif [ "x$CLANG" = "x1" ]; then
103 [ "x$IS_CLANG" = "x1" ] && echo true || echo false
88else 104else
89 [ "x$1" = "x" ] && usage 105 [ "x$1" = "x" ] && usage
90 do_cc $ccof $log $1 106 do_cc $ccof $log $1
91 if [ "$?" = "0" ]; then 107 if [ "$?" = "0" ]; then
92 # compile passed, but was the warning unrecognized? 108 # compile passed, but was the warning unrecognized?
93 grep -q "^cc1: warning: unrecognized command line option \"$1\"" $log 109 if [ "x$IS_CLANG" = "x1" ]; then
110 grep "^warning: unknown warning option '$1'" $log >/dev/null 2>&1
111 else
112 grep "^cc1: warning: unrecognized command line option \"$1\"" $log >/dev/null 2>&1
113 fi
94 [ "$?" = "1" ] && echo $1 114 [ "$?" = "1" ] && echo $1
95 fi 115 fi
96fi 116fi
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk
index 26b1198..81ecb9e 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk
@@ -60,6 +60,7 @@ $(call directory-must-exist,$(TOP))
60RELATIVE_OUT := $(patsubst $(TOP)/%,%,$(OUT)) 60RELATIVE_OUT := $(patsubst $(TOP)/%,%,$(OUT))
61HOST_OUT := $(RELATIVE_OUT)/host 61HOST_OUT := $(RELATIVE_OUT)/host
62TARGET_OUT := $(RELATIVE_OUT)/target 62TARGET_OUT := $(RELATIVE_OUT)/target
63DOCS_OUT := $(RELATIVE_OUT)/docs
63CONFIG_MK := $(RELATIVE_OUT)/config.mk 64CONFIG_MK := $(RELATIVE_OUT)/config.mk
64CONFIG_H := $(RELATIVE_OUT)/config.h 65CONFIG_H := $(RELATIVE_OUT)/config.h
65CONFIG_KERNEL_MK := $(RELATIVE_OUT)/config_kernel.mk 66CONFIG_KERNEL_MK := $(RELATIVE_OUT)/config_kernel.mk
@@ -82,9 +83,9 @@ ifneq ($(INTERNAL_CLOBBER_ONLY),true)
82# 83#
83$(shell mkdir -p $(OUT)) 84$(shell mkdir -p $(OUT))
84 85
85# Provide rules to create $(HOST_OUT) and $(TARGET_OUT) 86# Provide rules to create the directories for binaries and documentation
86.SECONDARY: $(HOST_OUT) $(TARGET_OUT) 87.SECONDARY: $(HOST_OUT) $(TARGET_OUT) $(DOCS_OUT)
87$(HOST_OUT) $(TARGET_OUT): 88$(HOST_OUT) $(TARGET_OUT) $(DOCS_OUT):
88 $(make-directory) 89 $(make-directory)
89 90
90# If these generated files differ from any pre-existing ones, 91# If these generated files differ from any pre-existing ones,
@@ -201,13 +202,15 @@ endif
201# You can say 'make all_modules' to attempt to make everything, or 'make 202# You can say 'make all_modules' to attempt to make everything, or 'make
202# components' to only make the things which are listed (in the per-build 203# components' to only make the things which are listed (in the per-build
203# makefiles) as components of the build. 204# makefiles) as components of the build.
204.PHONY: all_modules components 205.PHONY: all_modules all_docs components
205all_modules: $(ALL_MODULES) 206all_modules: $(ALL_MODULES)
207all_docs: ;
206components: $(COMPONENTS) 208components: $(COMPONENTS)
209docs: $(DOCS)
207 210
208# Cleaning 211# Cleaning
209.PHONY: clean clobber 212.PHONY: clean clobber
210clean: MODULE_DIRS_TO_REMOVE := $(OUT)/host/intermediates $(OUT)/target/intermediates $(OUT)/target/kbuild 213clean: MODULE_DIRS_TO_REMOVE := $(HOST_OUT) $(TARGET_OUT) $(DOCS_OUT)
211clean: 214clean:
212 $(clean-dirs) 215 $(clean-dirs)
213clobber: MODULE_DIRS_TO_REMOVE := $(OUT) 216clobber: MODULE_DIRS_TO_REMOVE := $(OUT)
@@ -217,10 +220,14 @@ clobber:
217# Saying 'make clean-MODULE' removes the intermediates for MODULE. 220# Saying 'make clean-MODULE' removes the intermediates for MODULE.
218# clobber-MODULE deletes the output files as well 221# clobber-MODULE deletes the output files as well
219clean-%: 222clean-%:
220 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$*)) 223 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(OUT)/docs/intermediates/$*))
221 $(RM) -rf $(OUT)/host/intermediates/$*/* $(OUT)/target/intermediates/$*/* 224 $(RM) -rf $(OUT)/host/intermediates/$*/* $(OUT)/target/intermediates/$*/* $(OUT)/docs/intermediates/$*/*
222clobber-%: 225clobber-%:
223 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*))) 226 $(if $(V),,@echo " RM " $(call relative-to-top,$(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)))
224 $(RM) -rf $(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(INTERNAL_TARGETS_FOR_$*) 227 $(RM) -rf $(OUT)/host/intermediates/$* $(OUT)/target/intermediates/$* $(OUT)/docs/intermediates/$* $(INTERNAL_TARGETS_FOR_$*)
225 228
226include $(MAKE_TOP)/bits.mk 229include $(MAKE_TOP)/bits.mk
230
231# D=nobuild stops the build before any recipes are run. This line should
232# come at the end of this makefile.
233$(if $(filter nobuild,$(D)),$(error D=nobuild given),)
diff --git a/jacinto6/sgx_src/eurasia_km/include4/img_defs.h b/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
index 375ed99..bf0c360 100644
--- a/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
+++ b/jacinto6/sgx_src/eurasia_km/include4/img_defs.h
@@ -147,6 +147,71 @@ typedef char TCHAR, *PTCHAR, *PTSTR;
147#define IMG_UNDEF (~0UL) 147#define IMG_UNDEF (~0UL)
148#endif 148#endif
149 149
150/*
151 Do the right thing when using printf to output cpu addresses,
152 depending on architecture.
153 */
154#if defined (_WIN64)
155 #define UINTPTR_FMT "%016llX"
156#else
157 #if defined (__x86_64__)
158 #define UINTPTR_FMT "%016lX"
159 #else
160 #define UINTPTR_FMT "%08lX"
161 #endif
162#endif
163
164/*
165 Similarly for DEV_ and SYS_ PHYSADDRs, but this is dependent on 32/36-bit MMU
166 capability, in addition to host architecture.
167 */
168#if IMG_ADDRSPACE_PHYSADDR_BITS == 32
169 #if defined(IMG_UINT32_IS_ULONG)
170 #define CPUPADDR_FMT "%08lX"
171 #define DEVPADDR_FMT "%08lX"
172 #define SYSPADDR_FMT "%08lX"
173 #else
174 #define CPUPADDR_FMT "%08X"
175 #define DEVPADDR_FMT "%08X"
176 #define SYSPADDR_FMT "%08X"
177 #endif
178#else
179 #if defined(__x86_64__)
180 #define CPUPADDR_FMT "%016lX"
181 #define DEVPADDR_FMT "%016lX"
182 #define SYSPADDR_FMT "%016lX"
183 #else
184
185 #define CPUPADDR_FMT "%016llX"
186 #define DEVPADDR_FMT "%016llX"
187 #define SYSPADDR_FMT "%016llX"
188 #endif
189#endif
190
191/*
192 Define a printf format macro for the length property of the format-specifier
193 for size_t, that allows avoidance of C99 dependency on compilers that don't
194 support this, while still ensuring that whatever the size of size_t (eg 32,
195 64 bit Linux builds, or Win32/64 builds), a size_t (or IMG_SIZE_T) can be
196 passed to printf-type functions without a cast.
197*/
198#if defined LINUX
199 /* Use C99 format specifier where possible */
200 #define SIZE_T_FMT_LEN "z"
201#elif defined _WIN64
202 #define SIZE_T_FMT_LEN "I"
203#else
204 #define SIZE_T_FMT_LEN "l" /* May need to be updated as required, for other OSs */