From b1a11e71bf33a53ffca5ad4e34d3fffdb12f75ef Mon Sep 17 00:00:00 2001 From: Divya Singhatwaria Date: Tue, 16 Jul 2019 21:21:48 +0530 Subject: [PATCH] gpu: nvgpu: libfalcon_utf for tmake makefiles Accessing falcon_utf objects from another directory introduces build dependencies and also stale .o files could be used. Fix this by generating a shared library: libfalcon_utf.so for falcon. JIRA NVGPU-2159 Change-Id: Ie117f553ad792a1652852b433456d86d264d0bb8 Signed-off-by: Divya Singhatwaria Reviewed-on: https://git-master.nvidia.com/r/2154211 Reviewed-by: Sagar Kamble GVS: Gerrit_Virtual_Submit Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions Tested-by: mobile promotions --- Makefile.umbrella.tmk | 1 + userspace/units/falcon/Makefile.interface.tmk | 29 +++++++++++++++++++ userspace/units/falcon/Makefile.tmk | 26 +++++++++++++++++ userspace/units/falcon/falcon/Makefile.tmk | 7 +++-- userspace/units/falcon/libfalcon_utf.export | 25 ++++++++++++++++ 5 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 userspace/units/falcon/Makefile.interface.tmk create mode 100644 userspace/units/falcon/Makefile.tmk create mode 100644 userspace/units/falcon/libfalcon_utf.export diff --git a/Makefile.umbrella.tmk b/Makefile.umbrella.tmk index 205fbde7e..2df6c5513 100644 --- a/Makefile.umbrella.tmk +++ b/Makefile.umbrella.tmk @@ -64,6 +64,7 @@ NV_REPOSITORY_COMPONENTS += userspace/units/fuse endif NV_REPOSITORY_COMPONENTS += userspace/units/list NV_REPOSITORY_COMPONENTS += userspace/units/enabled +NV_REPOSITORY_COMPONENTS += userspace/units/falcon NV_REPOSITORY_COMPONENTS += userspace/units/falcon/falcon endif diff --git a/userspace/units/falcon/Makefile.interface.tmk b/userspace/units/falcon/Makefile.interface.tmk new file mode 100644 index 000000000..057bbd727 --- /dev/null +++ b/userspace/units/falcon/Makefile.interface.tmk @@ -0,0 +1,29 @@ +################################### tell Emacs this is a -*- makefile-gmake -*- +# +# Copyright (c) 2019, NVIDIA CORPORATION. All Rights Reserved. +# +# NVIDIA CORPORATION and its licensors retain all intellectual property +# and proprietary rights in and to this software, related documentation +# and any modifications thereto. Any use, reproduction, disclosure or +# distribution of this software and related documentation without an express +# license agreement from NVIDIA CORPORATION is strictly prohibited. +# +# tmake for SW Mobile component makefile +# +# libfalcon_utf interface makefile fragment +# +############################################################################### + +ifdef NV_INTERFACE_FLAG_SHARED_LIBRARY_SECTION + +NV_INTERFACE_NAME := falcon_utf +NV_INTERFACE_EXPORTS := lib$(NV_INTERFACE_NAME) +NV_INTERFACE_SONAME := lib$(NV_INTERFACE_NAME).so + +endif + +# Local Variables: +# indent-tabs-mode: t +# tab-width: 8 +# End: +# vi: set tabstop=8 noexpandtab: diff --git a/userspace/units/falcon/Makefile.tmk b/userspace/units/falcon/Makefile.tmk new file mode 100644 index 000000000..b6e07dcba --- /dev/null +++ b/userspace/units/falcon/Makefile.tmk @@ -0,0 +1,26 @@ +################################### tell Emacs this is a -*- makefile-gmake -*- +# +# Copyright (c) 2019 NVIDIA CORPORATION. All Rights Reserved. +# +# NVIDIA CORPORATION and its licensors retain all intellectual property +# and proprietary rights in and to this software, related documentation +# and any modifications thereto. Any use, reproduction, disclosure or +# distribution of this software and related documentation without an express +# license agreement from NVIDIA CORPORATION is strictly prohibited. +# +# tmake for SW Mobile component makefile +# +# Component makefile for compiling falcon_utf common tests. +# +############################################################################### + +NVGPU_UNIT_NAME = falcon_utf +NVGPU_UNIT_SRCS = falcon_utf.c + +include $(NV_COMPONENT_DIR)/../Makefile.units.common.tmk + +# Local Variables: +# indent-tabs-mode: t +# tab-width: 8 +# End: +# vi: set tabstop=8 noexpandtab: diff --git a/userspace/units/falcon/falcon/Makefile.tmk b/userspace/units/falcon/falcon/Makefile.tmk index ad164d582..84bb6b86d 100644 --- a/userspace/units/falcon/falcon/Makefile.tmk +++ b/userspace/units/falcon/falcon/Makefile.tmk @@ -13,8 +13,11 @@ ############################################################################### NVGPU_UNIT_NAME=falcon -NVGPU_UNIT_SRCS=../falcon_utf.c \ - falcon.c +NVGPU_UNIT_SRCS=falcon.c + +NVGPU_UNIT_INTERFACE_DIRS := \ + $(NV_COMPONENT_DIR)/.. \ + $(NV_SOURCE)/kernel/nvgpu/drivers/gpu/nvgpu include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk diff --git a/userspace/units/falcon/libfalcon_utf.export b/userspace/units/falcon/libfalcon_utf.export new file mode 100644 index 000000000..ad71779c5 --- /dev/null +++ b/userspace/units/falcon/libfalcon_utf.export @@ -0,0 +1,25 @@ +# +# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. +# +# 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: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# 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. 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. +# + +nvgpu_utf_falcon_free +nvgpu_utf_falcon_init +nvgpu_utf_falcon_register_io