I. For mips
1. Find ENTRY point:
example :
mips-linux-objdump -f vmlinux | grep start
arm-softfloat-linux-gnu-objdump -f vmlinux | grep start
2.Find Load Point:
example :
mips-linux-nm vmlinux | grep _ftext
arm-softfloat-linux-gnu-nm | grep _ftext
Another way :
ENTRY=`readelf -a ${VMLINUX} |grep "Entry" |cut -d":" -f 2`
LDADDR=`readelf -a ${VMLINUX}| grep "\[ 1\]" |cut -d" " -f 26`
II.For Arm
# Note: the following conditions must always be true:
# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
# PARAMS_PHYS must be within 4MB of ZRELADDR
# INITRD_PHYS must be in RAM
ZRELADDR := $(zreladdr-y)
PARAMS_PHYS := $(params_phys-y)
INITRD_PHYS := $(initrd_phys-y)
For arm system, the entry and load address just referenc follow 2 files :
(1) linuxsource/arch/arm/mach-xxxxxxxx/Makefile.boot
(2)linuxsource/arch/arm/boot/Makefile
Then using mkimage :
$(MKIMAGE) -A arm -O linux -T kernel -C none -a $(ZRELADDR) -e $(ZRELADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@