Hi all,<br><br>I work with a linux cross-compiler (codesourcery with gcc 4.2.3) for embedded powerpc targets (mpc8248).<br>So I tried to compile u-boot (version 1.1.6). It works fine with another and older version of gcc (3.3.2) but with the new cross-compiler (4.2.3) I have trouble to do this part :<br>
powerpc-linux-gnu-objcopy --gap-fill 0xff -O binary u-boot u-boot.bin<br><br>This command freezes and uses a lot of memory without sucess (maybe I have not enough disk space).<br><br>I decided to launch without "--gap-fill" to see the reaction :<br>
powerpc-linux-gnu-objcopy -O binary u-boot u-boot.bin<br>It creates u-boot.bin file, and the system (host ls -al) tells that this file has a size nearest to 4GiB<br><br>So I think it's a problem in the mapping of u-boot :<br>
powerpc-linux-gnu-objdump -h u-boot<br><br>u-boot: file format elf32-powerpc<br><br>Sections:<br>Idx Name Size VMA LMA File off Algn<br> 0 .text 00017e18 fc000000 fc000000 00002138 2**2<br>
CONTENTS, ALLOC, LOAD, READONLY, CODE<br> 1 .reloc 00000804 fc018000 fc018000 0001a138 2**0<br> CONTENTS, ALLOC, LOAD, DATA<br> 2 .data 00001060 fc018804 fc018804 0001a93c 2**2<br>
CONTENTS, ALLOC, LOAD, DATA<br> 3 .data.rel.ro.local 0000003c fc019864 fc019864 0001b99c 2**2<br> CONTENTS, ALLOC, LOAD, DATA<br> 4 .data.rel 0000003c fc0198a0 fc0198a0 0001b9d8 2**2<br>
CONTENTS, ALLOC, LOAD, DATA<br> 5 .data.rel.local 00000634 fc0198dc fc0198dc 0001ba14 2**2<br> CONTENTS, ALLOC, LOAD, DATA<br> 6 .ppcenv 00000200 fc019f10 fc019f10 0001c048 2**2<br>
CONTENTS, ALLOC, LOAD, DATA<br> 7 .u_boot_cmd 000000dc fc01a110 fc01a110 0001c248 2**2<br> CONTENTS, ALLOC, LOAD, DATA<br> 8 .bss 00001bf8 fc01b000 fc01b000 0001d138 2**3<br>
ALLOC<br> 9 .debug_line 0000607d 00000000 00000000 0001d138 2**0<br> CONTENTS, READONLY, DEBUGGING<br> 10 .debug_info 00027d84 00000000 00000000 000231b5 2**0<br> CONTENTS, READONLY, DEBUGGING<br>
11 .debug_abbrev 00005254 00000000 00000000 0004af39 2**0<br> CONTENTS, READONLY, DEBUGGING<br> 12 .debug_aranges 00000660 00000000 00000000 00050190 2**3<br> CONTENTS, READONLY, DEBUGGING<br>
13 .rodata.str1.1 0000209e 00000660 00000660 00000094 2**0<br> CONTENTS, ALLOC, LOAD, READONLY, DATA<br> 14 .debug_frame 000026cc 00000000 00000000 000507f0 2**2<br> CONTENTS, READONLY, DEBUGGING<br>
15 .debug_loc 0000c9c7 00000000 00000000 00052ebc 2**0<br> CONTENTS, READONLY, DEBUGGING<br> 16 .debug_pubnames 000016b1 00000000 00000000 0005f883 2**0<br> CONTENTS, READONLY, DEBUGGING<br>
17 .debug_str 000043d5 00000000 00000000 00060f34 2**0<br> CONTENTS, READONLY, DEBUGGING<br> 18 .comment 000006d6 00000000 00000000 00065309 2**0<br> CONTENTS, READONLY<br>
19 .note.GNU-stack 00000000 00000000 00000000 000659df 2**0<br> CONTENTS, READONLY<br> 20 .gnu.attributes 00000384 00000000 00000000 000659df 2**0<br> CONTENTS, READONLY<br> 21 .debug_ranges 00000f60 00000000 00000000 00065d63 2**0<br>
CONTENTS, READONLY, DEBUGGING<br><br>Just a command to show you how objs are compiled :<br>powerpc-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFC000000 -I/a/good/path/to/include2 -I/a/good/path/to/include -I/a/good/path/to/include -fno-builtin -ffreestanding -nostdinc -isystem/usr/freescale-gcc-4.2.3/bin/../lib/gcc/powerpc-linux-gnu/4.2.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -Wall -Wstrict-prototypes -c -o /a/good/path/to/common/cmd_mac.o cmd_mac.c<br>
<br>And another command to see how u-boot is built :<br>powerpc-linux-gnu-ld -Bstatic -T /a/good/path/to/a/u-boot.lds -Ttext 0xFC000000 -n $UNDEF_SYM cpu/mpc8260/start.o \<br> --start-group lib_generic/libgeneric.a board/rmp100/librmp100.a cpu/mpc8260/libmpc8260.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /usr/freescale-gcc-4.2.3/bin/../lib/gcc/powerpc-linux-gnu/4.2.3 -lgcc \<br>
-Map u-boot.map -o u-boot<br><br>If I do it with .a files compiled with gcc3 and after I do objcopy it works but if I do it with .a files compiled with gcc4 it freezes.<br><br>NB : <br>- with gcc3, u-boot.bin has a size of 121KiB<br>
- UNDEF_SYM=<br>-u__u_boot_cmd_autoscr -u__u_boot_cmd_bootm -u__u_boot_cmd_diskboot -u__u_boot_cmd_end -u__u_boot_cmd_go -u__u_boot_cmd_help -u__u_boot_cmd_ide -u__u_boot_cmd_printenv -u__u_boot_cmd_question_mark -u__u_boot_cmd_reset -u__u_boot_cmd_setenv -u__u_boot_cmd_start -u__u_boot_cmd_version<br>
- I know u-boot 1.1.6 is an older version but I have to use it not another<br><br>Thanks a lot for your attention and your futurs ideas...<br><br>Val.<br>