v831刚上电没有log打印,到了kernel阶段才有
-
正常来说,板子刚上电会类似有如下的打印:
但因为硬件没用到uart0,改成uart1后,到了kernel起来阶段,才有打印,而且烧录时也没有打印。请问这块的打印是在哪里控制?
查了些历史帖,都在讨论env.cfg、sys_config.fex、dts等
env.cfg部分内容如下
#kernel command arguments earlyprintk=sunxi-uart,0x05000000 initcall_debug=0 console=ttyS1,115200 nand_root=/dev/ubiblock0_4 mmc_root=/dev/mmcblk0p4 nor_root=/dev/mtdblock2 init=/init rdinit=/rdinit loglevel=8 cma=4M coherent_pool=16K
sys_config.fex如下:
[uart_para] uart_debug_port = 1 uart_debug_tx = port:PG06<5><1><default><default> uart_debug_rx = port:PG07<5><1><default><default>
;---------------------------------------------------------------------------------- ;uart configuration ;uart_type --- 2 (2 wire), 4 (4 wire), 8 (8 wire, full function) ;---------------------------------------------------------------------------------- [uart1] uart1_used = 1 uart1_port = 1 uart1_type = 2 uart1_tx = port:PG06<5><1><default><default> uart1_rx = port:PG07<5><1><default><default>
dts我直接改了sun8iw19p1-pinctrl.dsti:
uart1_pins_a: uart1@0 { allwinner,pins = "PG6", "PG7"; allwinner,pname = "uart1_tx", "uart1_rx"; allwinner,function = "uart1"; allwinner,muxsel = <5>; allwinner,drive = <1>; allwinner,pull = <1>; }; uart1_pins_b: uart1@1 { allwinner,pins = "PG6", "PG7"; allwinner,function = "io_disabled"; allwinner,muxsel = <7>; allwinner,drive = <1>; allwinner,pull = <0>; };
原理图:
还有哪里没改对?
-
kernel要指定log的寄存器地址
make kernel_menuconfig
找到 Kernel low-level debugging functions,修改寄存器地址 -
@whycanservice kernel加载阶段串口是有打印的,但板子刚上电时没有打印,也没有bootdelay的等待。“kernel指定log寄存器地址” 跟这个没关系吧?我也试了,没啥变化, debugging port也试过选成uart1,也没作用
-
@cruise33 uboot也需要修改,修改uart index
-
@whycanservice 在 v831刚上电没有log打印,到了kernel阶段才有 中说:
@cruise33 uboot也需要修改,修改uart index
参考了这个精华帖
https://bbs.aw-ol.com/topic/1673/全志芯片tina-linux-修改-uart-引脚-uart端口?_=1679296875490make kernel_menuconfig
env.cfg
earlyprintk=sunxi-uart,0x05000400 initcall_debug=0 console=ttyS1,115200
board.dts
(为啥用&uart1这个标签会编译不过 )soc@03000000 { uart@05000000 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart0_pins_a>; pinctrl-1 = <&uart0_pins_b>; status = "disabled"; }; /*&uart1*/ uart@05000400 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart1_pins_a>; pinctrl-1 = <&uart1_pins_b>; uart1_type = <2>; status = "okay"; }; pinctrl@0300b000 { uart1_pins_a: uart1@0 { allwinner,pins = "PG6", "PG7"; allwinner,pname = "uart1_tx", "uart1_rx"; allwinner,function = "uart1"; allwinner,muxsel = <5>; allwinner,drive = <1>; allwinner,pull = <1>; }; uart1_pins_b: uart1@1 { allwinner,pins = "PG6", "PG7"; allwinner,function = "gpio_in"; };
sun8iw19p1_nor_defconfig
CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_CONS_INDEX=2
还是只有如下开始的log :
BOOT0的打印 和烧录时的打印到底受哪里控制..
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号