Indeed, if the console is not initialized, where is the output supposed to go? It is unusable before a certain point in the kernel boot process, prior to console initialization. Earlyprintk may be a solution, but I don't want to waste the time any more, just use _dbg_buf to debug it.įounded the following message in the web: The Nonrobustness of printk()Ī **bleep** in the armor of printk()'s robustness does exist. I guess that because the device tree is not used yet, the hardware is not initialized, so printk() can not print message to console at this point. Looked around the web, founded I am not alone. Using Device Tree in place at 18000000, end 1800eb8a Image Type: ARM Linux Kernel Image (uncompressed) # Booting kernel from Legacy Image at 20000000. No panel detected: default to Hannstar-XGAĨ585104 bytes read in 420 ms (19.5 MiB/s) *** Warning - bad CRC, using default environment Do I need to modify other configurations to make the UART3 works during the kernel start process?įound solution, use early_print function to print message to console. I also add CONFIG_DEBUG_IMX_UART_PORT=3 in defconfig file. I modified CONFIG_CMDLINE="noinitrd console=ttymxc2,115200". It seems that the serial console was not set correctly. If printk works, the console should display "Booting Linux on physical CPU 0" ,the linux banner,cgroug initialization information, etc, but nothing was displayed. I also boot the system by a SD card, and add a dead loop before the setup_arch(), found that the system did stay in the dead loop. I did run step by step, and the two lines:Įarly_print("\nError: invalid dtb and unrecognized/unsupported machine ID\n") Įarly_print(" r1=0xx, r2=0xx\n", _machine_arch_type,_atags_pointer) ĭid executed, but no output to the console. If I use GDB and vmlinux to debug the kernel, because there is no dtb file loaded into memory, when the kernel run setup_arch() function, it should print "invalid dtb and unrecognized/unsupported machine ID" and "r1=.,r2=.", but nothing was printed on the console. After displaying the "starting Kernel", the system hangs. During the u-boot process, the console can display all the messages.
0 Comments
Leave a Reply. |