/************************************
Full Search EARLYPRINTK view its invocation procedure
***************************************/
Full Search EARLYPRINTK view its invocation procedure
① in Kernel-parameters.txt The following description, see our correspondence which,
earlyprintk= [X86,sh,blackfin,arm] Earlyprintk=vga
Earlyprintk=xen
Earlyprintk=serial[,ttysn[,baudrate]]
earlyprintk=serial[,0x ... [, BaudRate]]
Earlyprintk=ttysn[,baudrate]
earlyprintk=dbgp[debugcontroller#]
And finally we call it: earlyprintk=msm_hsl_uart,0x078b0000. 0x078b0000 is the base site of Uart2.
/************************************
Determine the base address of the UART2:
***************************************/
Cd/android/kernel/arch/arm64/boot/dts
Grep-r "UART". |grep 8916
See a few lines, please.
./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>,
The 78b0000 in blsp1_uart2:serial@78b0000 here is the base site.
The base site can also be found in the manual.
If there is no relevant print display during startup, the necessary printing should be turned on:
#CONFIG_SERIAL_MSM_HS =y
#CONFIG_SERIAL_MSM_HSL =y
#CONFIG_SERIAL_MSM_HSL_CONSOLE =y
Config_cmdline's Location:
①android/device/qcom/msm8916_64/boardconfig.mk/************/EARLYPRINTK is set here after the./build.sh kernel after boot.img is not regenerated:
②android/kernel/arch/arm/boot/dts/qcom/msm8939.dtsi Search chosen{with Bootargs settings}
③android/bootable/bootloader/lk/app/aboot/aboot.c
View Cmdlines in the kernel
Cat/proc/cmdlines
Problems encountered during the process: after changing the cmdline in ①android/device/qcom/msm8916_64/boardconfig.mk, the/android/out directory in the build directory should be deleted again, otherwise./build.sh Kernel command is not updated after execution boot.img
Print the log In search Earlyprink/earlycon/bootconsoles, see a print
Found in the program: The reason is only cmdline+ earlyprintk, but not to Earlyprink assignment
if (!BUF) {
Pr_warning ("No earlyprintk arguments passed.\n");
return 0;
}
Kernel-parameters.txt is described in the following
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 is the same as for TTYs, above.
earlycon******************
Earlycon according to the settings in the other config file
Grep-r "Earlycon" *config
./drivers/tty/serial/8250/kconfig: "EARLYCON=UART8250,IO,0X3F8,9600N8"
./drivers/tty/serial/8250/kconfig: "Earlycon=uart8250,mmio,0xff5e0000,115200n8".
Another way to start:
Fastboot-c "earlyprintk=msm_hsl_uart,0x078b0000" boot boot.img can start the specified kernel via fastboot. Although the start did not succeed, but probably the order should be correct ~ ~ ~ to be improved.
Search for no EARLYPRINTK arguments passed in google
Https://lists.linaro.org/pipermail/linaro-kernel/2013-May/004416.html This article seems to have solved the problem
Setup of normal serial port: Console=ttyhsl0,115200,n8 parameter in CmdLine
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);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.