tech_log: Linux relocation address - where to find it

Friday, May 15, 2009

Linux relocation address - where to find it

Here is a liitle text that help you find zreladdr-y needed by the U-Boot bootloader procedure to copy Linux kernel to SDRAM and launch it:<br />
As you could have notice from the mach-types file, the name of the variable is not MACH_CM922TXA10,
but CONFIG_ is appended by the configuration tool, and this variable contains either a ’n’ or an
’y’ (for no or yes boolean value). If it is selected (yes value), the name of the folder of our machine is
appended to the machine-y variable, which contains the folders to be visited during compilation (machis
automatically appended). make will enter in our folder, but we must tell him what it must do, then we
create the arch/arm/mach-cm922txa10/Makefile with the content :
#
# Makefile for the linux kernel.
#
# Object file lists.
obj-y := arch.o irq.o mm.o time.o
obj-m :=
obj-n :=
obj- :=
This Makefile is quite static since we have no configuration available at this time. Object files
listed here are inherited from the EPXA10db machine support. In the same folder we have to put an extra
Makefile, the Makefile.boot which only contains the physical address of the text segment (this
gives the value of ZRELADDR, which is the physical address of TEXTADDR) :
zreladdr-y := 0x00008000

------------------------------------

example:

drasko@marx:~/linux-2.6/arch/arm/mach-versatile$ cat Makefile.boot
       zreladdr-y    := 0x00008000
params_phys-y    := 0x00000100
   initrd_phys-y    := 0x00800000







0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home