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 &quot;--gap-fill&quot; 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&#39;s a problem in the mapping of u-boot :<br>
powerpc-linux-gnu-objdump -h u-boot<br><br>u-boot:&nbsp;&nbsp;&nbsp;&nbsp; file format elf32-powerpc<br><br>Sections:<br>Idx Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VMA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LMA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File off&nbsp; Algn<br>&nbsp; 0 .text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00017e18&nbsp; fc000000&nbsp; fc000000&nbsp; 00002138&nbsp; 2**2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, READONLY, CODE<br>&nbsp; 1 .reloc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00000804&nbsp; fc018000&nbsp; fc018000&nbsp; 0001a138&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 2 .data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00001060&nbsp; fc018804&nbsp; fc018804&nbsp; 0001a93c&nbsp; 2**2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 3 .data.rel.ro.local 0000003c&nbsp; fc019864&nbsp; fc019864&nbsp; 0001b99c&nbsp; 2**2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 4 .data.rel&nbsp;&nbsp;&nbsp;&nbsp; 0000003c&nbsp; fc0198a0&nbsp; fc0198a0&nbsp; 0001b9d8&nbsp; 2**2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 5 .data.rel.local 00000634&nbsp; fc0198dc&nbsp; fc0198dc&nbsp; 0001ba14&nbsp; 2**2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 6 .ppcenv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00000200&nbsp; fc019f10&nbsp; fc019f10&nbsp; 0001c048&nbsp; 2**2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 7 .u_boot_cmd&nbsp;&nbsp; 000000dc&nbsp; fc01a110&nbsp; fc01a110&nbsp; 0001c248&nbsp; 2**2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, DATA<br>&nbsp; 8 .bss&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00001bf8&nbsp; fc01b000&nbsp; fc01b000&nbsp; 0001d138&nbsp; 2**3<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALLOC<br>&nbsp; 9 .debug_line&nbsp;&nbsp; 0000607d&nbsp; 00000000&nbsp; 00000000&nbsp; 0001d138&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>&nbsp;10 .debug_info&nbsp;&nbsp; 00027d84&nbsp; 00000000&nbsp; 00000000&nbsp; 000231b5&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>
&nbsp;11 .debug_abbrev 00005254&nbsp; 00000000&nbsp; 00000000&nbsp; 0004af39&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>&nbsp;12 .debug_aranges 00000660&nbsp; 00000000&nbsp; 00000000&nbsp; 00050190&nbsp; 2**3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>
&nbsp;13 .rodata.str1.1 0000209e&nbsp; 00000660&nbsp; 00000660&nbsp; 00000094&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, ALLOC, LOAD, READONLY, DATA<br>&nbsp;14 .debug_frame&nbsp; 000026cc&nbsp; 00000000&nbsp; 00000000&nbsp; 000507f0&nbsp; 2**2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>
&nbsp;15 .debug_loc&nbsp;&nbsp;&nbsp; 0000c9c7&nbsp; 00000000&nbsp; 00000000&nbsp; 00052ebc&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>&nbsp;16 .debug_pubnames 000016b1&nbsp; 00000000&nbsp; 00000000&nbsp; 0005f883&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>
&nbsp;17 .debug_str&nbsp;&nbsp;&nbsp; 000043d5&nbsp; 00000000&nbsp; 00000000&nbsp; 00060f34&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br>&nbsp;18 .comment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 000006d6&nbsp; 00000000&nbsp; 00000000&nbsp; 00065309&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY<br>
&nbsp;19 .note.GNU-stack 00000000&nbsp; 00000000&nbsp; 00000000&nbsp; 000659df&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY<br>&nbsp;20 .gnu.attributes 00000384&nbsp; 00000000&nbsp; 00000000&nbsp; 000659df&nbsp; 2**0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY<br>&nbsp;21 .debug_ranges 00000f60&nbsp; 00000000&nbsp; 00000000&nbsp; 00065d63&nbsp; 2**0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CONTENTS, READONLY, DEBUGGING<br><br>Just a command to show you how objs are compiled :<br>powerpc-linux-gnu-gcc -g&nbsp; -Os&nbsp;&nbsp; -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFC000000&nbsp; -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&nbsp; -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&nbsp; -n $UNDEF_SYM cpu/mpc8260/start.o \<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -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>