mali: fixes mali drm in-tree building

Change-Id: I6807fbd278772a8913f767b1de389f3d4258390d

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Mauro Ribeiro
2014-10-15 04:51:29 -03:00
committed by Dongjin Kim
parent 2eed5585f2
commit 3a17cff0da
5 changed files with 7 additions and 83 deletions

View File

@@ -7,70 +7,13 @@
# A copy of the licence is included with the program, and can also be obtained from Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
# Makefile for the drm device driver. This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
MALI_DRM_FILE_PREFIX =
ccflags-y = -Iinclude/drm
mali_drm-y := mali_drv.o
# For each arch check: CROSS_COMPILE , KDIR , CFLAGS += -DARCH
ARCH ?= arm
## @note Should allow overriding of building MALI DRM for non-debug:
EXTRA_CFLAGS += -DDEBUG
DRM_SYMVERS_FILE = ../drm/Module.symvers
KBUILD_EXTRA_SYMBOLS = $(KBUILD_EXTMOD)/$(DRM_SYMVERS_FILE)
obj-$(CONFIG_DRM_MALI) += mali_drm.o
# linux build system integration
ifneq ($(KERNELRELEASE),)
# Inside the kernel build system
EXTRA_CFLAGS += -I$(KBUILD_EXTMOD) -I$(KBUILD_EXTMOD)/include -I$(KBUILD_EXTMOD)/../drm/include/
SRC += $(MALI_DRM_FILE_PREFIX)mali/mali_drv.c
# Selecting files to compile by parsing the config file
MODULE:=mali_drm.ko
obj-m := $(MODULE:.ko=.o)
$(MODULE:.ko=-y) := $(SRC:.c=.o)
else
# Outside the kernel build system
# Get any user defined KDIR-<names> or maybe even a hardcoded KDIR
-include KDIR_CONFIGURATION
# Define host system directory
KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build
ifeq ($(ARCH), arm)
# when compiling for ARM we're cross compiling
export CROSS_COMPILE ?= arm-none-linux-gnueabi-
# default to Virtex5
CONFIG ?= pb-virtex5
else
# Compiling for the host
CONFIG ?= $(shell uname -m)
endif
# default cpu to select
CPU ?= ct11mp
# look up KDIR based om CPU selection
KDIR ?= $(KDIR-$(CPU))
ifeq ($(KDIR),)
$(error No KDIR found for platform $(CPU))
endif
all:
$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules
kernelrelease:
$(MAKE) -C $(KDIR) kernelrelease
clean:
$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
endif

View File

@@ -1,19 +0,0 @@
#
# Copyright (C) 2010, 2012 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
#
# A copy of the licence is included with the program, and can also be obtained from Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
# Makefile for the drm device driver. This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
ccflags-y = -Iinclude/drm
mali_drm-y := mali_drv.o
obj-$(CONFIG_DRM_MALI) += mali_drm.o

View File

@@ -16,7 +16,7 @@
#include <linux/vermagic.h>
#include <linux/version.h>
#include <drm/drmP.h>
#include "../include/mali_drm.h"
#include "include/mali_drm.h"
#include "mali_drv.h"
static struct platform_device *dev0;