summaryrefslogtreecommitdiff
path: root/packages/dsplink/files/lpm-make-symbol-warnings-fix.patch
blob: 031a16022fd4ebcba3ed5eb78a3c767d5e0df942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile
--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile  2008-11-05 00:38:57.000000000 +0000
+++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile      2009-02-17 23:53:08.000000000 +0000
@@ -1,5 +1,5 @@
-# 
-#  Copyright 2008 by Texas Instruments Incorporated.
+# --COPYRIGHT--,GPL
+#  Copyright $(CPYYEAR) by Texas Instruments Incorporated.
 #
 #  This program is free software: you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -12,31 +12,34 @@
 #
 #  You should have received a copy of the GNU General Public License
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>
-# 
+# --/COPYRIGHT--
 #
 
 #
 # This makefile will build the lpm_omap3530.ko driver.
 #
 
+# If KERNELRELEASE is undefined, then this makefile has been invoked
+# directly from the command line. Invoke the kernel build system.
+ifeq ($(KERNELRELEASE),)
+
+
 # Update these macros to reflect you environment.
 #
-# KERNEL_DIR   = the Linux kernel source directory
-# TOOL_PREFIX  = the toolchain directory and decorated name prefix
+# LINUXKERNEL_INSTALL_DIR = the Linux kernel source directory
+# MVTOOL_PREFIX  = the toolchain directory and decorated name prefix
 # DSPLINK_REPO = the repository which contains DSP/BIOS LINK
-# DSPLINK_BLD  = the DSP/BIOS LINK build variant
 #
-KERNEL_DIR   = /db/toolsrc/library/toolsC38/vendors/mvl/arm/omap3/OMAP35x_SDK_0.9.7/src/linux/kernel_org/2.6_kernel
-TOOL_PREFIX  = /db/toolsrc/library/toolsC38/vendors/cs/arm/arm-2007q3/bin/arm-none-linux-gnueabi-
-DSPLINK_REPO = /db/atree/library/trees/power/power-d04x/imports
-DSPLINK_BLD  = Linux/OMAP3530/RELEASE
+LINUXKERNEL_INSTALL_DIR := _your_kernel_installation_
+MVTOOL_PREFIX  := _your_codegen_installation_and_name_prefix_
+DSPLINK_REPO := _your_dsplink_repository_
 
 # Set PROFILE to DEBUG or RELEASE
 PROFILE = RELEASE
 
 # Process DSPLINK flags
 LINK_DIR = $(DSPLINK_REPO)/dsplink
-LINK_PATH = $(LINK_DIR)/gpp/export/BIN/$(DSPLINK_BLD)
+LINK_PATH = $(LINK_DIR)/gpp/export/BIN/Linux/OMAP3530/RELEASE
 LINK_ORIG := $(shell cat $(LINK_PATH)/DSPLINK.txt)
 LINK_DEFS := $(shell cat $(LINK_PATH)/PMGR_defines.txt)
 LINK_INCS := $(shell cat $(LINK_PATH)/PMGR_includes.txt)
@@ -53,20 +56,11 @@
 # add internal header files
 LINK_INCS_INTERNAL = -I$(LINK_DIR)/gpp/export/INCLUDE/Linux/OMAP3530/internal
 
+ifneq ($(wildcard $(LINK_PATH)/Module.symvers),)
+EXTRA_SYMBOLS = $(LINK_PATH)/Module.symvers
+endif
 
-# If KERNELRELEASE is defined, then this makefile has been invoked
-# from the kernel build system. Use native build language.
-ifneq ($(KERNELRELEASE),)
-
-obj-m := lpm_omap3530.o
-lpm_omap3530-objs := lpm_driver.o lpm_omap.o tal_dsplink_gpp.o
-
-
-# Otherwise, this makefile has been invoked directly from the
-# command line. Invoke the kernel build system.
-else
-
-MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(TOOL_PREFIX)
+MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX)
 CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -D$(PROFILE) \
          $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL)
 
@@ -74,19 +68,28 @@
     CFLAGS := -g $(CFLAGS)
 endif
 
-
+# Invoke the kernel build system
 default:
-	$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) $(MAKE_OPTS) \
+ifneq ($(EXTRA_SYMBOLS),)
+	rm -f Module.symvers
+	cat $(foreach file, $(EXTRA_SYMBOLS), $(file)) >> Module.symvers
+endif
+	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) $(MAKE_OPTS) \
         EXTRA_CFLAGS="$(CFLAGS)" modules
 
 .clean:
-	$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) $(MAKE_OPTS) clean
+	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) $(MAKE_OPTS) clean
+	rm -f modules.order
 
 .help:
-	$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) help
+	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) help
 
-endif
-#
-#  @(#) ti.bios.power; 1, 1, 0,1; 11-5-2008 16:38:57; /db/atree/library/trees/power/power-d04x/src/
-#
 
+# If KERNELRELEASE is defined, then this makefile has been invoked
+# from the kernel build system. Use native build language.
+else 
+
+obj-m := lpm_omap3530.o
+lpm_omap3530-objs := lpm_driver.o lpm_omap.o tal_dsplink_gpp.o
+
+endif