i.MX6 - u-boot binary size getting changed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX6 - u-boot binary size getting changed

976 次查看
Ansari
Contributor IV

Hi,

We are using imx6Q sabresd platform for our development with Linux 3.10.17_1.0.0-GA BSP.

We have installed the meta-tool chain in our 64bit Host PC and 32 bit Host PC using below steps.
$bitbake meta-toolchain
$sudo sh tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-<version>.sh

The u-boot source code is compiled in 32bit host PC and with this u-boot.imx binary, the target board is booted.
At u-boot level, the command "bdinfo" displays below information.

arch_number = 0x0000112D
boot_params = 0x10000100
DRAM bank   = 0x00000000
-> start    = 0x10000000
-> size     = 0x40000000
eth0name    = FEC
ethaddr     = 00:01:02:03:04:05
current eth = FEC
ip_addr     = <NULL>
baudrate    = 115200 bps
TLB addr    = 0x4FFF0000
relocaddr   = 0x4FF68000
reloc off   = 0x38768000

irq_sp      = 0x4F565F38
sp start    = 0x4F565F28

Then the u-boot source code is compiled in 64bit host PC and with this u-boot.imx binary, the target board is booted.
At u-boot level, the command "bdinfo" displays below information.

arch_number = 0x0000112D
boot_params = 0x10000100
DRAM bank   = 0x00000000
-> start    = 0x10000000
-> size     = 0x40000000
eth0name    = FEC
ethaddr     = 00:01:02:03:04:05
current eth = FEC
ip_addr     = <NULL>
baudrate    = 115200 bps
TLB addr    = 0x4FFF0000
relocaddr   = 0x4FF66000
reloc off   = 0x38766000

irq_sp      = 0x4F563F38
sp start    = 0x4F563F28


We would like to know, why the "relocaddr & reloc off "(as highlighted above) are different?  since the source codes are same and compiled in different host PC (64bit & 32bit).
In addition, we checked the u-boot.imx binary file size.  We could see the difference in the file size as below
u-boot.imx(compiled in 32bit host PC) - 313644 bytes
u-boot.imx(compiled in 64bit host PC) - 318780 bytes


Thank You,
Regards,
Ansari

0 项奖励
回复
1 回复

633 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Abdul

gcc for 64-bit environment can set int to 32 bits and long and pointer to 64 bits,

32-bit environment set int, long and pointer to 32 bits

HowTo Compile a 32-bit Application Using gcc On the 64-bit Linux Version - nixCraft

also size may depend on optimization level. Suggest to post this to Uboot Wiki

WebHome < DULG < DENX

Best regards

igor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 项奖励
回复