genkernel: Add --kconfig to set specific kernel config options
[genkernel.git] / gen_cmdline.sh
index 5503bb56abcc866ba4e457baed2603755e0a76ad..6766b4ea292c5476e0d7ce97923d5ca97269bf08 100755 (executable)
@@ -32,6 +32,7 @@ longusage() {
   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"
@@ -326,6 +327,12 @@ parse_cmdline() {
                        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 ]