What are ATAGs for a device that uses Linux Kernel?

rqmok picture rqmok · Jun 27, 2014 · Viewed 9.3k times · Source

I am trying to understand how a kernel boots. I am currently trying to port a new kernel to hTC Incredible S VIVO (s710e) device, but I cannot get it to boot. So, I looked into the device's original kernel, and looked through some documentation, and found out that the device uses ATAGs. Now, I have several questions that I cannot find a clear answer for:

  • What are ATAGs?
  • What are they used for?
  • How does the kernel boot using ATAGs?
  • Do ATAGs play a vital role in booting a kernel?

Answer

Joe Kul picture Joe Kul · Jun 27, 2014

ATAGS are ARM tags. They are used to carry information such as memory size from boot code to kernel. Some references (which in turn lead to other references): booting standards, customized ATAG.

This reference arm/Booting explains theory, but does not much tell a user what to do.

On my target I use the following in my U-Boot config: CONFIG_CMDLINE_TAG, CONFIG_SETUP_MEMORY_TAGS, and these in my kernel config: CONFIG_ATAGS=y, CONFIG_USE_OF is not set. Not sure if that is sufficient for you but it gives you clues to search on, good luck.