Hi, I'm trying to understand how the boot sequence works on ARM-based systems. Searching on the net I have found some infos, but they are all too vague.
From what I have found, the typical ARM boot sequence is as follows:
1. on power-on the BootROM ( it is hardcoded into the ASIC ) is executed
2. the BootROM searches for the boot1 stage and try to boot it
3. the boot1 searches for the boot2 stage and try to boot it
4. the boot2 boots the linux/android/whatever kernel
It is a good explanation ( in theory at least ), but what are the implementative details?
For example, on x86 we know the BIOS executes from ROM and it loads and executes the code on the MBR of the HDD.
We can safely assume the BootROM is something like the BIOS ( but it does much less setup work ). Then, where the BootROM goes to find for the boot1 code? Is the boot1 always located on a NAND flash chip? On a NOR SPI chip? On the sdcard? Is there some magic value ( like 55 AA in the case of x86/MBR )? At what location the boot1 must be localized on the boot media?
Then, the boot1 searches for the boot2 code, but where? And the same goes for the boot2/kernel. I have read the boot2 is often U-Boot. So, how does U-Boot knows where to load the kernel from?
Also, I have been playing with some ARM sticks, and I see there is a strange ASCII text file at the head of the NAND flash, a file full of variables and values!!
I understand that the NAND has no partitions ( in the MBR/GPT sense ). The partitions exist only at a logical level in the kernel.
Can someone help me understand how this thing works?
Thanks in advance for the reply.