diff options
author | Denys Dmytriyenko <denys@ti.com> | 2015-08-20 06:53:05 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2015-08-19 20:55:09 -0400 |
commit | 3d31d82b334ea0e608dbee3b2d5d1cde85eaa10c (patch) | |
tree | 3eac290e5ec50e010d641219c261e2f2bc417f5c /recipes-ti | |
parent | 781e7e00c4ba8e968cbd8e82e98edb0b7a5f2659 (diff) | |
download | meta-ti-3d31d82b334ea0e608dbee3b2d5d1cde85eaa10c.tar.gz |
ti-ipc: fix build when STAGING_KERNEL_DIR != STAGING_KERNEL_BUILDDIR
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti')
-rw-r--r-- | recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch | 114 | ||||
-rw-r--r-- | recipes-ti/ipc/ti-ipc_git.bb | 6 |
2 files changed, 118 insertions, 2 deletions
diff --git a/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch b/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch new file mode 100644 index 00000000..cfa1b3b0 --- /dev/null +++ b/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch | |||
@@ -0,0 +1,114 @@ | |||
1 | From f1e89940a3fbc0ffec51640f909f87419c08a17e Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Mon, 27 Jul 2015 11:51:52 -0400 | ||
4 | Subject: [PATCH] Add kernel build dir | ||
5 | |||
6 | We build kernel outside of the source directory and the generated version.h | ||
7 | file ends up being in a separate directory from the rest of kernel headers. | ||
8 | Use another variable to point to the kernel build artifacts. | ||
9 | |||
10 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
11 | --- | ||
12 | configure.ac | 6 ++++++ | ||
13 | ipc-linux.mak | 3 +++ | ||
14 | linux/src/mm/Makefile.am | 2 +- | ||
15 | packages/ti/ipc/mm/MmRpc.c | 4 ++++ | ||
16 | 4 files changed, 14 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index e6cb19f..22f7db2 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -70,6 +70,7 @@ AC_SUBST([AM_LDFLAGS]) | ||
23 | AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' and 'DRA7XX'. If not defined all platforms will be built.) | ||
24 | AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries) | ||
25 | AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.) | ||
26 | +AC_ARG_VAR(KERNEL_BUILD_DIR, Path to the Linux kernel build artifacts.) | ||
27 | AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver) | ||
28 | AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.) | ||
29 | |||
30 | @@ -108,6 +109,7 @@ AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=]) | ||
31 | AC_SUBST([PLATFORM]) | ||
32 | AC_SUBST([CMEM_INSTALL_DIR]) | ||
33 | AC_SUBST([KERNEL_INSTALL_DIR]) | ||
34 | +AC_SUBST([KERNEL_BUILD_DIR]) | ||
35 | AC_SUBST([AF_RPMSG]) | ||
36 | AC_SUBST([DRM_PREFIX]) | ||
37 | |||
38 | @@ -123,6 +125,7 @@ AM_CONDITIONAL([DRA7XX], [test "x$PLATFORM" = "xDRA7XX"]) | ||
39 | AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"]) | ||
40 | AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"]) | ||
41 | AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"]) | ||
42 | +AM_CONDITIONAL([KERNEL_BUILD_DIR], [test -n "$KERNEL_BUILD_DIR"]) | ||
43 | AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"]) | ||
44 | AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"]) | ||
45 | |||
46 | @@ -153,6 +156,9 @@ You have configured to build for the '${PLATFORM}' platform | ||
47 | Your KERNEL installation directory is set to: | ||
48 | '${KERNEL_INSTALL_DIR}' | ||
49 | |||
50 | +Your KERNEL build artifacts directory is set to: | ||
51 | + '${KERNEL_BUILD_DIR}' | ||
52 | + | ||
53 | Your DRM installation directory is set to: | ||
54 | '${DRM_PREFIX}' | ||
55 | |||
56 | diff --git a/ipc-linux.mak b/ipc-linux.mak | ||
57 | index 58a9cea..a174a9c 100644 | ||
58 | --- a/ipc-linux.mak | ||
59 | +++ b/ipc-linux.mak | ||
60 | @@ -60,6 +60,7 @@ config: | ||
61 | PLATFORM=$(PLATFORM) \ | ||
62 | CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ | ||
63 | KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ | ||
64 | + KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ | ||
65 | DRM_PREFIX=$(DRM_PREFIX) \ | ||
66 | AF_RPMSG=$(AF_RPMSG) | ||
67 | |||
68 | @@ -72,6 +73,7 @@ config-static: | ||
69 | PLATFORM=$(PLATFORM) \ | ||
70 | CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ | ||
71 | KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ | ||
72 | + KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ | ||
73 | DRM_PREFIX=$(DRM_PREFIX) \ | ||
74 | AF_RPMSG=$(AF_RPMSG) | ||
75 | |||
76 | @@ -84,5 +86,6 @@ config-shared: | ||
77 | PLATFORM=$(PLATFORM) \ | ||
78 | CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ | ||
79 | KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ | ||
80 | + KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ | ||
81 | DRM_PREFIX=$(DRM_PREFIX) \ | ||
82 | AF_RPMSG=$(AF_RPMSG) | ||
83 | diff --git a/linux/src/mm/Makefile.am b/linux/src/mm/Makefile.am | ||
84 | index 59aa312..436b432 100644 | ||
85 | --- a/linux/src/mm/Makefile.am | ||
86 | +++ b/linux/src/mm/Makefile.am | ||
87 | @@ -32,7 +32,7 @@ | ||
88 | ## | ||
89 | |||
90 | # additional include paths necessary to compile the library | ||
91 | -AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" | ||
92 | +AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" -DKERNEL_BUILD_DIR="$(KERNEL_BUILD_DIR)" | ||
93 | |||
94 | ############################################################################### | ||
95 | # THE LIBRARIES TO BUILD | ||
96 | diff --git a/packages/ti/ipc/mm/MmRpc.c b/packages/ti/ipc/mm/MmRpc.c | ||
97 | index 09d6b05..78adfa8 100644 | ||
98 | --- a/packages/ti/ipc/mm/MmRpc.c | ||
99 | +++ b/packages/ti/ipc/mm/MmRpc.c | ||
100 | @@ -56,7 +56,11 @@ | ||
101 | #endif | ||
102 | |||
103 | #define linux_version_include(kd) <kd/include/generated/uapi/linux/version.h> | ||
104 | +#if defined(KERNEL_BUILD_DIR) | ||
105 | +#include linux_version_include(KERNEL_BUILD_DIR) | ||
106 | +#else | ||
107 | #include linux_version_include(KERNEL_INSTALL_DIR) | ||
108 | +#endif | ||
109 | |||
110 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) | ||
111 | #define linux_include(kd,m) <kd/include/linux/m.h> | ||
112 | -- | ||
113 | 2.2.0 | ||
114 | |||
diff --git a/recipes-ti/ipc/ti-ipc_git.bb b/recipes-ti/ipc/ti-ipc_git.bb index 5f0b8db0..065d2c64 100644 --- a/recipes-ti/ipc/ti-ipc_git.bb +++ b/recipes-ti/ipc/ti-ipc_git.bb | |||
@@ -11,6 +11,7 @@ PV = "3.36.01.11" | |||
11 | BRANCH = "3.36" | 11 | BRANCH = "3.36" |
12 | SRC_URI = "git://git.ti.com/ipc/ipcdev.git;protocol=git;branch=${BRANCH} \ | 12 | SRC_URI = "git://git.ti.com/ipc/ipcdev.git;protocol=git;branch=${BRANCH} \ |
13 | file://tiipclad-daemon.sh \ | 13 | file://tiipclad-daemon.sh \ |
14 | file://0001-Add-kernel-build-dir.patch \ | ||
14 | " | 15 | " |
15 | # Commit corresponds to 3.36.01.11 | 16 | # Commit corresponds to 3.36.01.11 |
16 | SRCREV = "2a4256289d462d93a7e00a6ffb10bd46081a9500" | 17 | SRCREV = "2a4256289d462d93a7e00a6ffb10bd46081a9500" |
@@ -33,14 +34,15 @@ DAEMON_k2hk-evm = "lad_tci6638" | |||
33 | DAEMON_k2l-evm = "lad_tci6630" | 34 | DAEMON_k2l-evm = "lad_tci6630" |
34 | DAEMON_k2e-evm = "lad_66ak2e" | 35 | DAEMON_k2e-evm = "lad_66ak2e" |
35 | 36 | ||
36 | inherit autotools pkgconfig update-rc.d | 37 | inherit autotools-brokensep pkgconfig update-rc.d |
37 | 38 | ||
38 | INITSCRIPT_NAME = "tiipclad-daemon.sh" | 39 | INITSCRIPT_NAME = "tiipclad-daemon.sh" |
39 | INITSCRIPT_PARAMS = "defaults 10" | 40 | INITSCRIPT_PARAMS = "defaults 10" |
40 | 41 | ||
41 | EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}" | 42 | EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" |
42 | 43 | ||
43 | do_configure() { | 44 | do_configure() { |
45 | ( cd ${S}; autoreconf -f -i -s ) | ||
44 | oe_runconf | 46 | oe_runconf |
45 | } | 47 | } |
46 | 48 | ||