1

I have question from page 27 of following doc embedded-linux-labs.pdf.
http://free-electrons.com/doc/training/embedded-linux/embedded-linux-labs.pdf

See Attached image. Board used is Atmel SAMA5D3 Xplained boards.

Here in figure UBI use to go in MDT partition.

Does following also goes into individual MDT partition :--
AT91Bootstrap, U-Boot, U-Boot env & U-Boot env backup

Or these (AT91Bootstrap, U-Boot, U-Boot env & U-Boot env backup ) also goes into NAND Flash at predefined location which are not MDT partiton ?

How rom code will come to know the size of AT91Bootstrap to be loaded from NAND flash.

Also how the ROM code will come to enter image description here

Katoch
  • 2,709
  • 9
  • 51
  • 84

1 Answers1

0

You have to put each part into NAND as pointed out in this doc. I'm not familiar with their idea, but as I understand you already have UBI partition and you have to create additional partition with AT91+U-boot+env+env-backup. And then flash it into the NAND. So, the answer for your question is YES, (AT91Bootstrap, U-Boot, U-Boot env & U-Boot env backup) goes to the NAND. Usually embedded systems use NAND to store first bootloader, second bootloader, with ENV, kernel and dtb files.

About size: When you create AT91Bootstrap you have to(or some script does) add valid "magic" header. In your case it's called "valid code". Internal bootloader read it(I mean it reads several first bytes or one page; it depends on memory type you use), parse it and take details about boot process from there, include size of AT91Bootstrap data. You can find details about this process from this link(Page 68) http://www.atmel.com/Images/Atmel-11121-32-bit-Cortex-A5-Microcontroller-SAMA5D3_Datasheet.pdf

Anton Glukhov
  • 3,507
  • 1
  • 15
  • 16
  • They are putting dbt+kernel+rfsystem in ubi image which have to be mounted on mdt partition – Katoch Sep 28 '15 at 14:07
  • Ok its RAW partition not MDT .. as doc use to say how bootstrap code finds the U-boot ... "Offset 0x40000 for the second stage bootloader is decided by the first stage bootloader. This can be changed by changing the AT91Bootstrap configuration." – Katoch Sep 28 '15 at 14:50
  • "Ok its RAW partition not MDT".. Yeah, it looks the truth, now;) About the way how _first_ bootloader finds _second_ one yes, you're absolutely right, there is board config file in which you can change offset. – Anton Glukhov Sep 28 '15 at 14:55