# This script makes it ez to update all the test configs located
# in linux-2.4.19/test/configs and the normal build configs located
# in linux-2.4.19/arch/arm/def-configs.
#
# If you want the new options to go to the make menuconfig defaults
# then you only have to select to exit and save several times.
#
function update_a_test_config(){
	cp -f test/configs/config_"$1" .config
	make menuconfig
	cp -f .config test/configs/config_"$1"
}

function update_a_normal_config(){
	cp -f arch/arm/def-configs/"$1" .config
	make menuconfig
	cp -f .config arch/arm/def-configs/"$1"
}

echo "***************************************************************"
echo "******** UPDATING EP9301 CONFIGS ******************************"
echo "***************************************************************"
update_a_test_config kernel_ep9301

update_a_normal_config ep9301
update_a_normal_config ep9301_nfs

echo "***************************************************************"
echo "******** UPDATING EP9312 CONFIGS ******************************"
echo "***************************************************************"

update_a_test_config kernel_ac97
update_a_test_config kernel_cherry
update_a_test_config kernel_crt640x480x16bpp
update_a_test_config kernel_crt640x480x8bpp
update_a_test_config kernel_ide_pio
update_a_test_config kernel_lcd640x480x16bpp
update_a_test_config kernel_lcd640x480x8bpp
update_a_test_config kernel_serial_console
update_a_test_config kernel_sir_irda

update_a_normal_config ep9312
update_a_normal_config ep9312_nfs
update_a_normal_config ep9312_nfs_ide
cp -f arch/arm/def-configs/ep9312_nfs arch/arm/def-configs/ep9312_dev

echo "Done"
