diff options
-rw-r--r-- | meta-networking/recipes-support/drbd/drbd/0001-drbd-kbuild-fix-use-M-don-t-forget-addprefix-obj.patch | 79 | ||||
-rw-r--r-- | meta-networking/recipes-support/drbd/drbd_9.0.17-1.bb | 4 |
2 files changed, 82 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/drbd/drbd/0001-drbd-kbuild-fix-use-M-don-t-forget-addprefix-obj.patch b/meta-networking/recipes-support/drbd/drbd/0001-drbd-kbuild-fix-use-M-don-t-forget-addprefix-obj.patch new file mode 100644 index 000000000..fbf94d513 --- /dev/null +++ b/meta-networking/recipes-support/drbd/drbd/0001-drbd-kbuild-fix-use-M-don-t-forget-addprefix-obj.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | Upstream-Status: Backport [https://github.com/LINBIT/drbd-9.0/commit/46e8e3f] | ||
2 | |||
3 | Backport patch to fix compile errors: | ||
4 | |||
5 | | LD [M] /home/kkang/buildarea/Yocto/build/tmp/work/qemux86_64-poky-linux/drbd/9.0.17-1-r0/drbd-9.0.17-1/drbd/drbd.o | ||
6 | | x86_64-poky-linux-ld.bfd: cannot find .../tmp/work/qemux86_64-poky-linux/drbd/9.0.17-1-r0/drbd-9.0.17-1/drbd/drbd_bitmap.o: No such file or directory | ||
7 | |||
8 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
9 | |||
10 | From 46e8e3fc31b651fb56ea38134dcf14382fc43000 Mon Sep 17 00:00:00 2001 | ||
11 | From: Lars Ellenberg <lars.ellenberg@linbit.com> | ||
12 | Date: Wed, 3 Apr 2019 10:57:46 +0200 | ||
13 | Subject: [PATCH] drbd: kbuild fix: use M=; don't forget addprefix $(obj) | ||
14 | |||
15 | Kernel build started to warn about using SUBDIRS instead of M, | ||
16 | and we don't support "very old" kernels anymore anyways. | ||
17 | |||
18 | Our list of dependencies for drbd_buildtag.c needs to depend on the | ||
19 | actual files $(obj)/*.o resulting from the build, | ||
20 | not on just the list of *.o names. | ||
21 | |||
22 | This apparently also fixes a build failure in opensuse build service for | ||
23 | tumbleweed when using make-4.2.1-7.5 against kernel 5.0.5-something. | ||
24 | --- | ||
25 | drbd/Kbuild | 11 +++++------ | ||
26 | drbd/Makefile | 4 +--- | ||
27 | 2 files changed, 6 insertions(+), 9 deletions(-) | ||
28 | |||
29 | diff --git a/drbd/Kbuild b/drbd/Kbuild | ||
30 | index 285f7a81..99228029 100644 | ||
31 | --- a/drbd/Kbuild | ||
32 | +++ b/drbd/Kbuild | ||
33 | @@ -1,4 +1,5 @@ | ||
34 | -obj-m := drbd.o drbd_transport_tcp.o | ||
35 | +obj-m += drbd.o drbd_transport_tcp.o | ||
36 | +# obj-$(CONFIG_BLK_DEV_DRBD) += drbd.o drbd_transport_tcp.o | ||
37 | |||
38 | clean-files := compat.h $(wildcard .config.$(KERNELVERSION).timestamp) | ||
39 | |||
40 | @@ -56,10 +57,8 @@ ifndef DISABLE_KREF_DEBUGGING_HERE | ||
41 | drbd-y += kref_debug.o drbd_kref_debug.o | ||
42 | endif | ||
43 | |||
44 | -$(patsubst %,$(obj)/%,$(drbd-y)): $(obj)/compat.h | ||
45 | -$(patsubst %,$(obj)/%,drbd_transport_tcp.o): $(obj)/compat.h | ||
46 | - | ||
47 | -obj-$(CONFIG_BLK_DEV_DRBD) += drbd.o | ||
48 | +$(addprefix $(obj)/,$(drbd-y)): $(obj)/compat.h | ||
49 | +$(obj)/drbd_transport_tcp.o: $(obj)/compat.h | ||
50 | |||
51 | # ====================================================================== | ||
52 | |||
53 | @@ -124,7 +123,7 @@ endif | ||
54 | # and not in e.g. dash. I'm too lazy to fix it to be compatible. | ||
55 | SHELL=/bin/bash | ||
56 | |||
57 | -$(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y)) | ||
58 | +$(obj)/drbd_buildtag.c: $(addprefix $(obj)/,$(filter-out drbd_buildtag.o,$(drbd-y))) | ||
59 | @$(kecho) ' GEN $@ $(echo-why)' | ||
60 | @set -e; exec > $@.new; \ | ||
61 | echo -e "/* automatically generated. DO NOT EDIT. */"; \ | ||
62 | diff --git a/drbd/Makefile b/drbd/Makefile | ||
63 | index 5f768fc6..f9e8792a 100644 | ||
64 | --- a/drbd/Makefile | ||
65 | +++ b/drbd/Makefile | ||
66 | @@ -102,9 +102,7 @@ else | ||
67 | |||
68 | kbuild: | ||
69 | @rm -f .drbd_kernelrelease* | ||
70 | - # previous to 2.6.6 (suse: 2.6.5-dunno), this should be: | ||
71 | - $(MAKE) -C $(KDIR) $(if $(O),O=$(O),) SUBDIRS=$(DRBDSRC) $(ARCH_UM) modules | ||
72 | -# $(MAKE) -C $(KDIR) M=$(DRBDSRC) $(ARCH_UM) modules | ||
73 | + $(MAKE) -C $(KDIR) $(if $(O),O=$(O),) M=$(DRBDSRC) $(ARCH_UM) modules | ||
74 | -mv .drbd_kernelrelease.new .drbd_kernelrelease | ||
75 | @echo -n "Memorizing module configuration ... " | ||
76 | @config=$$( (for x in $(KDIR)/.config $(O)/.config ; do \ | ||
77 | -- | ||
78 | 2.20.0 | ||
79 | |||
diff --git a/meta-networking/recipes-support/drbd/drbd_9.0.17-1.bb b/meta-networking/recipes-support/drbd/drbd_9.0.17-1.bb index d6750ab2f..1eada269c 100644 --- a/meta-networking/recipes-support/drbd/drbd_9.0.17-1.bb +++ b/meta-networking/recipes-support/drbd/drbd_9.0.17-1.bb | |||
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" | |||
9 | DEPENDS = "virtual/kernel" | 9 | DEPENDS = "virtual/kernel" |
10 | 10 | ||
11 | SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \ | 11 | SRC_URI = "http://www.linbit.com/downloads/drbd/9.0/drbd-${PV}.tar.gz \ |
12 | file://check_existence_of_modules_before_installing.patch" | 12 | file://check_existence_of_modules_before_installing.patch \ |
13 | file://0001-drbd-kbuild-fix-use-M-don-t-forget-addprefix-obj.patch \ | ||
14 | " | ||
13 | 15 | ||
14 | SRC_URI[md5sum] = "ae8d5030760b2820a4b3e250447890a0" | 16 | SRC_URI[md5sum] = "ae8d5030760b2820a4b3e250447890a0" |
15 | SRC_URI[sha256sum] = "86dd6cc0fdc8123056a3bb67a634cd7ba62a7b05b23caab9995cce7730891da8" | 17 | SRC_URI[sha256sum] = "86dd6cc0fdc8123056a3bb67a634cd7ba62a7b05b23caab9995cce7730891da8" |