Browse Source

Add autoload support

1. Autoload according to the env of "al", "append".
2. If user don't set "al", use the default settings.

Target: Bonito2g690e
master
MA Jian 15 years ago
committed by LIU Qi
parent
commit
d20042f7d7
  1. 2
      Targets/Bonito2g690e/conf/Bonito.2g690e
  2. 17
      pmon/common/main.c

2
Targets/Bonito2g690e/conf/Bonito.2g690e

@ -121,7 +121,7 @@ option USE_SUPERIO_UART
#option LONGMENG
#option RADEON7000
#option DEBUG_EMU_VGA
#option AUTOLOAD
option AUTOLOAD
#option CONFIG_PCI0_LARGE_MEM
#option CONFIG_PCI0_HUGE_MEM
#option CONFIG_PCI0_GAINT_MEM

17
pmon/common/main.c

@ -409,15 +409,16 @@ if(!run)
{
run=1;
#ifdef AUTOLOAD
if(getenv("al") == NULL)
{
setenv("al","/dev/fs/ext2@wd0/boot/vmlinux");
setenv("append","console=tty root=/dev/sda1 video=vfb:1");
}
s = getenv ("al");
//autoload (s);
autoload ("/dev/fs/ext2@wd0/boot/vmlinux.whd");
//s = "ifaddr rtl0 10.2.0.129";
//do_cmd (s);
////s = "load tftp://10.2.5.9/vmlinux.whd.debug.1";
//while(1) {
//strcpy(buf,"load tftp://10.2.5.9/vmlinux.whd.debug.1");
//do_cmd(buf);}
autoload (s);
#else
s = getenv ("autoboot");
autorun (s);

Loading…
Cancel
Save