调试Android的内核:将参数传递到Android内核,同时启动 [英] Debugging Android kernel: Passing arguments to android kernel while booting

查看:745
本文介绍了调试Android的内核:将参数传递到Android内核,同时启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得的kgdb使用了Android的内核工作 http://bootloader.wikidot.com/android :使用kgdb 。我得到了stucked在接下来的步骤:

I am trying to get kgdb working with Android kernel using http://bootloader.wikidot.com/android:kgdb. I got stucked at following step:

    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是指?或者有没有其他的方法,通过这些参数传递给内核,同时启动?

Could anybody please tell me which BoardConfig.mk is it referring? Or is there any other method for passing these arguments to the kernel while booting?

推荐答案

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

An old post, but I've been looking at KGDB recently so thought I'd share:

有关Android的,我一直在通过引导,通过它可以在创建(或更新)启动映像中指定的bootimg.cfg文件PARAMS研究。例如,我使用更新现有的启动​​映像与一个新的配置文件,新的内核如下:

For Android, I've been passing boot params in via the bootimg.cfg file which can be specified when you create (or update) your boot image. For example, I am updating an existing boot image with a new config file and new kernel using the following:

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

一位在这个配置文件中的PARAMS是CMDLINE在这里你可以添加你的选择。

One of the params within this config file is "cmdline" where you can append your options.

另外,对于一个快速和肮脏的修改,你可以通过-c参数=值'选项abootimg这将允许你指定在飞行了新的选择。

Alternatively, for a quick and dirty modification you can pass the '-c "param=value"' option to abootimg which will allow you to specify new options on the fly.

这篇关于调试Android的内核:将参数传递到Android内核,同时启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆