美文网首页
LicheePi Nano开启early printk

LicheePi Nano开启early printk

作者: fefr | 来源:发表于2020-01-01 22:19 被阅读0次

原本已经可正常进入系统了,但开启Tracers后就卡在Starting kernel ...了,经一番搜索后发现可使用early printk查看死机原因。LicheePi Nano打开early printk方法可参考此处此处

[*] Kernel low-level debugging functions (read help!) 
          Kernel low-level debugging port (Kernel low-level debugging messages via sunXi UART0)  --->     
(0x01c25000) Physical base address of debug UART
(0xf1c25000) Virtual base address of debug UART
[*] Early printk

开启后需要修改debug UART的物理基址为0x01c25000和虚拟基址为0xf1c25000,什么是虚拟基址可参考此处后再搜索。0x01c25000可从LicheePi Nano的linux内核目录下的arch/arm/boot/dts/suniv.dtsi找到,定义在uart0中:

        uart0: serial@1c25000 {
            compatible = "snps,dw-apb-uart";
            reg = <0x01c25000 0x400>;
            interrupts = <1>;
            reg-shift = <2>;
            reg-io-width = <4>;
            clocks = <&ccu CLK_BUS_UART0>;
            resets = <&ccu RST_BUS_UART0>;
            status = "disabled";
        };

相关文章

网友评论

      本文标题:LicheePi Nano开启early printk

      本文链接:https://www.haomeiwen.com/subject/jjggoctx.html