#!/bin/bash KVM_COMMIT="0e68cb048bb8aadb14675f5d4286d8ab2fc35449" OVS_COMMIT="4ff6642f3c1dd8949c2f42b3310ee2523ee970a6" KEEP=no quirks() { # Workaround build bug on Ubuntu 14.04 cat < arch/x86/boot/install.sh #!/bin/sh cp -a -- "\$2" "\$4/vmlinuz-\$1" EOF # Add deprecated XFS delaylog option back in cat <m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); mp->m_qflags &= ~XFS_GQUOTA_ENFD; + } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) { + xfs_warn(mp, + "delaylog is the default now, option is deprecated."); } else if (!strcmp(this_char, MNTOPT_DISCARD)) { mp->m_flags |= XFS_MOUNT_DISCARD; } else if (!strcmp(this_char, MNTOPT_NODISCARD)) { -- 1.9.1 EOF } for i do case $i in -k) KEEP=yes shift ;; -c) KVM_COMMIT=$2 shift;shift ;; -o) OVS_COMMIT=$2 shift;shift ;; esac done SRC=${1:-/root} CONFIG=${2:-arch/x86/configs/opnfv.config} VERSION=${3:-1.0.OPNFV} # Check for necessary build tools if ! type git >/dev/null 2>/dev/null then echo "Build tools missing, run the command apt-get install git fakeroot build-essential ncurses-dev xz-utils kernel-package automake as root and try again" exit 1 fi # Make sure the source dir exists if [ ! -d $SRC ] then echo "$SRC: no such directory" exit 1 fi ( cd $SRC # Get the Open VSwitch sources if [ ! -d ovs ] then git clone https://github.com/openvswitch/ovs.git fi # Get the KVM for NFV kernel sources if [ ! -d kvmfornfv ] then git clone https://gerrit.opnfv.org/gerrit/kvmfornfv fi cd kvmfornfv git pull if [ x$KVM_COMMIT != x ] then git checkout $KVM_COMMIT else git reset --hard fi cd kernel quirks # Configure the kernel cp $CONFIG .config make oldconfig