No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

checkconfig.sh 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. set -e
  3. if [ "$#" -lt 1 ]
  4. then
  5. echo "Usage : $0 configfile" 2>/dev/null
  6. exit 1
  7. fi
  8. config=$1
  9. err=0
  10. while read -r rule
  11. do
  12. opt="$(echo "$rule" | cut -d ":" -f 1)"
  13. comment="$(echo "$rule" | cut -d ":" -f 2-)"
  14. printf "%-40s" "$opt"
  15. if grep "$opt" "$config" >/dev/null
  16. then
  17. echo " [$(tput setaf 2)OK$(tput sgr0)]"
  18. else
  19. err=1
  20. echo "[$(tput setaf 1)FAIL$(tput sgr0)] $comment"
  21. fi
  22. done << __EOF__
  23. # CONFIG_BLK_DEV_INITRD is not set:Initrd should be disabled
  24. # CONFIG_MODULES is not set:Kernel should be monolitic (without module support)
  25. CONFIG_EXT4_FS=y:Needed by tests with debvm
  26. CONFIG_SWAP=y:Swap support
  27. CONFIG_VIRTIO=y:Needed by VIRTIO_PCI and VIRTIO_BALOON
  28. CONFIG_VIRTIO_MENU=y:The virtio drivers
  29. CONFIG_VIRTIO_NET=y:The virtio network driver
  30. CONFIG_VIRTIO_BLK=y:The virtio block device driver
  31. CONFIG_VIRTIO_PCI=y:Support for virtio PCI devices
  32. CONFIG_VIRTIO_MMIO:Support for memory mapped virtio driver
  33. CONFIG_VIRTIO_MEM=y:The virtio memory driver
  34. CONFIG_VIRTIO_BALLOON=y:Support for hot memory amount change for KVM guest
  35. CONFIG_VIRTIO_INPUT=y:The virtio input (kbd, mice) driver
  36. CONFIG_VIRTIO_CONSOLE=y:Support for virtio serial console
  37. CONFIG_VIRTIO_VDPA=y:Virtio data path acceleration support
  38. CONFIG_HW_RANDOM_VIRTIO=y:Virtio random number generator support
  39. CONFIG_VP_VDPA=y:Bridges virtio PCI to vDPA
  40. CONFIG_PCI_MSI=y:Allows driver to enable Message Signaled Interrupts
  41. CONFIG_KVM_GUEST=y:Optimization for KVM guest
  42. CONFIG_PARAVIRT=y:Optimization for linux guest
  43. CONFIG_MEMORY_HOTPLUG=y:Needed by VIRTIO_BALLOON
  44. CONFIG_MEMORY_HOTREMOVE=y:Needed by VIRTIO_BALLOON
  45. __EOF__
  46. exit $err