diff options
author | Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> | 2012-07-18 00:30:31 -0300 |
---|---|---|
committer | Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> | 2012-07-18 00:30:31 -0300 |
commit | 0f9b9d9e1f16d454b12921d3429eced6dc1095d4 (patch) | |
tree | 21eaffbd85393a9e53889bbd868a255c7f6c24fc /sgx/eurasiacon/build | |
parent | 50fa520ba5f68fa76173493c44715d4542007120 (diff) |
Imported Upstream version 1.9.0.4.1.1 (ARMHF)upstream/1.9.0.4.1.1
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
Diffstat (limited to 'sgx/eurasiacon/build')
25 files changed, 1182 insertions, 746 deletions
diff --git a/sgx/eurasiacon/build/linux2/bits.mk b/sgx/eurasiacon/build/linux2/bits.mk index 173e1ef..02d7c0b 100755..100644 --- a/sgx/eurasiacon/build/linux2/bits.mk +++ b/sgx/eurasiacon/build/linux2/bits.mk @@ -1,29 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Useful special targets which don't build anything +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# - -# Useful special targets which don't build anything +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### ifneq ($(filter dumpvar-%,$(MAKECMDGOALS)),) dumpvar-%: ; @@ -41,10 +56,8 @@ whatis-$(RELATIVE_OUT)/host/%: ; $(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)),))))) endif -.PHONY: ls-modules ls-modules-v +.PHONY: ls-modules ls-modules: - @: $(foreach _m,$(ALL_MODULES),$(info $(_m))) -ls-modules-v: @: $(foreach _m,$(ALL_MODULES),$(info $($(_m)_type) $(_m) $(patsubst $(TOP)/%,%,$(INTERNAL_MAKEFILE_FOR_MODULE_$(_m))))) ifeq ($(strip $(MAKECMDGOALS)),visualise) @@ -64,18 +77,20 @@ endif .PHONY: help help: @echo 'Build targets' - @echo ' make, make build Build the UM/KM components of the build and scripts' - @echo ' make components Build only the UM components' - @echo ' make kbuild Build only the KM components' - @echo ' make scripts Build only the scripts (rc.pvr and install.sh)' - @echo ' make MODULE Build the module MODULE and all its dependencies' + @echo ' make, make build Build all components of the build' + @echo ' make components Build only the user-mode components' + @echo ' make kbuild Build only the kernel-mode components' + @echo ' make MODULE Build the module MODULE and all of its dependencies' @echo ' make eurasiacon/binary2_.../target/libsomething.so' @echo ' Build a particular file (including intermediates)' @echo 'Variables' @echo ' make V=1 ... Print the commands that are executed' + @echo ' make W=1 ... Enable extra compiler warnings' + @echo ' make D=opt ... Set build system debug option (D=help for a list)' @echo ' make OUT=dir ... Place output+intermediates in specified directory' - @echo ' make SOMEOPTION=1 ... Set configuration options (see Makefile.config)' - @echo '' + @echo ' EXCLUDED_APIS=... List of APIs to remove from the build' + @echo ' make SOMEOPTION=1 ... Set configuration options (see config/core.mk)' + @echo ' Defaults are set by $(PVR_BUILD_DIR)/Makefile' @echo 'Clean targets' @echo ' make clean Remove only intermediates for the current build' @echo ' make clobber As "make clean", but remove output files too' @@ -84,4 +99,15 @@ help: @echo 'Special targets' @echo ' make whereis-MODULE Show the path to the Linux.mk defining MODULE' @echo ' make whatis-FILE Show which module builds an output FILE' - @echo ' make ls-modules[-v] List all modules [with type+makefile]' + @echo ' make ls-modules List all modules defined by makefiles' + +ifneq ($(filter help,$(D)),) +empty := +space := $(empty) $(empty) +$(info Debug options) +$(info $(space)D=modules dump module info) +$(info $(space)D=freeze-config prevent config changes) +$(info $(space)D=config-changes dump diffs when config changes) +$(info Options may be combined: make D=freeze-config,config-changes) +$(error D=help given) +endif diff --git a/sgx/eurasiacon/build/linux2/buildvars.mk b/sgx/eurasiacon/build/linux2/buildvars.mk index e50aacb..0dd0723 100755..100644 --- a/sgx/eurasiacon/build/linux2/buildvars.mk +++ b/sgx/eurasiacon/build/linux2/buildvars.mk @@ -1,54 +1,67 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Define global variables +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@Description This file is read once at the start of the build, after reading +# in config.mk. It should define the non-MODULE_* variables used +# in commands, like ALL_CFLAGS +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# - -# -# This file is read once at the start of the build, after reading in -# config.mk. It should define the non-MODULE_* variables used in commands, -# like ALL_CFLAGS -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### ifeq ($(BUILD),debug) -COMMON_FLAGS := -Os +COMMON_USER_FLAGS := -Os else OPTIM ?= -O2 -COMMON_FLAGS := $(OPTIM) +COMMON_USER_FLAGS := $(OPTIM) endif # FIXME: We should probably audit the driver for aliasing # -COMMON_FLAGS += -fno-strict-aliasing +COMMON_USER_FLAGS += -fno-strict-aliasing # We always enable debugging. Either the release binaries are stripped # and the symbols put in the symbolpackage, or we're building debug. # -COMMON_FLAGS += -g +COMMON_USER_FLAGS += -g # These flags are used for kernel, User C and User C++ # -COMMON_FLAGS += \ - -W -Wall -Wno-missing-field-initializers -Wmissing-format-attribute +COMMON_FLAGS = -W -Wall # Some GCC warnings are C only, so we must mask them from C++ # @@ -56,11 +69,16 @@ COMMON_CFLAGS := $(COMMON_FLAGS) \ -Wdeclaration-after-statement -Wno-format-zero-length \ -Wmissing-prototypes -Wstrict-prototypes -# If we saw W=1, turn on some extra warnings. -# Most of these flags are new, so cc-option check them. +# Additional warnings, and optional warnings. # +WARNING_CFLAGS := \ + -Wpointer-arith -Wunused-parameter \ + -Wmissing-format-attribute \ + $(call cc-option,-Wno-missing-field-initializers) \ + $(call cc-option,-fdiagnostics-show-option) + ifeq ($(W),1) -COMMON_CFLAGS += \ +WARNING_CFLAGS += \ $(call cc-option,-Wbad-function-cast) \ $(call cc-option,-Wcast-qual) \ $(call cc-option,-Wcast-align) \ @@ -82,18 +100,84 @@ COMMON_CFLAGS += \ $(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 += \ + $(call host-cc-option,-Wbad-function-cast) \ + $(call host-cc-option,-Wcast-qual) \ + $(call host-cc-option,-Wcast-align) \ + $(call host-cc-option,-Wconversion) \ + $(call host-cc-option,-Wdisabled-optimization) \ + $(call host-cc-option,-Wlogical-op) \ + $(call host-cc-option,-Wmissing-declarations) \ + $(call host-cc-option,-Wmissing-include-dirs) \ + $(call host-cc-option,-Wnested-externs) \ + $(call host-cc-option,-Wold-style-definition) \ + $(call host-cc-option,-Woverlength-strings) \ + $(call host-cc-option,-Wpacked) \ + $(call host-cc-option,-Wpacked-bitfield-compat) \ + $(call host-cc-option,-Wpadded) \ + $(call host-cc-option,-Wredundant-decls) \ + $(call host-cc-option,-Wshadow) \ + $(call host-cc-option,-Wswitch-default) \ + $(call host-cc-option,-Wvla) \ + $(call host-cc-option,-Wwrite-strings) +endif + +HOST_WARNING_CFLAGS += \ + $(call host-cc-optional-warning,-Wunused-but-set-variable) + +KBUILD_WARNING_CFLAGS := \ + -Wno-unused-parameter -Wno-sign-compare +KBUILD_WARNING_CFLAGS += \ + $(call kernel-cc-optional-warning,-Wbad-function-cast) \ + $(call kernel-cc-optional-warning,-Wcast-qual) \ + $(call kernel-cc-optional-warning,-Wcast-align) \ + $(call kernel-cc-optional-warning,-Wconversion) \ + $(call kernel-cc-optional-warning,-Wdisabled-optimization) \ + $(call kernel-cc-optional-warning,-Wlogical-op) \ + $(call kernel-cc-optional-warning,-Wmissing-declarations) \ + $(call kernel-cc-optional-warning,-Wmissing-include-dirs) \ + $(call kernel-cc-optional-warning,-Wnested-externs) \ + $(call kernel-cc-optional-warning,-Wno-missing-field-initializers) \ + $(call kernel-cc-optional-warning,-Wold-style-definition) \ + $(call kernel-cc-optional-warning,-Woverlength-strings) \ + $(call kernel-cc-optional-warning,-Wpacked) \ + $(call kernel-cc-optional-warning,-Wpacked-bitfield-compat) \ + $(call kernel-cc-optional-warning,-Wpadded) \ + $(call kernel-cc-optional-warning,-Wredundant-decls) \ + $(call kernel-cc-optional-warning,-Wshadow) \ + $(call kernel-cc-optional-warning,-Wswitch-default) \ + $(call kernel-cc-optional-warning,-Wvla) \ + $(call kernel-cc-optional-warning,-Wwrite-strings) + # User C only # ALL_CFLAGS := \ - $(COMMON_CFLAGS) -Wpointer-arith -Wunused-parameter $(SYS_CFLAGS) + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(WARNING_CFLAGS) \ + $(SYS_CFLAGS) + ALL_HOST_CFLAGS := \ - $(COMMON_CFLAGS) -Wpointer-arith -Wunused-parameter + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) $(HOST_WARNING_CFLAGS) # User C++ only # ALL_CXXFLAGS := \ - $(COMMON_FLAGS) -fno-rtti -fno-exceptions \ - -Wpointer-arith -Wunused-parameter $(SYS_CXXFLAGS) + $(COMMON_USER_FLAGS) $(COMMON_FLAGS) \ + -fno-rtti -fno-exceptions \ + -Wpointer-arith -Wunused-parameter \ + $(SYS_CXXFLAGS) + +ALL_HOST_CXXFLAGS := \ + $(COMMON_USER_FLAGS) $(COMMON_CFLAGS) -Wall # User C and C++ # @@ -118,9 +202,11 @@ ALL_LDFLAGS += $(SYS_LDFLAGS) # Kernel C only # -ALL_KBUILD_CFLAGS := $(COMMON_CFLAGS) -Wno-unused-parameter -Wno-sign-compare \ - $(call cc-option,-Wno-type-limits) \ - $(call cc-option,-Wno-unused-but-set-variable) +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 := diff --git a/sgx/eurasiacon/build/linux2/commands.mk b/sgx/eurasiacon/build/linux2/commands.mk index 35d1988..71f1508 100755..100644 --- a/sgx/eurasiacon/build/linux2/commands.mk +++ b/sgx/eurasiacon/build/linux2/commands.mk @@ -1,26 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # from-one-* recipes make a thing from one source file, so they use $<. Others # use $(MODULE_something) instead of $^ diff --git a/sgx/eurasiacon/build/linux2/common/apis/xorg.mk b/sgx/eurasiacon/build/linux2/common/apis/xorg.mk index f0a8ef0..3901be0 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/apis/xorg.mk +++ b/sgx/eurasiacon/build/linux2/common/apis/xorg.mk @@ -1,29 +1,49 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title XOrg root makefile +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### ifeq ($(filter xorg,$(EXCLUDED_APIS)),) - COMPONENTS += xorg pvr_conf pvr_video wsegl_dri2_linux + COMPONENTS += xorg pvr_conf pvr_video pvr_video_bin wsegl_dri2_linux -include ../common/apis/xorg_opengl.mk +ifeq ($(SUPPORT_PVR_REMOTE),1) + COMPONENTS += pvr_input +endif endif diff --git a/sgx/eurasiacon/build/linux2/common/dridrm.mk b/sgx/eurasiacon/build/linux2/common/dridrm.mk index 86b2f08..2ae1c89 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/dridrm.mk +++ b/sgx/eurasiacon/build/linux2/common/dridrm.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### $(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM,)) $(eval $(call TunableBothConfigC,SUPPORT_DRI_DRM_EXT,)) @@ -35,6 +51,7 @@ ifeq ($(SUPPORT_DRI_DRM),1) ifeq ($(SUPPORT_DRI_DRM_NO_LIBDRM),1) endif $(eval $(call TunableKernelConfigC,PVR_SECURE_DRM_AUTH_EXPORT,)) +$(eval $(call TunableKernelConfigC,SUPPORT_DRM_MODESET,)) endif $(eval $(call TunableKernelConfigC,PVR_DISPLAY_CONTROLLER_DRM_IOCTL,)) @@ -44,4 +61,5 @@ $(eval $(call TunableBothConfigMake,PVR_DRI_DRM_NOT_PCI)) $(eval $(call TunableKernelConfigC,PVR_DRI_DRM_PLATFORM_DEV,)) + export EXTERNAL_3PDD_TARBALL diff --git a/sgx/eurasiacon/build/linux2/common/omap4.mk b/sgx/eurasiacon/build/linux2/common/omap4.mk index 8c0a172..256b860 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/omap4.mk +++ b/sgx/eurasiacon/build/linux2/common/omap4.mk @@ -1,27 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### -$(eval $(call TunableBothConfigC,PVR_NO_FULL_CACHE_OPS,)) $(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,)) +$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DONT_USE_FB_PAN_DISPLAY,)) +$(eval $(call TunableKernelConfigC,PVR_OMAPLFB_DRM_FB,)) diff --git a/sgx/eurasiacon/build/linux2/common/omap5.mk b/sgx/eurasiacon/build/linux2/common/omap5.mk deleted file mode 100644 index 72038b6..0000000 --- a/sgx/eurasiacon/build/linux2/common/omap5.mk +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK -# -# - -$(eval $(call TunableBothConfigC,PVR_NO_FULL_CACHE_OPS,)) -$(eval $(call TunableKernelConfigC,PVR_NO_OMAP_TIMER,)) -$(eval $(call BothConfigC,SGX_FEATURE_MP,1)) -$(eval $(call TunableBothConfigC,SGX_FEATURE_SYSTEM_CACHE,1)) -$(eval $(call BothConfigC,SGX_FEATURE_MP_CORE_COUNT,2)) diff --git a/sgx/eurasiacon/build/linux2/common/opencl.mk b/sgx/eurasiacon/build/linux2/common/opencl.mk index 42c0ed0..8353352 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/opencl.mk +++ b/sgx/eurasiacon/build/linux2/common/opencl.mk @@ -1,24 +1,41 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### diff --git a/sgx/eurasiacon/build/linux2/common/xorg.mk b/sgx/eurasiacon/build/linux2/common/xorg.mk index f503460..6998893 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/xorg.mk +++ b/sgx/eurasiacon/build/linux2/common/xorg.mk @@ -1,28 +1,49 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### PVR_SECURE_DRM_AUTH_EXPORT := 1 $(eval $(call TunableKernelConfigC,XPROC_WORKAROUND_NUM_SHAREABLES,4095)) +ifeq ($(SUPPORT_PVR_REMOTE),1) +else +endif + diff --git a/sgx/eurasiacon/build/linux2/common/xorg_test.mk b/sgx/eurasiacon/build/linux2/common/xorg_test.mk index 6e7552f..281214f 100755..100644 --- a/sgx/eurasiacon/build/linux2/common/xorg_test.mk +++ b/sgx/eurasiacon/build/linux2/common/xorg_test.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # FIXME: Will go away when SUPPORT_DRI_DRM is untangled from # the old meaning of SUPPORT_XORG=1. diff --git a/sgx/eurasiacon/build/linux2/config/core.mk b/sgx/eurasiacon/build/linux2/config/core.mk index e77292d..b06052c 100755..100644 --- a/sgx/eurasiacon/build/linux2/config/core.mk +++ b/sgx/eurasiacon/build/linux2/config/core.mk @@ -1,27 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Root build configuration. +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # Configuration wrapper for new build system. This file deals with # configuration of the build. Add to this file anything that deals @@ -142,6 +159,14 @@ endif endif override EURASIAROOT := $(_GUESSED_EURASIAROOT) TOP := $(EURASIAROOT) + +ifneq ($(words $(TOP)),1) +$(warning This source tree is located in a path which contains whitespace,) +$(warning which is not supported.) +$(warning $(space)The root is: $(TOP)) +$(error Whitespace found in $$(TOP)) +endif + $(call directory-must-exist,$(TOP)) include ../defs.mk @@ -157,6 +182,7 @@ $(call directory-must-exist,$(TOP)/eurasiacon/build/linux2/$(PVR_BUILD_DIR)) # BUILD ?= release OUT ?= $(TOP)/eurasiacon/binary2_$(PVR_BUILD_DIR)_$(BUILD) +override OUT := $(if $(filter /%,$(OUT)),$(OUT),$(TOP)/$(OUT)) # Without a build date drm fails to load DATE := $(shell date +%Y-%m-%d) @@ -253,7 +279,31 @@ override SUPPORT_HW_RECOVERY := 0 override SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif +# We're bumping against USSE limits on older cores because the ukernel +# is too large when building both SGX_DISABLE_VISTEST_SUPPORT=0 and +# PVRSRV_USSE_EDM_STATUS_DEBUG=1. +# +# Automatically disable vistest support if debugging the ukernel to +# prevent build failures. +# +ifneq ($(filter 520 530 531 535 540,$(SGXCORE)),) +ifneq ($(SGX_DISABLE_VISTEST_SUPPORT),1) +SGX_DISABLE_VISTEST_SUPPORT ?= not-overridden +ifeq ($(SGX_DISABLE_VISTEST_SUPPORT),not-overridden) +$(warning Setting SGX_DISABLE_VISTEST_SUPPORT=1 because PVRSRV_USSE_EDM_STATUS_DEBUG=1) +SGX_DISABLE_VISTEST_SUPPORT := 1 +endif +endif +endif + ifeq ($(SGXCORE),535) +ifeq ($(PVRSRV_USSE_EDM_STATUS_DEBUG),1) +SUPPORT_SGX_HWPERF ?= not-overridden +ifeq ($(SUPPORT_SGX_HWPERF),not-overridden) +$(warning Setting SUPPORT_SGX_HWPERF=0 because PVRSRV_USSE_EDM_STATUS_DEBUG=1) +SUPPORT_SGX_HWPERF := 0 +endif +endif PVR2D_ALT_2DHW ?= 0 endif @@ -306,7 +356,7 @@ $(foreach _o,SYS_CFLAGS SYS_CXXFLAGS SYS_EXE_LDFLAGS SYS_LIB_LDFLAGS SUPPORT_EWS # Check for words in EXCLUDED_APIS that aren't understood by the # common/apis/*.mk files. This should be kept in sync with all the tests on # EXCLUDED_APIS in those files -_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests +_excludable_apis := opencl opengl opengles1 opengles2 openvg ews unittests xorg xorg_unittests scripts _unrecognised := $(strip $(filter-out $(_excludable_apis),$(EXCLUDED_APIS))) ifneq ($(_unrecognised),) $(warning *** Unrecognised entries in EXCLUDED_APIS: $(_unrecognised)) @@ -331,19 +381,47 @@ KERNEL_COMPONENTS += dbgdrv endif endif +ifeq ($(SUPPORT_PVR_REMOTE),1) +ifneq ($(filter pvr2d,$(COMPONENTS)),) +COMPONENTS += null_pvr2d_remote +endif +COMPONENTS += pvrvncsrv +endif + # If KERNELDIR is set, write it out to the config.mk, with # KERNEL_COMPONENTS and KERNEL_ID # ifneq ($(strip $(KERNELDIR)),) include ../kernel_version.mk +PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/ $(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR))) # Needed only by install script $(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS))) -$(eval $(call TunableKernelConfigMake,KERNEL_CROSS_COMPILE,)) $(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,)) $(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,)) + +# If KERNEL_CROSS_COMPILE is set to "undef", this is magically +# equivalent to being unset. If it is unset, we use CROSS_COMPILE +# (which might also be unset). If it is set, use it directly. +ifneq ($(KERNEL_CROSS_COMPILE),undef) +KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE) +$(eval $(call TunableBothConfigMake,KERNEL_CROSS_COMPILE,)) endif +# Check the KERNELDIR has a kernel built and also check that it is +# not 64-bit, which we do not support. +VMLINUX := $(strip $(wildcard $(KERNELDIR)/vmlinux)) +ifneq ($(VMLINUX),) +VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep -q 64-bit || echo false) +ifneq ($(VMLINUX_IS_64BIT),false) +$(warning $$(KERNELDIR)/vmlinux is 64-bit, which is not supported. Kbuild may fail.) +endif +else +$(warning $$(KERNELDIR)/vmlinux does not exist. Kbuild may fail.) +endif +endif + + # Ideally configured by platform Makefiles, as necessary # @@ -368,10 +446,22 @@ $(eval $(call TunableBothConfigC,USE_SGX_CORE_REV_HEAD,)) $(eval $(call BothConfigC,TRANSFER_QUEUE,)) $(eval $(call BothConfigC,PVR_SECURE_HANDLES,)) -ifdef DISPLAY_CONTROLLER -$(eval $(call KernelConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) +ifneq ($(DISPLAY_CONTROLLER),) +$(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) endif +PVR_LINUX_MEM_AREA_POOL_MAX_PAGES ?= 0 +ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0) +PVR_LINUX_MEM_AREA_USE_VMAP ?= 1 +include ../kernel_version.mk +ifeq ($(call kernel-version-at-least,3,0),true) +PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1 +endif +endif +$(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES))) +$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_USE_VMAP,)) +$(eval $(call TunableKernelConfigC,PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK,)) + $(eval $(call TunableKernelConfigC,FLIP_TECHNIQUE_FRAMEBUFFER,)) $(eval $(call TunableKernelConfigC,FLIP_TECHNIQUE_OVERLAY,)) @@ -381,6 +471,10 @@ $(eval $(call BothConfigMake,PVR_SYSTEM,$(PVR_SYSTEM))) # Build-type dependent options # $(eval $(call BothConfigMake,BUILD,$(BUILD))) +$(eval $(call KernelConfigC,DEBUG_LINUX_MMAP_AREAS,)) +$(eval $(call KernelConfigC,DEBUG_LINUX_MEM_AREAS,)) +$(eval $(call KernelConfigC,DEBUG_LINUX_MEMORY_ALLOCATIONS,)) +$(eval $(call KernelConfigC,PVRSRV_DISABLE_UM_SYNCOBJ_MAPPINGS,1)) ifeq ($(BUILD),debug) $(eval $(call BothConfigC,DEBUG,)) @@ -409,12 +503,11 @@ $(eval $(call TunableBothConfigC,SUPPORT_HYBRID_PB,)) $(eval $(call TunableBothConfigC,SUPPORT_HW_RECOVERY,1)) $(eval $(call TunableBothConfigC,SUPPORT_ACTIVE_POWER_MANAGEMENT,1)) $(eval $(call TunableBothConfigC,SUPPORT_SGX_HWPERF,1)) -$(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,1)) +$(eval $(call TunableBothConfigC,SUPPORT_SGX_LOW_LATENCY_SCHEDULING,)) $(eval $(call TunableBothConfigC,SUPPORT_MEMINFO_IDS,)) $(eval $(call TunableBothConfigC,SUPPORT_SGX_NEW_STATUS_VALS,1)) $(eval $(call TunableBothConfigC,SUPPORT_PDUMP_MULTI_PROCESS,)) $(eval $(call TunableBothConfigC,SUPPORT_DBGDRV_EVENT_OBJECTS,1)) -$(eval $(call TunableBothConfigC,PVR_DBG_BREAK_ASSERT_FAIL,)) $(eval $(call TunableBothConfigC,SGX_FEATURE_SYSTEM_CACHE,)) $(eval $(call TunableBothConfigC,SGX_BYPASS_SYSTEM_CACHE,)) $(eval $(call TunableBothConfigC,SGX_BYPASS_DCU,)) @@ -425,19 +518,27 @@ $(eval $(call TunableBothConfigC,FPGA,)) $(eval $(call TunableBothConfigC,PDUMP,)) $(eval $(call TunableBothConfigC,NO_HARDWARE,)) $(eval $(call TunableBothConfigC,PDUMP_DEBUG_OUTFILES,)) +$(eval $(call TunableBothConfigC,PVRSRV_USSE_EDM_STATUS_DEBUG,)) +$(eval $(call TunableBothConfigC,SGX_DISABLE_VISTEST_SUPPORT,)) $(eval $(call TunableBothConfigC,PVRSRV_RESET_ON_HWTIMEOUT,)) $(eval $(call TunableBothConfigC,SYS_USING_INTERRUPTS,1)) $(eval $(call TunableBothConfigC,SUPPORT_EXTERNAL_SYSTEM_CACHE,)) +$(eval $(call TunableBothConfigC,PVRSRV_NEW_PVR_DPF,)) $(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_DPF,)) $(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_ASSERT,)) $(eval $(call TunableBothConfigC,PVRSRV_NEED_PVR_TRACE,)) $(eval $(call TunableBothConfigC,SUPPORT_SECURE_33657_FIX,)) +$(eval $(call TunableBothConfigC,SUPPORT_ION,)) +$(eval $(call TunableBothConfigC,SUPPORT_HWRECOVERY_TRACE_LIMIT,)) +$(eval $(call TunableBothConfigC,SUPPORT_PVRSRV_GET_DC_SYSTEM_BUFFER,1)) +$(eval $(call TunableBothConfigC,SUPPORT_NV12_FROM_2_HWADDRS,)) $(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_WRITECOMBINE,1)) $(eval $(call TunableKernelConfigC,SUPPORT_LINUX_X86_PAT,1)) $(eval $(call TunableKernelConfigC,SGX_DYNAMIC_TIMING_INFO,)) $(eval $(call TunableKernelConfigC,SYS_SGX_ACTIVE_POWER_LATENCY_MS,)) $(eval $(call TunableKernelConfigC,SYS_CUSTOM_POWERLOCK_WRAP,)) +$(eval $(call TunableKernelConfigC,SYS_SUPPORTS_SGX_IDLE_CALLBACK,)) $(eval $(call TunableKernelConfigC,PVR_LINUX_USING_WORKQUEUES,)) $(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_WORKQUEUE,)) $(eval $(call TunableKernelConfigC,PVR_LINUX_MISR_USING_PRIVATE_WORKQUEUE,)) @@ -445,20 +546,25 @@ $(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_WORKQUEUES,)) $(eval $(call TunableKernelConfigC,PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE,)) $(eval $(call TunableKernelConfigC,LDM_PLATFORM,)) $(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED,)) +$(eval $(call TunableKernelConfigC,PVR_LDM_PLATFORM_PRE_REGISTERED_DEV,)) +$(eval $(call TunableKernelConfigC,PVR_LDM_DRIVER_REGISTRATION_NAME,"\"$(PVRSRV_MODNAME)\"")) $(eval $(call TunableKernelConfigC,LDM_PCI,)) $(eval $(call TunableKernelConfigC,PVRSRV_DUMP_MK_TRACE,)) $(eval $(call TunableKernelConfigC,PVRSRV_DUMP_KERNEL_CCB,)) +$(eval $(call TunableKernelConfigC,PVRSRV_REFCOUNT_DEBUG,)) +$(eval $(call TunableKernelConfigC,PVRSRV_MMU_MAKE_READWRITE_ON_DEMAND,)) $(eval $(call TunableKernelConfigC,HYBRID_SHARED_PB_SIZE,)) +$(eval $(call TunableKernelConfigC,SUPPORT_LARGE_GENERAL_HEAP,1)) +$(eval $(call TunableKernelConfigC,TTRACE,)) -$(eval $(call TunableBothConfigMake,LDM_PLATFORM,)) -$(eval $(call TunableBothConfigMake,LDM_PCI,)) +$(eval $(call TunableBothConfigMake,SUPPORT_ION,)) $(eval $(call TunableBothConfigMake,OPTIM,)) -$(eval $(call TunableBothConfigMake,SUPPORT_V4L2_GFX,)) -$(eval $(call TunableBothConfigMake,SUPPORT_BC_EXAMPLE,)) + +$(eval $(call TunableKernelConfigMake,TTRACE,)) endif # INTERNAL_CLOBBER_ONLY @@ -466,7 +572,7 @@ export INTERNAL_CLOBBER_ONLY export TOP export OUT -MAKE_ETC := -Rr --no-print-directory -C $(TOP) TOP=$(TOP) \ +MAKE_ETC := -Rr --no-print-directory -C $(TOP) TOP=$(TOP) OUT=$(OUT) \ -f eurasiacon/build/linux2/toplevel.mk # This must match the default value of MAKECMDGOALS below, and the default @@ -485,7 +591,8 @@ autogen: ifeq ($(INTERNAL_CLOBBER_ONLY),) @$(MAKE) -s --no-print-directory -C $(EURASIAROOT) \ DOS2UNIX="$(DOS2UNIX)" \ - -f eurasiacon/build/linux2/prepare_tree.mk + -f eurasiacon/build/linux2/prepare_tree.mk \ + LDM_PCI=$(LDM_PCI) LDM_PLATFORM=$(LDM_PLATFORM) else @: endif diff --git a/sgx/eurasiacon/build/linux2/defs.mk b/sgx/eurasiacon/build/linux2/defs.mk index d4cfe29..52abe7d 100755..100644 --- a/sgx/eurasiacon/build/linux2/defs.mk +++ b/sgx/eurasiacon/build/linux2/defs.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### define must-be-defined $(if $(filter undefined,$(origin $(1))),$(error In makefile $(THIS_MAKEFILE): $$($(1)) must be defined),) @@ -101,3 +117,26 @@ endef define host-cc-option $(call cc-check,$(patsubst @%,%,$(HOST_CC)),$(OUT),$(1)) endef + +define kernel-cc-option +$(call cc-check,$(KERNEL_CROSS_COMPILE)gcc,$(OUT),$(1)) +endef + +# Turn a particular warning on, or explicitly turn it off, depending on +# the value of W. The "-W" or "-Wno-" part of the warning need not be +# specified. +define cc-optional-warning +$(call cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) +endef + +define host-cc-optional-warning +$(call host-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) +endef + +define kernel-cc-optional-warning +$(call kernel-cc-option,-W$(if $(W),,no-)$(patsubst -W%,%,$(patsubst -Wno-%,%,$(1)))) +endef + +define module-info-line +$(if $(filter modules,$(D)),$(info $(1)),) +endef diff --git a/sgx/eurasiacon/build/linux2/kbuild/Makefile.template b/sgx/eurasiacon/build/linux2/kbuild/Makefile.template index 803a208..9506784 100644 --- a/sgx/eurasiacon/build/linux2/kbuild/Makefile.template +++ b/sgx/eurasiacon/build/linux2/kbuild/Makefile.template @@ -1,27 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Root kernel makefile +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # This top-level kbuild makefile builds all the Linux kernel modules in the # DDK. To run kbuild, this makefile is copied to $(TARGET_OUT)/kbuild/Makefile @@ -55,7 +72,6 @@ ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \ -I$(TOP)/services4/include \ -I$(TOP)/services4/system/$(PVR_SYSTEM) \ -I$(TOP)/services4/system/include \ - -I$(TOP)/services4/srvkm/hwdefs \ -I$(TOP)/services4/srvkm/bridged \ -I$(TOP)/services4/srvkm/bridged/sgx \ -I$(TOP)/services4/srvkm/common \ @@ -63,6 +79,12 @@ ccflags-y += -D__linux__ -include $(OUT)/config_kernel.h \ -I$(TOP)/services4/srvkm/env/linux \ -I$(TOP)/services4/srvkm/include +ifeq ($(PVR_LOCAL_HWDEFS),) +ccflags-y += -I$(TOP)/services4/srvkm/hwdefs +else +ccflags-y += -I$(TOP)/hwdefs +endif + include $(INTERNAL_KBUILD_MAKEFILES) $(if $($(PVRSRV_MODNAME)-y),,$(error $(PVRSRV_MODNAME)-y was empty, which could mean that srvkm is missing from $$(KERNEL_COMPONENTS))) diff --git a/sgx/eurasiacon/build/linux2/kbuild/external_tarball.mk b/sgx/eurasiacon/build/linux2/kbuild/external_tarball.mk index caa58ed..be98380 100755..100644 --- a/sgx/eurasiacon/build/linux2/kbuild/external_tarball.mk +++ b/sgx/eurasiacon/build/linux2/kbuild/external_tarball.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### ifneq ($(EXTERNAL_3PDD_TARBALL),) TAR_OPT_STRIP_COMPONENTS ?= --strip-components diff --git a/sgx/eurasiacon/build/linux2/kbuild/kbuild.mk b/sgx/eurasiacon/build/linux2/kbuild/kbuild.mk index 7aee762..96cd9cd 100755..100644 --- a/sgx/eurasiacon/build/linux2/kbuild/kbuild.mk +++ b/sgx/eurasiacon/build/linux2/kbuild/kbuild.mk @@ -1,33 +1,47 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### $(if $(strip $(KERNELDIR)),,$(error KERNELDIR must be set)) $(call directory-must-exist,$(KERNELDIR)) -KERNEL_CROSS_COMPILE ?= $(CROSS_COMPILE) - $(TARGET_OUT)/kbuild/Makefile: $(MAKE_TOP)/kbuild/Makefile.template @[ ! -e $(dir $@) ] && mkdir -p $(dir $@) || true $(CP) -f $< $@ diff --git a/sgx/eurasiacon/build/linux2/kernel_module.mk b/sgx/eurasiacon/build/linux2/kernel_module.mk index 4cd5328..c6a8c36 100755..100644 --- a/sgx/eurasiacon/build/linux2/kernel_module.mk +++ b/sgx/eurasiacon/build/linux2/kernel_module.mk @@ -1,26 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # Rules for making kernel modules with kbuild. This makefile doesn't define # any rules that build the modules, it only copies the kbuild Makefile into diff --git a/sgx/eurasiacon/build/linux2/kernel_version.mk b/sgx/eurasiacon/build/linux2/kernel_version.mk index ef604e9..50590a8 100755..100644 --- a/sgx/eurasiacon/build/linux2/kernel_version.mk +++ b/sgx/eurasiacon/build/linux2/kernel_version.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### $(if $(KERNELDIR),,$(error KERNELDIR must be set to obtain a version)) @@ -34,28 +50,52 @@ override KERNEL_SUBLEVEL := \ override KERNEL_EXTRAVERSION := \ $(shell grep "^EXTRAVERSION = " $(KERNELDIR)/Makefile | cut -f3 -d' ') +# Break the kernel version up into a space separated list +kernel_version_as_list := $(KERNEL_VERSION) \ + $(KERNEL_PATCHLEVEL) \ + $(KERNEL_SUBLEVEL) \ + $(patsubst .%,%,$(KERNEL_EXTRAVERSION)) + # The base ID doesn't have to be accurate; we only use it for # feature checks which will not care about extraversion bits # override KERNEL_BASE_ID := \ $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL) -# UTS_RELEASE is more accurate, if we can find it -# If we can't, fall back to manufacturing the version -# +# Try to get the kernel ID from the kernel.release file. +# KERNEL_ID ?= \ - $(shell grep -h '\#define UTS_RELEASE' \ - $(KERNELDIR)/include/*/* | cut -f3 -d' ' | sed s/\"//g) + $(shell cat $(KERNELDIR)/include/config/kernel.release 2>/dev/null) +# If the kernel ID isn't set yet, try to set it from the UTS_RELEASE +# macro. +# ifeq ($(strip $(KERNEL_ID)),) -# kernel.release, it it exists, contains what UTS_RELEASE would have -# been set to. -# KERNEL_ID := \ - $(shell cat $(KERNELDIR)/include/config/kernel.release 2>/dev/null) + $(shell grep -h '\#define UTS_RELEASE' \ + $(KERNELDIR)/include/linux/* | cut -f3 -d' ' | sed s/\"//g) endif ifeq ($(strip $(KERNEL_ID)),) KERNEL_ID := \ $(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION) endif + +# Return 1 if the kernel version is at least the value passed to the +# function, else return nothing. +# Examples +# $(call kernel-version-at-least,2,6,35) +# $(call kernel-version-at-least,2,6,35,7) +# +define kernel-version-at-least +$(shell set -- $(kernel_version_as_list) 0 0 0 0; \ + Y=true; \ + for D in $1 $2 $3 $4; \ + do \ + [ $$1 ] || break; \ + [ $$1 -eq $$D ] && { shift; continue; };\ + [ $$1 -lt $$D ] && Y=; \ + break; \ + done; \ + echo $$Y) +endef diff --git a/sgx/eurasiacon/build/linux2/moduledefs.mk b/sgx/eurasiacon/build/linux2/moduledefs.mk index 2569099..3e07c5c 100755..100644 --- a/sgx/eurasiacon/build/linux2/moduledefs.mk +++ b/sgx/eurasiacon/build/linux2/moduledefs.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### MODULE_TARGETS := MODULE_CFLAGS := $(ALL_CFLAGS) $($(THIS_MODULE)_cflags) diff --git a/sgx/eurasiacon/build/linux2/modules.mk b/sgx/eurasiacon/build/linux2/modules.mk index 9bc52a3..dc33c8c 100755..100644 --- a/sgx/eurasiacon/build/linux2/modules.mk +++ b/sgx/eurasiacon/build/linux2/modules.mk @@ -1,27 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Module processing +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # Bits for processing $(modules) after reading in each Linux.mk diff --git a/sgx/eurasiacon/build/linux2/omap4430_linux/Makefile b/sgx/eurasiacon/build/linux2/omap4430_linux/Makefile index b5e3e4c..bf9601e 100755..100644 --- a/sgx/eurasiacon/build/linux2/omap4430_linux/Makefile +++ b/sgx/eurasiacon/build/linux2/omap4430_linux/Makefile @@ -1,27 +1,44 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Title Root makefile for OMAP4430 Linux. Builds everything else. +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### PVR_SYSTEM := omap4 @@ -99,6 +116,24 @@ SYS_CUSTOM_POWERLOCK_WRAP := 1 ifeq ($(OMAP_KERNEL_AT_LEAST_2_6_35),1) ifeq ($(LDM_PLATFORM),1) PVR_LDM_PLATFORM_PRE_REGISTERED := 1 +ifeq ($(call kernel-version-at-least,2,6,35,7),true) +# Not all variants of the OMAP4 kernel have a DRM based framebuffer. +# Note that a non-X.Org version of the driver does not have to be built +# with DRM support if the kernel has a DRM based framebuffer. +PVR_OMAPLFB_DRM_FB ?= 1 +ifeq ($(PVR_OMAPLFB_DRM_FB),1) +PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm_pvr\"" +# There is already a "pvrsrvkm" driver (part of the DRM framebuffer code), +# so use the pre-registered device name instead. +PVR_LDM_DRIVER_REGISTRATION_NAME := "\"pvrsrvkm_pvr"\" +# The DRM library will not load the Services module on behalf of the X Server, +# as a DRM module has already been loaded (the DRM based framebuffer), so +# load the Services module before starting the X Server. +XORG_EXPLICIT_PVR_SERVICES_LOAD := 1 +else +PVR_LDM_PLATFORM_PRE_REGISTERED_DEV := "\"pvrsrvkm\"" +endif +endif endif endif @@ -109,7 +144,7 @@ endif ifeq ($(want_xorg),1) -ifeq ($(OMAP_KERNEL_AT_LEAST_2_6_35),1) +ifeq ($(call kernel-version-at-least,2,6,35),true) PVR_DRI_DRM_PLATFORM_DEV := 1 else PVR_DRI_DRM_NOT_PCI := 1 @@ -156,6 +191,8 @@ SUPPORT_MEMINFO_IDS ?= 1 SUPPORT_MESA_SONAME ?= 1 +SUPPORT_MEMINFO_IDS ?= 1 + ifeq ($(SUPPORT_V4L2_GFX),1) KERNEL_COMPONENTS += v4l2-gfx endif diff --git a/sgx/eurasiacon/build/linux2/omap5430_linux/Makefile b/sgx/eurasiacon/build/linux2/omap5430_linux/Makefile deleted file mode 100644 index db29f8e..0000000 --- a/sgx/eurasiacon/build/linux2/omap5430_linux/Makefile +++ /dev/null @@ -1,181 +0,0 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK -# -# - -PVR_SYSTEM := omap5 - -KERNEL_COMPONENTS := srvkm - -# Confirm kernel version with KERNELDIR if supplied, otherwise assume -# a 2.6.35+ kernel. -ifneq ($(KERNELDIR),) -include ../kernel_version.mk -OMAP_KERNEL_AT_LEAST_2_6_35 := $(shell test $(KERNEL_VERSION) -ge 3 || \ - test $(KERNEL_VERSION) -ge 2 -a \ - $(KERNEL_PATCHLEVEL) -ge 6 -a \ - $(KERNEL_SUBLEVEL) -ge 35 && echo 1 || echo 0) -else -OMAP_KERNEL_AT_LEAST_2_6_35 := 1 -endif - -include ../common/xorg_test.mk - -ifeq ($(want_xorg),1) -SUPPORT_DRI_DRM := 1 -SUPPORT_DRI_DRM_EXTERNAL := 1 -SUPPORT_BC_EXAMPLE ?= 0 -else -SUPPORT_BC_EXAMPLE ?= 1 -endif - -# Only enable active power management if passive power management is -# enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, -# the system can suspend in the case where active power management is -# enabled in the SGX driver, but passive power management isn't. As -# passive power management isn't enabled, the driver won't see the -# system suspend/resume events, and so won't take appropriate action. -LDM_PLATFORM ?= 1 - -ifeq ($(LDM_PLATFORM),1) -SUPPORT_LINUX_USING_WORKQUEUES := 1 -#DISPLAY_CONTROLLER_COMPONENT += dc_omapdrm_linux -#DISPLAY_CONTROLLER := omaplfb -else -SUPPORT_LINUX_USING_SHARED_WORKQUEUES := 1 -OMAP_NON_FLIP_DISPLAY := 1 -DISPLAY_CONTROLLER_COMPONENT += linux_framebuffer -DISPLAY_CONTROLLER := pvrlfb -endif - -# When flipping is enabled, the Framebuffer API will be used to -# present the frames to the display in the 3PDD -FLIP_TECHNIQUE_FRAMEBUFFER := 1 - -OPTIM := -Os - -SYS_CFLAGS := -march=armv7-a - -ifneq ($(CROSS_COMPILE),) -SYS_CFLAGS += -mtls-dialect=arm -endif - -SUPPORT_OMAP4430_NEON ?= 1 - -ifeq ($(SUPPORT_OMAP4430_NEON),1) -SYS_CFLAGS += -ftree-vectorize -mfpu=neon -mfloat-abi=hard -endif - -PVR_NO_FULL_CACHE_OPS := 1 - -LIBGCC := $(shell $(CROSS_COMPILE)gcc -print-libgcc-file-name) - -SGXCORE := 544 -SGX_CORE_REV := 105 - -SGX_DYNAMIC_TIMING_INFO := 1 -SYS_CUSTOM_POWERLOCK_WRAP := 1 - -ifeq ($(OMAP_KERNEL_AT_LEAST_2_6_35),1) -ifeq ($(LDM_PLATFORM),1) -PVR_LDM_PLATFORM_PRE_REGISTERED := 1 -endif -endif - -BUILD_OPENCL ?= 0 -ifneq ($(BUILD_OPENCL),1) -EXCLUDED_APIS += opencl -endif - -ifeq ($(want_xorg),1) - -ifeq ($(OMAP_KERNEL_AT_LEAST_2_6_35),1) -PVR_DRI_DRM_PLATFORM_DEV := 1 -else -PVR_DRI_DRM_NOT_PCI := 1 -endif - -XORG_PREFIX := /usr -XORG_TOOLCHAIN := extern -XORG_PVR_CONF := omap4 -XORG_PVR_VIDEO := omap4 -XF86_VIDEO ?= ti-pvr_video - -OPK_DEFAULT := libpvrPVR2D_DRIWSEGL.so -OPK_FALLBACK := libpvrPVR2D_DRIWSEGL.so - -ifneq ($(OMAP_NON_FLIP_DISPLAY),1) -XORG_PVR_VIDEO ?= $(PVR_SYSTEM) -PVR_DISPLAY_CONTROLLER_DRM_IOCTL := 1 -endif - -else # xorg isn't excluded - -ifeq ($(OMAP_NON_FLIP_DISPLAY),1) -OPK_DEFAULT := libpvrPVR2D_BLITWSEGL.so -else -OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so -endif -OPK_FALLBACK := libpvrPVR2D_BLITWSEGL.so - -endif # xorg isn't excluded - -ifeq ($(SUPPORT_DRI_DRM),1) -ifeq ($(PVR_DRI_DRM_NOT_PCI),1) -KERNEL_COMPONENTS += linux_drm -EXTRA_KBUILD_SOURCE := $(KERNELDIR) -endif -EXTRA_PVRSRVKM_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) -else -KERNEL_COMPONENTS += $(DISPLAY_CONTROLLER_COMPONENT) -endif - -SUPPORT_V4L2_GFX ?= 0 - -SUPPORT_MEMINFO_IDS ?= 1 - -SUPPORT_MESA_SONAME ?= 1 - -ifeq ($(SUPPORT_V4L2_GFX),1) -KERNEL_COMPONENTS += v4l2-gfx -endif - -ifeq ($(SUPPORT_BC_EXAMPLE),1) -KERNEL_COMPONENTS += bufferclass_example -endif - -PVRSRV_MODNAME := omapdrm_pvr - -PVRSRV_BUSID := platform:omapdrm:00 - -include ../config/core.mk -include ../common/xorg.mk -include ../common/dridrm.mk -include ../common/opencl.mk -include ../common/omap5.mk - -# We only need this for pvr_video's includes, which should -# really be done differently, as DISPLAY_CONTROLLER_DIR is -# now obsolete.. -# -$(eval $(call UserConfigMake,DISPLAY_CONTROLLER_DIR,3rdparty/$(DISPLAY_CONTROLLER_COMPONENT))) diff --git a/sgx/eurasiacon/build/linux2/prepare_tree.mk b/sgx/eurasiacon/build/linux2/prepare_tree.mk index e1e18da..e69d9af 100755..100644 --- a/sgx/eurasiacon/build/linux2/prepare_tree.mk +++ b/sgx/eurasiacon/build/linux2/prepare_tree.mk @@ -1,29 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# - --include $(OUT)/config.mk.new +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### .PHONY: prepare_tree diff --git a/sgx/eurasiacon/build/linux2/this_makefile.mk b/sgx/eurasiacon/build/linux2/this_makefile.mk index 2410804..0a38c82 100755..100644 --- a/sgx/eurasiacon/build/linux2/this_makefile.mk +++ b/sgx/eurasiacon/build/linux2/this_makefile.mk @@ -1,27 +1,43 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # Find out the path of the Linux.mk makefile currently being processed, and # set paths used by the build rules diff --git a/sgx/eurasiacon/build/linux2/tools/cc-check.sh b/sgx/eurasiacon/build/linux2/tools/cc-check.sh index 7d6d75c..0077615 100755 --- a/sgx/eurasiacon/build/linux2/tools/cc-check.sh +++ b/sgx/eurasiacon/build/linux2/tools/cc-check.sh @@ -1,34 +1,63 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +#!/bin/sh +########################################################################### ### +#@Title Test the nature of the C compiler. +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. +# +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". # +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### + +LANG=C +export LANG usage() { echo "usage: $0 [--64] --cc CC --out OUT [cflag]" exit 1 } +# NOTE: The program passed to the compiler is deliberately incorrect +# (`return;' should be `return 0;') but we do this to emit a warning. +# +# Emitting a warning is necessary to get GCC to print out additional +# warnings about any unsupported -Wno options, so we can handle these +# as unsupported by the build. +# do_cc() { - echo "int main(void){return 0;}" | $CC $1 -xc -c - -o $ccof 2>/dev/null + echo "int main(void){return;}" | $CC -W -Wall $3 -xc -c - -o $1 >$2 2>&1 } while [ 1 ]; do @@ -51,16 +80,21 @@ done [ "x$CC" = "x" ] && usage [ "x$OUT" = "x" ] && usage ccof=$OUT/cc-sanity-check +log=${ccof}.log if [ "x$BIT_CHECK" = "x1" ]; then - do_cc "" + do_cc $ccof $log "" file $ccof | grep -q 64-bit [ "$?" = "0" ] && echo true || echo false else [ "x$1" = "x" ] && usage - do_cc $1 - [ "$?" = "0" ] && echo $1 + do_cc $ccof $log $1 + if [ "$?" = "0" ]; then + # compile passed, but was the warning unrecognized? + grep -q "^cc1: warning: unrecognized command line option \"$1\"" $log + [ "$?" = "1" ] && echo $1 + fi fi -rm -f $ccof +rm -f $ccof $log exit 0 diff --git a/sgx/eurasiacon/build/linux2/toplevel.mk b/sgx/eurasiacon/build/linux2/toplevel.mk index e9f8aca..8a1e7ea 100755..100644 --- a/sgx/eurasiacon/build/linux2/toplevel.mk +++ b/sgx/eurasiacon/build/linux2/toplevel.mk @@ -1,33 +1,48 @@ -# -# Copyright (C) Imagination Technologies Ltd. All rights reserved. +########################################################################### ### +#@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +#@License Dual MIT/GPLv2 # -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. +# The contents of this file are subject to the MIT license as set out below. # -# This program is distributed in the hope it will be useful but, except -# as otherwise stated in writing, without any warranty; without even the -# implied warranty of merchantability or fitness for a particular purpose. -# See the GNU General Public License for more details. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# Imagination Technologies Ltd. <gpl-support@imgtec.com> -# Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK +# Alternatively, the contents of this file may be used under the terms of +# the GNU General Public License Version 2 ("GPL") in which case the provisions +# of GPL are applicable instead of those above. # -# - +# If you wish to allow use of your version of this file only under the terms of +# GPL, and not to allow others to use your version of this file under the terms +# of the MIT license, indicate your decision by deleting the provisions above +# and replace them with the notice and other provisions required by GPL as set +# out in the file called "GPL-COPYING" included in this distribution. If you do +# not delete the provisions above, a recipient may use your version of this file +# under the terms of either the MIT license or GPL. +# +# This License is also included in this distribution in the file called +# "MIT-COPYING". +# +# EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +# PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +### ########################################################################### # Define the default goal. This masks a previous definition of the default # goal in Makefile.config, which must match this one .PHONY: build -build: components kbuild scripts +build: components kbuild ifeq ($(OUT),) $(error "Must specify output directory with OUT=") @@ -53,6 +68,14 @@ CONFIG_KERNEL_H := $(RELATIVE_OUT)/config_kernel.h MAKE_TOP := eurasiacon/build/linux2 THIS_MAKEFILE := (top-level makefiles) +# Convert commas to spaces in $(D). This is so you can say "make +# D=config-changes,freeze-config" and have $(filter config-changes,$(D)) +# still work. +comma := , +empty := +space := $(empty) $(empty) +override D := $(subst $(comma),$(space),$(D)) + include $(MAKE_TOP)/defs.mk ifneq ($(INTERNAL_CLOBBER_ONLY),true) @@ -68,15 +91,33 @@ $(HOST_OUT) $(TARGET_OUT): # If these generated files differ from any pre-existing ones, # replace them, causing affected parts of the driver to rebuild. # -$(shell \ +_want_config_diff := $(filter config-changes,$(D)) +_freeze_config := $(strip $(filter freeze-config,$(D))) +_updated_config_files := $(shell \ + $(if $(_want_config_diff),rm -f $(OUT)/config.diff;,) \ for file in $(CONFIG_MK) $(CONFIG_H) \ $(CONFIG_KERNEL_MK) $(CONFIG_KERNEL_H); do \ - diff -q $$file $$file.new >/dev/null 2>/dev/null \ + diff -U 0 $$file $$file.new \ + >>$(if $(_want_config_diff),$(OUT)/config.diff,/dev/null) 2>/dev/null \ && rm -f $$file.new \ - || mv -f $$file.new $$file >/dev/null 2>/dev/null; \ + || echo $$file; \ done) + +ifneq ($(_want_config_diff),) +# We send the diff to stderr so it isn't captured by $(shell) +$(shell [ -s $(OUT)/config.diff ] && echo >&2 "Configuration changed in $(RELATIVE_OUT):" && cat >&2 $(OUT)/config.diff) +endif + +ifneq ($(_freeze_config),) +$(if $(_updated_config_files),$(error Configuration change in $(RELATIVE_OUT) prevented by D=freeze-config),) endif +# Update the config, if changed +$(foreach _f,$(_updated_config_files), \ + $(shell mv -f $(_f).new $(_f) >/dev/null 2>/dev/null)) + +endif # INTERNAL_CLOBBER_ONLY + MAKEFLAGS := -Rr --no-print-directory ifneq ($(INTERNAL_CLOBBER_ONLY),true) @@ -84,7 +125,7 @@ ifneq ($(INTERNAL_CLOBBER_ONLY),true) # This is so you can say "find $(TOP) -name Linux.mk > /tmp/something; export # ALL_MAKEFILES=/tmp/something; make" and avoid having to run find. This is # handy if your source tree is mounted over NFS or something -override ALL_MAKEFILES := $(call relative-to-top,$(if $(strip $(ALL_MAKEFILES)),$(shell cat $(ALL_MAKEFILES)),$(shell find $(TOP) -type f -name Linux.mk))) +override ALL_MAKEFILES := $(call relative-to-top,$(if $(strip $(ALL_MAKEFILES)),$(shell cat $(ALL_MAKEFILES)),$(shell find $(TOP) -type f -name Linux.mk -print -o -type d -name '.*' -prune))) ifeq ($(strip $(ALL_MAKEFILES)),) $(info ** Unable to find any Linux.mk files under $$(TOP). This could mean that) $(info ** there are no makefiles, or that ALL_MAKEFILES is set in the environment) @@ -96,12 +137,14 @@ else # clobber-only ALL_MAKEFILES := endif +unexport ALL_MAKEFILES + REMAINING_MAKEFILES := $(ALL_MAKEFILES) ALL_MODULES := INTERNAL_INCLUDED_ALL_MAKEFILES := ifneq ($(INTERNAL_CLOBBER_ONLY),true) --include $(CONFIG_MK) +# Please do not change the format of the following lines -include $(CONFIG_KERNEL_MK) # These files may not exist in GPL km source packages -include $(MAKE_TOP)/xorgconf.mk @@ -128,8 +171,8 @@ endif # each module: for each module in $(ALL_MODULES), set per-makefile variables $(foreach _m,$(ALL_MODULES),$(eval $(call process-module,$(_m)))) -.PHONY: kbuild scripts install -kbuild scripts install: +.PHONY: kbuild install +kbuild install: ifneq ($(INTERNAL_CLOBBER_ONLY),true) -include $(MAKE_TOP)/scripts.mk @@ -158,34 +201,11 @@ endif # You can say 'make all_modules' to attempt to make everything, or 'make # components' to only make the things which are listed (in the per-build -# makefiles) as components of the build. 'make scripts' generates the -# install.sh and rc.pvr scripts. -.PHONY: all_modules components scripts +# makefiles) as components of the build. +.PHONY: all_modules components all_modules: $(ALL_MODULES) components: $(COMPONENTS) -# 'make opk' builds the OEM Porting Kit. The build should set OPK_COMPONENTS -# in components.mk if it should be possible to build the OPK for it -.PHONY: opk -ifneq ($(strip $(OPK_COMPONENTS)),) -opk: $(OPK_COMPONENTS) - -opk_clobber: MODULE_DIRS_TO_REMOVE := $(addprefix $(OUT)/target/intermediates/,$(OPK_COMPONENTS)) -opk_clobber: OPK_OUTFILES := $(addprefix $(RELATIVE_OUT)/target/,$(foreach _c,$(OPK_COMPONENTS),$(if $($(_c)_target),$($(_c)_target),$(error Module $(_c) must be a shared library which sets $$($(_c)_target) for OPK clobbering)))) -opk_clobber: - $(clean-dirs) - $(if $(V),,@echo " RM " $(call relative-to-top,$(OPK_OUTFILES))) - $(RM) -f $(OPK_OUTFILES) -else -# OPK_COMPONENTS is empty or unset -opk: - @echo - @echo "** This build ($(PVR_BUILD_DIR)) is unable to build the OPK, because" - @echo "** OPK_COMPONENTS is empty or unset. Cannot continue." - @echo - @false -endif - # Cleaning .PHONY: clean clobber clean: MODULE_DIRS_TO_REMOVE := $(OUT)/host/intermediates $(OUT)/target/intermediates $(OUT)/target/kbuild |