[powerpc,powerpcspe,ppc64] Fix cross-build (Closes: #903096)
- Introduce linux-bootwrapper-<abiname> package containing boot wrapper tools for the host architecture - linux-image: Install symlinks to boot wrapper tools instead of the native tools built by kbuild
This commit is contained in:
parent
e57ba67647
commit
b8c95ad3b9
|
@ -241,6 +241,11 @@ linux (4.17.4-1) UNRELEASED; urgency=medium
|
||||||
- powerpc/lib/sstep: Fix building for powerpcspe
|
- powerpc/lib/sstep: Fix building for powerpcspe
|
||||||
- powerpc/lib/Makefile: Don't pull in quad.o for 32-bit kernels
|
- powerpc/lib/Makefile: Don't pull in quad.o for 32-bit kernels
|
||||||
- linux-perf: Disable building for powerpcspe
|
- linux-perf: Disable building for powerpcspe
|
||||||
|
* [powerpc,powerpcspe,ppc64] Fix cross-build (Closes: #903096):
|
||||||
|
- Introduce linux-bootwrapper-<abiname> package containing boot wrapper
|
||||||
|
tools for the host architecture
|
||||||
|
- linux-image: Install symlinks to boot wrapper tools instead of the
|
||||||
|
native tools built by kbuild
|
||||||
|
|
||||||
-- Sjoerd Simons <sjoerd@debian.org> Wed, 04 Jul 2018 10:25:57 +0200
|
-- Sjoerd Simons <sjoerd@debian.org> Wed, 04 Jul 2018 10:25:57 +0200
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,11 @@ SUBDIRS = \
|
||||||
scripts \
|
scripts \
|
||||||
tools
|
tools
|
||||||
|
|
||||||
|
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
|
ifneq ($(filter powerpc powerpcspe ppc64,$(DEB_HOST_ARCH)),)
|
||||||
|
SUBDIRS += arch/powerpc/boot
|
||||||
|
endif
|
||||||
|
|
||||||
include $(top_rulesdir)/Makefile.inc
|
include $(top_rulesdir)/Makefile.inc
|
||||||
|
|
||||||
# Build userland headers first
|
# Build userland headers first
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
PROGS = \
|
||||||
|
addnote \
|
||||||
|
hack-coff \
|
||||||
|
mktree
|
||||||
|
|
||||||
|
SCRIPTS = \
|
||||||
|
wrapper
|
||||||
|
|
||||||
|
include $(top_rulesdir)/Makefile.inc
|
||||||
|
|
||||||
|
CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
@ -85,6 +85,9 @@ ifneq ($(DO_TOOLS_VERSIONED),False)
|
||||||
binary-arch-arch: install-perf
|
binary-arch-arch: install-perf
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(filter powerpc powerpcspe ppc64,$(DEB_HOST_ARCH)),)
|
||||||
|
binary-arch-arch: install-bootwrapper
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(DO_TOOLS_UNVERSIONED),False)
|
ifneq ($(DO_TOOLS_UNVERSIONED),False)
|
||||||
binary-arch-arch: install-usbip install-cpupower install-liblockdep
|
binary-arch-arch: install-usbip install-cpupower install-liblockdep
|
||||||
|
@ -455,10 +458,20 @@ ifneq ($(filter arm64 armel armhf,$(ARCH)),)
|
||||||
+$(MAKE_CLEAN) -C $(DIR) dtbs_install INSTALL_DTBS_PATH=$(CURDIR)/$(DT_INSTALL_DIR)
|
+$(MAKE_CLEAN) -C $(DIR) dtbs_install INSTALL_DTBS_PATH=$(CURDIR)/$(DT_INSTALL_DIR)
|
||||||
endif
|
endif
|
||||||
ifneq ($(filter powerpc powerpcspe ppc64,$(ARCH)),)
|
ifneq ($(filter powerpc powerpcspe ppc64,$(ARCH)),)
|
||||||
|
# Install wrapper code and DT source, but not the wrapper script or
|
||||||
|
# the executables it calls. Kbuild will always build these executable
|
||||||
|
# as native code, which is wrong for a cross-built package. Install
|
||||||
|
# symlinks to the versions in the linux-bootwrapper package instead.
|
||||||
|
rm -rf '$(DIR)_bootwrapper'
|
||||||
+$(MAKE_CLEAN) -C '$(DIR)' bootwrapper_install \
|
+$(MAKE_CLEAN) -C '$(DIR)' bootwrapper_install \
|
||||||
WRAPPER_OBJDIR='$(CURDIR)/$(DT_INSTALL_DIR)' \
|
WRAPPER_OBJDIR='$(CURDIR)/$(DT_INSTALL_DIR)' \
|
||||||
WRAPPER_DTSDIR='$(CURDIR)/$(DT_INSTALL_DIR)'/dts \
|
WRAPPER_DTSDIR='$(CURDIR)/$(DT_INSTALL_DIR)/dts' \
|
||||||
WRAPPER_BINDIR='$(CURDIR)/$(DT_INSTALL_DIR)'
|
WRAPPER_BINDIR='$(CURDIR)/$(DIR)_bootwrapper'
|
||||||
|
for prog in '$(DIR)_bootwrapper'/*; do \
|
||||||
|
prog="$$(basename $$prog)"; \
|
||||||
|
ln -s ../linux-bootwrapper-$(ABINAME)/$$prog \
|
||||||
|
'$(DT_INSTALL_DIR)'/$$prog; \
|
||||||
|
done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_bug:
|
install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_bug:
|
||||||
|
@ -765,4 +778,22 @@ endif
|
||||||
dh_md5sums
|
dh_md5sums
|
||||||
dh_builddeb
|
dh_builddeb
|
||||||
|
|
||||||
|
install-bootwrapper: PACKAGE_NAME = linux-bootwrapper-$(ABINAME)
|
||||||
|
install-bootwrapper: DH_OPTIONS = -p$(PACKAGE_NAME)
|
||||||
|
install-bootwrapper: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
|
||||||
|
install-bootwrapper: $(STAMPS_DIR)/build-tools
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_prep
|
||||||
|
$(call make-tools,arch/powerpc/boot) install DESTDIR=$(DIR) installdir=/usr/lib/$(PACKAGE_NAME)
|
||||||
|
dh_installchangelogs
|
||||||
|
dh_strip
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
dh_installdeb
|
||||||
|
dh_shlibdeps
|
||||||
|
dh_gencontrol
|
||||||
|
dh_md5sums
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
# vim: filetype=make
|
# vim: filetype=make
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Package: linux-image-@abiname@@localversion@
|
Package: linux-image-@abiname@@localversion@
|
||||||
Build-Profiles: <!stage1>
|
Build-Profiles: <!stage1>
|
||||||
Depends: kmod, linux-base (>= 4.3~), ${misc:Depends}
|
Depends: kmod, linux-base (>= 4.3~), linux-bootwrapper-@abiname@ [powerpc powerpcspe ppc64], ${misc:Depends}
|
||||||
Recommends: firmware-linux-free, ${kernel:Recommends}
|
Recommends: firmware-linux-free, ${kernel:Recommends}
|
||||||
Suggests: linux-doc-@version@, debian-kernel-handbook
|
Suggests: linux-doc-@version@, debian-kernel-handbook
|
||||||
Description: Linux @upstreamversion@ for @class@
|
Description: Linux @upstreamversion@ for @class@
|
||||||
|
|
|
@ -22,3 +22,12 @@ Description: Performance analysis tools for Linux @version@
|
||||||
.
|
.
|
||||||
The linux-base package contains a 'perf' command which will invoke the
|
The linux-base package contains a 'perf' command which will invoke the
|
||||||
appropriate version for the running kernel.
|
appropriate version for the running kernel.
|
||||||
|
|
||||||
|
Package: linux-bootwrapper-@abiname@
|
||||||
|
Build-Profiles: <!stage1 !pkg.linux.notools>
|
||||||
|
Architecture: powerpc powerpcspe ppc64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Multi-Arch: foreign
|
||||||
|
Description: Boot wrapper tools for Linux @version@ on PowerPC
|
||||||
|
This package provides the 'wrapper' script and related tools needed
|
||||||
|
to process the Linux kernel image for use with some PowerPC platforms.
|
||||||
|
|
Loading…
Reference in New Issue