Hi all,
I have two questions about making the MLO loader for the Blaze device.
Target: Blaze
Toolchain: mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3
System: Ubuntu LTS 12 64Bit
My build process is configured like described on omappedia.com:
make ARCH=arm omap44XXsdp_config
make ift 2>&1 |tee ${MYDROID}/logs/x-loader_make.out
1. Address of _start
********************
The start address of the MLO is set by the define TEXT_BASE located in board/omap4430sdp/config.mk to 0x40304350. After 'make ift' is done the address of _start (which seams to be the first code) is set to 0x40304360. Perhaps this is done by alignment issue of the compiler.
> grep _start x-load.map
0x40304360 _start
The compiler inserts 16 zero bytes before the new address of _start.
> hd x-load.bin -n 32
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010 12 00 00 ea 14 f0 9f e5 10 f0 9f e5 0c f0 9f e5
Setting TEXT_BASE to 0x40304360 prevents the 'move' of _start.
Why is 0x40304350 used as TEXT_BASE? What are the 16 zero bytes good for?
2. Makefile grep (MLO)
**********************
In one of the following steps in Makefile the address of _start is fetched from System.map which is now 0x40304360. The result is assigned to TEXT_BASE which was set to 0x40304350 before (board/omap4430sdp/config.mk).
Part of Makefile:
x-load.bin.ift: signGP System.map x-load.bin
TEXT_BASE=`grep -w _start System.map|cut -d ' ' -f1`
./signGP x-load.bin $(TEXT_BASE)
The assignment seams not to work (because it is done in a sub shell created by the make process). The signGP is always called with the 'old' value of TEXT_BASE (before grep) 0x40304350, which results in including the 16 leading bytes from question 1 into the MLO file.
> hd MLO -n 32 -s 512
00000200 b4 5f 00 00 50 43 30 40 00 00 00 00 00 00 00 00
00000210 00 00 00 00 00 00 00 00 12 00 00 ea 14 f0 9f e5
As far as I know the first ARM instruction 0xEA000012 should be located at 0x208 not at 0x218.
Is this correct?
Best regards,
Roman Jordan
↧
MLO start address
↧