summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2013-06-10 15:28:26 -0500
committerVishal Mahaveer2013-06-10 15:28:26 -0500
commit49290fec5b79ea4464b7b6db018bc1f03e4b6e49 (patch)
treec3c370a6dd58444d34732f6c475b13c138146ebf
parentcca3094bfd2e6b9bbad60eb3515347259e3c920d (diff)
downloaddevice-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.tar.gz
device-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.tar.xz
device-ti-proprietary-open-49290fec5b79ea4464b7b6db018bc1f03e4b6e49.zip
proprietary-open: jacinto6: add graphics kernel module sources
Adding kernel module sources. Branch: origin/1.9/j6-wip Commit: 6708c05 Change-Id: I01a2ed673a2ad790bf2f15d86d947aca4fe26f6c Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--jacinto6/sgx_src/eurasia_km/GPL-COPYING344
-rw-r--r--jacinto6/sgx_src/eurasia_km/INSTALL72
-rw-r--r--jacinto6/sgx_src/eurasia_km/MIT-COPYING41
-rw-r--r--jacinto6/sgx_src/eurasia_km/README49
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk112
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk217
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk219
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk61
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk68
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk47
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk326
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk53
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk156
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk63
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk43
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk40
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk604
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk140
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template92
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk49
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk91
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_module.mk75
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kernel_version.mk100
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/moduledefs.mk96
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/modules.mk49
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/Makefile193
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android/products.mk46
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/prepare_tree.mk60
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/this_makefile.mk68
-rwxr-xr-xjacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/tools/cc-check.sh99
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/toplevel.mk226
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/dbgdrvif.h381
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/img_defs.h153
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/img_types.h214
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pdumpdefs.h126
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvr_debug.h235
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvrmodule.h48
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/pvrversion.h69
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/services.h1870
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/servicesext.h965
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgx_options.h258
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgxapi_km.h524
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgxscript.h99
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/Kbuild.mk47
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw.h288
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_displayclass.c982
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_nohw/dc_nohw_linux.c376
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/Kbuild.mk48
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb.h323
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.c1722
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c1165
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/kernelbuffer.h97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/kerneldisplay.h243
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pdump.h51
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge.h2255
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvr_bridge_km.h409
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvrmmap.h81
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/pvrsrv_errors.h311
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/servicesint.h555
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_bridge.h779
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_mkif_km.h476
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgx_ukernel_status_codes.h966
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/include/sgxinfo.h489
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c5512
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.h257
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_support.c117
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/bridged_support.h72
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/sgx/bridged_sgx_bridge.c3819
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/bridged/sgx/bridged_sgx_bridge.h61
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/buffer_manager.c3573
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceclass.c2864
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/deviceid.h51
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/devicemem.c2592
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/handle.c2689
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/hash.c738
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/lists.c156
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/mem.c175
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/mem_debug.c272
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/metrics.c209
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/osfunc_common.c48
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pdump_common.c2967
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/perproc.c398
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/power.c996
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/pvrsrv.c1846
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/queue.c1503
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/ra.c2427
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/refcount.c588
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/resman.c985
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/common/ttrace.c597
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/mmu.c4600
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/mmu.h501
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/pb.c493
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgx_bridge_km.h279
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxconfig.h481
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinfokm.h606
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxinit.c3431
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxkick.c918
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxpower.c660
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxreset.c808
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxtransfer.c814
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c1914
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.h195
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/Kbuild.mk166
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/env_data.h93
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/env_perproc.h79
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/event.c414
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/event.h48
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/gc_bvmapping.c147
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/gc_bvmapping.h27
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c363
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.h74
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/linkage.h72
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/lock.h56
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.c2946
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.h751
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c1655
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.h240
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c1211
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutex.c163
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutex.h97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.c166
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h119
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c4714
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osperproc.c146
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pdump.c804
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/private_data.h95
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/proc.c1414
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/proc.h127
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_bridge_k.c524
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_debug.c506
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_uaccess.h88
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/sysfs.c90
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/sysfs.h22
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/mnemedefs.h117
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/ocpdefs.h308
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx520defs.h555
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx530defs.h542
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx531defs.h601
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx535defs.h739
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx540defs.h605
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx543_v1.164defs.h1396
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx543defs.h1487
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx544defs.h1487
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgx545defs.h1290
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxdefs.h112
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxerrata.h495
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxfeaturedefs.h274
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxmmu.h99
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/hwdefs/sgxmpdefs.h365
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/buffer_manager.h674
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/device.h409
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/handle.h567
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/hash.h277
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/lists.h349
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/metrics.h146
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/osfunc.h799
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/osperproc.h94
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/pdump_int.h100
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/pdump_km.h441
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/pdump_osfunc.h337
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/perfkm.h53
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/perproc.h150
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/power.h140
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/queue.h145
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ra.h293
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/refcount.h203
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/resman.h152
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/services_headers.h68
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/srvkm.h129
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ttrace.h200
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ttrace_common.h146
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ttrace_tokens.h119
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/include/syscommon.h397
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/oemfuncs.h80
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq.c590
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq.h97
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq_activeidle.c181
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq_cool.c104
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq_on3demand.c324
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq_onoff.c180
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sgxfreq_userspace.c124
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysconfig.c1333
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysconfig.h110
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysinfo.h64
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/syslocal.h265
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysutils.c59
-rw-r--r--jacinto6/sgx_src/eurasia_km/services4/system/omap4/sysutils_linux.c750
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/client/linuxsrv.h64
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Kbuild.mk51
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Linux.mk45
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.c2883
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv.h155
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv_ioctl.h57
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/handle.c141
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/hostfunc.h82
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/hotkey.c199
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/hotkey.h82
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/ioctl.c827
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/linux/hostfunc.c395
-rw-r--r--jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/linux/main.c355
203 files changed, 115725 insertions, 0 deletions
diff --git a/jacinto6/sgx_src/eurasia_km/GPL-COPYING b/jacinto6/sgx_src/eurasia_km/GPL-COPYING
new file mode 100644
index 0000000..83d1261
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/GPL-COPYING
@@ -0,0 +1,344 @@
1-------------------------------------------------------------------------
2
3 GNU GENERAL PUBLIC LICENSE
4 Version 2, June 1991
5
6 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
7 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8 Everyone is permitted to copy and distribute verbatim copies
9 of this license document, but changing it is not allowed.
10
11 Preamble
12
13 The licenses for most software are designed to take away your
14freedom to share and change it. By contrast, the GNU General Public
15License is intended to guarantee your freedom to share and change free
16software--to make sure the software is free for all its users. This
17General Public License applies to most of the Free Software
18Foundation's software and to any other program whose authors commit to
19using it. (Some other Free Software Foundation software is covered by
20the GNU Library General Public License instead.) You can apply it to
21your programs, too.
22
23 When we speak of free software, we are referring to freedom, not
24price. Our General Public Licenses are designed to make sure that you
25have the freedom to distribute copies of free software (and charge for
26this service if you wish), that you receive source code or can get it
27if you want it, that you can change the software or use pieces of it
28in new free programs; and that you know you can do these things.
29
30 To protect your rights, we need to make restrictions that forbid
31anyone to deny you these rights or to ask you to surrender the rights.
32These restrictions translate to certain responsibilities for you if you
33distribute copies of the software, or if you modify it.
34
35 For example, if you distribute copies of such a program, whether
36gratis or for a fee, you must give the recipients all the rights that
37you have. You must make sure that they, too, receive or can get the
38source code. And you must show them these terms so they know their
39rights.
40
41 We protect your rights with two steps: (1) copyright the software, and
42(2) offer you this license which gives you legal permission to copy,
43distribute and/or modify the software.
44
45 Also, for each author's protection and ours, we want to make certain
46that everyone understands that there is no warranty for this free
47software. If the software is modified by someone else and passed on, we
48want its recipients to know that what they have is not the original, so
49that any problems introduced by others will not reflect on the original
50authors' reputations.
51
52 Finally, any free program is threatened constantly by software
53patents. We wish to avoid the danger that redistributors of a free
54program will individually obtain patent licenses, in effect making the
55program proprietary. To prevent this, we have made it clear that any
56patent must be licensed for everyone's free use or not licensed at all.
57
58 The precise terms and conditions for copying, distribution and
59modification follow.
60
61 GNU GENERAL PUBLIC LICENSE
62 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
63
64 0. This License applies to any program or other work which contains
65a notice placed by the copyright holder saying it may be distributed
66under the terms of this General Public License. The "Program", below,
67refers to any such program or work, and a "work based on the Program"
68means either the Program or any derivative work under copyright law:
69that is to say, a work containing the Program or a portion of it,
70either verbatim or with modifications and/or translated into another
71language. (Hereinafter, translation is included without limitation in
72the term "modification".) Each licensee is addressed as "you".
73
74Activities other than copying, distribution and modification are not
75covered by this License; they are outside its scope. The act of
76running the Program is not restricted, and the output from the Program
77is covered only if its contents constitute a work based on the
78Program (independent of having been made by running the Program).
79Whether that is true depends on what the Program does.
80
81 1. You may copy and distribute verbatim copies of the Program's
82source code as you receive it, in any medium, provided that you
83conspicuously and appropriately publish on each copy an appropriate
84copyright notice and disclaimer of warranty; keep intact all the
85notices that refer to this License and to the absence of any warranty;
86and give any other recipients of the Program a copy of this License
87along with the Program.
88
89You may charge a fee for the physical act of transferring a copy, and
90you may at your option offer warranty protection in exchange for a fee.
91
92 2. You may modify your copy or copies of the Program or any portion
93of it, thus forming a work based on the Program, and copy and
94distribute such modifications or work under the terms of Section 1
95above, provided that you also meet all of these conditions:
96
97 a) You must cause the modified files to carry prominent notices
98 stating that you changed the files and the date of any change.
99
100 b) You must cause any work that you distribute or publish, that in
101 whole or in part contains or is derived from the Program or any
102 part thereof, to be licensed as a whole at no charge to all third
103 parties under the terms of this License.
104
105 c) If the modified program normally reads commands interactively
106 when run, you must cause it, when started running for such
107 interactive use in the most ordinary way, to print or display an
108 announcement including an appropriate copyright notice and a
109 notice that there is no warranty (or else, saying that you provide
110 a warranty) and that users may redistribute the program under
111 these conditions, and telling the user how to view a copy of this
112 License. (Exception: if the Program itself is interactive but
113 does not normally print such an announcement, your work based on
114 the Program is not required to print an announcement.)
115
116These requirements apply to the modified work as a whole. If
117identifiable sections of that work are not derived from the Program,
118and can be reasonably considered independent and separate works in
119themselves, then this License, and its terms, do not apply to those
120sections when you distribute them as separate works. But when you
121distribute the same sections as part of a whole which is a work based
122on the Program, the distribution of the whole must be on the terms of
123this License, whose permissions for other licensees extend to the
124entire whole, and thus to each and every part regardless of who wrote it.
125
126Thus, it is not the intent of this section to claim rights or contest
127your rights to work written entirely by you; rather, the intent is to
128exercise the right to control the distribution of derivative or
129collective works based on the Program.
130
131In addition, mere aggregation of another work not based on the Program
132with the Program (or with a work based on the Program) on a volume of
133a storage or distribution medium does not bring the other work under
134the scope of this License.
135
136 3. You may copy and distribute the Program (or a work based on it,
137under Section 2) in object code or executable form under the terms of
138Sections 1 and 2 above provided that you also do one of the following:
139
140 a) Accompany it with the complete corresponding machine-readable
141 source code, which must be distributed under the terms of Sections
142 1 and 2 above on a medium customarily used for software interchange; or,
143
144 b) Accompany it with a written offer, valid for at least three
145 years, to give any third party, for a charge no more than your
146 cost of physically performing source distribution, a complete
147 machine-readable copy of the corresponding source code, to be
148 distributed under the terms of Sections 1 and 2 above on a medium
149 customarily used for software interchange; or,
150
151 c) Accompany it with the information you received as to the offer
152 to distribute corresponding source code. (This alternative is
153 allowed only for noncommercial distribution and only if you
154 received the program in object code or executable form with such
155 an offer, in accord with Subsection b above.)
156
157The source code for a work means the preferred form of the work for
158making modifications to it. For an executable work, complete source
159code means all the source code for all modules it contains, plus any
160associated interface definition files, plus the scripts used to
161control compilation and installation of the executable. However, as a
162special exception, the source code distributed need not include
163anything that is normally distributed (in either source or binary
164form) with the major components (compiler, kernel, and so on) of the
165operating system on which the executable runs, unless that component
166itself accompanies the executable.
167
168If distribution of executable or object code is made by offering
169access to copy from a designated place, then offering equivalent
170access to copy the source code from the same place counts as
171distribution of the source code, even though third parties are not
172compelled to copy the source along with the object code.
173
174 4. You may not copy, modify, sublicense, or distribute the Program
175except as expressly provided under this License. Any attempt
176otherwise to copy, modify, sublicense or distribute the Program is
177void, and will automatically terminate your rights under this License.
178However, parties who have received copies, or rights, from you under
179this License will not have their licenses terminated so long as such
180parties remain in full compliance.
181
182 5. You are not required to accept this License, since you have not
183signed it. However, nothing else grants you permission to modify or
184distribute the Program or its derivative works. These actions are
185prohibited by law if you do not accept this License. Therefore, by
186modifying or distributing the Program (or any work based on the
187Program), you indicate your acceptance of this License to do so, and
188all its terms and conditions for copying, distributing or modifying
189the Program or works based on it.
190
191 6. Each time you redistribute the Program (or any work based on the
192Program), the recipient automatically receives a license from the
193original licensor to copy, distribute or modify the Program subject to
194these terms and conditions. You may not impose any further
195restrictions on the recipients' exercise of the rights granted herein.
196You are not responsible for enforcing compliance by third parties to
197this License.
198
199 7. If, as a consequence of a court judgment or allegation of patent
200infringement or for any other reason (not limited to patent issues),
201conditions are imposed on you (whether by court order, agreement or
202otherwise) that contradict the conditions of this License, they do not
203excuse you from the conditions of this License. If you cannot
204distribute so as to satisfy simultaneously your obligations under this
205License and any other pertinent obligations, then as a consequence you
206may not distribute the Program at all. For example, if a patent
207license would not permit royalty-free redistribution of the Program by
208all those who receive copies directly or indirectly through you, then
209the only way you could satisfy both it and this License would be to
210refrain entirely from distribution of the Program.
211
212If any portion of this section is held invalid or unenforceable under
213any particular circumstance, the balance of the section is intended to
214apply and the section as a whole is intended to apply in other
215circumstances.
216
217It is not the purpose of this section to induce you to infringe any
218patents or other property right claims or to contest validity of any
219such claims; this section has the sole purpose of protecting the
220integrity of the free software distribution system, which is
221implemented by public license practices. Many people have made
222generous contributions to the wide range of software distributed
223through that system in reliance on consistent application of that
224system; it is up to the author/donor to decide if he or she is willing
225to distribute software through any other system and a licensee cannot
226impose that choice.
227
228This section is intended to make thoroughly clear what is believed to
229be a consequence of the rest of this License.
230
231 8. If the distribution and/or use of the Program is restricted in
232certain countries either by patents or by copyrighted interfaces, the
233original copyright holder who places the Program under this License
234may add an explicit geographical distribution limitation excluding
235those countries, so that distribution is permitted only in or among
236countries not thus excluded. In such case, this License incorporates
237the limitation as if written in the body of this License.
238
239 9. The Free Software Foundation may publish revised and/or new versions
240of the General Public License from time to time. Such new versions will
241be similar in spirit to the present version, but may differ in detail to
242address new problems or concerns.
243
244Each version is given a distinguishing version number. If the Program
245specifies a version number of this License which applies to it and "any
246later version", you have the option of following the terms and conditions
247either of that version or of any later version published by the Free
248Software Foundation. If the Program does not specify a version number of
249this License, you may choose any version ever published by the Free Software
250Foundation.
251
252 10. If you wish to incorporate parts of the Program into other free
253programs whose distribution conditions are different, write to the author
254to ask for permission. For software which is copyrighted by the Free
255Software Foundation, write to the Free Software Foundation; we sometimes
256make exceptions for this. Our decision will be guided by the two goals
257of preserving the free status of all derivatives of our free software and
258of promoting the sharing and reuse of software generally.
259
260 NO WARRANTY
261
262 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
263FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
264OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
265PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
266OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
267MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
268TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
269PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
270REPAIR OR CORRECTION.
271
272 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
273WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
274REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
275INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
276OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
277TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
278YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
279PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
280POSSIBILITY OF SUCH DAMAGES.
281
282 END OF TERMS AND CONDITIONS
283
284 Appendix: How to Apply These Terms to Your New Programs
285
286 If you develop a new program, and you want it to be of the greatest
287possible use to the public, the best way to achieve this is to make it
288free software which everyone can redistribute and change under these terms.
289
290 To do so, attach the following notices to the program. It is safest
291to attach them to the start of each source file to most effectively
292convey the exclusion of warranty; and each file should have at least
293the "copyright" line and a pointer to where the full notice is found.
294
295 <one line to give the program's name and a brief idea of what it does.>
296 Copyright (C) 19yy <name of author>
297
298 This program is free software; you can redistribute it and/or modify
299 it under the terms of the GNU General Public License as published by
300 the Free Software Foundation; either version 2 of the License, or
301 (at your option) any later version.
302
303 This program is distributed in the hope that it will be useful,
304 but WITHOUT ANY WARRANTY; without even the implied warranty of
305 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
306 GNU General Public License for more details.
307
308 You should have received a copy of the GNU General Public License
309 along with this program; if not, write to the Free Software
310 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
311
312Also add information on how to contact you by electronic and paper mail.
313
314If the program is interactive, make it output a short notice like this
315when it starts in an interactive mode:
316
317 Gnomovision version 69, Copyright (C) 19yy name of author
318 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
319 This is free software, and you are welcome to redistribute it
320 under certain conditions; type `show c' for details.
321
322The hypothetical commands `show w' and `show c' should show the appropriate
323parts of the General Public License. Of course, the commands you use may
324be called something other than `show w' and `show c'; they could even be
325mouse-clicks or menu items--whatever suits your program.
326
327You should also get your employer (if you work as a programmer) or your
328school, if any, to sign a "copyright disclaimer" for the program, if
329necessary. Here is a sample; alter the names:
330
331 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
332 `Gnomovision' (which makes passes at compilers) written by James Hacker.
333
334 <signature of Ty Coon>, 1 April 1989
335 Ty Coon, President of Vice
336
337This General Public License does not permit incorporating your program into
338proprietary programs. If your program is a subroutine library, you may
339consider it more useful to permit linking proprietary applications with the
340library. If this is what you want to do, use the GNU Library General
341Public License instead of this License.
342
343-------------------------------------------------------------------------
344
diff --git a/jacinto6/sgx_src/eurasia_km/INSTALL b/jacinto6/sgx_src/eurasia_km/INSTALL
new file mode 100644
index 0000000..aefa6c3
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/INSTALL
@@ -0,0 +1,72 @@
1
2SGX Embedded Systems DDK for the Linux kernel.
3Copyright (C) Imagination Technologies Ltd. All rights reserved.
4======================================================================
5
6This file covers how to build and install the Imagination Technologies
7SGX DDK for the Linux kernel.
8
9
10Build System Environment Variables
11-------------------------------------------
12
13The SGX DDK Build scripts depend on a number of environment variables
14being setup before compilation or installation of DDK software can
15commence:
16
17$DISCIMAGE
18The DDK Build scripts install files to the location specified by the
19DISCIMAGE environment variable, when the make install target is used.
20This should point to the target filesystem.
21$ export DISCIMAGE=/path/to/filesystem
22
23$KERNELDIR
24When building the SGX DDK kernel module, the build needs access
25to the headers of the Linux kernel
26$ export KERNELDIR=/path/to/kernel
27
28$PATH
29If a cross compiler is being used make sure the PATH environment variable
30includes the path to the toolchain
31$ export PATH=$PATH:/path/to/toolchain
32
33$CROSS_COMPILE
34Since the SGX DDK Build scripts are geared toward a cross-compilation
35workflow, the CROSS_COMPILE environment variable needs to be set
36$ export CROSS_COMPILE=toolchain-prefix-
37
38
39Build and Install Instructions
40-------------------------------------------
41
42The SGX DDK configures different target builds within directories under
43eurasiacon/build/linux/.
44
45The supported build targets are:
46
47 all Makes everything
48 clean Removes all intermediate files created by a build.
49 clobber Removes all binaries for all builds as well.
50 install Runs the install script generated by the build.
51
52The following variables may be set on the command line to influence a build.
53
54 BUILD The type of build being performed.
55 Alternatives are release, timing or debug.
56 CFLAGS Build dependent optimisations and debug information flags.
57 SILENT Determines whether text of commands is produced during build.
58
59To build for, change to the appropriate target directory, e.g.:
60$ cd eurasiacon/build/linux/platform/kbuild
61
62Issue the make command:
63$ make BUILD=debug all
64
65The DDK software must be installed by the root user. Become the root user:
66$ su
67
68Install the DDK software:
69$ make install
70
71Become an ordinary user again:
72$ exit
diff --git a/jacinto6/sgx_src/eurasia_km/MIT-COPYING b/jacinto6/sgx_src/eurasia_km/MIT-COPYING
new file mode 100644
index 0000000..0cbd14e
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/MIT-COPYING
@@ -0,0 +1,41 @@
1
2This software is Copyright (C) Imagination Technologies Ltd.
3
4You may use, distribute and copy this software under the terms of the MIT
5license displayed below.
6
7-----------------------------------------------------------------------------
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19Alternatively, this Software may be used under the terms of the GNU General
20Public License Version 2 ("GPL") in which case the provisions of GPL are
21applicable instead of those above.
22
23If you wish to allow use of your version of this Software only under the terms
24of GPL, and not to allow others to use your version of this file under the
25terms of the MIT license, indicate your decision by deleting from each file
26the provisions above and replace them with the notice and other provisions
27required by GPL as set out in the file called "GPL-COPYING" included in this
28distribution. If you do not delete the provisions above, a recipient may use
29your version of this file under the terms of either the MIT license or GPL.
30
31-----------------------------------------------------------------------------
32
33EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40
41-----------------------------------------------------------------------------
diff --git a/jacinto6/sgx_src/eurasia_km/README b/jacinto6/sgx_src/eurasia_km/README
new file mode 100644
index 0000000..2eae109
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/README
@@ -0,0 +1,49 @@
1
2SGX Embedded Systems DDK for Linux kernel.
3Copyright (C) Imagination Technologies Ltd. All rights reserved.
4======================================================================
5
6
7About
8-------------------------------------------
9
10This is the Imagination Technologies SGX DDK for the Linux kernel.
11
12
13License
14-------------------------------------------
15
16You may use, distribute and copy this software under the terms of the MIT
17license. Details of this license can be found in the file "MIT-COPYING".
18
19Alternatively, you may use, distribute and copy this software under the terms
20of the GNU General Public License version 2. The full GNU General Public
21License version 2 can be found in the file "GPL-COPYING".
22
23
24Build and Install Instructions
25-------------------------------------------
26
27For details see the "INSTALL" file.
28
29To build for, change to the appropriate target directory, e.g.:
30$ cd eurasiacon/build/linux/platform/kbuild
31
32Issue the make command:
33$ make BUILD=debug all
34
35The DDK software must be installed by the root user. Become the root user:
36$ su
37
38Install the DDK software:
39# make install
40
41Become an ordinary user again:
42$ exit
43
44
45Contact information:
46-------------------------------------------
47
48Imagination Technologies Ltd. <gpl-support@imgtec.com>
49Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
new file mode 100644
index 0000000..a1a7eef
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/bits.mk
@@ -0,0 +1,112 @@
1########################################################################### ###
2#@Title Useful special targets which don't build anything
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),)
43dumpvar-%: ;
44$(foreach _var_to_dump,$(patsubst dumpvar-%,%,$(filter dumpvar-%,$(MAKECMDGOALS))),$(info $(if $(filter undefined,$(origin $(_var_to_dump))),# $$($(_var_to_dump)) is not set,$(_var_to_dump) := $($(_var_to_dump)))))
45endif
46
47ifneq ($(filter whereis-%,$(MAKECMDGOALS)),)
48whereis-%: ;
49$(foreach _module_to_find,$(patsubst whereis-%,%,$(filter whereis-%,$(MAKECMDGOALS))),$(info $(if $(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),$(INTERNAL_MAKEFILE_FOR_MODULE_$(_module_to_find)),# No module $(_module_to_find))))
50endif
51
52ifneq ($(filter whatis-%,$(MAKECMDGOALS)),)
53whatis-$(RELATIVE_OUT)/target/%: ;
54whatis-$(RELATIVE_OUT)/host/%: ;
55$(foreach _file_to_find,$(patsubst whatis-%,%,$(filter whatis-%,$(MAKECMDGOALS))),$(info $(strip $(foreach _m,$(ALL_MODULES),$(if $(filter $(_file_to_find),$(INTERNAL_TARGETS_FOR_$(_m))),$(_file_to_find) is in $(_m) which is defined in $(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)),)))))
56endif
57
58.PHONY: ls-modules
59ls-modules:
60 @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m)))))
61
62ifeq ($(strip $(MAKECMDGOALS)),visualise)
63FORMAT ?= xlib
64GRAPHVIZ ?= neato
65visualise: $(OUT)/MAKE_RULES.dot
66 $(GRAPHVIZ) -T$(FORMAT) -o $(OUT)/MAKE_RULES.$(FORMAT) $<
67$(OUT)/MAKE_RULES.dot: $(OUT)/MAKE_RULES
68 perl $(MAKE_TOP)/tools/depgraph.pl -t $(TOP) -g $(firstword $(GRAPHVIZ)) $(OUT)/MAKE_RULES >$(OUT)/MAKE_RULES.dot
69$(OUT)/MAKE_RULES: $(ALL_MAKEFILES)
70 -$(MAKE) -C $(TOP) -f $(MAKE_TOP)/toplevel.mk TOP=$(TOP) OUT=$(OUT) ls-modules -qp >$(OUT)/MAKE_RULES 2>&1
71else
72visualise:
73 @: $(error visualise specified along with other goals. This is not supported)
74endif
75
76.PHONY: help
77help:
78 @echo 'Build targets'
79 @echo ' make, make build Build all components of the build'
80 @echo ' make components Build only the user-mode components'
81 @echo ' make kbuild Build only the kernel-mode components'
82 @echo ' make MODULE Build the module MODULE and all of its dependencies'
83 @echo ' make eurasiacon/binary2_.../target/libsomething.so'
84 @echo ' Build a particular file (including intermediates)'
85 @echo 'Variables'
86 @echo ' make V=1 ... Print the commands that are executed'
87 @echo ' make W=1 ... Enable extra compiler warnings'
88 @echo ' make D=opt ... Set build system debug option (D=help for a list)'
89 @echo ' make OUT=dir ... Place output+intermediates in specified directory'
90 @echo ' EXCLUDED_APIS=... List of APIs to remove from the build'
91 @echo ' make SOMEOPTION=1 ... Set configuration options (see config/core.mk)'
92 @echo ' Defaults are set by $(PVR_BUILD_DIR)/Makefile'
93 @echo 'Clean targets'
94 @echo ' make clean Remove only intermediates for the current build'
95 @echo ' make clobber As "make clean", but remove output files too'
96 @echo ' make clean-MODULE Clean (or clobber) only files for MODULE'
97 @echo ''
98 @echo 'Special targets'
99 @echo ' make whereis-MODULE Show the path to the Linux.mk defining MODULE'
100 @echo ' make whatis-FILE Show which module builds an output FILE'
101 @echo ' make ls-modules List all modules defined by makefiles'
102
103ifneq ($(filter help,$(D)),)
104empty :=
105space := $(empty) $(empty)
106$(info Debug options)
107$(info $(space)D=modules dump module info)
108$(info $(space)D=freeze-config prevent config changes)
109$(info $(space)D=config-changes dump diffs when config changes)
110$(info Options may be combined: make D=freeze-config,config-changes)
111$(error D=help given)
112endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
new file mode 100644
index 0000000..24fa829
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk
@@ -0,0 +1,217 @@
1########################################################################### ###
2#@Title Define global variables
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@Description This file is read once at the start of the build, after reading
5# in config.mk. It should define the non-MODULE_* variables used
6# in commands, like ALL_CFLAGS
7#@License Dual MIT/GPLv2
8#
9# The contents of this file are subject to the MIT license as set out below.
10#
11# Permission is hereby granted, free of charge, to any person obtaining a copy
12# of this software and associated documentation files (the "Software"), to deal
13# in the Software without restriction, including without limitation the rights
14# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15# copies of the Software, and to permit persons to whom the Software is
16# furnished to do so, subject to the following conditions:
17#
18# The above copyright notice and this permission notice shall be included in
19# all copies or substantial portions of the Software.
20#
21# Alternatively, the contents of this file may be used under the terms of
22# the GNU General Public License Version 2 ("GPL") in which case the provisions
23# of GPL are applicable instead of those above.
24#
25# If you wish to allow use of your version of this file only under the terms of
26# GPL, and not to allow others to use your version of this file under the terms
27# of the MIT license, indicate your decision by deleting the provisions above
28# and replace them with the notice and other provisions required by GPL as set
29# out in the file called "GPL-COPYING" included in this distribution. If you do
30# not delete the provisions above, a recipient may use your version of this file
31# under the terms of either the MIT license or GPL.
32#
33# This License is also included in this distribution in the file called
34# "MIT-COPYING".
35#
36# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
37# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
38# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
40# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
41# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43### ###########################################################################
44
45ifeq ($(BUILD),debug)
46COMMON_USER_FLAGS := -O0
47else
48OPTIM ?= -O2
49COMMON_USER_FLAGS := $(OPTIM)
50endif
51
52# FIXME: We should probably audit the driver for aliasing
53#
54COMMON_USER_FLAGS += -fno-strict-aliasing
55
56# We always enable debugging. Either the release binaries are stripped
57# and the symbols put in the symbolpackage, or we're building debug.
58#
59COMMON_USER_FLAGS += -g
60
61# These flags are used for kernel, User C and User C++
62#
63COMMON_FLAGS = -W -Wall
64
65# Some GCC warnings are C only, so we must mask them from C++
66#
67COMMON_CFLAGS := $(COMMON_FLAGS) \
68 -Wdeclaration-after-statement -Wno-format-zero-length \
69 -Wmissing-prototypes -Wstrict-prototypes
70
71# Additional warnings, and optional warnings.
72#
73WARNING_CFLAGS := \
74 -Wpointer-arith -Wunused-parameter \
75 -Wmissing-format-attribute \
76 $(call cc-option,-Wno-missing-field-initializers) \
77 $(call cc-option,-fdiagnostics-show-option)
78
79ifeq ($(W),1)
80WARNING_CFLAGS += \
81 $(call cc-option,-Wbad-function-cast) \
82 $(call cc-option,-Wcast-qual) \
83 $(call cc-option,-Wcast-align) \
84 $(call cc-option,-Wconversion) \
85 $(call cc-option,-Wdisabled-optimization) \
86 $(call cc-option,-Wlogical-op) \
87 $(call cc-option,-Wmissing-declarations) \
88 $(call cc-option,-Wmissing-include-dirs) \
89 $(call cc-option,-Wnested-externs) \
90 $(call cc-option,-Wold-style-definition) \
91 $(call cc-option,-Woverlength-strings) \
92 $(call cc-option,-Wpacked) \
93 $(call cc-option,-Wpacked-bitfield-compat) \
94 $(call cc-option,-Wpadded) \
95 $(call cc-option,-Wredundant-decls) \
96 $(call cc-option,-Wshadow) \
97 $(call cc-option,-Wswitch-default) \
98 $(call cc-option,-Wvla) \
99 $(call cc-option,-Wwrite-strings)
100endif
101
102WARNING_CFLAGS += \
103 $(call cc-optional-warning,-Wunused-but-set-variable)
104
105HOST_WARNING_CFLAGS := \
106 -Wpointer-arith -Wunused-parameter \
107 -Wmissing-format-attribute \
108 $(call host-cc-option,-Wno-missing-field-initializers) \
109 $(call host-cc-option,-fdiagnostics-show-option)
110
111ifeq ($(W),1)
112HOST_WARNING_CFLAGS += \
113 $(call host-cc-option,-Wbad-function-cast) \
114 $(call host-cc-option,-Wcast-qual) \
115 $(call host-cc-option,-Wcast-align) \
116 $(call host-cc-option,-Wconversion) \
117 $(call host-cc-option,-Wdisabled-optimization) \
118 $(call host-cc-option,-Wlogical-op) \
119 $(call host-cc-option,-Wmissing-declarations) \
120 $(call host-cc-option,-Wmissing-include-dirs) \
121 $(call host-cc-option,-Wnested-externs) \
122 $(call host-cc-option,-Wold-style-definition) \
123 $(call host-cc-option,-Woverlength-strings) \
124 $(call host-cc-option,-Wpacked) \
125 $(call host-cc-option,-Wpacked-bitfield-compat) \
126 $(call host-cc-option,-Wpadded) \
127 $(call host-cc-option,-Wredundant-decls) \
128 $(call host-cc-option,-Wshadow) \
129 $(call host-cc-option,-Wswitch-default) \
130 $(call host-cc-option,-Wvla) \
131 $(call host-cc-option,-Wwrite-strings)
132endif
133
134HOST_WARNING_CFLAGS += \
135 $(call host-cc-optional-warning,-Wunused-but-set-variable)
136
137KBUILD_WARNING_CFLAGS := \
138 -Wno-unused-parameter -Wno-sign-compare
139KBUILD_WARNING_CFLAGS += \
140 $(call kernel-cc-optional-warning,-Wbad-function-cast) \
141 $(call kernel-cc-optional-warning,-Wcast-qual) \
142 $(call kernel-cc-optional-warning,-Wcast-align) \
143 $(call kernel-cc-optional-warning,-Wconversion) \
144 $(call kernel-cc-optional-warning,-Wdisabled-optimization) \
145 $(call kernel-cc-optional-warning,-Wlogical-op) \
146 $(call kernel-cc-optional-warning,-Wmissing-declarations) \
147 $(call kernel-cc-optional-warning,-Wmissing-include-dirs) \
148 $(call kernel-cc-optional-warning,-Wnested-externs) \
149 $(call kernel-cc-optional-warning,-Wno-missing-field-initializers) \
150 $(call kernel-cc-optional-warning,-Wold-style-definition) \
151 $(call kernel-cc-optional-warning,-Woverlength-strings) \
152 $(call kernel-cc-optional-warning,-Wpacked) \
153 $(call kernel-cc-optional-warning,-Wpacked-bitfield-compat) \
154 $(call kernel-cc-optional-warning,-Wpadded) \
155 $(call kernel-cc-optional-warning,-Wredundant-decls) \
156 $(call kernel-cc-optional-warning,-Wshadow) \
157 $(call kernel-cc-optional-warning,-Wswitch-default) \
158 $(call kernel-cc-optional-warning,-Wvla) \
159 $(call kernel-cc-optional-warning,-Wwrite-strings)
160
161# User C only
162#
163ALL_CFLAGS := \
164 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \
165 $(SYS_CFLAGS)
166
167ALL_HOST_CFLAGS := \
168 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS)
169
170# User C++ only
171#
172ALL_CXXFLAGS := \
173 $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \
174 -fno-rtti -fno-exceptions \
175 -Wpointer-arith -Wunused-parameter \
176 $(SYS_CXXFLAGS)
177
178ALL_HOST_CXXFLAGS := \
179 $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall
180
181# User C and C++
182#
183# NOTE: ALL_HOST_LDFLAGS should probably be using -rpath-link too, and if we
184# ever need to support building host shared libraries, it's required.
185#
186# We can't use it right now because we want to support non-GNU-compatible
187# linkers like the Darwin 'ld' which doesn't support -rpath-link.
188#
189ALL_HOST_LDFLAGS := -L$(HOST_OUT)
190ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
191
192ifneq ($(strip $(TOOLCHAIN)),)
193ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib
194endif
195
196ifneq ($(strip $(LINKER_RPATH)),)
197ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH))
198endif
199
200ALL_LDFLAGS += $(SYS_LDFLAGS)
201
202# Kernel C only
203#
204ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_WARNING_CFLAGS) \
205 $(call kernel-cc-option,-Wno-type-limits) \
206 $(call kernel-cc-option,-Wno-pointer-arith) \
207 $(call kernel-cc-option,-Wno-aggregate-return) \
208 $(call kernel-cc-option,-Wno-unused-but-set-variable)
209
210# This variable contains a list of all modules built by kbuild
211ALL_KBUILD_MODULES :=
212
213# This variable contains a list of all modules which contain C++ source files
214ALL_CXX_MODULES :=
215
216# Toolchain triple for cross environment
217CROSS_TRIPLE := $(patsubst %-,%,$(CROSS_COMPILE))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
new file mode 100644
index 0000000..25e5ed1
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/commands.mk
@@ -0,0 +1,219 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# from-one-* recipes make a thing from one source file, so they use $<. Others
42# use $(MODULE_something) instead of $^
43
44# We expect that MODULE_*FLAGS contains all the flags we need, including the
45# flags for all modules (like $(ALL_CFLAGS) and $(ALL_HOST_CFLAGS)), and
46# excluding flags for include search dirs or for linking libraries. The
47# exceptions are ALL_EXE_LDFLAGS and ALL_LIB_LDFLAGS, since they depend on the
48# type of thing being linked, so they appear in the commands below
49
50define host-o-from-one-c
51$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
52$(HOST_CC) -MD -c $(MODULE_HOST_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
53 -include $(CONFIG_H) $< -o $@
54endef
55
56define target-o-from-one-c
57$(if $(V),,@echo " CC " $(call relative-to-top,$<))
58$(CC) -MD -c $(MODULE_CFLAGS) $(MODULE_INCLUDE_FLAGS) \
59 -include $(CONFIG_H) $< -o $@
60endef
61
62# We use $(CC) to compile C++ files, and expect it to detect that it's
63# compiling C++
64define host-o-from-one-cxx
65$(if $(V),,@echo " HOST_CC " $(call relative-to-top,$<))
66$(HOST_CC) -MD -c $(MODULE_HOST_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
67 -include $(CONFIG_H) $< -o $@
68endef
69
70define target-o-from-one-cxx
71$(if $(V),,@echo " CC " $(call relative-to-top,$<))
72$(CC) -MD -c $(MODULE_CXXFLAGS) $(MODULE_INCLUDE_FLAGS) \
73 -include $(CONFIG_H) $< -o $@
74endef
75
76define host-executable-from-o
77$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
78$(HOST_CC) $(MODULE_HOST_LDFLAGS) \
79 -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
80 $(MODULE_LIBRARY_FLAGS)
81endef
82
83define host-executable-cxx-from-o
84$(if $(V),,@echo " HOST_LD " $(call relative-to-top,$@))
85$(HOST_CXX) $(MODULE_HOST_LDFLAGS) \
86 -o $@ $(sort $(MODULE_ALL_OBJECTS)) $(MODULE_LIBRARY_DIR_FLAGS) \
87 $(MODULE_LIBRARY_FLAGS)
88endef
89
90define target-executable-from-o
91$(if $(V),,@echo " LD " $(call relative-to-top,$@))
92$(CC) \
93 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
94 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
95 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
96endef
97
98define target-executable-cxx-from-o
99$(if $(V),,@echo " LD " $(call relative-to-top,$@))
100$(CXX) \
101 $(SYS_EXE_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
102 $(SYS_EXE_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_EXE_CRTEND) \
103 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
104endef
105
106define target-shared-library-from-o
107$(if $(V),,@echo " LD " $(call relative-to-top,$@))
108$(CC) -shared -Wl,-Bsymbolic \
109 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
110 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
111 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
112endef
113
114# If there were any C++ source files in a shared library, we use this recipe,
115# which runs the C++ compiler to link the final library
116define target-shared-library-cxx-from-o
117$(if $(V),,@echo " LD " $(call relative-to-top,$@))
118$(CXX) -shared -Wl,-Bsymbolic \
119 $(SYS_LIB_LDFLAGS) $(MODULE_LDFLAGS) -o $@ \
120 $(SYS_LIB_CRTBEGIN) $(sort $(MODULE_ALL_OBJECTS)) $(SYS_LIB_CRTEND) \
121 $(MODULE_LIBRARY_DIR_FLAGS) $(MODULE_LIBRARY_FLAGS) $(LIBGCC)
122endef
123
124define target-copy-debug-information
125$(OBJCOPY) --only-keep-debug $@ $(basename $@).dbg
126endef
127
128define host-strip-debug-information
129$(HOST_STRIP) --strip-unneeded $@
130endef
131
132define target-strip-debug-information
133$(STRIP) --strip-unneeded $@
134endef
135
136define target-add-debuglink
137$(if $(V),,@echo " DBGLINK " $(call relative-to-top,$(basename $@).dbg))
138$(OBJCOPY) --add-gnu-debuglink=$(basename $@).dbg $@
139endef
140
141define host-static-library-from-o
142$(if $(V),,@echo " HOST_AR " $(call relative-to-top,$@))
143$(HOST_AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
144endef
145
146define target-static-library-from-o
147$(if $(V),,@echo " AR " $(call relative-to-top,$@))
148$(AR) cru $@ $(sort $(MODULE_ALL_OBJECTS))
149endef
150
151define tab-c-from-y
152$(if $(V),,@echo " BISON " $(call relative-to-top,$<))
153$(BISON) $(MODULE_BISON_FLAGS) -o $@ -d $<
154endef
155
156define l-c-from-l
157$(if $(V),,@echo " FLEX " $(call relative-to-top,$<))
158$(FLEX) $(MODULE_FLEX_FLAGS) -o$@ $<
159endef
160
161define clean-dirs
162$(if $(V),,@echo " RM " $(call relative-to-top,$(MODULE_DIRS_TO_REMOVE)))
163$(RM) -rf $(MODULE_DIRS_TO_REMOVE)
164endef
165
166define make-directory
167$(MKDIR) -p $@
168endef
169
170define check-exports
171endef
172
173# Programs used in recipes
174
175BISON ?= bison
176CC ?= gcc
177CXX ?= g++
178HOST_CC ?= gcc
179HOST_CXX ?= g++
180JAR ?= jar
181JAVA ?= java
182JAVAC ?= javac
183ZIP ?= zip
184
185override AR := $(if $(V),,@)$(CROSS_COMPILE)ar
186override BISON := $(if $(V),,@)$(BISON)
187override BZIP2 := $(if $(V),,@)bzip2 -9
188override CC := $(if $(V),,@)$(CROSS_COMPILE)$(CC)
189override CC_CHECK := $(if $(V),,@)$(MAKE_TOP)/tools/cc-check.sh
190override CXX := $(if $(V),,@)$(CROSS_COMPILE)$(CXX)
191override CHMOD := $(if $(V),,@)chmod
192override CP := $(if $(V),,@)cp
193override ECHO := $(if $(V),,@)echo
194override FLEX := $(if $(V),,@)flex
195override GAWK := $(if $(V),,@)gawk
196override GREP := $(if $(V),,@)grep
197override HOST_AR := $(if $(V),,@)ar
198override HOST_CC := $(if $(V),,@)$(HOST_CC)
199override HOST_CXX := $(if $(V),,@)$(HOST_CXX)
200override HOST_STRIP := $(if $(V),,@)strip
201override INSTALL := $(if $(V),,@)install
202override JAR := $(if $(V),,@)$(JAR)
203override JAVA := $(if $(V),,@)$(JAVA)
204override JAVAC := $(if $(V),,@)$(JAVAC)
205override M4 := $(if $(V),,@)m4
206override MKDIR := $(if $(V),,@)mkdir
207override MV := $(if $(V),,@)mv
208override OBJCOPY := $(if $(V),,@)$(CROSS_COMPILE)objcopy
209override PDSASM := $(if $(V),,@)$(HOST_OUT)/pdsasm
210override RANLIB := $(if $(V),,@)$(CROSS_COMPILE)ranlib
211override RM := $(if $(V),,@)rm -f
212override SED := $(if $(V),,@)sed
213override STRIP := $(if $(V),,@)$(CROSS_COMPILE)strip
214override TAR := $(if $(V),,@)tar
215override TOUCH := $(if $(V),,@)touch
216override USEASM := $(if $(V),,@)$(HOST_OUT)/useasm
217override USELINK := $(if $(V),,@)$(HOST_OUT)/uselink
218override VHD2INC := $(if $(V),,@)$(HOST_OUT)/vhd2inc
219override ZIP := $(if $(V),,@)$(ZIP)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
new file mode 100644
index 0000000..23f9175
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/arch_common.mk
@@ -0,0 +1,61 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41SYS_CFLAGS := \
42 -fno-short-enums \
43 -funwind-tables \
44 -D__linux__ \
45 -I$(ANDROID_ROOT)/bionic/libc/arch-$(ANDROID_ARCH)/include \
46 -I$(ANDROID_ROOT)/bionic/libc/include \
47 -I$(ANDROID_ROOT)/bionic/libc/kernel/common \
48 -I$(ANDROID_ROOT)/bionic/libc/kernel/arch-$(ANDROID_ARCH) \
49 -I$(ANDROID_ROOT)/bionic/libm/include \
50 -I$(ANDROID_ROOT)/bionic/libm/include/$(ANDROID_ARCH) \
51 -I$(ANDROID_ROOT)/bionic/libthread_db/include \
52 -I$(ANDROID_ROOT)/frameworks/base/include \
53 -isystem $(ANDROID_ROOT)/system/core/include \
54 -I$(ANDROID_ROOT)/hardware/libhardware/include \
55 -I$(ANDROID_ROOT)/external/openssl/include
56
57SYS_EXE_LDFLAGS := \
58 -Bdynamic -nostdlib -Wl,-dynamic-linker,/system/bin/linker \
59 -lc -ldl -lcutils
60
61SYS_LIB_LDFLAGS := $(SYS_EXE_LDFLAGS)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
new file mode 100644
index 0000000..8c3f937
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/armv7-a.mk
@@ -0,0 +1,68 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41OPTIM := -Os
42
43ANDROID_ARCH := arm
44include ../common/android/arch_common.mk
45
46SYS_CFLAGS += -march=armv7-a
47
48SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o
49SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o
50
51# Handle the removal of the armelf.x and armelf.xsc linker scripts.
52ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),)
53# The linker scripts have been removed. We need to use these options
54# instead.
55SYS_EXE_LDFLAGS += -Wl,-z,relro -Wl,-z,now
56SYS_LIB_LDFLAGS += -Wl,-z,relro -Wl,-z,now
57else
58# The linker scripts are still present in the Android tree, so we need to
59# use them.
60SYS_EXE_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.x
61SYS_LIB_LDFLAGS += -Wl,-T$(ANDROID_ROOT)/build/core/armelf.xsc
62endif
63
64JNI_CPU_ABI := armeabi
65
66# Android builds are usually GPL
67#
68LDM_PLATFORM ?= 1
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
new file mode 100644
index 0000000..320804e
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/extra_config.mk
@@ -0,0 +1,47 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41
42$(eval $(call BothConfigC,ANDROID,))
43
44
45
46
47
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
new file mode 100644
index 0000000..8a60fb7
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
@@ -0,0 +1,326 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41include ../common/android/platform_version.mk
42
43# Basic support option tuning for Android
44#
45SUPPORT_ANDROID_PLATFORM := 1
46SUPPORT_OPENGLES1_V1_ONLY := 1
47
48# Meminfo IDs are required for buffer stamps
49#
50SUPPORT_MEMINFO_IDS := 1
51
52# Need multi-process support in PDUMP
53#
54SUPPORT_PDUMP_MULTI_PROCESS := 1
55
56# Always print debugging after 5 seconds of no activity
57#
58CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
59
60# Android WSEGL is always the same
61#
62OPK_DEFAULT := libpvrANDROID_WSEGL.so
63
64# srvkm is always built, but bufferclass_example is only built
65# before EGL_image_external was generally available.
66#
67KERNEL_COMPONENTS := srvkm
68ifeq ($(is_at_least_honeycomb),0)
69KERNEL_COMPONENTS += bufferclass_example
70endif
71
72# Kernel modules are always installed here under Android
73#
74PVRSRV_MODULE_BASEDIR := /system/modules/
75
76# Use the new PVR_DPF implementation to allow lower message levels
77# to be stripped from production drivers
78#
79PVRSRV_NEW_PVR_DPF := 1
80
81# Production Android builds don't want PVRSRVGetDCSystemBuffer
82#
83SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER := 0
84
85# Prefer to limit the 3D parameters heap to <16MB and move the
86# extra 48MB to the general heap. This only affects cores with
87# 28bit MMUs (520, 530, 531, 540).
88#
89SUPPORT_LARGE_GENERAL_HEAP := 1
90
91# Enable a page pool for uncached memory allocations. This improves
92# the performance of such allocations because the pages are temporarily
93# not returned to Linux and therefore do not have to be re-invalidated
94# (fewer cache invalidates are needed).
95#
96# Default the cache size to a maximum of 5400 pages (~21MB). If using
97# newer Linux kernels (>=3.0) the cache may be reclaimed and become
98# smaller than this maximum during runtime.
99#
100PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
101
102##############################################################################
103# EGL connect/disconnect hooks only available since Froyo
104# Obsolete in future versions
105#
106ifeq ($(is_at_least_froyo),1)
107ifeq ($(is_at_least_icecream_sandwich),0)
108PVR_ANDROID_HAS_CONNECT_DISCONNECT := 1
109endif
110endif
111
112##############################################################################
113# Override surface field name for older versions
114#
115ifeq ($(is_at_least_gingerbread),0)
116PVR_ANDROID_SURFACE_FIELD_NAME := \"mSurface\"
117endif
118
119##############################################################################
120# Provide ANativeWindow{Buffer,} typedefs for older versions
121#
122ifeq ($(is_at_least_gingerbread),0)
123PVR_ANDROID_NEEDS_ANATIVEWINDOW_TYPEDEF := 1
124endif
125ifeq ($(is_at_least_icecream_sandwich),0)
126PVR_ANDROID_NEEDS_ANATIVEWINDOWBUFFER_TYPEDEF := 1
127endif
128
129##############################################################################
130# Handle various platform includes for unittests
131#
132UNITTEST_INCLUDES := eurasiacon/android
133
134ifeq ($(is_at_least_gingerbread),1)
135UNITTEST_INCLUDES += $(ANDROID_ROOT)/frameworks/base/native/include
136endif
137
138ifeq ($(is_at_least_jellybean),1)
139UNITTEST_INCLUDES += \
140 $(ANDROID_ROOT)/frameworks/native/include \
141 $(ANDROID_ROOT)/frameworks/native/opengl/include \
142 $(ANDROID_ROOT)/libnativehelper/include
143# FIXME: This is the old location for the JNI header.
144UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include
145else
146UNITTEST_INCLUDES += \
147 $(ANDROID_ROOT)/frameworks/base/opengl/include \
148 $(ANDROID_ROOT)/dalvik/libnativehelper/include
149endif
150
151# But it doesn't have OpenVG headers
152#
153UNITTEST_INCLUDES += eurasiacon/unittests/include
154
155##############################################################################
156# Future versions moved proprietary libraries to a vendor directory
157#
158ifeq ($(is_at_least_gingerbread),1)
159SHLIB_DESTDIR := /system/vendor/lib
160DEMO_DESTDIR := /system/vendor/bin
161else
162SHLIB_DESTDIR := /system/lib
163DEMO_DESTDIR := /system/bin
164endif
165
166# EGL libraries go in a special place
167#
168EGL_DESTDIR := $(SHLIB_DESTDIR)/egl
169
170##############################################################################
171# We can support OpenCL in the build since Froyo (stlport was added in 2.2)
172#
173ifeq ($(is_at_least_froyo),1)
174SYS_CXXFLAGS := \
175 -fuse-cxa-atexit \
176 $(SYS_CFLAGS) \
177 -I$(ANDROID_ROOT)/bionic \
178 -I$(ANDROID_ROOT)/external/stlport/stlport
179else
180SYS_CXXFLAGS := \
181 $(SYS_CFLAGS) \
182 -I$(ANDROID_ROOT)/bionic/libstdc++/include
183endif
184
185##############################################################################
186# Composition bypass feature, supported since Froyo.
187# In ICS, hardware composer (HWC) should be used instead.
188#
189ifeq ($(is_at_least_froyo),1)
190ifeq ($(is_at_least_honeycomb),0)
191PVR_ANDROID_HAS_NATIVE_BUFFER_TRANSFORM := 1
192SUPPORT_ANDROID_COMPOSITION_BYPASS := 1
193endif
194endif
195
196##############################################################################
197# In ICS, we have hardware composer (HWC) support.
198#
199# SUPPORT_ANDROID_COMPOSER_HAL adds Post2() to the framebuffer HAL interface
200# and is intended for inter-op with external HWC modules. It is always
201# enabled (but we allow it to be compiled out just in case).
202#
203# SUPPORT_ANDROID_COMPOSITION_BYPASS adds a new buffer type (client buffers
204# allocated from the framebuffer pool) which maximizes compatibility with
205# most 3rdparty display controllers. It is orthogonal to HWC support.
206#
207ifeq ($(is_at_least_honeycomb),1)
208SUPPORT_ANDROID_COMPOSER_HAL := 1
209endif
210
211##############################################################################
212# We have some extra GRALLOC_USAGE bits we need to handle in ICS
213#
214ifeq ($(is_at_least_honeycomb),1)
215PVR_ANDROID_HAS_GRALLOC_USAGE_EXTERNAL_DISP := 1
216PVR_ANDROID_HAS_GRALLOC_USAGE_PROTECTED := 1
217PVR_ANDROID_HAS_GRALLOC_USAGE_PRIVATE := 1
218endif
219
220##############################################################################
221# Support the new OES_EGL_image_external extension + YV12 buffers
222#
223ifeq ($(is_at_least_honeycomb),1)
224PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YV12 := 1
225GLES1_EXTENSION_EGL_IMAGE_EXTERNAL := 1
226GLES2_EXTENSION_EGL_IMAGE_EXTERNAL := 1
227endif
228
229##############################################################################
230# Gingerbread adds the native window cancelBuffer operation
231#
232ifeq ($(is_at_least_gingerbread),1)
233PVR_ANDROID_HAS_CANCELBUFFER := 1
234endif
235
236##############################################################################
237# Versions prior to ICS have another header we must include
238#
239ifeq ($(is_at_least_icecream_sandwich),0)
240PVR_ANDROID_HAS_ANDROID_NATIVE_BUFFER_H := 1
241endif
242
243##############################################################################
244# ICS added dump() hook to gralloc alloc_device_t API
245#
246ifeq ($(is_at_least_honeycomb),1)
247PVR_ANDROID_HAS_GRALLOC_DUMP := 1
248endif
249
250##############################################################################
251# ICS added support for the BGRX pixel format, and allows drivers to advertise
252# configs in this format instead of RGBX.
253#
254# The DDK provides a private definition of HAL_PIXEL_FORMAT_BGRX_8888. This
255# option exposes it as the native visual for 8888 configs with alpha ignored
256#
257ifeq ($(is_at_least_icecream_sandwich),1)
258SUPPORT_HAL_PIXEL_FORMAT_BGRX := 1
259endif
260
261##############################################################################
262# ICS added the ability for GL clients to pre-rotate their rendering to the
263# orientation desired by the compositor. The SGX DDK can use TRANSFORM_HINT
264# to access this functionality.
265#
266# This is required by some HWC implementations that cannot use the display
267# to rotate buffers, otherwise the HWC optimization cannot be used when
268# rotating the device.
269#
270ifeq ($(is_at_least_icecream_sandwich),1)
271PVR_ANDROID_HAS_WINDOW_TRANSFORM_HINT := 1
272endif
273
274##############################################################################
275# ICS requires that at least one driver EGLConfig advertises the
276# EGL_RECORDABLE_ANDROID attribute. The platform requires that surfaces
277# rendered with this config can be consumed by an OMX video encoder.
278#
279ifeq ($(is_at_least_icecream_sandwich),1)
280EGL_EXTENSION_ANDROID_RECORDABLE := 1
281endif
282
283##############################################################################
284# ICS added a new usage bit. USAGE_HW_COMPOSER indicates that a buffer might
285# be used with HWComposer. In practice this is all non-MM buffers.
286#
287ifeq ($(is_at_least_icecream_sandwich),1)
288PVR_ANDROID_HAS_GRALLOC_USAGE_HW_COMPOSER := 1
289endif
290
291##############################################################################
292# ICS added the EGL_ANDROID_blob_cache extension. Enable support for this
293# extension in EGL/GLESv2.
294#
295ifeq ($(is_at_least_icecream_sandwich),1)
296EGL_EXTENSION_ANDROID_BLOB_CACHE := 1
297endif
298
299##############################################################################
300# ICS MR1 added a new usage bit. USAGE_HW_VIDEO_ENCODER indicates that a
301# buffer might be used with the video encoder.
302#
303ifeq ($(is_at_least_icecream_sandwich_mr1),1)
304PVR_ANDROID_HAS_GRALLOC_USAGE_HW_VIDEO_ENCODER := 1
305endif
306
307##############################################################################
308# ICS and earlier should rate-limit composition by waiting for 3D renders
309# to complete in the compositor's eglSwapBuffers().
310#
311ifeq ($(is_at_least_jellybean),0)
312PVR_ANDROID_COMPOSITOR_WAIT_FOR_RENDER := 1
313endif
314
315##############################################################################
316# JB added a new corkscrew API for userland backtracing.
317#
318ifeq ($(is_at_least_jellybean),1)
319PVR_ANDROID_HAS_CORKSCREW_API := 1
320endif
321
322# Placeholder for future version handling
323#
324ifeq ($(is_future_version),1)
325-include ../common/android/future_version.mk
326endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
new file mode 100644
index 0000000..5c8f000
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/paths.mk
@@ -0,0 +1,53 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41TARGET_BUILD_TYPE ?= release
42
43OUT_DIR ?= $(ANDROID_ROOT)/out
44
45ifeq ($(TARGET_BUILD_TYPE),debug)
46TARGET_ROOT := $(OUT_DIR)/debug/target
47else
48TARGET_ROOT := $(OUT_DIR)/target
49endif
50
51TOOLCHAIN ?= $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/obj
52
53LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
new file mode 100644
index 0000000..698efa3
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
@@ -0,0 +1,156 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41# Figure out the version of Android we're building against.
42#
43PLATFORM_VERSION := $(shell \
44 if [ -f $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop ]; then \
45 cat $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop | \
46 grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \
47 else \
48 echo 4.0.3; \
49 fi)
50
51define version-starts-with
52$(shell echo $(PLATFORM_VERSION) | grep -q ^$(1); \
53 [ "$$?" = "0" ] && echo 1 || echo 0)
54endef
55
56# ro.build.version.release contains the version number for release builds, or
57# the version codename otherwise. In this case we need to assume that the
58# version of Android we're building against has the features that are in the
59# final release of that version, so we set PLATFORM_VERSION to the
60# corresponding release number.
61#
62ifeq ($(call version-starts-with,Eclair),1)
63PLATFORM_VERSION := 2.0
64else ifeq ($(call version-starts-with,Froyo),1)
65PLATFORM_VERSION := 2.2
66else ifeq ($(call version-starts-with,Gingerbread),1)
67PLATFORM_VERSION := 2.3
68else ifeq ($(call version-starts-with,Honeycomb),1)
69PLATFORM_VERSION := 3.0
70else ifeq ($(call version-starts-with,IceCreamSandwichMR),1)
71PLATFORM_VERSION := 4.0.3
72else ifeq ($(call version-starts-with,IceCreamSandwich),1)
73PLATFORM_VERSION := 4.0
74else ifeq ($(call version-starts-with,JellyBean),1)
75PLATFORM_VERSION := 4.1
76else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
77PLATFORM_VERSION := 5.0
78endif
79
80PLATFORM_VERSION_MAJ := $(shell echo $(PLATFORM_VERSION) | cut -f1 -d'.')
81PLATFORM_VERSION_MIN := $(shell echo $(PLATFORM_VERSION) | cut -f2 -d'.')
82PLATFORM_VERSION_PATCH := $(shell echo $(PLATFORM_VERSION) | cut -f3 -d'.')
83
84# Not all versions have a patchlevel; fix that up here
85#
86ifeq ($(PLATFORM_VERSION_PATCH),)
87PLATFORM_VERSION_PATCH := 0
88endif
89
90# Macros to help categorize support for features and API_LEVEL for tests.
91#
92is_at_least_eclair := \
93 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
94 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
95 test $(PLATFORM_VERSION_MIN) -ge 0 ) ) && echo 1 || echo 0)
96is_at_least_froyo := \
97 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
98 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
99 test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0)
100is_at_least_gingerbread := \
101 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 2 || \
102 ( test $(PLATFORM_VERSION_MAJ) -eq 2 && \
103 test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
104is_at_least_honeycomb := \
105 $(shell test $(PLATFORM_VERSION_MAJ) -ge 3 && echo 1 || echo 0)
106is_at_least_icecream_sandwich := \
107 $(shell test $(PLATFORM_VERSION_MAJ) -ge 4 && echo 1 || echo 0)
108is_at_least_icecream_sandwich_mr1 := \
109 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
110 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
111 ( test $(PLATFORM_VERSION_MIN) -ge 1 || \
112 test $(PLATFORM_VERSION_PATCH) -ge 3 ) ) ) && echo 1 || echo 0)
113is_at_least_jellybean := \
114 $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
115 ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
116 test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0)
117
118# FIXME: Assume "future versions" are >=5.0, but we don't really know
119is_future_version := \
120 $(shell ( test $(PLATFORM_VERSION_MAJ) -ge 5 ) && echo 1 || echo 0)
121
122# Picking an exact match of API_LEVEL for the platform we're building
123# against can avoid compatibility theming and affords better integration.
124#
125ifeq ($(is_future_version),1)
126API_LEVEL := 17
127else ifeq ($(is_at_least_jellybean),1)
128API_LEVEL := 16
129else ifeq ($(is_at_least_icecream_sandwich),1)
130# MR1 15
131API_LEVEL := 14
132else ifeq ($(is_at_least_honeycomb),1)
133# MR2 13
134# MR1 12
135API_LEVEL := 11
136else ifeq ($(is_at_least_gingerbread),1)
137# MR1 10
138API_LEVEL := 9
139else ifeq ($(is_at_least_froyo),1)
140API_LEVEL := 8
141else ifeq ($(is_at_least_eclair),1)
142# MR1 7
143# 2.0.1 6
144API_LEVEL := 5
145else
146$(error Must build against Android >= 2.0)
147endif
148
149# Each DDK is tested against only a single version of the platform.
150# Warn if a different platform version is used.
151#
152ifeq ($(is_future_version),1)
153$(info WARNING: Android version is newer than this DDK supports)
154else ifneq ($(is_at_least_icecream_sandwich),1)
155$(info WARNING: Android version is older than this DDK supports)
156endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
new file mode 100644
index 0000000..5d0289f
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/dridrm.mk
@@ -0,0 +1,63 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM,))
42$(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM_EXT,))
43$(eval $(call TunableKernelConfigC,SUPPORT_DRI_DRM_PLUGIN,))
44
45
46$(eval $(call TunableBothConfigMake,SUPPORT_DRI_DRM,))
47
48ifeq ($(SUPPORT_DRI_DRM),1)
49ifeq ($(SUPPORT_DRI_DRM_NO_LIBDRM),1)
50endif
51$(eval $(call TunableKernelConfigC,PVR_SECURE_DRM_AUTH_EXPORT,))
52$(eval $(call TunableKernelConfigC,SUPPORT_DRM_MODESET,))
53endif
54
55$(eval $(call TunableKernelConfigC,PVR_DISPLAY_CONTROLLER_DRM_IOCTL,))
56
57$(eval $(call TunableBothConfigC,PVR_DRI_DRM_NOT_PCI))
58$(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI))
59
60$(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,))
61
62
63export EXTERNAL_3PDD_TARBALL
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
new file mode 100644
index 0000000..153159a
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/omap4.mk
@@ -0,0 +1,43 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,))
42$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,))
43$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk
new file mode 100644
index 0000000..b5f84d4
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/opencl.mk
@@ -0,0 +1,40 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
new file mode 100644
index 0000000..247d1e1
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
@@ -0,0 +1,604 @@
1########################################################################### ###
2#@Title Root build configuration.
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# Configuration wrapper for new build system. This file deals with
43# configuration of the build. Add to this file anything that deals
44# with switching driver options on/off and altering the defines or
45# objects the build uses.
46#
47# At the end of this file is an exhaustive list of all variables
48# that are passed between the platform/config stage and the generic
49# build. PLEASE refrain from adding more variables than necessary
50# to this stage -- almost all options can go through config.h.
51#
52
53################################# MACROS ####################################
54
55# Write out a kernel GNU make option.
56#
57define KernelConfigMake
58$$(shell echo "override $(1) := $(2)" >>$(CONFIG_KERNEL_MK).new)
59endef
60
61# Write out a GNU make option for both user & kernel
62#
63define BothConfigMake
64$$(eval $$(call KernelConfigMake,$(1),$(2)))
65endef
66
67# Conditionally write out a kernel GNU make option
68#
69define TunableKernelConfigMake
70ifneq ($$($(1)),)
71ifneq ($$($(1)),0)
72$$(eval $$(call KernelConfigMake,$(1),$$($(1))))
73endif
74else
75ifneq ($(2),)
76$$(eval $$(call KernelConfigMake,$(1),$(2)))
77endif
78endif
79endef
80
81# Conditionally write out a GNU make option for both user & kernel
82#
83define TunableBothConfigMake
84$$(eval $$(call TunableKernelConfigMake,$(1),$(2)))
85endef
86
87# Write out a kernel-only option
88#
89define KernelConfigC
90$$(shell echo "#define $(1) $(2)" >>$(CONFIG_KERNEL_H).new)
91endef
92
93# Write out an option for both user & kernel
94#
95define BothConfigC
96$$(eval $$(call KernelConfigC,$(1),$(2)))
97endef
98
99# Conditionally write out a kernel-only option
100#
101define TunableKernelConfigC
102ifneq ($$($(1)),)
103ifneq ($$($(1)),0)
104ifeq ($$($(1)),1)
105$$(eval $$(call KernelConfigC,$(1),))
106else
107$$(eval $$(call KernelConfigC,$(1),$$($(1))))
108endif
109endif
110else
111ifneq ($(2),)
112ifeq ($(2),1)
113$$(eval $$(call KernelConfigC,$(1),))
114else
115$$(eval $$(call KernelConfigC,$(1),$(2)))
116endif
117endif
118endif
119endef
120
121# Conditionally write out an option for both user & kernel
122#
123define TunableBothConfigC
124$$(eval $$(call TunableKernelConfigC,$(1),$(2)))
125endef
126
127############################### END MACROS ##################################
128
129# Check we have a new enough version of GNU make.
130#
131need := 3.81
132ifeq ($(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))),)
133$(error A version of GNU make >= $(need) is required - this is version $(MAKE_VERSION))
134endif
135
136# Try to guess EURASIAROOT if it wasn't set. Check this location.
137#
138_GUESSED_EURASIAROOT := $(abspath ../../../..)
139ifneq ($(strip $(EURASIAROOT)),)
140# We don't want to warn about EURASIAROOT if it's empty: this might mean that
141# it's not set at all anywhere, but it could also mean that it's set like
142# "export EURASIAROOT=" or "make EURASIAROOT= sometarget". If it is set but
143# empty, we'll act as if it's unset and not warn.
144ifneq ($(strip $(EURASIAROOT)),$(_GUESSED_EURASIAROOT))
145nothing :=
146space := $(nothing) $(nothing)
147$(warning EURASIAROOT is set (via: $(origin EURASIAROOT)), but its value does not)
148$(warning match the root of this source tree, so it is being ignored)
149$(warning EURASIAROOT is set to: $(EURASIAROOT))
150$(warning $(space)The detected root is: $(_GUESSED_EURASIAROOT))
151$(warning To suppress this message, unset EURASIAROOT or set it empty)
152endif
153# else, EURASIAROOT matched the actual root of the source tree: don't warn
154endif
155override EURASIAROOT := $(_GUESSED_EURASIAROOT)
156TOP := $(EURASIAROOT)
157
158ifneq ($(words $(TOP)),1)
159$(warning This source tree is located in a path which contains whitespace,)
160$(warning which is not supported.)
161$(warning $(space)The root is: $(TOP))
162$(error Whitespace found in $$(TOP))
163endif
164
165$(call directory-must-exist,$(TOP))
166
167include ../defs.mk
168
169# Infer PVR_BUILD_DIR from the directory configuration is launched from.
170# Check anyway that such a directory exists.
171#
172PVR_BUILD_DIR := $(notdir $(abspath .))
173$(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR))
174
175# Output directory for configuration, object code,
176# final programs/libraries, and install/rc scripts.
177#
178BUILD ?= release
179# TI: Added SGX type to binary build location so builds for different GPUs
180# with the same build directory are put in different places
181OUT ?= $(TOP)/eurasiacon/binary2_$(SGXCORE)_$(SGX_CORE_REV)_$(PVR_BUILD_DIR)_$(BUILD)
182override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT))
183
184CONFIG_MK := $(OUT)/config.mk
185CONFIG_H := $(OUT)/config.h
186CONFIG_KERNEL_MK := $(OUT)/config_kernel.mk
187CONFIG_KERNEL_H := $(OUT)/config_kernel.h
188
189# Create the OUT directory and delete any previous intermediary files
190#
191$(shell mkdir -p $(OUT))
192$(shell \
193 for file in $(CONFIG_MK).new $(CONFIG_H).new \
194 $(CONFIG_KERNEL_MK).new $(CONFIG_KERNEL_H).new; do \
195 rm -f $$file; \
196 done)
197
198# Some targets don't need information about any modules. If we only specify
199# these targets on the make command line, set INTERNAL_CLOBBER_ONLY to
200# indicate that toplevel.mk shouldn't read any makefiles
201CLOBBER_ONLY_TARGETS := clean clobber help install
202INTERNAL_CLOBBER_ONLY :=
203ifneq ($(strip $(MAKECMDGOALS)),)
204INTERNAL_CLOBBER_ONLY := \
205$(if \
206 $(strip $(foreach _cmdgoal,$(MAKECMDGOALS),\
207 $(if $(filter $(_cmdgoal),$(CLOBBER_ONLY_TARGETS)),,x))),,true)
208endif
209
210# For a clobber-only build, we shouldn't regenerate any config files, or
211# require things like SGXCORE to be set
212ifneq ($(INTERNAL_CLOBBER_ONLY),true)
213
214-include ../config/user-defs.mk
215
216# FIXME: Backwards compatibility remaps.
217#
218ifeq ($(SUPPORT_SLC),1)
219SGX_FEATURE_SYSTEM_CACHE := 1
220endif
221ifeq ($(BYPASS_SLC),1)
222SGX_BYPASS_SYSTEM_CACHE := 1
223endif
224ifeq ($(BYPASS_DCU),1)
225SGX_BYPASS_DCU := 1
226endif
227ifneq ($(SGXCOREREV),)
228SGX_CORE_REV := $(SGXCOREREV)
229endif
230
231# Core handling
232#
233ifeq ($(SGXCORE),)
234$(error Must specify SGXCORE)
235endif
236ifeq ($(SGX_CORE_REV),)
237override USE_SGX_CORE_REV_HEAD := 1
238else ifeq ($(SGX_CORE_REV),000)
239override USE_SGX_CORE_REV_HEAD := 1
240override SGX_CORE_REV :=
241else
242override USE_SGX_CORE_REV_HEAD := 0
243endif
244
245# Enforced dependencies. Move this to an include.
246#
247ifeq ($(SUPPORT_LINUX_USING_WORKQUEUES),1)
248override PVR_LINUX_USING_WORKQUEUES := 1
249override PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE := 1
250override PVR_LINUX_TIMERS_USING_WORKQUEUES := 1
251override SYS_CUSTOM_POWERLOCK_WRAP := 1
252else ifeq ($(SUPPORT_LINUX_USING_SHARED_WORKQUEUES),1)
253override PVR_LINUX_USING_WORKQUEUES := 1
254override PVR_LINUX_MISR_USING_WORKQUEUE := 1
255override PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE := 1
256override SYS_CUSTOM_POWERLOCK_WRAP := 1
257endif
258
259ifneq ($(PDUMP),1)
260override SUPPORT_PDUMP_MULTI_PROCESS := 0
261endif
262
263ifeq ($(SUPPORT_HYBRID_PB),1)
264override SUPPORT_SHARED_PB := 1
265override SUPPORT_PERCONTEXT_PB := 1
266else ifeq ($(SUPPORT_PERCONTEXT_PB),1)
267override SUPPORT_SHARED_PB := 0
268endif
269
270ifeq ($(NO_HARDWARE),1)
271override SYS_USING_INTERRUPTS := 0
272override SUPPORT_HW_RECOVERY := 0
273override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0
274endif
275
276# We're bumping against USSE limits on older cores because the ukernel
277# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and
278# PVRSRV_USSE_EDM_STATUS_DEBUG=1.
279#
280# Automatically disable vistest support if debugging the ukernel to
281# prevent build failures.
282#
283ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),)
284ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1)
285SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden
286ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden)
287$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
288SGX_DISABLE_VISTEST_SUPPORT := 1
289endif
290endif
291endif
292
293ifeq ($(SGXCORE),535)
294ifeq ($(PVRSRV_USSE_EDM_STATUS_DEBUG),1)
295SUPPORT_SGX_HWPERF ?= not-overridden
296ifeq ($(SUPPORT_SGX_HWPERF),not-overridden)
297$(warning Setting SUPPORT_SGX_HWPERF=0 because PVRSRV_USSE_EDM_STATUS_DEBUG=1)
298SUPPORT_SGX_HWPERF := 0
299endif
300endif
301PVR2D_ALT_2DHW ?= 0
302endif
303
304# Multi-core handling must be done separately to other options
305# Also do some sanity checks
306#
307ifeq ($(SGX_FEATURE_MP),1)
308ifeq ($(SGX_FEATURE_MP_CORE_COUNT),)
309ifeq ($(SGX_FEATURE_MP_CORE_COUNT_TA),)
310$(error Must specify SGX_FEATURE_MP_CORE_COUNT or both SGX_FEATURE_MP_CORE_COUNT_TA and SGX_FEATURE_MP_CORE_COUNT_3D with SGX_FEATURE_MP)
311else
312$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_TA,$(SGX_FEATURE_MP_CORE_COUNT_TA)))
313endif
314ifeq ($(SGX_FEATURE_MP_CORE_COUNT_3D),)
315$(error Must specify SGX_FEATURE_MP_CORE_COUNT or both SGX_FEATURE_MP_CORE_COUNT_TA and SGX_FEATURE_MP_CORE_COUNT_3D with SGX_FEATURE_MP)
316else
317$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT_3D,$(SGX_FEATURE_MP_CORE_COUNT_3D)))
318endif
319else
320$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT,$(SGX_FEATURE_MP_CORE_COUNT)))
321endif
322endif
323
324# Rather than requiring the user to have to define two variables (one quoted,
325# one not), make PVRSRV_MODNAME a non-tunable and give it an overridable
326# default here.
327#
328PVRSRV_MODNAME ?= pvrsrvkm
329
330# The user didn't set CROSS_COMPILE. There's probably nothing wrong
331# with that, but we'll let them know anyway.
332#
333ifeq ($(CROSS_COMPILE),)
334$(warning CROSS_COMPILE is not set. Target components will be built with the host compiler)
335endif
336
337# The user is trying to set one of the old SUPPORT_ options on the
338# command line or in the environment. This isn't supported any more
339# and will often break the build. The user is generally only trying
340# to remove a component from the list of targets to build, so we'll
341# point them at the new way of doing this.
342define sanity-check-support-option-origin
343ifeq ($$(filter undefined file,$$(origin $(1))),)
344$$(warning *** Setting $(1) via $$(origin $(1)) is deprecated)
345$$(error If you are trying to disable a component, use e.g. EXCLUDED_APIS="opengles1 opengl")
346endif
347endef
348$(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SUPPORT_EWS SUPPORT_OPENGLES1 SUPPORT_OPENGLES2 SUPPORT_OPENVG SUPPORT_OPENCL SUPPORT_OPENGL SUPPORT_UNITTESTS SUPPORT_XORG,$(eval $(call sanity-check-support-option-origin,$(_o))))
349
350# Check for words in EXCLUDED_APIS that aren't understood by the
351# common/apis/*.mk files. This should be kept in sync with all the tests on
352# EXCLUDED_APIS in those files
353_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts
354_unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS)))
355ifneq ($(_unrecognised),)
356$(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised))
357$(warning *** EXCLUDED_APIS was set via: $(origin EXCLUDED_APIS))
358$(error Excludable APIs are: $(_excludable_apis))
359endif
360
361# Build's selected list of components
362#
363-include components.mk
364
365# PDUMP needs extra components
366#
367ifeq ($(PDUMP),1)
368ifneq ($(COMPONENTS),)
369COMPONENTS += pdump
370endif
371ifeq ($(SUPPORT_DRI_DRM),1)
372EXTRA_PVRSRVKM_COMPONENTS += dbgdrv
373else
374KERNEL_COMPONENTS += dbgdrv
375endif
376endif
377
378ifeq ($(SUPPORT_PVR_REMOTE),1)
379ifneq ($(filter pvr2d,$(COMPONENTS)),)
380COMPONENTS += null_pvr2d_remote
381endif
382COMPONENTS += pvrvncsrv
383endif
384
385# If KERNELDIR is set, write it out to the config.mk, with
386# KERNEL_COMPONENTS and KERNEL_ID
387#
388ifneq ($(strip $(KERNELDIR)),)
389include ../kernel_version.mk
390PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/
391$(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR)))
392# Needed only by install script
393$(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS)))
394$(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,))
395$(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,))
396
397# If KERNEL_CROSS_COMPILE is set to "undef", this is magically
398# equivalent to being unset. If it is unset, we use CROSS_COMPILE
399# (which might also be unset). If it is set, use it directly.
400ifneq ($(KERNEL_CROSS_COMPILE),undef)
401KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE)
402$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,))
403endif
404
405# Check the KERNELDIR has a kernel built and also check that it is
406# not 64-bit, which we do not support.
407VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux))
408ifneq ($(VMLINUX),)
409VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false)
410ifneq ($(VMLINUX_IS_64BIT),false)
411$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.)
412endif
413else
414$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.)
415endif
416endif
417
418
419# Ideally configured by platform Makefiles, as necessary
420#
421
422# Invariant options for Linux
423#
424$(eval $(call BothConfigC,LINUX,))
425
426$(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\""))
427$(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\""))
428$(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\""))
429
430$(eval $(call TunableBothConfigC,SGXCORE,))
431$(eval $(call BothConfigC,SGX$(SGXCORE),))
432$(eval $(call BothConfigC,SUPPORT_SGX$(SGXCORE),))
433
434$(eval $(call TunableBothConfigC,SUPPORT_SGX,1))
435$(eval $(call TunableBothConfigC,SGX_CORE_REV,))
436$(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,))
437
438$(eval $(call BothConfigC,TRANSFER_QUEUE,))
439$(eval $(call BothConfigC,PVR_SECURE_HANDLES,))
440
441ifneq ($(DISPLAY_CONTROLLER),)
442$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER)))
443endif
444
445PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0
446ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
447PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
448include ../kernel_version.mk
449ifeq ($(call kernel-version-at-least,3,0),true)
450PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1
451endif
452endif
453$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
454$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,))
455$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,))
456
457
458$(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM)))
459
460
461# Build-type dependent options
462#
463$(eval $(call BothConfigMake,BUILD,$(BUILD)))
464
465ifeq ($(BUILD),debug)
466$(eval $(call BothConfigC,DEBUG,))
467$(eval $(call KernelConfigC,DEBUG_LINUX_MEMORY_ALLOCATIONS,))
468$(eval $(call KernelConfigC,DEBUG_LINUX_MEM_AREAS,))
469$(eval $(call KernelConfigC,DEBUG_LINUX_MMAP_AREAS,))
470$(eval $(call KernelConfigC,DEBUG_BRIDGE_KM,))
471else ifeq ($(BUILD),release)
472$(eval $(call BothConfigC,RELEASE,))
473$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
474else ifeq ($(BUILD),timing)
475$(eval $(call BothConfigC,TIMING,))
476$(eval $(call TunableBothConfigMake,DEBUGLINK,1))
477else
478$(error BUILD= must be either debug, release or timing)
479endif
480
481# User-configurable options
482#
483$(eval $(call TunableBothConfigC,SUPPORT_PERCONTEXT_PB,1))
484$(eval $(call TunableBothConfigC,SUPPORT_SHARED_PB,))
485$(eval $(call TunableBothConfigC,SUPPORT_HYBRID_PB,))
486$(eval $(call TunableBothConfigC,SUPPORT_HW_RECOVERY,1))
487$(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1))
488$(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1))
489$(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1))
490$(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,))
491$(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1))
492$(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,))
493$(eval $(call TunableBothConfigC,SUPPORT_DBGDRV_EVENT_OBJECTS,1))
494$(eval $(call TunableBothConfigC,SGX_FEATURE_SYSTEM_CACHE,))
495$(eval $(call TunableBothConfigC,SGX_BYPASS_SYSTEM_CACHE,))
496$(eval $(call TunableBothConfigC,SGX_BYPASS_DCU,))
497$(eval $(call TunableBothConfigC,SGX_FAST_DPM_INIT,))
498$(eval $(call TunableBothConfigC,SGX_FEATURE_MP,))
499$(eval $(call TunableBothConfigC,SGX_FEATURE_MP_PLUS,))
500$(eval $(call TunableBothConfigC,FPGA,))
501$(eval $(call TunableBothConfigC,PDUMP,))
502$(eval $(call TunableBothConfigC,NO_HARDWARE,))
503$(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,))
504$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,))
505$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,))
506$(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,))
507$(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1))
508$(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,))
509$(eval $(call TunableBothConfigC,PVRSRV_NEW_PVR_DPF,))
510$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_DPF,))
511$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_ASSERT,))
512$(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,))
513$(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,))
514$(eval $(call TunableBothConfigC,SUPPORT_ION,))
515$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,))
516$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1))
517$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,))
518
519$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1))
520$(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1))
521$(eval $(call TunableKernelConfigC,SGX_DYNAMIC_TIMING_INFO,))
522$(eval $(call TunableKernelConfigC,SYS_SGX_ACTIVE_POWER_LATENCY_MS,))
523$(eval $(call TunableKernelConfigC,SYS_CUSTOM_POWERLOCK_WRAP,))
524$(eval $(call TunableKernelConfigC,PVR_LINUX_USING_WORKQUEUES,))
525$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_WORKQUEUE,))
526$(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE,))
527$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,))
528$(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,))
529$(eval $(call TunableKernelConfigC,LDM_PLATFORM,))
530$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,))
531$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,))
532$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\""))
533$(eval $(call TunableKernelConfigC,LDM_PCI,))
534$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_MK_TRACE,))
535$(eval $(call TunableKernelConfigC,PVRSRV_DUMP_KERNEL_CCB,))
536$(eval $(call TunableKernelConfigC,PVRSRV_REFCOUNT_DEBUG,))
537$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,))
538$(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,))
539$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,))
540$(eval $(call TunableKernelConfigC,TTRACE,))
541
542ifeq ($(BUILD),debug)
543$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,1))
544else
545$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS,))
546endif
547
548$(eval $(call TunableKernelConfigC,CONFIG_PVR_PROC_FS_HEAP_ALLOC_DEBUG,))
549
550$(eval $(call TunableBothConfigMake,SUPPORT_ION,))
551
552
553$(eval $(call TunableBothConfigMake,OPTIM,))
554
555
556$(eval $(call TunableKernelConfigMake,TTRACE,))
557
558endif # INTERNAL_CLOBBER_ONLY
559
560export INTERNAL_CLOBBER_ONLY
561export TOP
562export OUT
563
564MAKE_ETC := -Rr --no-print-directory -C $(TOP) TOP=$(TOP) OUT=$(OUT) \
565 -f eurasiacon/build/linux2/toplevel.mk
566
567# This must match the default value of MAKECMDGOALS below, and the default
568# goal in toplevel.mk
569.DEFAULT_GOAL := build
570
571ifeq ($(MAKECMDGOALS),)
572MAKECMDGOALS := build
573else
574# We can't pass autogen to toplevel.mk
575MAKECMDGOALS := $(filter-out autogen,$(MAKECMDGOALS))
576endif
577
578.PHONY: autogen
579autogen:
580ifeq ($(INTERNAL_CLOBBER_ONLY),)
581 @$(MAKE) -s --no-print-directory -C $(EURASIAROOT) \
582 -f eurasiacon/build/linux2/prepare_tree.mk \
583 LDM_PCI=$(LDM_PCI) LDM_PLATFORM=$(LDM_PLATFORM)
584else
585 @:
586endif
587
588# This deletes built-in suffix rules. Otherwise the submake isn't run when
589# saying e.g. "make thingy.a"
590.SUFFIXES:
591
592# Because we have a match-anything rule below, we'll run the main build when
593# we're actually trying to remake various makefiles after they're read in.
594# These rules try to prevent that
595%.mk: ;
596Makefile%: ;
597Makefile: ;
598
599.PHONY: build kbuild install
600build kbuild install: autogen
601 @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
602
603%: autogen
604 @$(if $(MAKECMDGOALS),$(MAKE) $(MAKE_ETC) $(MAKECMDGOALS) $(eval MAKECMDGOALS :=),:)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
new file mode 100644
index 0000000..621e03e
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/defs.mk
@@ -0,0 +1,140 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41define must-be-defined
42$(if $(filter undefined,$(origin $(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must be defined),)
43endef
44
45define must-be-nonempty
46$(if $(strip $($(1))),,$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain a value))
47endef
48
49define directory-must-exist
50$(if $(wildcard $(abspath $(1)/)),,$(error Directory $(1) must exist))
51endef
52
53define one-word-only
54$(if $(filter-out $(firstword $($(1))),$($(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must contain only one word),)
55endef
56
57define target-intermediates-of
58$(addprefix $(TARGET_OUT)/intermediates/$(1)/,$(2))
59endef
60
61define host-intermediates-of
62$(addprefix $(HOST_OUT)/intermediates/$(1)/,$(2))
63endef
64
65define module-library
66$(patsubst lib%.so,%,$(if $($(1)_target),$($(1)_target),$(1).so))
67endef
68
69# This is done to allow module type makefiles to use $(THIS_MAKEFILE)
70define register-module
71INTERNAL_MAKEFILE_FOR_MODULE_$(1) := $(THIS_MAKEFILE)
72endef
73
74define process-module
75THIS_MODULE := $(1)
76THIS_MAKEFILE := $(INTERNAL_MAKEFILE_FOR_MODULE_$(1))
77include $$(MAKE_TOP)/this_makefile.mk
78$$(call must-be-nonempty,THIS_MAKEFILE)
79$$(call must-be-nonempty,$(1)_type)
80MODULE_HOST_BUILD := $$(if $(filter host_%,$($(1)_type)),true,)
81include $$(MAKE_TOP)/moduledefs.mk
82include $$(MAKE_TOP)/$$(patsubst host_%,%,$($(1)_type)).mk
83INTERNAL_TARGETS_FOR_$(THIS_MODULE) := $(MODULE_TARGETS)
84endef
85
86# This can be used by module_type.mk files to indicate that they can't be
87# built as host_module_type
88define target-build-only
89$(if $(filter true,$(MODULE_HOST_BUILD)),$(error In makefile $(THIS_MAKEFILE): Module $(THIS_MODULE) attempted to build a host $(1), which is not supported))
90endef
91
92define relative-to-top
93$(patsubst $(TOP)/%,%,$(1))
94endef
95
96define cc-check
97$(shell \
98 CC_CHECK=$(patsubst @%,%,$(CC_CHECK)) && \
99 $(patsubst @%,%,$(CHMOD)) +x $$CC_CHECK && \
100 $$CC_CHECK --cc "$(1)" --out "$(2)" $(3))
101endef
102
103define cc-is-64bit
104$(call cc-check,$(1),$(OUT),--64)
105endef
106
107define cc-option
108$(call cc-check,$(patsubst @%,%,$(CC)),$(OUT),$(1))
109endef
110
111define cxx-option
112$(call cc-check,$(patsubst @%,%,$(CXX)),$(OUT),$(1))
113endef
114
115define host-cc-option
116$(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1))
117endef
118
119define kernel-cc-option
120$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1))
121endef
122
123# Turn a particular warning on, or explicitly turn it off, depending on
124# the value of W. The "-W" or "-Wno-" part of the warning need not be
125# specified.
126define cc-optional-warning
127$(call cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
128endef
129
130define host-cc-optional-warning
131$(call host-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
132endef
133
134define kernel-cc-optional-warning
135$(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1))))
136endef
137
138define module-info-line
139$(if $(filter modules,$(D)),$(info $(1)),)
140endef
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template
new file mode 100644
index 0000000..9d88941
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/Makefile.template
@@ -0,0 +1,92 @@
1########################################################################### ###
2#@Title Root kernel makefile
3#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4#@License Dual MIT/GPLv2
5#
6# The contents of this file are subject to the MIT license as set out below.
7#
8# Permission is hereby granted, free of charge, to any person obtaining a copy
9# of this software and associated documentation files (the "Software"), to deal
10# in the Software without restriction, including without limitation the rights
11# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12# copies of the Software, and to permit persons to whom the Software is
13# furnished to do so, subject to the following conditions:
14#
15# The above copyright notice and this permission notice shall be included in
16# all copies or substantial portions of the Software.
17#
18# Alternatively, the contents of this file may be used under the terms of
19# the GNU General Public License Version 2 ("GPL") in which case the provisions
20# of GPL are applicable instead of those above.
21#
22# If you wish to allow use of your version of this file only under the terms of
23# GPL, and not to allow others to use your version of this file under the terms
24# of the MIT license, indicate your decision by deleting the provisions above
25# and replace them with the notice and other provisions required by GPL as set
26# out in the file called "GPL-COPYING" included in this distribution. If you do
27# not delete the provisions above, a recipient may use your version of this file
28# under the terms of either the MIT license or GPL.
29#
30# This License is also included in this distribution in the file called
31# "MIT-COPYING".
32#
33# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40### ###########################################################################
41
42# This top-level kbuild makefile builds all the Linux kernel modules in the
43# DDK. To run kbuild, this makefile is copied to $(TARGET_OUT)/kbuild/Makefile
44# and make is invoked in $(TARGET_OUT)/kbuild.
45
46# This makefile doesn't define any kbuild special variables apart from
47# ccflags-y and obj-m. The variables for objects are picked up by including
48# the kbuild makefile fragments named in $(INTERNAL_KBUILD_MAKEFILES). The
49# list of objects that these fragments make is collected in
50# $(INTERNAL_KBUILD_OBJECTS) and $(INTERNAL_EXTRA_KBUILD_OBJECTS). These
51# variables are set according to the build's $(KERNEL_COMPONENTS) and
52# $(EXTRA_PVRSRVKM_COMPONENTS). To add a new kernel module to the build, edit
53# these variables in the per-build Makefile.
54
55include $(OUT)/config_kernel.mk
56
57.SECONDARY:
58
59$(OUT)/target/kbuild/external/%.c: $(EXTRA_KBUILD_SOURCE)/%.c
60 @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
61 @if [ ! -h $@ ]; then ln -sf $< $@; fi
62
63$(OUT)/target/kbuild/%.c: $(TOP)/%.c
64 @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
65 @if [ ! -h $@ ]; then ln -sf $< $@; fi
66
67ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \
68 -DDEBUG_LOG_PATH_TRUNCATE="\"$(OUT)/target/kbuild\"" \
69 -I$(OUT)/include \
70 -I$(TOP)/include4 \
71 -I$(TOP)/services4/include \
72 -I$(TOP)/services4/system/$(PVR_SYSTEM) \
73 -I$(TOP)/services4/system/include \
74 -I$(TOP)/services4/srvkm/bridged \
75 -I$(TOP)/services4/srvkm/bridged/sgx \
76 -I$(TOP)/services4/srvkm/common \
77 -I$(TOP)/services4/srvkm/devices/sgx \
78 -I$(TOP)/services4/srvkm/env/linux \
79 -I$(TOP)/services4/srvkm/include
80
81ifeq ($(PVR_LOCAL_HWDEFS),)
82ccflags-y += -I$(TOP)/services4/srvkm/hwdefs
83else
84ccflags-y += -I$(TOP)/hwdefs
85endif
86
87include $(INTERNAL_KBUILD_MAKEFILES)
88
89$(if $(pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y),,$(error pvrsrvkm_sgx$(SGXCORE)_$(SGX_CORE_REV)-y was empty, which could mean that srvkm is missing from $$(KERNEL_COMPONENTS)))
90pvrsrvkm-y += $(foreach _m,$(INTERNAL_EXTRA_KBUILD_OBJECTS:.o=),$($(_m)-y))
91
92obj-m += $(INTERNAL_KBUILD_OBJECTS)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk
new file mode 100644
index 0000000..d3aa147
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/external_tarball.mk
@@ -0,0 +1,49 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11# copies of the Software, and to permit persons to whom the Software is
12# furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice shall be included in
15# all copies or substantial portions of the Software.
16#
17# Alternatively, the contents of this file may be used under the terms of
18# the GNU General Public License Version 2 ("GPL") in which case the provisions
19# of GPL are applicable instead of those above.
20#
21# If you wish to allow use of your version of this file only under the terms of
22# GPL, and not to allow others to use your version of this file under the terms
23# of the MIT license, indicate your decision by deleting the provisions above
24# and replace them with the notice and other provisions required by GPL as set
25# out in the file called "GPL-COPYING" included in this distribution. If you do
26# not delete the provisions above, a recipient may use your version of this file
27# under the terms of either the MIT license or GPL.
28#
29# This License is also included in this distribution in the file called
30# "MIT-COPYING".
31#
32# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
33# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
34# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
36# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39### ###########################################################################
40
41ifneq ($(EXTERNAL_3PDD_TARBALL),)
42TAR_OPT_STRIP_COMPONENTS ?= --strip-components
43prepare_tree: $(OUT)/target/kbuild/external
44$(OUT)/target/kbuild/external: eurasiacon/external/$(EXTERNAL_3PDD_TARBALL)
45 @echo "Extracting $<.."
46 @mkdir -p $@
47 @tar $(TAR_OPT_STRIP_COMPONENTS) 1 --touch -jxf $< -C $@
48 @touch $(OUT)/target/kbuild/external
49endif
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk
new file mode 100644
index 0000000..94e2100
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk
@@ -0,0 +1,91 @@
1########################################################################### ###
2#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
3#@License Dual MIT/GPLv2
4#
5# The contents of this file are subject to the MIT license as set out below.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a copy
8# of this software and associated documentation files (the "Software"), to deal
9# in the Software without restriction, including without limitation the rights
<