📄 cmd_autolinuxstart.c.svn-base
字号:
/* * bootrom programming routine * by ghcstop * * usage: * * prompt> brp * 捞犯霸 窍搁 default肺 /tftpboot/u-boot.bin阑 啊廉客辑 敲贰浆 菊率俊 何飘内靛甫 敬促 * prompt> brp godori2410 * 捞犯霸 窍搁 default肺 /tftpboot/godori2410阑 啊廉客辑 敲贰浆 菊率俊 何飘内靛甫 敬促 */#include <common.h>#include <command.h>#include <asm/processor.h>#include <asm/io.h>int do_autolinux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){// int rc = 1;// char buffer[100];/* if (argc > 2) { printf ("Usage:\n%s\n", cmdtp->usage); return 1; } if (argc < 2) {*/// sprintf (buffer,"tftpboot 33000000 u-boot.bin ");// rc = run_command(buffer, flag);// if ( rc >= 0 )// { printf("correct linux image!!!\n"); /*run_command("protect off 1:0-126",bd, flag);*/ /* ghcstop fix */// run_command("protect off 1:0-2", flag);// run_command("erase 1:0-2", flag);// sprintf (buffer,"cp 00020000 30f00000 %s ",getenv("filesize"));// run_command(buffer, flag); /*run_command("protect on 1:0-126 ",bd, flag);*/ /* ghcstop fix */// run_command("go 30f00000", flag);// }// }// if (argc == 2)// {// sprintf (buffer,"tftpboot 33000000 %s ",argv[1]);// rc = run_command(buffer, flag);//// if ( rc >= 0 )// {// printf("correct linux image!!!\n"); /*run_command("protect off 1:0-126",bd, flag);*/ /* ghcstop fix */// run_command("protect off 1:0-2", flag);// run_command("erase 1:0-2", flag);// sprintf (buffer,"cp 00020000 30f00000 %s ",getenv("filesize"));// run_command(buffer, flag); /*run_command("protect on 1:0-126 ",bd, flag);*/ /* ghcstop fix */ run_command("cp 00100000 30f00000 87370",flag);// sprintf(buffer,"cp 00080000 30f00000 87370"); // run_command("cp 00200000 30800000 34ec24",flag);// sprintf(buffer,"cp 00200000 30800000 34ec24"); run_command("go 30f00000", flag);// }// } return 0;}/***************************************************/U_BOOT_CMD( autolinux, 2, 1, do_autolinux, "autolinux - get default 'linux' image to 0x00020000\n", "autolinuxstart [filename]");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -