Skip to content
Snippets Groups Projects
load.c 24.6 KiB
Newer Older
  • Learn to ignore specific revisions
  • 	printf("## Total Size      = 0x%08x = %d Bytes\n", size, size);
    
    	setenv_hex("filesize", size);
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    /* -------------------------------------------------------------------- */
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    #ifdef	CONFIG_SYS_LOADS_BAUD_CHANGE
    
    U_BOOT_CMD(
    	loads, 3, 0,	do_load_serial,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"load S-Record file over serial line",
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"[ off ] [ baud ]\n"
    	"    - load S-Record file over serial line"
    
    	" with offset 'off' and baudrate 'baud'"
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    );
    
    
    #else	/* ! CONFIG_SYS_LOADS_BAUD_CHANGE */
    
    U_BOOT_CMD(
    	loads, 2, 0,	do_load_serial,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"load S-Record file over serial line",
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"[ off ]\n"
    
    	"    - load S-Record file over serial line with offset 'off'"
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    );
    
    #endif	/* CONFIG_SYS_LOADS_BAUD_CHANGE */
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    /*
     * SAVES always requires LOADS support, but not vice versa
     */
    
    
    
    #ifdef	CONFIG_SYS_LOADS_BAUD_CHANGE
    
    U_BOOT_CMD(
    	saves, 4, 0,	do_save_serial,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"save S-Record file over serial line",
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"[ off ] [size] [ baud ]\n"
    	"    - save S-Record file over serial line"
    
    	" with offset 'off', size 'size' and baudrate 'baud'"
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    );
    
    #else	/* ! CONFIG_SYS_LOADS_BAUD_CHANGE */
    
    U_BOOT_CMD(
    	saves, 3, 0,	do_save_serial,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"save S-Record file over serial line",
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"[ off ] [size]\n"
    
    	"    - save S-Record file over serial line with offset 'off' and size 'size'"
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    );
    
    #endif	/* CONFIG_SYS_LOADS_BAUD_CHANGE */
    
    #endif	/* CONFIG_CMD_SAVES */
    #endif	/* CONFIG_CMD_LOADS */
    
    U_BOOT_CMD(
    	loadb, 3, 0,	do_load_serial_bin,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"load binary file over serial line (kermit mode)",
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	"[ off ] [ baud ]\n"
    	"    - load binary file over serial line"
    
    Angus Ainslie's avatar
    Angus Ainslie committed
    	" with offset 'off' and baudrate 'baud'"
    );
    
    U_BOOT_CMD(
    	loadx, 3, 0,	do_load_serial_bin,
    	"load binary file over serial line (xmodem mode)",
    	"[ off ] [ baud ]\n"
    	"    - load binary file over serial line"
    
    	" with offset 'off' and baudrate 'baud'"
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    );
    
    
    U_BOOT_CMD(
    	loady, 3, 0,	do_load_serial_bin,
    
    Peter Tyser's avatar
    Peter Tyser committed
    	"load binary file over serial line (ymodem mode)",
    
    	"[ off ] [ baud ]\n"
    	"    - load binary file over serial line"
    
    	" with offset 'off' and baudrate 'baud'"
    
    #endif	/* CONFIG_CMD_LOADB */