0
\$\begingroup\$

STM32F2: Makefile, linker script and start-up file combination without commercial IDE is a simple but brilliant explanation of what happens when we start a system based on a Cortex-M series processor.

Will be grateful if a similar simple information is provided for Cortex-A series processors too. Since Cortex-A processors use MMU, and conventional embedded-linuxes run ONLY on Cortex-A, so I am presuming that the bootup process would be significantly different.

Thanks in advance.

Thanks and Regards, Ajay

\$\endgroup\$
  • \$\begingroup\$ Well, the embedded Linux source code is available, so you could read that. \$\endgroup\$ – Brian Drummond Apr 20 '18 at 6:40
  • \$\begingroup\$ The biggest difference is if you have multiple cores. You need to start one and leave the others initially idle. The MMU is off after booting. \$\endgroup\$ – Oldfart Apr 20 '18 at 7:02
  • \$\begingroup\$ Cortex-A chips vary a lot. i.MX6 has a ROM that tries to load the bootloader from SD card, NOR flash, USB etc. You could perhaps study the boot process of Raspberry Pi. \$\endgroup\$ – filo Apr 20 '18 at 7:09
  • \$\begingroup\$ @filo Pi is a bad example since the official bootloader is closed source \$\endgroup\$ – Jan Dorniak Apr 20 '18 at 8:01
  • \$\begingroup\$ @filo, we say that ROM tries to load the bootloader from SD card, NOR flash, USB etc. Does this mean that the ROM-code is burnt just once into the ROM, and if there is absolutely nothing on the board, then the CPU will simply keep waiting for a bootloader, by looping onto the (one-time burnt, fixed) code present in ROM? \$\endgroup\$ – Ajay Garg Apr 21 '18 at 5:42
1
\$\begingroup\$

The provess varies a lot depending on a particular SoC, but the general sequence is:

  1. Load bootloader (this depends on SoC)
  2. Bootloader initializes the most important parts - crystal, RAM, other stuff (and possibly allows changing the kernel)
  3. Bootloader runs the kernel

The most common open source bootloaders are U-Boot and RedBoot. If you want a hobbyist board to play around with I suggest Beaglebone - that SoC has very good open documentation and the relative U-Boot parts were contributed directly by TI.

\$\endgroup\$
  • \$\begingroup\$ Thanks Jan for the help. As per point 2, boot-loader initializes the RAM. (May be that is the reason why global-data-structure gd in uboot is declared with register storage-class, please confirm). Now, youtube.com/watch?v=3brOzLJmeek says that there are internal-ram and external-ram. Firstly, what is the difference between the two? Secondly, boot-loader initializes internal-ram or external-ram or both? \$\endgroup\$ – Ajay Garg Apr 21 '18 at 6:22
  • \$\begingroup\$ Internal RAM is otherwise listed as cache memory and it does not need initialization. \$\endgroup\$ – Jan Dorniak Apr 21 '18 at 9:54
  • \$\begingroup\$ @AjayGarg if my answer helped you consider upvoting or accepting it \$\endgroup\$ – Jan Dorniak Apr 21 '18 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.