f80ef062c8b9aa76c7cca457e6914701a84d50e5
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / ocf-linux / 0001-modules-cross.patch
1 Remove the OCF linux kernel extension instead opting to build ocf-linux
2 modules out of tree.
3 This is easier for users since no kernel config tweaking is required.
4 On the downside the OCF drivers can't be used, but then all of the
5 kernel crypto drivers are available to users via cryptosoft which is
6 preferred.
7
8 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
9
10 diff -Nura ocf-linux-20120127.orig/ocf/Makefile ocf-linux-20120127/ocf/Makefile
11 --- ocf-linux-20120127.orig/ocf/Makefile        2013-04-27 09:27:04.413911866 -0300
12 +++ ocf-linux-20120127/ocf/Makefile     2013-04-27 09:27:31.131775576 -0300
13 @@ -2,6 +2,7 @@
14  -include $(ROOTDIR)/modules/.config
15
16  OCF_OBJS = crypto.o criov.o
17 +KDIR ?= /lib/modules/$(shell uname -r)/build
18
19  ifdef CONFIG_OCF_RANDOMHARVEST
20         OCF_OBJS += random.o
21 @@ -78,20 +79,13 @@
22  #
23
24  ocf_make:
25 -       make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m
26 -       make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_CRYPTOSOFT=m
27 -       -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_BENCH=m
28 -       -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_OCFNULL=m
29 -       -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_HIFN=m
30 +       make -C $(KDIR) M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_CRYPTOSOFT=m CONFIG_OCF_BENCH=m CONFIG_OCF_OCFNULL=m
31
32  ocf_modules:
33         $(MAKE) ocf_make OCF_TARGET=modules
34
35  ocf_install:
36         $(MAKE) ocf_make OCF_TARGET="modules modules_install"
37 -       depmod
38 -       mkdir -p /usr/include/crypto
39 -       cp cryptodev.h /usr/include/crypto/.
40
41  #
42  # generate full kernel patches for 2.4 and 2.6 kernels to make patching