1 # We don't want make removing intermediary stamps
4 # Prepare the out-of-tree build directory
5 ifeq ($(do_full_source
),true
)
6 build_cd
= cd
$(builddir
)/build-
$*; #
10 build_O
= O
=$(builddir
)/build-
$*
13 $(stampdir
)/stamp-prepare-
%: config-prepare-check-
%
16 $(stampdir
)/stamp-prepare-tree-
%: target_flavour
= $*
17 $(stampdir
)/stamp-prepare-tree-
%: $(commonconfdir
)/config.common.
$(family
) $(archconfdir
)/config.common.
$(arch
) $(archconfdir
)/config.flavour.
%
19 install -d
$(builddir
)/build-
$*
20 touch
$(builddir
)/build-
$*/ubuntu-build
21 [ "$(do_full_source)" != 'true' ] && true || \
22 rsync
-a
--exclude debian
--exclude debian.master
--exclude
$(DEBIAN
) * $(builddir
)/build-
$*
23 cat
$^ | sed
-e
's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir
)/build-
$*/.config
24 find
$(builddir
)/build-
$* -name
"*.ko" | xargs
rm -f
25 $(build_cd
) $(kmake
) $(build_O
) -j1 silentoldconfig prepare scripts
28 # Used by developers as a shortcut to prepare a tree for compilation.
29 prepare-
%: $(stampdir
)/stamp-prepare-
%
31 # Used by developers to allow efficient pre-building without fakeroot.
32 build-
%: $(stampdir
)/stamp-build-
%
35 # Do the actual build, including image and modules
36 $(stampdir
)/stamp-build-
%: target_flavour
= $*
37 $(stampdir
)/stamp-build-
%: bldimg
= $(call custom_override
,build_image
,$*)
38 $(stampdir
)/stamp-build-
%: dtb_target
= $(dtb_files_
$*)
39 $(stampdir
)/stamp-build-
%: $(stampdir
)/stamp-prepare-
%
40 @echo Debug
: $@ build_image
$(build_image
) bldimg
$(bldimg
)
41 $(build_cd
) $(kmake
) $(build_O
) $(conc_level
) $(bldimg
) modules
$(dtb_target
)
44 # Install the finished build
45 install-
%: pkgdir
= $(CURDIR
)/debian
/$(bin_pkg_name
)-$*
46 install-
%: pkgdir_ex
= $(CURDIR
)/debian
/$(extra_pkg_name
)-$*
47 install-
%: bindoc
= $(pkgdir
)/usr
/share
/doc
/$(bin_pkg_name
)-$*
48 install-
%: dbgpkgdir
= $(CURDIR
)/debian
/$(bin_pkg_name
)-$*-dbgsym
49 install-
%: signed
= $(CURDIR
)/debian
/$(bin_pkg_name
)-signed
50 install-
%: basepkg
= $(hdrs_pkg_name
)
51 install-
%: kernfile
= $(call custom_override
,kernel_file
,$*)
52 install-
%: instfile
= $(call custom_override
,install_file
,$*)
53 install-
%: hdrdir
= $(CURDIR
)/debian
/$(basepkg
)-$*/usr
/src
/$(basepkg
)-$*
54 install-
%: target_flavour
= $*
55 install-
%: dtb_files
= $(dtb_files_
$*)
57 @echo Debug
: $@ kernel_file
$(kernel_file
) kernfile
$(kernfile
) install_file
$(install_file
) instfile
$(instfile
)
60 dh_clean
-k
-p
$(bin_pkg_name
)-$*
61 dh_clean
-k
-p
$(hdrs_pkg_name
)-$*
62 ifneq ($(skipdbg
),true
)
63 dh_clean
-k
-p
$(dbg_pkg_name
)-$*
67 # compress_file logic required because not all architectures
68 # generate a zImage automatically out of the box
69 ifeq ($(compress_file
),)
70 install -m600
-D
$(builddir
)/build-
$*/$(kernfile
) \
71 $(pkgdir
)/boot
/$(instfile
)-$(abi_release
)-$*
73 install -d
$(pkgdir
)/boot
74 gzip
-c9v
$(builddir
)/build-
$*/$(kernfile
) > \
75 $(pkgdir
)/boot
/$(instfile
)-$(abi_release
)-$*
76 chmod
600 $(pkgdir
)/boot
/$(instfile
)-$(abi_release
)-$*
80 ifeq ($(uefi_signed
),true
)
81 install -d
$(signed
)/$(release
)-$(revision
)
82 # Check to see if this supports handoff, if not do not sign it.
83 # Check the identification area magic and version >= 0x020b
84 handoff
=`dd if="$(pkgdir)/boot/$(instfile)-$(abi_release)-$*" bs=1 skip=514 count=6 2>/dev/null | od -s | awk '($$1 == 0 && $$2 == 25672 && $$3 == 21362 && $$4 >= 523) { print "GOOD" }'`; \
85 if
[ "$$handoff" = "GOOD" ]; then \
86 cp
-p
$(pkgdir
)/boot
/$(instfile
)-$(abi_release
)-$* \
87 $(signed
)/$(release
)-$(revision
)/$(instfile
)-$(abi_release
)-$*.efi
; \
92 install -m644
$(builddir
)/build-
$*/.config \
93 $(pkgdir
)/boot
/config-
$(abi_release
)-$*
94 install -m644
$(abidir
)/$* \
95 $(pkgdir
)/boot
/abi-
$(abi_release
)-$*
96 install -m600
$(builddir
)/build-
$*/System.map \
97 $(pkgdir
)/boot
/System.map-
$(abi_release
)-$*
98 if
[ "$(dtb_files)" ]; then \
99 install -d
$(pkgdir
)/lib
/firmware
/$(abi_release
)-$*/device-tree
; \
100 for dtb_file in
$(dtb_files
); do \
101 install -m644
$(builddir
)/build-
$*/arch
/$(build_arch
)/boot
/dts
/$$dtb_file \
102 $(pkgdir
)/lib
/firmware
/$(abi_release
)-$*/device-tree
/$$dtb_file; \
105 ifeq ($(no_dumpfile
),)
106 makedumpfile
-g
$(pkgdir
)/boot
/vmcoreinfo-
$(abi_release
)-$* \
107 -x
$(builddir
)/build-
$*/vmlinux
108 chmod
0600 $(pkgdir
)/boot
/vmcoreinfo-
$(abi_release
)-$*
111 $(build_cd
) $(kmake
) $(build_O
) $(conc_level
) modules_install \
112 INSTALL_MOD_STRIP
=1 INSTALL_MOD_PATH
=$(pkgdir
)/ \
113 INSTALL_FW_PATH
=$(pkgdir
)/lib
/firmware
/$(abi_release
)-$*
116 # Remove all modules not in the inclusion list.
118 if
[ -f
$(DEBIAN
)/control.d
/$(target_flavour
).inclusion-list
] ; then \
119 mkdir
-p
$(pkgdir_ex
)/lib
/modules
/$(abi_release
)-$*; \
120 mv
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/kernel \
121 $(pkgdir_ex
)/lib
/modules
/$(abi_release
)-$*/kernel
; \
122 $(SHELL
) $(DROOT
)/scripts
/module-inclusion
--master \
123 $(pkgdir_ex
)/lib
/modules
/$(abi_release
)-$*/kernel \
124 $(pkgdir
)/lib
/modules
/$(abi_release
)-$*/kernel \
125 $(DEBIAN
)/control.d
/$(target_flavour
).inclusion-list
2>&1 | \
126 tee
$(target_flavour
).inclusion-list.log
; \
127 /sbin
/depmod
-b
$(pkgdir
) -ea
-F
$(pkgdir
)/boot
/System.map-
$(abi_release
)-$* \
128 $(abi_release
)-$* 2>&1 |tee
$(target_flavour
).depmod.log
; \
131 ifeq ($(no_dumpfile
),)
132 makedumpfile
-g
$(pkgdir
)/boot
/vmcoreinfo-
$(abi_release
)-$* \
133 -x
$(builddir
)/build-
$*/vmlinux
134 chmod
0600 $(pkgdir
)/boot
/vmcoreinfo-
$(abi_release
)-$*
136 rm -f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/build
137 rm -f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/source
139 # Some initramfs-tools specific modules
140 install -d
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/initrd
141 if
[ -f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/kernel
/drivers
/video
/vesafb.ko
]; then\
142 ln
-f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/kernel
/drivers
/video
/vesafb.ko \
143 $(pkgdir
)/lib
/modules
/$(abi_release
)-$*/initrd
/; \
146 # Now the image scripts
147 install -d
$(pkgdir
)/DEBIAN
148 for script in postinst postrm preinst prerm
; do \
149 sed
-e
's/=V/$(abi_release)-$*/g' -e
's/=K/$(instfile)/g' \
150 -e
's/=L/$(loader)/g' -e
's@=B@$(build_arch)@g' \
151 $(DROOT
)/control-scripts
/$$script > $(pkgdir
)/DEBIAN
/$$script; \
152 chmod
755 $(pkgdir
)/DEBIAN
/$$script; \
154 # Install the postinit/postrm scripts in the extras package.
155 if
[ -f
$(DEBIAN
)/control.d
/$(target_flavour
).inclusion-list
] ; then \
156 install -d
$(pkgdir_ex
)/DEBIAN
; \
157 for script in postinst postrm
; do \
158 sed
-e
's/=V/$(abi_release)-$*/g' -e
's/=K/$(instfile)/g' \
159 -e
's/=L/$(loader)/g' -e
's@=B@$(build_arch)@g' \
160 debian
/control-scripts
/$$script > $(pkgdir_ex
)/DEBIAN
/$$script; \
161 chmod
755 $(pkgdir_ex
)/DEBIAN
/$$script; \
165 # Install the full changelog.
166 ifeq ($(do_doc_package
),true
)
168 cat
$(DEBIAN
)/changelog
$(DEBIAN
)/changelog.historical | \
169 gzip
-9 >$(bindoc
)/changelog.Debian.old.gz
170 chmod
644 $(bindoc
)/changelog.Debian.old.gz
173 ifneq ($(skipsub
),true
)
174 for sub in
$($(*)_sub
); do \
175 if
! (TO
=$$sub FROM
=$* ABI_RELEASE
=$(abi_release
) $(SHELL
) \
176 $(DROOT
)/scripts
/sub-flavour
); then exit
1; fi
; \
177 /sbin
/depmod
-b debian
/$(bin_pkg_name
)-$$sub \
178 -ea
-F debian
/$(bin_pkg_name
)-$$sub/boot
/System.map-
$(abi_release
)-$* \
180 install -d debian
/$(bin_pkg_name
)-$$sub/DEBIAN
; \
181 for script in postinst postrm preinst prerm
; do \
182 sed
-e
's/=V/$(abi_release)-$*/g' \
183 -e
's/=K/$(instfile)/g' \
184 -e
's/=L/$(loader)/g' \
185 -e
's@=B@$(build_arch)@g' \
186 $(DROOT
)/control-scripts
/$$script > \
187 debian
/$(bin_pkg_name
)-$$sub/DEBIAN
/$$script;\
188 chmod
755 debian
/$(bin_pkg_name
)-$$sub/DEBIAN
/$$script;\
193 ifneq ($(skipdbg
),true
)
194 # Debug image is simple
195 install -m644
-D
$(builddir
)/build-
$*/vmlinux \
196 $(dbgpkgdir
)/usr
/lib
/debug
/boot
/vmlinux-
$(abi_release
)-$*
197 $(build_cd
) $(kmake
) $(build_O
) modules_install \
198 INSTALL_MOD_PATH
=$(dbgpkgdir
)/usr
/lib
/debug
199 # Add .gnu_debuglink sections to each stripped .ko
200 # pointing to unstripped verson
201 find
$(pkgdir
) -name
'*.ko' | sed
's|$(pkgdir)||'| while read module
; do \
202 if
[[ -f
"$(dbgpkgdir)/usr/lib/debug/$$module" ]] ; then \
203 $(CROSS_COMPILE
)objcopy \
204 --add-gnu-debuglink
=$(dbgpkgdir
)/usr
/lib
/debug
/$$module \
205 $(pkgdir
)/$$module; \
208 rm -f
$(dbgpkgdir
)/usr
/lib
/debug
/lib
/modules
/$(abi_release
)-$*/build
209 rm -f
$(dbgpkgdir
)/usr
/lib
/debug
/lib
/modules
/$(abi_release
)-$*/source
210 rm -f
$(dbgpkgdir
)/usr
/lib
/debug
/lib
/modules
/$(abi_release
)-$*/modules.
*
211 rm -fr
$(dbgpkgdir
)/usr
/lib
/debug
/lib
/firmware
214 # The flavour specific headers image
215 # TODO: Would be nice if we didn't have to dupe the original builddir
216 install -d
-m755
$(hdrdir
)
217 cat
$(builddir
)/build-
$*/.config | \
218 sed
-e
's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \
220 chmod
644 $(hdrdir
)/.config
221 $(kmake
) O
=$(hdrdir
) -j1 silentoldconfig prepare scripts
222 # We'll symlink this stuff
223 rm -f
$(hdrdir
)/Makefile
224 rm -rf
$(hdrdir
)/include2
225 # Copy over the compilation version.
226 cp
"$(builddir)/build-$*/include/generated/compile.h" \
227 "$(hdrdir)/include/generated/compile.h"
228 # powerpc seems to need some .o files for external module linking. Add them in.
229 ifeq ($(arch
),powerpc
)
230 mkdir
-p
$(hdrdir
)/arch
/powerpc
/lib
231 cp
$(builddir
)/build-
$*/arch
/powerpc
/lib
/*.o
$(hdrdir
)/arch
/powerpc
/lib
233 # Script to symlink everything up
234 $(SHELL
) $(DROOT
)/scripts
/link-headers
"$(hdrdir)" "$(basepkg)" "$*"
236 install -d debian
/$(basepkg
)-$*/lib
/modules
/$(abi_release
)-$*
237 ln
-s
/usr
/src
/$(basepkg
)-$* \
238 debian
/$(basepkg
)-$*/lib
/modules
/$(abi_release
)-$*/build
239 # And finally the symvers
240 install -m644
$(builddir
)/build-
$*/Module.symvers \
241 $(hdrdir
)/Module.symvers
243 # Now the header scripts
244 install -d
$(CURDIR
)/debian
/$(basepkg
)-$*/DEBIAN
245 for script in postinst
; do \
246 sed
-e
's/=V/$(abi_release)-$*/g' -e
's/=K/$(instfile)/g' \
247 $(DROOT
)/control-scripts
/headers-
$$script > \
248 $(CURDIR
)/debian
/$(basepkg
)-$*/DEBIAN
/$$script; \
249 chmod
755 $(CURDIR
)/debian
/$(basepkg
)-$*/DEBIAN
/$$script; \
252 # At the end of the package prep, call the tests
253 DPKG_ARCH
="$(arch)" KERN_ARCH
="$(build_arch)" FLAVOUR
="$*" \
254 VERSION
="$(abi_release)" REVISION
="$(revision)" \
255 PREV_REVISION
="$(prev_revision)" ABI_NUM
="$(abinum)" \
256 PREV_ABI_NUM
="$(prev_abinum)" BUILD_DIR
="$(builddir)/build-$*" \
257 INSTALL_DIR
="$(pkgdir)" SOURCE_DIR
="$(CURDIR)" \
258 run-parts
-v
$(DROOT
)/tests-build
261 # Remove files which are generated at installation by postinst,
262 # except for modules.order and modules.builtin
264 # NOTE: need to keep this list in sync with postrm
266 mkdir
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/_
267 mv
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/modules.order \
268 $(pkgdir
)/lib
/modules
/$(abi_release
)-$*/_
269 if
[ -f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/modules.builtin
] ; then \
270 mv
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/modules.builtin \
271 $(pkgdir
)/lib
/modules
/$(abi_release
)-$*/_
; \
273 rm -f
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/modules.
*
274 mv
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/_
/* \
275 $(pkgdir
)/lib
/modules
/$(abi_release
)-$*
276 rmdir
$(pkgdir
)/lib
/modules
/$(abi_release
)-$*/_
278 headers_tmp
:= $(CURDIR
)/debian
/tmp-headers
279 headers_dir
:= $(CURDIR
)/debian
/linux-libc-dev
281 hmake
:= $(MAKE
) -C
$(CURDIR
) O
=$(headers_tmp
) \
282 KERNELVERSION
=$(abi_release
) INSTALL_HDR_PATH
=$(headers_tmp
)/install \
283 SHELL
="$(SHELL)" ARCH
=$(header_arch
)
285 install-arch-headers
:
289 dh_clean
-k
-plinux-libc-dev
291 rm -rf
$(headers_tmp
)
292 install -d
$(headers_tmp
) $(headers_dir
)/usr
/include/
294 $(hmake
) $(defconfig
)
295 mv
$(headers_tmp
)/.config
$(headers_tmp
)/.config.old
296 sed
-e
's/^# \(CONFIG_MODVERSIONS\) is not set$$/\1=y/' \
297 -e
's/.*CONFIG_LOCALVERSION_AUTO.*/# CONFIG_LOCALVERSION_AUTO is not set/' \
298 $(headers_tmp
)/.config.old
> $(headers_tmp
)/.config
299 $(hmake
) silentoldconfig
300 $(hmake
) headers_install
302 ( cd
$(headers_tmp
)/install/include/ && \
303 find .
-name
'.' -o
-name
'.*' -prune
-o
-print | \
304 cpio
-pvd
--preserve-modification-time \
305 $(headers_dir
)/usr
/include/ )
306 mkdir
$(headers_dir
)/usr
/include/$(DEB_HOST_MULTIARCH
)
307 mv
$(headers_dir
)/usr
/include/asm
$(headers_dir
)/usr
/include/$(DEB_HOST_MULTIARCH
)/
309 rm -rf
$(headers_tmp
)
311 binary-arch-headers
: install-arch-headers
315 ifeq ($(do_libc_dev_package
),true
)
316 ifneq ($(DEBIAN
),debian.master
)
317 echo
"non-master branch building linux-libc-dev, aborting"
320 dh_installchangelogs
-plinux-libc-dev
321 dh_installdocs
-plinux-libc-dev
322 dh_compress
-plinux-libc-dev
323 dh_fixperms
-plinux-libc-dev
324 dh_installdeb
-plinux-libc-dev
325 $(lockme
) dh_gencontrol
-plinux-libc-dev
-- $(libc_dev_version
)
326 dh_md5sums
-plinux-libc-dev
327 dh_builddeb
-plinux-libc-dev
330 binary-
%: pkgimg
= $(bin_pkg_name
)-$*
331 binary-
%: pkgimg_ex
= $(extra_pkg_name
)-$*
332 binary-
%: pkghdr
= $(hdrs_pkg_name
)-$*
333 binary-
%: dbgpkg
= $(bin_pkg_name
)-$*-dbgsym
334 binary-
%: dbgpkgdir
= $(CURDIR
)/debian
/$(bin_pkg_name
)-$*-dbgsym
335 binary-
%: target_flavour
= $*
341 dh_installchangelogs
-p
$(pkgimg
)
342 dh_installdocs
-p
$(pkgimg
)
343 dh_compress
-p
$(pkgimg
)
344 dh_fixperms
-p
$(pkgimg
) -X
/boot
/
345 dh_installdeb
-p
$(pkgimg
)
346 dh_shlibdeps
-p
$(pkgimg
)
347 $(lockme
) dh_gencontrol
-p
$(pkgimg
)
348 dh_md5sums
-p
$(pkgimg
)
349 dh_builddeb
-p
$(pkgimg
) -- -Zbzip2
-z9
351 if
[ -f
$(DEBIAN
)/control.d
/$(target_flavour
).inclusion-list
] ; then \
352 dh_installchangelogs
-p
$(pkgimg_ex
); \
353 dh_installdocs
-p
$(pkgimg_ex
); \
354 dh_compress
-p
$(pkgimg_ex
); \
355 dh_fixperms
-p
$(pkgimg_ex
) -X
/boot
/; \
356 dh_installdeb
-p
$(pkgimg_ex
); \
357 dh_shlibdeps
-p
$(pkgimg_ex
); \
358 $(lockme
) dh_gencontrol
-p
$(pkgimg_ex
); \
359 dh_md5sums
-p
$(pkgimg_ex
); \
360 dh_builddeb
-p
$(pkgimg_ex
) -- -Zbzip2
-z9
; \
363 dh_installchangelogs
-p
$(pkghdr
)
364 dh_installdocs
-p
$(pkghdr
)
365 dh_compress
-p
$(pkghdr
)
366 dh_fixperms
-p
$(pkghdr
)
367 dh_shlibdeps
-p
$(pkghdr
)
368 dh_installdeb
-p
$(pkghdr
)
369 $(lockme
) dh_gencontrol
-p
$(pkghdr
)
370 dh_md5sums
-p
$(pkghdr
)
371 dh_builddeb
-p
$(pkghdr
)
373 ifneq ($(skipsub
),true
)
374 @set
-e
; for sub in
$($(*)_sub
); do \
375 pkg
=$(bin_pkg_name
)-$$sub; \
376 dh_installchangelogs
-p
$$pkg; \
377 dh_installdocs
-p
$$pkg; \
378 dh_compress
-p
$$pkg; \
379 dh_fixperms
-p
$$pkg -X
/boot
/; \
380 dh_shlibdeps
-p
$$pkg; \
381 dh_installdeb
-p
$$pkg; \
382 $(lockme
) dh_gencontrol
-p
$$pkg; \
383 dh_md5sums
-p
$$pkg; \
384 dh_builddeb
-p
$$pkg; \
388 ifneq ($(skipdbg
),true
)
389 dh_installchangelogs
-p
$(dbgpkg
)
390 dh_installdocs
-p
$(dbgpkg
)
391 dh_compress
-p
$(dbgpkg
)
392 dh_fixperms
-p
$(dbgpkg
)
393 dh_installdeb
-p
$(dbgpkg
)
394 $(lockme
) dh_gencontrol
-p
$(dbgpkg
)
395 dh_md5sums
-p
$(dbgpkg
)
396 dh_builddeb
-p
$(dbgpkg
)
398 # Hokay...here's where we do a little twiddling...
399 # Renaming the debug package prevents it from getting into
400 # the primary archive, and therefore prevents this very large
401 # package from being mirrored. It is instead, through some
402 # archive admin hackery, copied to http://ddebs.ubuntu.com.
404 mv ..
/$(dbgpkg
)_
$(release
)-$(revision
)_
$(arch
).deb \
405 ..
/$(dbgpkg
)_
$(release
)-$(revision
)_
$(arch
).ddeb
408 $(lockme_cmd
) 9 || exit
1; \
409 if grep
-qs
'^Build-Debug-Symbols: yes$$' /CurrentlyBuilding
; then \
410 sed
-i
'/^$(dbgpkg)_/s/\.deb /.ddeb /' debian
/files
; \
412 grep
-v
'^$(dbgpkg)_.*$$' debian
/files
> debian
/files.new
; \
413 mv debian
/files.new debian
/files
; \
416 # Now, the package wont get into the archive, but it will get put
417 # into the debug system.
419 ifneq ($(full_build
),false
)
420 # Clean out this flavours build directory.
421 rm -rf
$(builddir
)/build-
$*
422 # Clean out the debugging package source directory.
427 # per-architecture packages
429 builddirpa
= $(builddir
)/tools-perarch
431 $(stampdir
)/stamp-prepare-perarch
:
433 ifeq ($(do_tools
),true
)
435 install -d
$(builddirpa
)
436 for i in
*; do ln
-s
$(CURDIR
)/$$i $(builddirpa
); done
437 rm $(builddirpa
)/tools
438 rsync
-a tools
/ $(builddirpa
)/tools
/
442 $(stampdir
)/stamp-build-perarch
: $(stampdir
)/stamp-prepare-perarch
444 ifeq ($(do_tools
),true
)
445 ifeq ($(do_tools_perf
),true
)
446 cd
$(builddirpa
)/tools
/perf
&& \
447 make HAVE_CPLUS_DEMANGLE
=1 CROSS_COMPILE
=$(CROSS_COMPILE
)
449 if
[ "$(arch)" = "amd64" ] ||
[ "$(arch)" = "i386" ]; then \
450 cd
$(builddirpa
)/tools
/power
/x86
/x86_energy_perf_policy
&& make CROSS_COMPILE
=$(CROSS_COMPILE
); \
451 cd
$(builddirpa
)/tools
/power
/x86
/turbostat
&& make CROSS_COMPILE
=$(CROSS_COMPILE
); \
452 if
[ "$(do_hyperv)" = "true" ]; then \
453 cd
$(builddirpa
)/tools
/hv
&& make CROSS_COMPILE
=$(CROSS_COMPILE
); \
459 install-perarch
: toolspkgdir
= $(CURDIR
)/debian
/$(tools_pkg_name
)
460 install-perarch
: $(stampdir
)/stamp-build-perarch
463 ifeq ($(do_tools
),true
)
464 install -d
$(toolspkgdir
)/usr
/bin
465 ifeq ($(do_tools_perf
),true
)
466 install -s
-m755
$(builddirpa
)/tools
/perf
/perf \
467 $(toolspkgdir
)/usr
/bin
/perf_
$(abi_release
)
469 if
[ "$(arch)" = "amd64" ] ||
[ "$(arch)" = "i386" ]; then \
470 install -s
-m755
$(builddirpa
)/tools
/power
/x86
/x86_energy_perf_policy
/x86_energy_perf_policy \
471 $(toolspkgdir
)/usr
/bin
/x86_energy_perf_policy_
$(abi_release
); \
472 install -s
-m755
$(builddirpa
)/tools
/power
/x86
/turbostat
/turbostat \
473 $(toolspkgdir
)/usr
/bin
/turbostat_
$(abi_release
); \
474 if
[ "$(do_hyperv)" = "true" ]; then \
475 install -d
$(toolspkgdir
)/usr
/sbin
; \
476 install -s
-m755
$(builddirpa
)/tools
/hv
/hv_kvp_daemon \
477 $(toolspkgdir
)/usr
/sbin
/hv_kvp_daemon_
$(abi_release
); \
482 binary-perarch
: toolspkg
= $(tools_pkg_name
)
483 binary-perarch
: install-perarch
485 ifeq ($(do_tools
),true
)
486 dh_installchangelogs
-p
$(toolspkg
)
487 dh_installdocs
-p
$(toolspkg
)
488 dh_compress
-p
$(toolspkg
)
489 dh_fixperms
-p
$(toolspkg
)
490 dh_shlibdeps
-p
$(toolspkg
)
491 dh_installdeb
-p
$(toolspkg
)
492 $(lockme
) dh_gencontrol
-p
$(toolspkg
)
493 dh_md5sums
-p
$(toolspkg
)
494 dh_builddeb
-p
$(toolspkg
)
497 binary-debs
: signed
= $(CURDIR
)/debian
/$(bin_pkg_name
)-signed
498 binary-debs
: signedv
= $(CURDIR
)/debian
/$(bin_pkg_name
)-signed
/$(release
)-$(revision
)
499 binary-debs
: signed_tar
= $(src_pkg_name
)_
$(release
)-$(revision
)_
$(arch
).
tar.gz
500 binary-debs
: binary-perarch
$(addprefix binary-
,$(flavours
))
503 ifeq ($(uefi_signed
),true
)
504 echo
$(release
)-$(revision
) > $(signedv
)/version
505 cd
$(signedv
) && ls
*.efi
>flavours
506 cd
$(signed
) && tar czvf ..
/..
/..
/$(signed_tar
) .
507 dpkg-distaddfile
$(signed_tar
) raw-uefi
-
511 build-arch-deps-
$(do_flavour_image_package
) += $(addprefix $(stampdir
)/stamp-build-
,$(flavours
))
512 build-arch
: $(build-arch-deps-true
)
516 binary-arch-deps-
$(do_flavour_image_package
) += binary-udebs
518 binary-arch-deps-
$(do_flavour_image_package
) = binary-debs
520 binary-arch-deps-
$(do_libc_dev_package
) += binary-arch-headers
521 ifneq ($(do_common_headers_indep
),true
)
522 binary-arch-deps-
$(do_flavour_header_package
) += binary-headers
524 binary-arch
: $(binary-arch-deps-true
)