1

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

Ajay Garg
  • 19
  • 2
  • Well, the embedded Linux source code is available, so you could read that. –  Apr 20 '18 at 06:40
  • 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. – Oldfart Apr 20 '18 at 07:02
  • 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. – filo Apr 20 '18 at 07:09
  • @filo Pi is a bad example since the official bootloader is closed source – jaskij Apr 20 '18 at 08:01
  • @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? – Ajay Garg Apr 21 '18 at 05:42
  • Yes, the ROM is burned permanently. See chapter 8 "system boot" https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf – filo Apr 21 '18 at 06:23

1 Answers1

1

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.

jaskij
  • 1,223
  • 8
  • 13
  • 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, https://www.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? – Ajay Garg Apr 21 '18 at 06:22
  • Internal RAM is otherwise listed as cache memory and it does not need initialization. – jaskij Apr 21 '18 at 09:54
  • @AjayGarg if my answer helped you consider upvoting or accepting it – jaskij Apr 21 '18 at 11:51