#!/bin/sh set -e if [ "$#" -lt 1 ] then echo "Usage : $0 configfile" 2>/dev/null exit 1 fi config=$1 err=0 while read -r rule do opt="$(echo "$rule" | cut -d ":" -f 1)" comment="$(echo "$rule" | cut -d ":" -f 2-)" printf "%-40s" "$opt" if grep "$opt" "$config" >/dev/null then echo " [$(tput setaf 2)OK$(tput sgr0)]" else err=1 echo "[$(tput setaf 1)FAIL$(tput sgr0)] $comment" fi done << __EOF__ # CONFIG_BLK_DEV_INITRD is not set:Initrd should be disabled # CONFIG_MODULES is not set:Kernel should be monolitic (without module support) CONFIG_EXT4_FS=y:Needed by tests with debvm CONFIG_SWAP=y:Swap support CONFIG_VIRTIO=y:Needed by VIRTIO_PCI and VIRTIO_BALOON CONFIG_VIRTIO_MENU=y:The virtio drivers CONFIG_VIRTIO_NET=y:The virtio network driver CONFIG_VIRTIO_BLK=y:The virtio block device driver CONFIG_VIRTIO_PCI=y:Support for virtio PCI devices CONFIG_VIRTIO_MMIO:Support for memory mapped virtio driver CONFIG_VIRTIO_MEM=y:The virtio memory driver CONFIG_VIRTIO_BALLOON=y:Support for hot memory amount change for KVM guest CONFIG_VIRTIO_INPUT=y:The virtio input (kbd, mice) driver CONFIG_VIRTIO_CONSOLE=y:Support for virtio serial console CONFIG_VIRTIO_VDPA=y:Virtio data path acceleration support CONFIG_HW_RANDOM_VIRTIO=y:Virtio random number generator support CONFIG_VP_VDPA=y:Bridges virtio PCI to vDPA CONFIG_PCI_MSI=y:Allows driver to enable Message Signaled Interrupts CONFIG_KVM_GUEST=y:Optimization for KVM guest CONFIG_PARAVIRT=y:Optimization for linux guest CONFIG_MEMORY_HOTPLUG=y:Needed by VIRTIO_BALLOON CONFIG_MEMORY_HOTREMOVE=y:Needed by VIRTIO_BALLOON __EOF__ exit $err