Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -bur pvr-source.orig/eurasiacon/build/linux2/buildvars.mk pvr-source/eurasiacon/build/linux2/buildvars.mk
- --- pvr-source.orig/eurasiacon/build/linux2/buildvars.mk 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/eurasiacon/build/linux2/buildvars.mk 2014-12-17 03:56:00.000000000 -0500
- @@ -42,12 +42,32 @@
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- ### ###########################################################################
- +# NOTE: You must *not* use the cc-option et al macros in COMMON_FLAGS,
- +# COMMON_CFLAGS or COMMON_USER_FLAGS. These flags are shared between
- +# host and target, which might use compilers with different capabilities.
- +
- +# These flags are used for kernel, User C and User C++
- +#
- +COMMON_FLAGS := -W -Wall
- +
- +# Some GCC warnings are C only, so we must mask them from C++
- +#
- +COMMON_CFLAGS := $(COMMON_FLAGS) \
- + -Wdeclaration-after-statement -Wno-format-zero-length \
- + -Wstrict-prototypes
- +
- +# User C and User C++ optimization control. Does not affect kernel.
- +#
- ifeq ($(BUILD),debug)
- COMMON_USER_FLAGS := -O0
- else
- OPTIM ?= -O2
- +ifeq ($(USE_LTO),1)
- +COMMON_USER_FLAGS := $(OPTIM) -flto
- +else
- COMMON_USER_FLAGS := $(OPTIM)
- endif
- +endif
- # FIXME: We should probably audit the driver for aliasing
- #
- @@ -58,26 +78,40 @@
- #
- COMMON_USER_FLAGS += -g
- -# These flags are used for kernel, User C and User C++
- +# User C and User C++ warning flags
- #
- -COMMON_FLAGS = -W -Wall
- -
- -# Some GCC warnings are C only, so we must mask them from C++
- -#
- -COMMON_CFLAGS := $(COMMON_FLAGS) \
- - -Wdeclaration-after-statement -Wno-format-zero-length \
- - -Wmissing-prototypes -Wstrict-prototypes
- +COMMON_USER_FLAGS += \
- + -Wpointer-arith -Wunused-parameter \
- + -Wmissing-format-attribute
- # Additional warnings, and optional warnings.
- #
- -WARNING_CFLAGS := \
- - -Wpointer-arith -Wunused-parameter \
- - -Wmissing-format-attribute \
- +TESTED_TARGET_USER_FLAGS := \
- $(call cc-option,-Wno-missing-field-initializers) \
- - $(call cc-option,-fdiagnostics-show-option)
- + $(call cc-option,-fdiagnostics-show-option) \
- + $(call cc-option,-Wno-self-assign) \
- + $(call cc-option,-Wno-parentheses-equality)
- +TESTED_HOST_USER_FLAGS := \
- + $(call host-cc-option,-Wno-missing-field-initializers) \
- + $(call host-cc-option,-fdiagnostics-show-option) \
- + $(call host-cc-option,-Wno-self-assign) \
- + $(call host-cc-option,-Wno-parentheses-equality)
- +
- +# These flags are clang-specific.
- +# -Wno-unused-command-line-argument works around a buggy interaction
- +# with ccache, see https://bugzilla.samba.org/show_bug.cgi?id=8118
- +# -fcolor-diagnostics force-enables colored error messages which
- +# get disabled when ccache is piped through ccache.
- +#
- +TESTED_TARGET_USER_FLAGS += \
- + $(call cc-option,-Qunused-arguments) \
- + $(call cc-option,-fcolor-diagnostics)
- +TESTED_HOST_USER_FLAGS += \
- + $(call host-cc-option,-Qunused-arguments) \
- + $(call host-cc-option,-fcolor-diagnostics)
- ifeq ($(W),1)
- -WARNING_CFLAGS += \
- +TESTED_TARGET_USER_FLAGS += \
- $(call cc-option,-Wbad-function-cast) \
- $(call cc-option,-Wcast-qual) \
- $(call cc-option,-Wcast-align) \
- @@ -97,19 +131,7 @@
- $(call cc-option,-Wswitch-default) \
- $(call cc-option,-Wvla) \
- $(call cc-option,-Wwrite-strings)
- -endif
- -
- -WARNING_CFLAGS += \
- - $(call cc-optional-warning,-Wunused-but-set-variable)
- -
- -HOST_WARNING_CFLAGS := \
- - -Wpointer-arith -Wunused-parameter \
- - -Wmissing-format-attribute \
- - $(call host-cc-option,-Wno-missing-field-initializers) \
- - $(call host-cc-option,-fdiagnostics-show-option)
- -
- -ifeq ($(W),1)
- -HOST_WARNING_CFLAGS += \
- +TESTED_HOST_USER_FLAGS += \
- $(call host-cc-option,-Wbad-function-cast) \
- $(call host-cc-option,-Wcast-qual) \
- $(call host-cc-option,-Wcast-align) \
- @@ -131,12 +153,20 @@
- $(call host-cc-option,-Wwrite-strings)
- endif
- -HOST_WARNING_CFLAGS += \
- +TESTED_TARGET_USER_FLAGS += \
- + $(call cc-optional-warning,-Wunused-but-set-variable)
- +TESTED_HOST_USER_FLAGS += \
- $(call host-cc-optional-warning,-Wunused-but-set-variable)
- -KBUILD_WARNING_CFLAGS := \
- +KBUILD_FLAGS := \
- -Wno-unused-parameter -Wno-sign-compare
- -KBUILD_WARNING_CFLAGS += \
- +
- +TESTED_KBUILD_FLAGS := \
- + $(call kernel-cc-option,-Wmissing-include-dirs) \
- + $(call kernel-cc-option,-Wno-type-limits) \
- + $(call kernel-cc-option,-Wno-pointer-arith) \
- + $(call kernel-cc-option,-Wno-aggregate-return) \
- + $(call kernel-cc-option,-Wno-unused-but-set-variable) \
- $(call kernel-cc-optional-warning,-Wbad-function-cast) \
- $(call kernel-cc-optional-warning,-Wcast-qual) \
- $(call kernel-cc-optional-warning,-Wcast-align) \
- @@ -161,22 +191,31 @@
- # User C only
- #
- ALL_CFLAGS := \
- - $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \
- + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(TESTED_TARGET_USER_FLAGS) \
- $(SYS_CFLAGS)
- -
- ALL_HOST_CFLAGS := \
- - $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS)
- + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(TESTED_HOST_USER_FLAGS)
- # User C++ only
- #
- ALL_CXXFLAGS := \
- - $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \
- -fno-rtti -fno-exceptions \
- - -Wpointer-arith -Wunused-parameter \
- + $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_TARGET_USER_FLAGS) \
- $(SYS_CXXFLAGS)
- -
- ALL_HOST_CXXFLAGS := \
- - $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall
- + -fno-rtti -fno-exceptions \
- + $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_HOST_USER_FLAGS)
- +
- +# Workaround for some target clangs that don't support -O0 w/ PIC.
- +#
- +ifeq ($(cc-is-clang),true)
- +ALL_CFLAGS := $(patsubst -O0,-O1,$(ALL_CFLAGS))
- +ALL_CXXFLAGS := $(patsubst -O0,-O1,$(ALL_CXXFLAGS))
- +endif
- +
- +# Kernel C only
- +#
- +ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_FLAGS) $(TESTED_KBUILD_FLAGS)
- # User C and C++
- #
- @@ -186,27 +225,28 @@
- # We can't use it right now because we want to support non-GNU-compatible
- # linkers like the Darwin 'ld' which doesn't support -rpath-link.
- #
- +# For the same reason (Darwin 'ld') don't bother checking for text
- +# relocations in host binaries.
- +#
- ALL_HOST_LDFLAGS := -L$(HOST_OUT)
- -ALL_LDFLAGS := -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
- +ALL_LDFLAGS := \
- + -Wl,--warn-shared-textrel \
- + -L$(TARGET_OUT) -Xlinker -rpath-link=$(TARGET_OUT)
- ifneq ($(strip $(TOOLCHAIN)),)
- ALL_LDFLAGS += -L$(TOOLCHAIN)/lib -Xlinker -rpath-link=$(TOOLCHAIN)/lib
- endif
- +ifneq ($(strip $(TOOLCHAIN2)),)
- +ALL_LDFLAGS += -L$(TOOLCHAIN2)/lib -Xlinker -rpath-link=$(TOOLCHAIN2)/lib
- +endif
- +
- ifneq ($(strip $(LINKER_RPATH)),)
- ALL_LDFLAGS += $(addprefix -Xlinker -rpath=,$(LINKER_RPATH))
- endif
- ALL_LDFLAGS += $(SYS_LDFLAGS)
- -# Kernel C only
- -#
- -ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) $(KBUILD_WARNING_CFLAGS) \
- - $(call kernel-cc-option,-Wno-type-limits) \
- - $(call kernel-cc-option,-Wno-pointer-arith) \
- - $(call kernel-cc-option,-Wno-aggregate-return) \
- - $(call kernel-cc-option,-Wno-unused-but-set-variable)
- -
- # This variable contains a list of all modules built by kbuild
- ALL_KBUILD_MODULES :=
- Only in pvr-source/eurasiacon/build/linux2: buildvars.mk.bak
- diff -bur pvr-source.orig/eurasiacon/build/linux2/common/android/armv7-a.mk pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk
- --- pvr-source.orig/eurasiacon/build/linux2/common/android/armv7-a.mk 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/eurasiacon/build/linux2/common/android/armv7-a.mk 2014-12-17 03:56:00.000000000 -0500
- @@ -38,16 +38,23 @@
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- ### ###########################################################################
- -OPTIM := -Os
- +OPTIM := -O2
- ANDROID_ARCH := arm
- include ../common/android/arch_common.mk
- SYS_CFLAGS += -march=armv7-a
- +ifneq ($(BUILD),debug)
- +SYS_CFLAGS += -mthumb
- +endif
- +
- SYS_EXE_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_dynamic.o
- SYS_EXE_CRTEND := $(TOOLCHAIN)/lib/crtend_android.o
- +SYS_LIB_CRTBEGIN := $(TOOLCHAIN)/lib/crtbegin_so.o
- +SYS_LIB_CRTEND := $(TOOLCHAIN)/lib/crtend_so.o
- +
- # Handle the removal of the armelf.x and armelf.xsc linker scripts.
- ifeq ($(strip $(wildcard $(ANDROID_ROOT)/build/core/armelf.x)),)
- # The linker scripts have been removed. We need to use these options
- diff -bur pvr-source.orig/eurasiacon/build/linux2/common/android/extra_config.mk pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk
- --- pvr-source.orig/eurasiacon/build/linux2/common/android/extra_config.mk 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/eurasiacon/build/linux2/common/android/extra_config.mk 2015-07-05 00:46:22.457048000 -0400
- @@ -40,6 +40,9 @@
- $(eval $(call BothConfigC,ANDROID,))
- +$(eval $(call TunableBothConfigMake,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
- +$(eval $(call TunableBothConfigC,PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC,))
- +
- diff -bur pvr-source.orig/eurasiacon/build/linux2/common/android/features.mk pvr-source/eurasiacon/build/linux2/common/android/features.mk
- --- pvr-source.orig/eurasiacon/build/linux2/common/android/features.mk 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/eurasiacon/build/linux2/common/android/features.mk 2015-07-04 20:57:04.776827000 -0400
- @@ -49,10 +49,6 @@
- #
- SUPPORT_MEMINFO_IDS := 1
- -# Need multi-process support in PDUMP
- -#
- -SUPPORT_PDUMP_MULTI_PROCESS := 1
- -
- # Always print debugging after 5 seconds of no activity
- #
- CLIENT_DRIVER_DEFAULT_WAIT_RETRIES := 50
- @@ -61,6 +57,10 @@
- #
- OPK_DEFAULT := libpvrANDROID_WSEGL.so
- +# Need multi-process support in PDUMP
- +#
- +SUPPORT_PDUMP_MULTI_PROCESS := 1
- +
- # srvkm is always built, but bufferclass_example is only built
- # before EGL_image_external was generally available.
- #
- @@ -100,6 +100,12 @@
- PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 5400
- ##############################################################################
- +# Framebuffer target extension is used to find configs compatible with
- +# the framebuffer (added in JB MR1).
- +#
- +EGL_EXTENSION_ANDROID_FRAMEBUFFER_TARGET := 1
- +
- +##############################################################################
- # EGL connect/disconnect hooks only available since Froyo
- # Obsolete in future versions
- #
- @@ -140,12 +146,11 @@
- $(ANDROID_ROOT)/frameworks/native/include \
- $(ANDROID_ROOT)/frameworks/native/opengl/include \
- $(ANDROID_ROOT)/libnativehelper/include
- -# FIXME: This is the old location for the JNI header.
- -UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper/include
- +UNITTEST_INCLUDES += $(ANDROID_ROOT)/dalvik/libnativehelper
- else
- UNITTEST_INCLUDES += \
- $(ANDROID_ROOT)/frameworks/base/opengl/include \
- - $(ANDROID_ROOT)/dalvik/libnativehelper/include
- + $(ANDROID_ROOT)/dalvik/libnativehelper/include/nativehelper
- endif
- # But it doesn't have OpenVG headers
- @@ -319,6 +324,110 @@
- PVR_ANDROID_HAS_CORKSCREW_API := 1
- endif
- +##############################################################################
- +# JB MR1 makes the framebuffer HAL obsolete.
- +#
- +# We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
- +# framebuffers and GPU buffers in a 'preferred' format.
- +#
- +ifeq ($(is_at_least_jellybean_mr1),0)
- +SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
- +else
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
- +endif
- +
- +##############################################################################
- +# JB MR1 introduces cross-process syncs associated with a fd.
- +# This requires a new enough kernel version to have the base/sync driver.
- +#
- +ifeq ($(is_at_least_jellybean_mr1),1)
- +EGL_EXTENSION_ANDROID_NATIVE_FENCE_SYNC := 0
- +PVR_ANDROID_NATIVE_WINDOW_HAS_SYNC := 0
- +endif
- +
- +##############################################################################
- +# JB MR1 introduces new usage bits for the camera HAL and some new formats.
- +#
- +ifeq ($(is_at_least_jellybean_mr1),1)
- +PVR_ANDROID_HAS_GRALLOC_USAGE_HW_CAMERA := 1
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAW_SENSOR := 1
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_BLOB := 1
- +endif
- +
- +##############################################################################
- +# JB MR2 adds a new graphics HAL (gralloc) API function, lock_ycbcr(), and
- +# a so-called "flexible" YUV format enum.
- +#
- +ifeq ($(is_at_least_jellybean_mr2),1)
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_YCbCr_420_888 := 1
- +PVR_ANDROID_GRALLOC_HAS_0_2_FEATURES := 1
- +endif
- +
- +##############################################################################
- +# In JB MR2 we can use a native helper library for the unittest wrapper.
- +# In earlier versions, we must use a less ideal approach.
- +#
- +ifeq ($(is_at_least_jellybean_mr2),0)
- +PVR_ANDROID_SURFACE_FIELD_NAME := \"mNativeSurface\"
- +endif
- +
- +##############################################################################
- +# JB MR2 introduces two new camera HAL formats (Y8, Y16)
- +#
- +ifeq ($(is_at_least_jellybean_mr2),1)
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y8 := 1
- +PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_Y16 := 1
- +endif
- +
- +##############################################################################
- +# KK's EGL wrapper remaps EGLConfigs in the BGRA and BGRX formats to RGBA and
- +# RGBX respectively, for CpuConsumer compatibility. It does this because the
- +# usage bits for the gralloc allocation are not available to EGL.
- +#
- +# In this newer platform version, gralloc has been redefined to allow the
- +# 'format' parameter to gralloc->alloc() to be ignored for non-USAGE_SW
- +# allocations, so long as the bits per channel and sRGB-ness are preserved.
- +#
- +ifeq ($(is_at_least_kitkat),1)
- +PVR_ANDROID_REMAP_HW_ONLY_PIXEL_FORMATS := 1
- +endif
- +
- +##############################################################################
- +# Support newer HWC features in KK
- +#
- +ifeq ($(is_at_least_kitkat),1)
- +PVR_ANDROID_HWC_HAS_1_3_FEATURES := 1
- +endif
- +
- +##############################################################################
- +# KK eliminated egl.cfg. Only create for older versions.
- +#
- +ifeq ($(is_at_least_kitkat),0)
- +PVR_ANDROID_HAS_EGL_CFG := 1
- +endif
- +
- +##############################################################################
- +# KK has a bug in its browser that we need to work around.
- +#
- +ifeq ($(is_at_least_kitkat),1)
- +PVR_ANDROID_RELAX_GRALLOC_MODULE_MAP_CHECKS := 1
- +endif
- +
- +##############################################################################
- +# KK's Camera HAL requires that ACTIVE_ARRAY_SIZE specify xmin/ymin first
- +#
- +ifeq ($(is_at_least_kitkat),1)
- +PVR_ANDROID_CAMERA_ACTIVE_ARRAY_SIZE_HAS_XMIN_YMIN := 1
- +endif
- +
- +##############################################################################
- +# KitKat added a new memory tracking HAL. This enables gralloc support for
- +# the GRAPHICS/GL memtrack types.
- +#
- +ifeq ($(is_at_least_kitkat),1)
- +SUPPORT_ANDROID_MEMTRACK_HAL := 1
- +endif
- +
- # Placeholder for future version handling
- #
- ifeq ($(is_future_version),1)
- Only in pvr-source/eurasiacon/build/linux2/common/android: features.mk.orig
- diff -bur pvr-source.orig/eurasiacon/build/linux2/common/android/platform_version.mk pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk
- --- pvr-source.orig/eurasiacon/build/linux2/common/android/platform_version.mk 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/eurasiacon/build/linux2/common/android/platform_version.mk 2015-07-05 04:49:05.829264451 -0400
- @@ -45,7 +45,7 @@
- cat $(TARGET_ROOT)/product/$(TARGET_PRODUCT)/system/build.prop | \
- grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \
- else \
- - echo 4.0.3; \
- + echo 5.0; \
- fi)
- define version-starts-with
- @@ -71,8 +71,16 @@
- PLATFORM_VERSION := 4.0.3
- else ifeq ($(call version-starts-with,IceCreamSandwich),1)
- PLATFORM_VERSION := 4.0
- +else ifeq ($(call version-starts-with,JellyBeanMR1),1)
- +PLATFORM_VERSION := 4.2
- +else ifeq ($(call version-starts-with,JellyBeanMR),1)
- +PLATFORM_VERSION := 4.3
- else ifeq ($(call version-starts-with,JellyBean),1)
- PLATFORM_VERSION := 4.1
- +else ifeq ($(call version-starts-with,KeyLimePie),1)
- +PLATFORM_VERSION := 4.4
- +else ifeq ($(call version-starts-with,KitKat),1)
- +PLATFORM_VERSION := 4.4
- else ifeq ($(shell echo $(PLATFORM_VERSION) | grep -qE "[A-Za-z]+"; echo $$?),0)
- PLATFORM_VERSION := 5.0
- endif
- @@ -114,6 +122,18 @@
- $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
- ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
- test $(PLATFORM_VERSION_MIN) -ge 1 ) ) && echo 1 || echo 0)
- +is_at_least_jellybean_mr1 := \
- + $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
- + ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
- + test $(PLATFORM_VERSION_MIN) -ge 2 ) ) && echo 1 || echo 0)
- +is_at_least_jellybean_mr2 := \
- + $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
- + ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
- + test $(PLATFORM_VERSION_MIN) -ge 3 ) ) && echo 1 || echo 0)
- +is_at_least_kitkat := \
- + $(shell ( test $(PLATFORM_VERSION_MAJ) -gt 4 || \
- + ( test $(PLATFORM_VERSION_MAJ) -eq 4 && \
- + test $(PLATFORM_VERSION_MIN) -ge 4 ) ) && echo 1 || echo 0)
- # FIXME: Assume "future versions" are >=5.0, but we don't really know
- is_future_version := \
- @@ -123,6 +143,12 @@
- # against can avoid compatibility theming and affords better integration.
- #
- ifeq ($(is_future_version),1)
- +API_LEVEL := 20
- +else ifeq ($(is_at_least_kitkat),1)
- +API_LEVEL := 19
- +else ifeq ($(is_at_least_jellybean_mr2),1)
- +API_LEVEL := 18
- +else ifeq ($(is_at_least_jellybean_mr1),1)
- API_LEVEL := 17
- else ifeq ($(is_at_least_jellybean),1)
- API_LEVEL := 16
- Only in pvr-source/eurasiacon/build/linux2/common/android: platform_version.mk.new
- diff -bur pvr-source.orig/services4/srvkm/devices/sgx/mmu.c pvr-source/services4/srvkm/devices/sgx/mmu.c
- --- pvr-source.orig/services4/srvkm/devices/sgx/mmu.c 2013-09-01 13:33:17.000000000 -0400
- +++ pvr-source/services4/srvkm/devices/sgx/mmu.c 2014-01-17 15:44:45.000000000 -0500
- @@ -1434,6 +1434,7 @@
- PVR_ASSERT(pui32PDEntry[i] == 0);
- #endif
- #endif
- + sDevPAddr.uiAddr = 0;
- if(_AllocPageTableMemory (pMMUHeap, ppsPTInfoList[i], &sDevPAddr) != IMG_TRUE)
- {
- PVR_DPF((PVR_DBG_ERROR, "_DeferredAllocPagetables: ERROR call to _AllocPageTableMemory failed"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement