点击打开链接

解决问题的过程中,好文章推荐,都保存在火狐wilson_sq@qq.com记录中~~~~~~~~

grep -r "earlyprintk" kernel

kernel/Documentation/driver-model/platform.txt:should use early_platform_init("earlyprintk", &platform_driver).
./arch/sh/configs/sh2007_defconfig:CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1"
./arch/sh/configs/rsk7203_defconfig:CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
./arch/sh/configs/migor_defconfig:CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp"
./arch/sh/configs/sdk7786_defconfig:CONFIG_CMDLINE="console=ttySC1,115200 earlyprintk=sh-sci.1,115200 root=/dev/sda1 nmi_debug=state,debounce rootdelay=5 pmb=iomap ignore_loglevel"
./arch/sh/configs/rsk7201_defconfig:CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
./arch/sh/configs/shx3_defconfig:CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=bios ignore_loglevel"

/************************************
全盘搜索earlyprintk查看其调用过程
***************************************/
全盘搜索earlyprintk查看其调用过程
①在kernel-parameters.txt中有如下描述,看我们的对应哪个,
earlyprintk=  [X86,SH,BLACKFIN,ARM] earlyprintk=vga
earlyprintk=xen
earlyprintk=serial[,ttySn[,baudrate]]
earlyprintk=serial[,0x...[,baudrate]]
earlyprintk=ttySn[,baudrate]
earlyprintk=dbgp[debugController#]
最终我们调用的是:earlyprintk=msm_hsl_uart,0x078b0000 。      0x078b0000是uart2的基地址

/************************************
      确定uart2的基地址:
***************************************/  
cd /android/kernel/arch/arm64/boot/dts
grep -r "uart" . |grep 8916
看到一下几行
./qcom/msm8916.dtsi:            pinctrl-0 = <&hsuart_sleep>;
./qcom/msm8916.dtsi:            pinctrl-1 = <&hsuart_active>;
./qcom/msm8916.dtsi:    blsp1_uart2: serial@78b0000 {
./qcom/msm8916.dtsi:            compatible = "qcom,msm-lsuart-v14";
./qcom/msm8916.dtsi:            clocks = <&clock_gcc clk_gcc_blsp1_uart2_apps_clk>,
这里的blsp1_uart2: serial@78b0000   中的78b0000就是基地址
手册中也可以查到这个 基地址

如果启动过程中没有相关的打印显示,则应打开必要的打印:
#CONFIG_SERIAL_MSM_HS=y
#CONFIG_SERIAL_MSM_HSL=y
#CONFIG_SERIAL_MSM_HSL_CONSOLE=y

CONFIG_CMDLINE的位置:
①android/device/qcom/msm8916_64/BoardConfig.mk        /************/earlyprintk在这里设置后,./build.sh kernel后boot.img没有重新生成。。
②android/kernel/arch/arm/boot/dts/qcom/msm8939.dtsi 里搜索chosen{有bootargs的设置}
③android/bootable/bootloader/lk/app/aboot/aboot.c

内核中查看cmdlines
cat /proc/cmdlines

过程中遇到的问题:在改动①android/device/qcom/msm8916_64/BoardConfig.mk中的CMDLINE后,应该将生成目录中的/android/out目录重新删除,否则./build.sh kernel命令执行后不更新boot.img

打印的log中搜索earlyprink/earlycon/bootconsoles,看到有一下打印
在一下程序中找到:原因是只有CMDLINE+ earlyprintk,而没有给earlyprink赋值
if (!buf) {
pr_warning("No earlyprintk arguments passed.\n");
return 0;
}

kernel-parameters.txt中有如下描述
earlycon=  [KNL] Output early console device and options. uart[8250],io,<addr>[,options]
uart[8250],mmio,<addr>[,options]
uart[8250],mmio32,<addr>[,options] Start an early, polled-mode console on the 8250/16550
UART at the specified I/O port or MMIO address.
MMIO inter-register address stride is either 8-bit
(mmio) or 32-bit (mmio32).
The options are the same as for ttyS, above.
*********************earlycon******************
earlycon根据其他的config文件中的设置一下
//grep -r “earlycon”   *config
./drivers/tty/serial/8250/Kconfig:  "earlycon=uart8250,io,0x3f8,9600n8"
./drivers/tty/serial/8250/Kconfig:  "earlycon=uart8250,mmio,0xff5e0000,115200n8".

void __init parse_early_options(char *cmdline)
parse_args("early options", cmdline, NULL, 0, 0, 0, do_early_param);
parse_one(param, val, doing, params, num, min_level, max_level, unknown);
handle_unknown(param, val, doing);        doing="early options"

另一种启动方式:
fastboot -c   "earlyprintk=msm_hsl_uart,0x078b0000" boot   boot.img可以通过fastboot启动指定内核。虽然启动没成功,但是大概命令应该没错~~~有待改进。。

google里搜索No earlyprintk arguments passed
https://lists.linaro.org/pipermail/linaro-kernel/2013-May/004416.html这篇文章好像可已解决问题

正常串口的设置:    CMDLINE中的console=ttyHSL0,115200,n8 参数
platform_driver_register(&msm_hsl_platform_driver);
msm_hsl_platform_driver
msm_serial_hsl_probe
uart_add_one_port(&msm_hsl_uart_driver, port);
uport->cons = drv->cons;
uart_configure_port(drv, state, uport);
uart_configure_port(struct uart_driver *drv, struct uart_state *state,struct uart_port *port)
register_console(port->cons);

uart_add_one_port(&msm_hsl_uart_driver, port);
static struct uart_driver msm_hsl_uart_driver = {
.owner = THIS_MODULE,
.driver_name = "msm_serial_hsl",
.dev_name = "ttyHSL",
.nr = UART_NR,
.cons = msm_hsl_console,
};

static struct console msm_hsl_console = {
.name = "ttyHSL",
.write = msm_hsl_console_write,
.device = uart_console_device,
.setup = msm_hsl_console_setup,
.flags = CON_PRINTBUFFER,
.index = -1,
.data = &msm_hsl_uart_driver,
};

uart_console_write(port, s, count, msm_hsl_console_putchar);
msm_hsl_console_putchar(struct uart_port *port, int ch)
msm_hsl_write(port, ch, regmap[vid][UARTDM_TF]);

打开CMDLINE中的 ” earlyprink “ 参数相关推荐

  1. python中打开文件时只允许写入的模式是_在open函数中访问模式参数使用()表示打开一个文件只用于写入。(4.0分)_学小易找答案...

    [单选题]溢流坝属于( ) [单选题]在重力坝的底部沿坝轴线方向设置大尺寸的空腔,即为( ) [单选题]模式()的用途是打开一个文件用于追加.如果该文件已存在,文件指针将会放在文件的结尾.(4.0分) ...

  2. window.open打开页面并传值,window. location.search遍历获取到的请求链接中的所有参数

    window.open打开页面并传值,遍历 window.location.search取到的url参数 1.a.js中打开OtherBankProtocol.html页面 window.open打开 ...

  3. 在AngularJS中读取查询参数的最简洁方法是什么?

    本文翻译自:What's the most concise way to read query parameters in AngularJS? I'd like to read the values ...

  4. C#开发Unity游戏教程之Unity中方法的参数

    C#开发Unity游戏教程之Unity中方法的参数 Unity的方法的参数 出现在脚本中的方法,无论是在定义的时候,还是使用的时候,后面都跟着一对括号"( )",有意义吗?看起来最 ...

  5. 文本编辑器中命令行参数的应用

    文章目录 1 文本编辑器中命令行参数的应用 1 文本编辑器中命令行参数的应用 我们要知道对于每一个应用程序我们都能够接收命令行参数,那么对于GUI系统中命令行参数如何传递到应用程序呢? 主要有如下两种 ...

  6. 在controller中调用指定参数给指定表单_第005课:Spring Boot 中MVC支持

    Spring Boot 的 MVC 支持主要介绍实际项目中最常用的几个注解,包括 @RestController. @RequestMapping.@PathVariable.@RequestPara ...

  7. 控制文件中的 MAXDATAFILES 参数

    出自:http://www.linuxso.com/sql/18319.html 控制文件中的 MAXDATAFILES 参数 有关Oracle 的控制文件说明,参考我之前的Blog: Oracle ...

  8. mysql5.7命中率_MySQL5.7中 performance和sys schema中的监控参数解释(推荐)

    1.performance schema:介绍 在mysql5.7中,performance schema有很大改进,包括引入大量新加入的监控项.降低占用空间和负载,以及通过新的sys schema机 ...

  9. SQLAlchemy中模糊查询;JS中POST带参数跳转;JS获取url参数

    SQLAlchemy中模糊查询,如何like多个关键字 JS中POST带参数跳转 一个项目中要跳转到另外一个项目,还需要带参数 考虑到安全性的问题,最好是用POST跳转,不能再URL中拼参 所以找到了 ...

最新文章

  1. F5内网大二层负载均衡业务访问故障解析(CISCO OTV+LISP-MTU问题导致)
  2. 通过容器编排和服务网格来改进Java微服务的可测性
  3. webrtc收包流程源码分析
  4. setseed_Java Random setSeed()方法与示例
  5. 【bzoj2281】[Sdoi2011]黑白棋
  6. 河池学院计算机宿舍,河池学院宿舍条件,宿舍环境图片(10篇)
  7. 成为java架构师需要具备那些技能?
  8. Golang学习(12)——regex包
  9. ansible自动化运维必备工具详解
  10. 阿里云云计算 15 在线实验--OSS的使用
  11. .net分层架构思想(彻底分离每个层)
  12. 怎么使用水经注万能地图下载器制作百度个性化道路地图
  13. Android修炼之道—自定义控件 (300喵喵币)
  14. matlab官方中文文档教程
  15. 私服玉兔元素服务器在哪个网站,1.85玉兔元素服务端
  16. Python运行不显示DOS窗口方法
  17. 在滴滴云 DC2 云服务器上搭建 ELK 日志采集系统
  18. 数据结构:平衡二叉树(AVL树)、树的高度
  19. 【Verilog】布斯算法(Booth Algorithm)乘法器的 Verilog 实现
  20. 软件工程部署图_部署图| 软件工程

热门文章

  1. 038_Unicode对照表四
  2. js中执行到一个if就停止的代码_Node.JS实战64:ES6新特性:Let和Const。
  3. Java数据结构和算法:图
  4. Windows 上搭建FTP服务器
  5. vue-router 的常见用法
  6. 联想无线网卡 linux驱动,ubuntu14.04手动安装博通官方无线网卡驱动时报错,
  7. oracle nodemanage,Linux 下Weblogic集群搭建-04通过nodemanage进行节点的启动与关闭
  8. git 将暂存区文件提交_Git知识
  9. hadoop 开启防火墙_Hadoop部署一Hadoop安装
  10. android 除了webview 浏览器控件,AgentWeb是基于Android WebView一个功能完善小型浏览器库...