Added nconfig support

Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>
cleanup-cruft^2
Vadim A. Misbakh-Soloviov 12 years ago
parent 08cd7890bf
commit ebdac46cd8

@ -91,6 +91,9 @@ KERNEL CONFIGURATION
*--*[*no-*]*menuconfig*:: *--*[*no-*]*menuconfig*::
Runs, or does not run "make menuconfig" after running "make oldconfig". Runs, or does not run "make menuconfig" after running "make oldconfig".
*--*[*no-*]*nconfig*::
Runs, or does not run "make nconfig" after running "make oldconfig".
*--*[*no-*]*save-config*:: *--*[*no-*]*save-config*::
Saves, or does not save the kernel configuration to '/etc/kernels' Saves, or does not save the kernel configuration to '/etc/kernels'
if the kernel is successfully compiled. if the kernel is successfully compiled.

@ -25,6 +25,8 @@ longusage() {
echo " Kernel Configuration settings" echo " Kernel Configuration settings"
echo " --menuconfig Run menuconfig after oldconfig" echo " --menuconfig Run menuconfig after oldconfig"
echo " --no-menuconfig Do not run menuconfig after oldconfig" echo " --no-menuconfig Do not run menuconfig after oldconfig"
echo " --nconfig Run nconfig after oldconfig"
echo " --no-nconfig Do not run nconfig after oldconfig"
echo " --gconfig Run gconfig after oldconfig" echo " --gconfig Run gconfig after oldconfig"
echo " --no-gconfig Don't run gconfig after oldconfig" echo " --no-gconfig Don't run gconfig after oldconfig"
echo " --xconfig Run xconfig after oldconfig" echo " --xconfig Run xconfig after oldconfig"
@ -172,6 +174,7 @@ usage() {
echo echo
echo 'Some useful options:' echo 'Some useful options:'
echo ' --menuconfig Run menuconfig after oldconfig' echo ' --menuconfig Run menuconfig after oldconfig'
echo ' --nconfig Run nconfig after oldconfig (requires ncurses)'
echo ' --no-clean Do not run make clean before compilation' echo ' --no-clean Do not run make clean before compilation'
echo ' --no-mrproper Do not run make mrproper before compilation,' echo ' --no-mrproper Do not run make mrproper before compilation,'
echo ' this is implied by --no-clean.' echo ' this is implied by --no-clean.'
@ -356,6 +359,14 @@ parse_cmdline() {
CMD_MENUCONFIG=0 CMD_MENUCONFIG=0
print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}" print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
;; ;;
--nconfig)
CMD_NCONFIG=1
print_info 2 "CMD_NCONFIG: ${CMD_NCONFIG}"
;;
--no-nconfig)
CMD_NCONFIG=0
print_info 2 "CMD_NCONFIG: ${CMD_NCONFIG}"
;;
--gconfig|--no-gconfig) --gconfig|--no-gconfig)
CMD_GCONFIG=`parse_optbool "$*"` CMD_GCONFIG=`parse_optbool "$*"`
print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}" print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}"

@ -85,6 +85,11 @@ config_kernel() {
print_info 1 'kernel: >> Invoking menuconfig...' print_info 1 'kernel: >> Invoking menuconfig...'
compile_generic menuconfig kernelruntask compile_generic menuconfig kernelruntask
[ "$?" ] || gen_die 'Error: menuconfig failed!' [ "$?" ] || gen_die 'Error: menuconfig failed!'
elif isTrue ${NCONFIG}
then
print_info 1 'kernel: >> Invoking nconfig...'
compile_generic nconfig kernelruntask
[ "$?" ] || gen_die 'Error: nconfig failed!'
elif isTrue ${CMD_GCONFIG} elif isTrue ${CMD_GCONFIG}
then then
print_info 1 'kernel: >> Invoking gconfig...' print_info 1 'kernel: >> Invoking gconfig...'

@ -96,6 +96,7 @@ determine_real_args() {
set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR
set_config_with_override BOOL MRPROPER CMD_MRPROPER set_config_with_override BOOL MRPROPER CMD_MRPROPER
set_config_with_override BOOL MENUCONFIG CMD_MENUCONFIG set_config_with_override BOOL MENUCONFIG CMD_MENUCONFIG
set_config_with_override BOOL NCONFIG CMD_NCONFIG
set_config_with_override BOOL CLEAN CMD_CLEAN set_config_with_override BOOL CLEAN CMD_CLEAN
set_config_with_override STRING MINKERNPACKAGE CMD_MINKERNPACKAGE set_config_with_override STRING MINKERNPACKAGE CMD_MINKERNPACKAGE

@ -17,6 +17,12 @@ OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel? # Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="no" MENUCONFIG="no"
# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel?
NCONFIG="no"
# Note, that two previous lines are mutual exclusive (logically), while
# MENUCONFIG has a higher priority if both them is enabled.
# Run 'make clean' before compilation? # Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run # If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration # Also, if clean is NO, it won't copy over any configuration

Loading…
Cancel
Save