2013-09-24 63 views
0

我想要使用http://bootloader.wikidot.com/android:kgdb让kgdb与Android内核一起工作。我被困在以下步骤:调试Android内核:在启动时将参数传递给android内核

Configure kernel command line 

    Specify ttyGS0 as the kgdboc device. Add the following into the kernel command line (possibly in BoardConfig.mk) 

    kgdboc=ttyGS0 kgdbretry=4 

    The second option "kgdbretry=4" is a new parameter added to kgdboc.c. 
    It means that if kgdb cannot find the device "ttyGS0" in early boot, 
    it will retry once after the specified number of seconds. 
    This is a work-around if the USB device is not immediately initialized during system boot. 

有没有人可以告诉我哪个BoardConfig.mk是指它?或者有什么其他方法在引导时将这些参数传递给内核?

+0

“Android”将不会有统一的答案 - 它取决于给定设备上使用的引导加载程序和相关系统并进行安装。 –

回答

-1

http://www.stlinux.com/u-boot/kernel-booting

你可以改变内核命令行是这样的:

setenv bootargs mem=128M kgdboc=ttyGS0 kgdbretry=4

saveenv

您可能需要删除console=ttyAS0,115200的是kgdb正常工作。

+0

请注意,这个答案是特定于某些未指定的平台。一般来说,内核如何加载并不是标准的。 –

0

旧的文章,但我一直在寻找最近KGDB这样想我会分享:

对于Android,我一直在传递启动通过它可以指定bootimg.cfg文件PARAMS在当您创建(或更新)您的启动映像。比如,我用下面的一个新的配置文件,新的内核更新现有的启动映像:这个配置文件中

abootimg -u boot.img -f bootimg.cfg -u zImage-dtb 

一位则params的是“CMDLINE”在那里你可以追加你的选择。

或者,对于快速而脏的修改,您可以将'-c'参数=值''选项传递给abootimg,这将允许您在运行中指定新选项。

+0

如果它包含指向bootimg.cfg文档(或可以编辑的现有bootimg.cfg)的指针,这会更有帮助。 –