Code:
if(serch_boot_drv(max_drv) == MV_FAIL)
{
printf ("Lost all init_rd \n");
tftp_mode_set() ;
/* if(is_em_mode() != 0x00 )
{
tftp_mode_set() ;
}
else
{
lost_boot_image() ;
}*/
}
there is a check against with serch_boot_drv's return value.
if serch_boot_drv failed,uboot will swith to tftp mode.
so you must make sure serch_boot_drv returns MV_OK.
you should put a valid initrd.buffalo(create it by mkimage) in your sda1.
and,if you go through serch_boot_drv function,
you can see it WILL MODIFY bootcmd env param.(this is not a problem with LSPro because LSPro just has only one HDD)
did you forget to put an initrd.buffalo in you hdd's first partition?
you have installed a JTAG cable on you LSPro,right?
just make some changes to serch_boot_cmd,recompile,flash.
etc. put some printf in the serch_boot_drv function to see what's wrong with your initrd.buffalo.
with your JTAG cable,even LSPro get bricked,you can still debrick it,right?
so,just modify the code.
i think it is safe to comment out the whole search-boot-drv logic for our LSPro.right?
we set bootcmd correctly,and LSPro boots.
that's all.
we do not need uboot to fix our "correct" bootcmd.
there is another intresting thing.
there is a function named "misc_init_r_env"
Code:
env = getenv("buffalo_ver");
if (!env || strcmp(env,BUFFALO_VER)!=0|| strcmp(getenv("build_time"),__TIME__)!=0 ){
MV_U32 bid=mvBoardIdGet();
printf("-- initialize Env for BUFFALO\n");
here,it checked buffalo_ver and build_time env params,
if this check failed,uboot will rewrite buffalo_ver build_time AND BOOTCMD env param.
but just only rewrite them without saving them to flah,right?
so,check your log to see whether there is an "initialize Env for BUFFALO" string?
i think the simplest way is just erase your env cfg,and let uboot to reinitialize it.
when you see the second "hit any key to stop autoboot"
then press any key.and you are in uboot shell
then issue a "saveenv" command.
then "reset"
may i have a favor to ask you to post your log file?
i think we can finger out what is wrong by tracing the log file carefully.