When I boot linux on zynq board, one of the line that I get is;
Starting kernel . . .
For debugging purpose I wanted to know where in the source code these lines are written, I would change them and then add printf/printk statements at various points to debug my linux kernel. I found that in the bootm.c file it was indeed written. But I also found this 'fake' stuff here which I am uanble to understand.
/**
* announce_and_cleanup() - Print message and prepare for kernel boot
*
* @fake: non-zero to do everything except actually boot
*/
static void announce_and_cleanup(int fake)
{
printf("\n Starting kernel ...%s\n\n", fake ?
"(fake run for tracing)" : "");
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
#ifdef CONFIG_BOOTSTAGE_FDT
if (flag == BOOTM_STATE_OS_FAKE_GO)
bootstage_fdt_add_report();
#endif
#ifdef CONFIG_BOOTSTAGE_REPORT
bootstage_report();
#endif
the complete file is available here also
What exactly is this 'fake' stuf and why do we need it?