Hello? Anybody that can give me some advice on this please ~ Thank you. Chan Kim
> -----Original Message----- > From: U-Boot <[email protected]> On Behalf Of Chan Kim > Sent: Wednesday, December 8, 2021 6:39 PM > To: U-Boot Mailing List <[email protected]> > Subject: When is the console connected during spl run? > > Hello experts, > > I was following u-boot-spl program on our board hoping somewhere serial > port will be initialized and also the console using the serial port. > > In our FPGA board, there is a small 8 BM on-chip memory in place of DDR > and I can use two 51kB sram on-chip. > > The spl program is loaded on the first sram and bss and gd was allocated > on sdram (actually it's on-chip sram as I said). > > I followed u-boot-spl program using some debug prints on memory until it > goes into board_init_r function (in common/spl/spl.c). > > Just inside the function I see this line > > > > void board_init_r(gd_t *dummy1, ulong dummy2) > > { > > u32 spl_boot_list[] = { > > BOOT_DEVICE_NONE, > > BOOT_DEVICE_NONE, > > BOOT_DEVICE_NONE, > > BOOT_DEVICE_NONE, > > BOOT_DEVICE_NONE, > > }; > > struct spl_image_info spl_image; > > int ret; > > > > debug(">>" SPL_TPL_PROMPT "board_init_r()\n"); > > > > spl_set_bd(); > > > > The "debug" macro is the one defined in include/log.h and because I added > "#define DEBUG" to the make argument, it uses this definition. > > #else /* _DEBUG */ > > > > /* > > * Output a debug text when condition "cond" is met. The "cond" should be > > * computed by a preprocessor in the best case, allowing for the best > > * optimization. > > */ > > #define debug_cond(cond, fmt, args...) \ > > ({ \ > > if (cond) \ > > printf(pr_fmt(fmt), ##args); \ > > }) > > > > #endif /* _DEBUG */ > > So, am I supposed to see the message in my console? From the reset to this > point, I couldn't see any serial port initialization (this is arm64 and > board_init_f just returned doing nothing. No need to initialize sdram.). > > How should I connect uart to console? Should I add my own board_init_f > function and do serial_init and console_init_f there? > > Any comment or help will be really appreciated. > > > > Thank you! > > Chan Kim > > >

