build_O = O=$(builddir)/build-$*
endif
-prepare-%: $(stampdir)/stamp-prepare-%
- @# Empty for make to be happy
-$(stampdir)/stamp-prepare-%: $(stampdir)/stamp-prepare-tree-% prepare-checks-%
+$(stampdir)/stamp-prepare-%: config-prepare-check-%
@touch $@
$(stampdir)/stamp-prepare-tree-%: target_flavour = $*
$(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(archconfdir)/config.common.$(arch) $(archconfdir)/config.flavour.%
rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) * $(builddir)/build-$*
cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(release)$(extraversion)"/' > $(builddir)/build-$*/.config
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
- $(build_cd) $(kmake) $(build_O) silentoldconfig prepare scripts
+ $(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts
touch $@
# Do the actual build, including image and modules
build-%: $(stampdir)/stamp-build-%
@# Empty for make to be happy
$(stampdir)/stamp-build-%: target_flavour = $*
-$(stampdir)/stamp-build-%: prepare-%
+$(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
@echo "Building $*..."
- $(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image)
- $(build_cd) $(kmake) $(build_O) $(conc_level) modules
+ $(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image) modules
@touch $@
# Install the finished build
install-%: basepkg = $(hdrs_pkg_name)
install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
install-%: target_flavour = $*
-install-%: $(stampdir)/stamp-build-% checks-%
+install-%: checks-%
dh_testdir
dh_testroot
dh_clean -k -p$(bin_pkg_name)-$*
# compress_file logic required because not all architectures
# generate a zImage automatically out of the box
ifeq ($(compress_file),)
- install -m644 -D $(builddir)/build-$*/$(kernel_file) \
+ install -m600 -D $(builddir)/build-$*/$(kernel_file) \
$(pkgdir)/boot/$(install_file)-$(abi_release)-$*
else
install -d $(pkgdir)/boot
gzip -c9v $(builddir)/build-$*/$(kernel_file) > \
$(pkgdir)/boot/$(install_file)-$(abi_release)-$*
- chmod 644 $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
+ chmod 600 $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
endif
install -m644 $(builddir)/build-$*/.config \
$(pkgdir)/boot/config-$(abi_release)-$*
install -m644 $(abidir)/$* \
$(pkgdir)/boot/abi-$(abi_release)-$*
- install -m644 $(builddir)/build-$*/System.map \
+ install -m600 $(builddir)/build-$*/System.map \
$(pkgdir)/boot/System.map-$(abi_release)-$*
ifeq ($(no_dumpfile),)
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
-x $(builddir)/build-$*/vmlinux
+ chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
endif
- $(build_cd) $(kmake) $(build_O) modules_install \
+ $(build_cd) $(kmake) $(build_O) $(conc_level) modules_install \
INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \
INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
ifeq ($(no_dumpfile),)
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
-x $(builddir)/build-$*/vmlinux
+ chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
endif
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/build
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/source
sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \
$(hdrdir)/.config
chmod 644 $(hdrdir)/.config
- $(kmake) O=$(hdrdir) silentoldconfig prepare scripts
+ $(kmake) O=$(hdrdir) -j1 silentoldconfig prepare scripts
# We'll symlink this stuff
rm -f $(hdrdir)/Makefile
rm -rf $(hdrdir)/include2
-e 's/.*CONFIG_LOCALVERSION_AUTO.*/# CONFIG_LOCALVERSION_AUTO is not set/' \
$(headers_tmp)/.config.old > $(headers_tmp)/.config
$(hmake) silentoldconfig
- $(hmake) headers_install
+ $(hmake) $(conc_level) headers_install
( cd $(headers_tmp)/install/include/ && \
find . -name '.' -o -name '.*' -prune -o -print | \
cpio -pvd --preserve-modification-time \
$(headers_dir)/usr/include/ )
+ mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
+ mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/
rm -rf $(headers_tmp)
dh_installchangelogs -p$(pkgimg)
dh_installdocs -p$(pkgimg)
dh_compress -p$(pkgimg)
- dh_fixperms -p$(pkgimg)
+ dh_fixperms -p$(pkgimg) -X/boot/
dh_installdeb -p$(pkgimg)
dh_shlibdeps -p$(pkgimg)
dh_gencontrol -p$(pkgimg)
dh_installchangelogs -p$$pkg; \
dh_installdocs -p$$pkg; \
dh_compress -p$$pkg; \
- dh_fixperms -p$$pkg; \
+ dh_fixperms -p$$pkg -X/boot/; \
dh_shlibdeps -p$$pkg; \
dh_installdeb -p$$pkg; \
dh_gencontrol -p$$pkg; \
rm -rf $(dbgpkgdir)
endif
-$(stampdir)/stamp-flavours:
- @echo $(flavours) > $@
-
#
# per-architecture packages
#
$(stampdir)/stamp-prepare-perarch:
@echo "Preparing perarch ..."
ifeq ($(do_tools),true)
+ rm -rf $(builddir)/tools-$*
install -d $(builddir)/tools-$*
for i in *; do ln -s $(CURDIR)/$$i $(builddir)/tools-$*/; done
rm $(builddir)/tools-$*/tools
endif
touch $@
-$(stampdir)/stamp-build-perarch: prepare-perarch
+$(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch
ifeq ($(do_tools),true)
- cd $(builddir)/tools-$*/tools/perf && make
+ cd $(builddir)/tools-$*/tools/perf && \
+ make HAVE_CPLUS_DEMANGLE=1 $(CROSS_COMPILE) $(conc_level)
endif
@touch $@
dh_builddeb -p$(toolspkg)
endif
-binary-debs: binary-perarch $(stampdir)/stamp-flavours $(addprefix binary-,$(flavours))
+binary-debs: binary-perarch $(addprefix binary-,$(flavours))
build-arch-deps-$(do_flavour_image_package) += $(addprefix build-,$(flavours))
build-arch: $(build-arch-deps-true)