原本已经可正常进入系统了,但开启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";
};