What is bootloader? Baidu a lot of, it is to optimize the processor for a suitable environment, and then the leader point to the kernel, the rest of the matter to the kernel, there will be no more of it (here bootloader is not uboot). Then someone asked: what if it wants to pass to the kernel what some parameters like in the execution? Isn't that ridiculous? That's certainly not so easy.
Hardware initialization of the work you should be able to guess one or two, 1, must be the clock, but before this need to turn off the watchdog, 2, of course, memory (that is, RAM), and then to the kernel (simple bar), but before this, if our bootloader is too large, we also need to relocate it to ram. Here's a tip: if you want to speed up the bootloader, you can turn on Icache to speed up the process. Then go to the main function to perform the jump work.
In this process, we bootloader a space in memory to add some parameters to the RAM segment in a way that the kernel can recognize, so that whenever the kernel needs bootloader parameters, she takes the memory to parse the data in a specific way, Then bootloader can indirectly pass the parameter to the kernel. As for the relocation of the address and how the kernel jumps, I have more detailed comments in the code. Some of the data in the code is copied from the previous uboot, and the operation of the Register is different for each processor. This bootloader is just an introduction to Uboot, and the complete uboot is much more complicated than that.
Code reference Address: http://www.oschina.net/code/snippet_2241389_52110
The code implements a basic bootloader