[PATCH] Add boot -c option: set console name and baudrate
- From 4c7e5fb13b0c4243994d2349c0531ebc55cbfeb4 Mon Sep 17 00:00:00 2001
- From: wham <[email]wham.xia@gmail.com[/email]>
- Date: Mon, 2 Nov 2009 15:23:35 +0800
- Subject: [PATCH] Add boot -c option: set console name and baudrate
- ---
- app/boot/boot.c | 5 +++--
- filesys/sysconf.c | 1 +
- 2 files changed, 4 insertions(+), 2 deletions(-)
- diff --git a/app/boot/boot.c b/app/boot/boot.c
- index 26f0c7b..bcc9185 100644
- --- a/app/boot/boot.c
- +++ b/app/boot/boot.c
- @@ -114,7 +114,8 @@ static int BootUsage(void)
- "\t-n [nfs_server:/path/to/nfs/root]: boot via NFS\n"
- "\t-l [kernel command line]: boot via spcified CmdLine\n"
- "\t-r [ramdisk_image_name]: boot with Ramdisk\n"
- - "\t-m <MachID>: set board machine ID\n"
- + "\t-c <console_name, baudrate>: set console name and baudrate\n"
- + "\t-m <machine ID>: set board machine ID\n"
- "\t-v: print the linux parameters and quit\n"
- "\nExamples:\n"
- "\t..."
- @@ -416,7 +417,7 @@ static int BuildCmdline(char *pchCmdline, size_t nMaxLen)
- #endif
- // } MARK_MAXWIT_TRAINING
- - str += sprintf(str, " console=%s,115200", pKeParam->szConDev);
- + str += sprintf(str, " console=%s", pKeParam->szConDev);
- L2:
- GuFlashClose(pFlash);
- diff --git a/filesys/sysconf.c b/filesys/sysconf.c
- index f5a3bfd..aaf0be8 100644
- --- a/filesys/sysconf.c
- +++ b/filesys/sysconf.c
- @@ -228,6 +228,7 @@ int SysConfReset()
- strncpy(pKeParam->szNfsPath, CONF_NFS_ROOT, sizeof(pKeParam->szNfsPath));
- strncpy(pKeParam->szConDev, CONF_CONSOLE_NAME, sizeof(pKeParam->szConDev));
- + sprintf(pKeParam->szConDev, "%s,115200", CONF_CONSOLE_NAME);
- pKeParam->dwMachID = MACH_ID;
- SysConfCheckSum(NULL);
- --
- 1.6.0.4
复制代码
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论