]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Revert "UBUNTU: Bypass spl/zfs config"
authorTim Gardner <tim.gardner@canonical.com>
Thu, 5 Nov 2015 16:19:47 +0000 (10:19 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 15:52:31 +0000 (08:52 -0700)
This reverts commit 2f3a4219e605b5ba4d83f3786abb9dac7148fae0.

Seems like this causes symbol resolution problems.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
debian/rules.d/2-binary-arch.mk

index 1b4e887993824d6131e185b84a9a0a88a03bc545..ead71e630462ccb49b33f4a3b93424e8007f52c2 100644 (file)
@@ -39,34 +39,31 @@ build-%: $(stampdir)/stamp-build-%
 
 # Do the actual build, including image and modules
 $(stampdir)/stamp-build-%: target_flavour = $*
-$(stampdir)/stamp-build-%: SPL_MODULE_CFLAGS += -I$(builddir)/build-$*/spl/include
-$(stampdir)/stamp-build-%: SPL_MODULE_CFLAGS += -include $(builddir)/build-$*/spl/spl_config.h
-$(stampdir)/stamp-build-%: SPL_MODULE_CFLAGS += -D_KERNEL -DNDEBUG
-$(stampdir)/stamp-build-%: spl_opts += SUBDIRS=$(builddir)/build-$*/spl/module
-$(stampdir)/stamp-build-%: spl_opts += SPL_MODULE_CFLAGS="$(SPL_MODULE_CFLAGS)"
-$(stampdir)/stamp-build-%: spl_opts += CONFIG_SPL=m
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -include $(builddir)/build-$*/spl/spl_config.h
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -include $(builddir)/build-$*/zfs/zfs_config.h
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -I$(builddir)/build-$*/zfs/include
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -I$(builddir)/build-$*/spl/include
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -I$(builddir)/build-$*/spl
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -DHAVE_SPL
-$(stampdir)/stamp-build-%: ZFS_MODULE_CFLAGS += -D_KERNEL -DNDEBUG
-$(stampdir)/stamp-build-%: zfs_opts += SUBDIRS=$(builddir)/build-$*/zfs/module
-$(stampdir)/stamp-build-%: zfs_opts += ZFS_MODULE_CFLAGS="$(ZFS_MODULE_CFLAGS)"
-$(stampdir)/stamp-build-%: zfs_opts += CONFIG_ZFS=m
+$(stampdir)/stamp-build-%: splopts  = --with-linux=$(CURDIR)
+$(stampdir)/stamp-build-%: splopts += --with-linux-obj=$(builddir)/build-$*
+$(stampdir)/stamp-build-%: zfsopts  = $(splopts)
+$(stampdir)/stamp-build-%: zfsopts += --with-spl=$(builddir)/build-$*/spl
+$(stampdir)/stamp-build-%: zfsopts += --with-spl-obj=$(builddir)/build-$*/spl
+$(stampdir)/stamp-build-%: zfsopts += --prefix=/usr --with-config=kernel
 $(stampdir)/stamp-build-%: bldimg = $(call custom_override,build_image,$*)
 $(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
        @echo Debug: $@ build_image $(build_image) bldimg $(bldimg)
        $(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(if $(filter true,$(do_dtbs)),dtbs)
 ifeq ($(do_zfs),true)
+       #
+       # SPL/ZFS wants a fully built kernel before you can configure and build.
+       # It seems to be impossible to tease out the application configuration
+       # from the modules, but at least one can build just the modules.
+       #
        install -d $(builddir)/build-$*/spl
-       rsync -a --delete spl/ $(builddir)/build-$*/spl/
-       $(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(spl_opts)
+       rsync -a --exclude=dkms.conf --delete spl/ $(builddir)/build-$*/spl/
+       cd $(builddir)/build-$*/spl; sh autogen.sh; sh configure $(splopts)
+       $(kmake) -C $(builddir)/build-$*/spl/module $(conc_level)
 
        install -d $(builddir)/build-$*/zfs
-       rsync -a --delete zfs/ $(builddir)/build-$*/zfs/
-       $(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(zfs_opts)
+       rsync -a --exclude=dkms.conf --delete zfs/ $(builddir)/build-$*/zfs/
+       cd $(builddir)/build-$*/zfs; sh autogen.sh; sh configure $(zfsopts)
+       $(kmake) -C $(builddir)/build-$*/zfs/module $(conc_level)
 endif
        @touch $@
 
@@ -92,15 +89,6 @@ install-%: splopts += INSTALL_MOD_PATH=$(pkgdir)/
 install-%: splopts += INSTALL_MOD_DIR=zfs
 install-%: splopts += $(conc_level)
 install-%: zfsopts  = $(splopts)
-install-%: kmake_install_opts  = INSTALL_MOD_STRIP=1
-install-%: kmake_install_opts += INSTALL_MOD_PATH=$(pkgdir)/
-install-%: kmake_install_opts += INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
-install-%: spl_install_opts  = $(kmake_install_opts)
-install-%: spl_install_opts += INSTALL_MOD_DIR=zfs
-install-%: spl_install_opts += SUBDIRS=$(builddir)/build-$*/spl/module CONFIG_SPL=m
-install-%: zfs_install_opts  = $(kmake_install_opts)
-install-%: zfs_install_opts += INSTALL_MOD_DIR=zfs
-install-%: zfs_install_opts += SUBDIRS=$(builddir)/build-$*/zfs/module CONFIG_ZFS=m
 install-%: checks-%
        @echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile)
        dh_testdir
@@ -155,10 +143,14 @@ ifeq ($(no_dumpfile),)
        chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
 endif
 
-       $(build_cd) $(kmake) $(build_O) $(conc_level) modules_install $(vdso) $(kmake_install_opts)
+       $(build_cd) $(kmake) $(build_O) $(conc_level) modules_install $(vdso) \
+               INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \
+               INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
 ifeq ($(do_zfs),true)
-       $(build_cd) $(kmake) $(build_O) $(conc_level) modules_install $(spl_install_opts)
-       $(build_cd) $(kmake) $(build_O) $(conc_level) modules_install $(zfs_install_opts)
+       cd $(builddir)/build-$*/spl/module; \
+               $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(splopts)
+       cd $(builddir)/build-$*/zfs/module; \
+               $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(zfsopts)
 endif
 
        #