echo " --save-config Save the configuration to /etc/kernels"
echo " --no-save-config Don't save the configuration to /etc/kernels"
echo " --virtio Include VirtIO kernel code"
+ echo " --kconfig=<CONFIG>=<value> Set a specific kernel config option"
echo " Kernel Compile settings"
echo " --oldconfig Implies --no-clean and runs a 'make oldconfig'"
echo " --clean Run make clean before compilation"
CMD_VIRTIO=`parse_optbool "$*"`
print_info 2 "CMD_VIRTIO: ${CMD_VIRTIO}"
;;
+ --kconfig=*)
+ KCONFIG_KEY=$(echo "$*" | cut -d= -f2)
+ KCONFIG_VALUE=$(echo "$*" | cut -d= -f3)
+ KCONFIG["$KCONFIG_KEY"]="$KCONFIG_VALUE"
+ print_info 2 "KCONFIG: ${KCONFIG_KEY}=${KCONFIG_VALUE}"
+ ;;
--multipath|--no-multipath)
CMD_MULTIPATH=`parse_optbool "$*"`
if [ "$CMD_MULTIPATH" = "1" -a ! -e /usr/include/libdevmapper.h ]
sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_VIRTIO_NET.*/CONFIG_VIRTIO_NET=y/g'
sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_VHOST_NET.*/CONFIG_VHOST_NET=y/g'
fi
+
+ for KEY in "${!KCONFIG[@]}"; do
+ VALUE="${KCONFIG[$KEY]}"
+ sed -i ${KERNEL_DIR}/.config -e "s/#\? \?$KEY.*/$KEY=$VALUE/g'
+ done
}