6b13f685e
김민수
BSP 최초 추가
|
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
LINUX_TOOLS += perf
PERF_DEPENDENCIES = host-flex host-bison
ifeq ($(KERNEL_ARCH),x86_64)
PERF_ARCH=x86
else
PERF_ARCH=$(KERNEL_ARCH)
endif
PERF_MAKE_FLAGS = \
$(LINUX_MAKE_FLAGS) \
JOBS=$(PARALLEL_JOBS) \
ARCH=$(PERF_ARCH) \
DESTDIR=$(TARGET_DIR) \
prefix=/usr \
WERROR=0 \
NO_LIBAUDIT=1 \
NO_NEWT=1 \
NO_GTK2=1 \
NO_LIBPERL=1 \
NO_LIBPYTHON=1 \
NO_LIBBIONIC=1
ifeq ($(BR2_mips)$(BR2_mips64),y)
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EB"
else ifeq ($(BR2_mipsel)$(BR2_mips64el),y)
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EL"
endif
ifeq ($(BR2_arc),y)
PERF_MAKE_FLAGS += NO_BACKTRACE=1
endif
ifeq ($(BR2_PACKAGE_SLANG),y)
PERF_DEPENDENCIES += slang
else
PERF_MAKE_FLAGS += NO_SLANG=1
endif
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
PERF_DEPENDENCIES += libunwind
else
PERF_MAKE_FLAGS += NO_LIBUNWIND=1
endif
ifeq ($(BR2_PACKAGE_NUMACTL),y)
PERF_DEPENDENCIES += numactl
else
PERF_MAKE_FLAGS += NO_LIBNUMA=1
endif
ifeq ($(BR2_PACKAGE_ELFUTILS),y)
PERF_DEPENDENCIES += elfutils
else
PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
PERF_DEPENDENCIES += zlib
else
PERF_MAKE_FLAGS += NO_ZLIB=1
endif
ifeq ($(BR2_PACKAGE_XZ),y)
PERF_DEPENDENCIES += xz
else
PERF_MAKE_FLAGS += NO_LZMA=1
endif
define PERF_DISABLE_DOCUMENTATION
if [ -f $(@D)/tools/perf/Documentation/Makefile ]; then \
printf "%%:
\t@:
" >$(@D)/tools/perf/Documentation/GNUmakefile; \
fi
endef
LINUX_POST_PATCH_HOOKS += PERF_DISABLE_DOCUMENTATION
define PERF_BUILD_CMDS
$(Q)if test ! -f $(@D)/tools/perf/Makefile ; then \
echo "Your kernel version is too old and does not have the perf tool." ; \
echo "At least kernel 2.6.31 must be used." ; \
exit 1 ; \
fi
$(Q)if test "$(BR2_PACKAGE_ELFUTILS)" = "" ; then \
if ! grep -q NO_LIBELF $(@D)/tools/perf/Makefile* ; then \
if ! test -r $(@D)/tools/perf/config/Makefile ; then \
echo "The perf tool in your kernel cannot be built without libelf." ; \
echo "Either upgrade your kernel to >= 3.7, or enable the elfutils package." ; \
exit 1 ; \
fi \
fi \
fi
$(TARGET_MAKE_ENV) $(MAKE1) $(PERF_MAKE_FLAGS) \
-C $(@D)/tools/perf O=$(@D)/tools/perf/
endef
define PERF_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) $(PERF_MAKE_FLAGS) \
-C $(@D)/tools/perf O=$(@D)/tools/perf/ install
$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/
$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/
endef
|