目录
- 1、修改chosen节点的bootargs
- 2、修改fiq_debugger节点
- 3、添加uart2使能
1、修改chosen节点的bootargs
文件为:kernel/arch/arm64/boot/dts/rockchip/rk3399-linux.dtsi
修改为:
1 2 3 | chosen {<!-- --> bootargs = "earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 ro root=PARTLABEL=rootfs rootfstype=ext4 rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1"; }; |
主要是添加console=ttyFIQ0
2、修改fiq_debugger节点
1 2 3 4 5 6 7 8 9 10 11 | fiq_debugger: fiq-debugger {<!-- --> //status = "disabled"; //这里要打开,不写默认为打开 compatible = "rockchip,fiq-debugger"; rockchip,serial-id = <2>; rockchip,signal-irq = <182>; rockchip,wake-irq = <0>; rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ pinctrl-names = "default"; pinctrl-0 = <&uart2c_xfer>; }; |
3、添加uart2使能
1 2 3 4 | &uart2 {<!-- --> //这里要将串口本身关闭才可以用debug口 status = "disabled"; }; |