Reputation: 43
During bootup of the target board we see uboot (bootloader) printing some information such as Image name, Image type, Load Address, Verifying checksum etc on the console. Which printing mechanism does it use? Does it use something like printk
or it has its own definition for printing info even before kernel boots up? Where can I find the code for its printing implementation?
Upvotes: 1
Views: 9630
Reputation: 175
You can enter uBoot when you startup (interrupting the startup of the kernel) if you want information about uBoot for example where it prints to or what the values are of it's variables you can use the 'printenv' command and change them with the 'setenv' command.
Upvotes: 0
Reputation: 678
In the normal U-boot boot process,a limited amount of information is printed to the console. It use the the same kind of functions to print information as we use during the C programming.
u-boot use printf
and puts
to print the information on the console. you can find the same function implementations in the u-boot source code (u-boot boardfile and drivers).
There are a lot of commands which you can try from u-boot command prompts for more information.
To enable more messages you can either:
debug_cond (cond, fmt, args...):
if you define some cond, once it is met, the U-boot will print out this message.debug(fmt, args...):
you can define DEBUG in the file u-boot-include/configs/<boardfile>_common.h
(like in my case mx6_common.h), once do that and recompile the code, the U-boot will print out all debug messageNote: If you put too much debug into the code, it might make u-boot hang up.
Upvotes: 1