Tuesday, July 13, 2010

zreladdr, ztextaddr value

ZRELADDR
 This is the address where the decompressed kernel will be written,
 and eventually executed.  The following constraint must be valid:

  __virt_to_phys(TEXTADDR) == ZRELADDR

 The initial part of the kernel is carefully coded to be position
 independent.
More from RMK
So, this should be the address to be defined where we want the uncompressed kernel 
to be placed. Since boot args are placed at address 0x80000100 by u-boot, we should 
make sure we do not overwrite this memory area. Also, kernel sets up Page Table 
Entries 16k below zreladdr, so we have to keep thought on that as well. 
 
Considering these details in mind, I choose to set it at the address 0x80008000.
In the expression:
 
__virt_to_phys(TEXTADDR) == ZRELADDR
 
TEXTADDR corresponds to stext value obtained from the linux kernel linker script 
"vmlinux.lds". This is normally set to 0xC0008000 (as seen in System.map after 
building the image)and is left at this default value. 
 
 
ZTEXTADDR: Address where zImage is located by the bootloader

No comments:

Post a Comment