Solved.
define
config_sys_no_flash do not define
config_flash_cfi_driver do not define
config_cmd_flash (undefine it if necessary
do not define
config_cmd_imls (undefine it if necessary)
You may still see error in compilation.
Go to u-boot/lib_nios2/board.c
around line 155, comment out the line
//bd->bi_flashsize = flash_init();
At least, this will give you a command prompt of the u-boot.
Or simply the board.c file should use# ifdef to process this line.
1 more thing. If you are using the config_cmd_default, then...
In side of u-boot/include/config_cmd_default.h
around line 25, comment out# define CONFIG_CMD_FLASH