3 KVM_COMMIT="0e68cb048bb8aadb14675f5d4286d8ab2fc35449"
4 OVS_COMMIT="4ff6642f3c1dd8949c2f42b3310ee2523ee970a6"
8 # Workaround build bug on Ubuntu 14.04
9 cat <<EOF > arch/x86/boot/install.sh
11 cp -a -- "\$2" "\$4/vmlinuz-\$1"
14 # Add deprecated XFS delaylog option back in
16 diff --git a/kernel/fs/xfs/xfs_super.c b/kernel/fs/xfs/xfs_super.c
17 index 65a4537..b73ca67 100644
18 --- a/kernel/fs/xfs/xfs_super.c
19 +++ b/kernel/fs/xfs/xfs_super.c
20 @@ -109,6 +109,7 @@ static struct xfs_kobj xfs_dbg_kobj; /* global debug sysfs attrs */
21 #define MNTOPT_GQUOTANOENF "gqnoenforce"/* group quota limit enforcement */
22 #define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */
23 #define MNTOPT_QUOTANOENF "qnoenforce" /* same as uqnoenforce */
24 +#define MNTOPT_DELAYLOG "delaylog" /* Delayed logging enabled */
25 #define MNTOPT_DISCARD "discard" /* Discard unused blocks */
26 #define MNTOPT_NODISCARD "nodiscard" /* Do not discard unused blocks */
28 @@ -359,6 +360,9 @@ xfs_parseargs(
29 } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) {
30 mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
31 mp->m_qflags &= ~XFS_GQUOTA_ENFD;
32 + } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) {
34 + "delaylog is the default now, option is deprecated.");
35 } else if (!strcmp(this_char, MNTOPT_DISCARD)) {
36 mp->m_flags |= XFS_MOUNT_DISCARD;
37 } else if (!strcmp(this_char, MNTOPT_NODISCARD)) {
64 CONFIG=${2:-arch/x86/configs/opnfv.config}
65 VERSION=${3:-1.0.OPNFV}
67 # Check for necessary build tools
68 if ! type git >/dev/null 2>/dev/null
70 echo "Build tools missing, run the command
72 apt-get install git fakeroot build-essential ncurses-dev xz-utils kernel-package automake
74 as root and try again"
78 # Make sure the source dir exists
81 echo "$SRC: no such directory"
88 # Get the Open VSwitch sources
91 git clone https://github.com/openvswitch/ovs.git
94 # Get the KVM for NFV kernel sources
97 git clone https://gerrit.opnfv.org/gerrit/kvmfornfv
101 if [ x$KVM_COMMIT != x ]
103 git checkout $KVM_COMMIT
111 # Configure the kernel
114 make oldconfig </dev/null
116 # Build the kernel debs
121 fakeroot make-kpkg --initrd --revision=$VERSION kernel_image kernel_headers
122 git checkout arch/x86/boot/install.sh
123 git checkout fs/xfs/xfs_super.c
125 # Build OVS kernel modules
127 if [ x$OVS_COMMIT != x ]
129 git checkout $OVS_COMMIT
135 # Apply out of tree patches
137 for i in $SRC/kvmfornfv/patches/ovs/*.patch
147 ./configure --with-linux=$SRC/kvmfornfv/kernel
150 # Add OVS kernel modules to kernel deb
151 dpkg-deb -x $SRC/kvmfornfv/linux-image*.deb ovs.$$
152 dpkg-deb --control $SRC/kvmfornfv/linux-image*.deb ovs.$$/DEBIAN
153 cp datapath/linux/*.ko ovs.$$/lib/modules/*/kernel/net/openvswitch
154 depmod -b ovs.$$ -a `ls ovs.$$/lib/modules`
155 dpkg-deb -b ovs.$$ $SRC/kvmfornfv/linux-image*.deb
159 mv $SRC/kvmfornfv/*.deb .