public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MAKEALL ml507_flash return "Not enough room for program headers" error
@ 2008-11-03  6:59 Benny Chen
  2008-11-03  8:25 ` [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error Ricardo
  0 siblings, 1 reply; 9+ messages in thread
From: Benny Chen @ 2008-11-03  6:59 UTC (permalink / raw)
  To: u-boot

Hi there,

I am trying to build a U-Boot image for the ML507 board running from
FLASH and got the "Not enough room for program headers" error.

 

The main difference for my setup is the toolchain.  I am using the
powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
ml507_flash design for U-Boot.

 

I have seen a patch on the linker script for the mpc8555cds board and
tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
got the "relocation truncated to fit R_PPC_REL24" error.  
 
Before going further with debugging this problem, I would like to check
if this problem is due to the powerpc-eabi tool chain from Xilinx? 

 

Thanks for your help.

 

Regards,

Benny

 

$ ./MAKEALL ml507_flash

Configuring for ml507 board...

powerpc-eabi-ld: u-boot: Not enough room for program headers (allocated
2, need 5)

powerpc-eabi-ld: final link failed: Bad value

make: *** [u-boot] Error 1

size: './u-boot': No such file

 

 

 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
  2008-11-03  6:59 [U-Boot] MAKEALL ml507_flash return "Not enough room for program headers" error Benny Chen
@ 2008-11-03  8:25 ` Ricardo
  2008-11-04  5:11   ` Benny Chen
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo @ 2008-11-03  8:25 UTC (permalink / raw)
  To: u-boot

Hello Benny

  I have just checkout the build of the ml507_flash and works ok for me

ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
Configuring for ml507 board...
   text	   data	    bss	    dec	    hex	filename
 202132	  10476	  30032	 242640	  3b3d0	./u-boot


  I remember that when I was using another toolchain the final link
failed (but showing different error). Try with another toochain, I am
using one produced by OpenEmbedded, but you will get the same results
with the ELDK


  Best regards



On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com> wrote:
> Hi there,
>
> I am trying to build a U-Boot image for the ML507 board running from
> FLASH and got the "Not enough room for program headers" error.
>
>
>
> The main difference for my setup is the toolchain.  I am using the
> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
> ml507_flash design for U-Boot.
>
>
>
> I have seen a patch on the linker script for the mpc8555cds board and
> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
> got the "relocation truncated to fit R_PPC_REL24" error.
>
> Before going further with debugging this problem, I would like to check
> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>
>
>
> Thanks for your help.
>
>
>
> Regards,
>
> Benny
>
>
>
> $ ./MAKEALL ml507_flash
>
> Configuring for ml507 board...
>
> powerpc-eabi-ld: u-boot: Not enough room for program headers (allocated
> 2, need 5)
>
> powerpc-eabi-ld: final link failed: Bad value
>
> make: *** [u-boot] Error 1
>
> size: './u-boot': No such file
>
>
>
>
>
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
  2008-11-03  8:25 ` [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error Ricardo
@ 2008-11-04  5:11   ` Benny Chen
  2008-11-04  9:13     ` Ricardo
  0 siblings, 1 reply; 9+ messages in thread
From: Benny Chen @ 2008-11-04  5:11 UTC (permalink / raw)
  To: u-boot

Hi Ricardo,
Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
default ml507_flash project.  However, because my hardware design does
not map the FLASH chip to 0xFE000000 but to 0x86000000 the build failed
with the following error.

/******************************/
cpu/ppc4xx/start.o: In function `rsttlb':

/usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
relocation truncated to fit: R_PPC_REL24 against symbol `_start' defined
in .text section in cpu/ppc4xx/start.o
/*****************************/

I think this issue maybe to do with the 24bit branch address limit with
the PPC440x5 core. Here the _start_440 function calls a "b _start" and
in this case the _start is mapped to flash in address 0x8600xxxx.
Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
this is why the linker failed at the last stage.

Does anyone have any idea with this issue?

Regards,
Benny

-----Original Message-----
From: Ricardo [mailto:ricardo.ribalda at gmail.com] 
Sent: Monday, 3 November 2008 6:26 PM
To: Benny Chen
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
programheaders" error

Hello Benny

  I have just checkout the build of the ml507_flash and works ok for me

ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
Configuring for ml507 board...
   text	   data	    bss	    dec	    hex	filename
 202132	  10476	  30032	 242640	  3b3d0	./u-boot


  I remember that when I was using another toolchain the final link
failed (but showing different error). Try with another toochain, I am
using one produced by OpenEmbedded, but you will get the same results
with the ELDK


  Best regards



On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
wrote:
> Hi there,
>
> I am trying to build a U-Boot image for the ML507 board running from
> FLASH and got the "Not enough room for program headers" error.
>
>
>
> The main difference for my setup is the toolchain.  I am using the
> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
> ml507_flash design for U-Boot.
>
>
>
> I have seen a patch on the linker script for the mpc8555cds board and
> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
> got the "relocation truncated to fit R_PPC_REL24" error.
>
> Before going further with debugging this problem, I would like to
check
> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>
>
>
> Thanks for your help.
>
>
>
> Regards,
>
> Benny
>
>
>
> $ ./MAKEALL ml507_flash
>
> Configuring for ml507 board...
>
> powerpc-eabi-ld: u-boot: Not enough room for program headers
(allocated
> 2, need 5)
>
> powerpc-eabi-ld: final link failed: Bad value
>
> make: *** [u-boot] Error 1
>
> size: './u-boot': No such file
>
>
>
>
>
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
  2008-11-04  5:11   ` Benny Chen
@ 2008-11-04  9:13     ` Ricardo
  2008-11-05  5:10       ` Benny Chen
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo @ 2008-11-04  9:13 UTC (permalink / raw)
  To: u-boot

Hello Benny

  Maybe if you move your _start to the booptg section you will solve
your problem.... or you can also modify the jump to be a long jump.


              Best regards

On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com> wrote:
> Hi Ricardo,
> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
> default ml507_flash project.  However, because my hardware design does
> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build failed
> with the following error.
>
> /******************************/
> cpu/ppc4xx/start.o: In function `rsttlb':
>
> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
> relocation truncated to fit: R_PPC_REL24 against symbol `_start' defined
> in .text section in cpu/ppc4xx/start.o
> /*****************************/
>
> I think this issue maybe to do with the 24bit branch address limit with
> the PPC440x5 core. Here the _start_440 function calls a "b _start" and
> in this case the _start is mapped to flash in address 0x8600xxxx.
> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
> this is why the linker failed at the last stage.
>
> Does anyone have any idea with this issue?
>
> Regards,
> Benny
>
> -----Original Message-----
> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
> Sent: Monday, 3 November 2008 6:26 PM
> To: Benny Chen
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
> programheaders" error
>
> Hello Benny
>
>  I have just checkout the build of the ml507_flash and works ok for me
>
> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
> Configuring for ml507 board...
>   text    data     bss     dec     hex filename
>  202132   10476   30032  242640   3b3d0 ./u-boot
>
>
>  I remember that when I was using another toolchain the final link
> failed (but showing different error). Try with another toochain, I am
> using one produced by OpenEmbedded, but you will get the same results
> with the ELDK
>
>
>  Best regards
>
>
>
> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
> wrote:
>> Hi there,
>>
>> I am trying to build a U-Boot image for the ML507 board running from
>> FLASH and got the "Not enough room for program headers" error.
>>
>>
>>
>> The main difference for my setup is the toolchain.  I am using the
>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>> ml507_flash design for U-Boot.
>>
>>
>>
>> I have seen a patch on the linker script for the mpc8555cds board and
>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
>> got the "relocation truncated to fit R_PPC_REL24" error.
>>
>> Before going further with debugging this problem, I would like to
> check
>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>
>>
>>
>> Thanks for your help.
>>
>>
>>
>> Regards,
>>
>> Benny
>>
>>
>>
>> $ ./MAKEALL ml507_flash
>>
>> Configuring for ml507 board...
>>
>> powerpc-eabi-ld: u-boot: Not enough room for program headers
> (allocated
>> 2, need 5)
>>
>> powerpc-eabi-ld: final link failed: Bad value
>>
>> make: *** [u-boot] Error 1
>>
>> size: './u-boot': No such file
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>
>
>
> --
> Ricardo Ribalda
> http://www.eps.uam.es/~rribalda/
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
  2008-11-04  9:13     ` Ricardo
@ 2008-11-05  5:10       ` Benny Chen
  2008-11-05 18:13         ` [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
  2008-11-10 23:03         ` [U-Boot] MAKEALL ml507_flash return "Not enough room forprogramheaders" error Benny Chen
  0 siblings, 2 replies; 9+ messages in thread
From: Benny Chen @ 2008-11-05  5:10 UTC (permalink / raw)
  To: u-boot

Hi Ricardo,

Thanks for helping with this issue.  My real option is to do a long jump to the _start code.   However, I am not familiar with the PPC assembler hence, I am not able to get the longcall working.

_start is written in assembler in cpu/ppc_4xx/start.S therefore, I need to do a longcall from assembler which I am not sure how to do.  Could you please help advise on how I can do a longcall in assembler?

Further, investigation I found that the other option is to do a function pointer call to _start.  When written in C this should force the use of the CTR register which is 32-bit to hold the _start address.  But I don't know how to do this in assembler.  If you have any idea on this it would be much appreciated.


Thanks once again mate.

Regards,
Benny


-----Original Message-----
From: Ricardo [mailto:ricardo.ribalda at gmail.com]
Sent: Tue 04/11/2008 19:13
To: Benny Chen
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
 
Hello Benny

  Maybe if you move your _start to the booptg section you will solve
your problem.... or you can also modify the jump to be a long jump.


              Best regards

On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com> wrote:
> Hi Ricardo,
> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
> default ml507_flash project.  However, because my hardware design does
> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build failed
> with the following error.
>
> /******************************/
> cpu/ppc4xx/start.o: In function `rsttlb':
>
> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
> relocation truncated to fit: R_PPC_REL24 against symbol `_start' defined
> in .text section in cpu/ppc4xx/start.o
> /*****************************/
>
> I think this issue maybe to do with the 24bit branch address limit with
> the PPC440x5 core. Here the _start_440 function calls a "b _start" and
> in this case the _start is mapped to flash in address 0x8600xxxx.
> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
> this is why the linker failed at the last stage.
>
> Does anyone have any idea with this issue?
>
> Regards,
> Benny
>
> -----Original Message-----
> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
> Sent: Monday, 3 November 2008 6:26 PM
> To: Benny Chen
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
> programheaders" error
>
> Hello Benny
>
>  I have just checkout the build of the ml507_flash and works ok for me
>
> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
> Configuring for ml507 board...
>   text    data     bss     dec     hex filename
>  202132   10476   30032  242640   3b3d0 ./u-boot
>
>
>  I remember that when I was using another toolchain the final link
> failed (but showing different error). Try with another toochain, I am
> using one produced by OpenEmbedded, but you will get the same results
> with the ELDK
>
>
>  Best regards
>
>
>
> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
> wrote:
>> Hi there,
>>
>> I am trying to build a U-Boot image for the ML507 board running from
>> FLASH and got the "Not enough room for program headers" error.
>>
>>
>>
>> The main difference for my setup is the toolchain.  I am using the
>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>> ml507_flash design for U-Boot.
>>
>>
>>
>> I have seen a patch on the linker script for the mpc8555cds board and
>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
>> got the "relocation truncated to fit R_PPC_REL24" error.
>>
>> Before going further with debugging this problem, I would like to
> check
>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>
>>
>>
>> Thanks for your help.
>>
>>
>>
>> Regards,
>>
>> Benny
>>
>>
>>
>> $ ./MAKEALL ml507_flash
>>
>> Configuring for ml507 board...
>>
>> powerpc-eabi-ld: u-boot: Not enough room for program headers
> (allocated
>> 2, need 5)
>>
>> powerpc-eabi-ld: final link failed: Bad value
>>
>> make: *** [u-boot] Error 1
>>
>> size: './u-boot': No such file
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>
>
>
> --
> Ricardo Ribalda
> http://www.eps.uam.es/~rribalda/
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for
  2008-11-05  5:10       ` Benny Chen
@ 2008-11-05 18:13         ` Michal Simek
  2008-11-06  6:27           ` Benny Chen
  2008-11-10 23:03         ` [U-Boot] MAKEALL ml507_flash return "Not enough room forprogramheaders" error Benny Chen
  1 sibling, 1 reply; 9+ messages in thread
From: Michal Simek @ 2008-11-05 18:13 UTC (permalink / raw)
  To: u-boot

Hi Benny and Ricardo,

How are you Benny?

I am not xilinx ppc expert but it seems to me that your problem is in Flash
baseaddr. I haven't worked with ppc440 but I worked with ppc405.
The point is that ppc starts on specific address. I think from end of memory
space (address like 0xFFFFFFFC or any similar). Look at u-boot-rom.lds in xilinx
folder. Then is jump in one page and there is relocation to ram. It is not hard
to understand that - everything is in U-BOOT code.
And in your case where the flash has lower address your compilation seems to me
failed on linking because your target file is huge. You should move flash memory
 to the end of memory space.

PPC is a little bit different than Microblaze which you know. But you can of
course add there bram memory and do any wrapper there.

Cheers,
Michal



> Hi Ricardo,
> 
> Thanks for helping with this issue.  My real option is to do a long jump to the _start code.   However, I am not familiar with the PPC assembler hence, I am not able to get the longcall working.
> 
> _start is written in assembler in cpu/ppc_4xx/start.S therefore, I need to do a longcall from assembler which I am not sure how to do.  Could you please help advise on how I can do a longcall in assembler?
> 
> Further, investigation I found that the other option is to do a function pointer call to _start.  When written in C this should force the use of the CTR register which is 32-bit to hold the _start address.  But I don't know how to do this in assembler.  If you have any idea on this it would be much appreciated.
> 
> 
> Thanks once again mate.
> 
> Regards,
> Benny
> 
> 
> -----Original Message-----
> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
> Sent: Tue 04/11/2008 19:13
> To: Benny Chen
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error
>  
> Hello Benny
> 
>   Maybe if you move your _start to the booptg section you will solve
> your problem.... or you can also modify the jump to be a long jump.
> 
> 
>               Best regards
> 
> On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com> wrote:
>> Hi Ricardo,
>> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
>> default ml507_flash project.  However, because my hardware design does
>> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build failed
>> with the following error.
>>
>> /******************************/
>> cpu/ppc4xx/start.o: In function `rsttlb':
>>
>> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
>> relocation truncated to fit: R_PPC_REL24 against symbol `_start' defined
>> in .text section in cpu/ppc4xx/start.o
>> /*****************************/
>>
>> I think this issue maybe to do with the 24bit branch address limit with
>> the PPC440x5 core. Here the _start_440 function calls a "b _start" and
>> in this case the _start is mapped to flash in address 0x8600xxxx.
>> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
>> this is why the linker failed at the last stage.
>>
>> Does anyone have any idea with this issue?
>>
>> Regards,
>> Benny
>>
>> -----Original Message-----
>> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
>> Sent: Monday, 3 November 2008 6:26 PM
>> To: Benny Chen
>> Cc: u-boot at lists.denx.de
>> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
>> programheaders" error
>>
>> Hello Benny
>>
>>  I have just checkout the build of the ml507_flash and works ok for me
>>
>> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
>> Configuring for ml507 board...
>>   text    data     bss     dec     hex filename
>>  202132   10476   30032  242640   3b3d0 ./u-boot
>>
>>
>>  I remember that when I was using another toolchain the final link
>> failed (but showing different error). Try with another toochain, I am
>> using one produced by OpenEmbedded, but you will get the same results
>> with the ELDK
>>
>>
>>  Best regards
>>
>>
>>
>> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
>> wrote:
>>> Hi there,
>>>
>>> I am trying to build a U-Boot image for the ML507 board running from
>>> FLASH and got the "Not enough room for program headers" error.
>>>
>>>
>>>
>>> The main difference for my setup is the toolchain.  I am using the
>>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>>> ml507_flash design for U-Boot.
>>>
>>>
>>>
>>> I have seen a patch on the linker script for the mpc8555cds board and
>>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
>>> got the "relocation truncated to fit R_PPC_REL24" error.
>>>
>>> Before going further with debugging this problem, I would like to
>> check
>>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>>
>>>
>>>
>>> Thanks for your help.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Benny
>>>
>>>
>>>
>>> $ ./MAKEALL ml507_flash
>>>
>>> Configuring for ml507 board...
>>>
>>> powerpc-eabi-ld: u-boot: Not enough room for program headers
>> (allocated
>>> 2, need 5)
>>>
>>> powerpc-eabi-ld: final link failed: Bad value
>>>
>>> make: *** [u-boot] Error 1
>>>
>>> size: './u-boot': No such file
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>>>
>>
>>
>> --
>> Ricardo Ribalda
>> http://www.eps.uam.es/~rribalda/
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for
  2008-11-05 18:13         ` [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
@ 2008-11-06  6:27           ` Benny Chen
  2008-11-06  6:47             ` [U-Boot] ?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
  0 siblings, 1 reply; 9+ messages in thread
From: Benny Chen @ 2008-11-06  6:27 UTC (permalink / raw)
  To: u-boot

Hi Michal,

Good to hear from you.

You are exactly right about the issue with my FLASH not being mapped to
the end of the memory mapped space.  Hence, the initial boot code could
not jump far enough to it.

I need a 64k BRAM block sitting on the end of memory address so I can't
back my FLASH mapping right up to FFFFFFFF.  However, I am trying to get
it close enough so that the branch code can reach.

I am not sure if this is what you meant by "my target file is huge".
But hey let me know if I am wrong.

Cheers,
B.

-----Original Message-----
From: Michal Simek [mailto:monstr at seznam.cz] 
Sent: Thursday, 6 November 2008 4:13 AM
To: Benny Chen
Cc: Ricardo; u-boot at lists.denx.de
Subject: Re:
=?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=2
0=22Not=20enough=20room=20for

Hi Benny and Ricardo,

How are you Benny?

I am not xilinx ppc expert but it seems to me that your problem is in
Flash
baseaddr. I haven't worked with ppc440 but I worked with ppc405.
The point is that ppc starts on specific address. I think from end of
memory
space (address like 0xFFFFFFFC or any similar). Look at u-boot-rom.lds
in xilinx
folder. Then is jump in one page and there is relocation to ram. It is
not hard
to understand that - everything is in U-BOOT code.
And in your case where the flash has lower address your compilation
seems to me
failed on linking because your target file is huge. You should move
flash memory
 to the end of memory space.

PPC is a little bit different than Microblaze which you know. But you
can of
course add there bram memory and do any wrapper there.

Cheers,
Michal



> Hi Ricardo,
> 
> Thanks for helping with this issue.  My real option is to do a long
jump to the _start code.   However, I am not familiar with the PPC
assembler hence, I am not able to get the longcall working.
> 
> _start is written in assembler in cpu/ppc_4xx/start.S therefore, I
need to do a longcall from assembler which I am not sure how to do.
Could you please help advise on how I can do a longcall in assembler?
> 
> Further, investigation I found that the other option is to do a
function pointer call to _start.  When written in C this should force
the use of the CTR register which is 32-bit to hold the _start address.
But I don't know how to do this in assembler.  If you have any idea on
this it would be much appreciated.
> 
> 
> Thanks once again mate.
> 
> Regards,
> Benny
> 
> 
> -----Original Message-----
> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
> Sent: Tue 04/11/2008 19:13
> To: Benny Chen
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
programheaders" error
>  
> Hello Benny
> 
>   Maybe if you move your _start to the booptg section you will solve
> your problem.... or you can also modify the jump to be a long jump.
> 
> 
>               Best regards
> 
> On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com>
wrote:
>> Hi Ricardo,
>> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
>> default ml507_flash project.  However, because my hardware design
does
>> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build
failed
>> with the following error.
>>
>> /******************************/
>> cpu/ppc4xx/start.o: In function `rsttlb':
>>
>> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
>> relocation truncated to fit: R_PPC_REL24 against symbol `_start'
defined
>> in .text section in cpu/ppc4xx/start.o
>> /*****************************/
>>
>> I think this issue maybe to do with the 24bit branch address limit
with
>> the PPC440x5 core. Here the _start_440 function calls a "b _start"
and
>> in this case the _start is mapped to flash in address 0x8600xxxx.
>> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
>> this is why the linker failed at the last stage.
>>
>> Does anyone have any idea with this issue?
>>
>> Regards,
>> Benny
>>
>> -----Original Message-----
>> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
>> Sent: Monday, 3 November 2008 6:26 PM
>> To: Benny Chen
>> Cc: u-boot at lists.denx.de
>> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
>> programheaders" error
>>
>> Hello Benny
>>
>>  I have just checkout the build of the ml507_flash and works ok for
me
>>
>> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
>> Configuring for ml507 board...
>>   text    data     bss     dec     hex filename
>>  202132   10476   30032  242640   3b3d0 ./u-boot
>>
>>
>>  I remember that when I was using another toolchain the final link
>> failed (but showing different error). Try with another toochain, I am
>> using one produced by OpenEmbedded, but you will get the same results
>> with the ELDK
>>
>>
>>  Best regards
>>
>>
>>
>> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
>> wrote:
>>> Hi there,
>>>
>>> I am trying to build a U-Boot image for the ML507 board running from
>>> FLASH and got the "Not enough room for program headers" error.
>>>
>>>
>>>
>>> The main difference for my setup is the toolchain.  I am using the
>>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>>> ml507_flash design for U-Boot.
>>>
>>>
>>>
>>> I have seen a patch on the linker script for the mpc8555cds board
and
>>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds
but
>>> got the "relocation truncated to fit R_PPC_REL24" error.
>>>
>>> Before going further with debugging this problem, I would like to
>> check
>>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>>
>>>
>>>
>>> Thanks for your help.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Benny
>>>
>>>
>>>
>>> $ ./MAKEALL ml507_flash
>>>
>>> Configuring for ml507 board...
>>>
>>> powerpc-eabi-ld: u-boot: Not enough room for program headers
>> (allocated
>>> 2, need 5)
>>>
>>> powerpc-eabi-ld: final link failed: Bad value
>>>
>>> make: *** [u-boot] Error 1
>>>
>>> size: './u-boot': No such file
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>>>
>>
>>
>> --
>> Ricardo Ribalda
>> http://www.eps.uam.es/~rribalda/
>>
> 
> 
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] ?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for
  2008-11-06  6:27           ` Benny Chen
@ 2008-11-06  6:47             ` Michal Simek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2008-11-06  6:47 UTC (permalink / raw)
  To: u-boot

Hi Benny,

> Hi Michal,
> 
> Good to hear from you.
> 
> You are exactly right about the issue with my FLASH not being mapped to
> the end of the memory mapped space.  Hence, the initial boot code could
> not jump far enough to it.
> 
> I need a 64k BRAM block sitting on the end of memory address so I can't
> back my FLASH mapping right up to FFFFFFFF.  However, I am trying to get
> it close enough so that the branch code can reach.

:-)

> I am not sure if this is what you meant by "my target file is huge".
> But hey let me know if I am wrong.

That was only my suggestion. Microblaze is still my mainstream. I haven't built
ppc440 code.

Cheers,
Michal

> 
> Cheers,
> B.
> 
> -----Original Message-----
> From: Michal Simek [mailto:monstr at seznam.cz] 
> Sent: Thursday, 6 November 2008 4:13 AM
> To: Benny Chen
> Cc: Ricardo; u-boot at lists.denx.de
> Subject: Re:
> =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=2
> 0=22Not=20enough=20room=20for
> 
> Hi Benny and Ricardo,
> 
> How are you Benny?
> 
> I am not xilinx ppc expert but it seems to me that your problem is in
> Flash
> baseaddr. I haven't worked with ppc440 but I worked with ppc405.
> The point is that ppc starts on specific address. I think from end of
> memory
> space (address like 0xFFFFFFFC or any similar). Look at u-boot-rom.lds
> in xilinx
> folder. Then is jump in one page and there is relocation to ram. It is
> not hard
> to understand that - everything is in U-BOOT code.
> And in your case where the flash has lower address your compilation
> seems to me
> failed on linking because your target file is huge. You should move
> flash memory
>  to the end of memory space.
> 
> PPC is a little bit different than Microblaze which you know. But you
> can of
> course add there bram memory and do any wrapper there.
> 
> Cheers,
> Michal
> 
> 
> 
>> Hi Ricardo,
>>
>> Thanks for helping with this issue.  My real option is to do a long
> jump to the _start code.   However, I am not familiar with the PPC
> assembler hence, I am not able to get the longcall working.
>> _start is written in assembler in cpu/ppc_4xx/start.S therefore, I
> need to do a longcall from assembler which I am not sure how to do.
> Could you please help advise on how I can do a longcall in assembler?
>> Further, investigation I found that the other option is to do a
> function pointer call to _start.  When written in C this should force
> the use of the CTR register which is 32-bit to hold the _start address.
> But I don't know how to do this in assembler.  If you have any idea on
> this it would be much appreciated.
>>
>> Thanks once again mate.
>>
>> Regards,
>> Benny
>>
>>
>> -----Original Message-----
>> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
>> Sent: Tue 04/11/2008 19:13
>> To: Benny Chen
>> Cc: u-boot at lists.denx.de
>> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
> programheaders" error
>>  
>> Hello Benny
>>
>>   Maybe if you move your _start to the booptg section you will solve
>> your problem.... or you can also modify the jump to be a long jump.
>>
>>
>>               Best regards
>>
>> On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com>
> wrote:
>>> Hi Ricardo,
>>> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
>>> default ml507_flash project.  However, because my hardware design
> does
>>> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build
> failed
>>> with the following error.
>>>
>>> /******************************/
>>> cpu/ppc4xx/start.o: In function `rsttlb':
>>>
>>> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
>>> relocation truncated to fit: R_PPC_REL24 against symbol `_start'
> defined
>>> in .text section in cpu/ppc4xx/start.o
>>> /*****************************/
>>>
>>> I think this issue maybe to do with the 24bit branch address limit
> with
>>> the PPC440x5 core. Here the _start_440 function calls a "b _start"
> and
>>> in this case the _start is mapped to flash in address 0x8600xxxx.
>>> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
>>> this is why the linker failed at the last stage.
>>>
>>> Does anyone have any idea with this issue?
>>>
>>> Regards,
>>> Benny
>>>
>>> -----Original Message-----
>>> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
>>> Sent: Monday, 3 November 2008 6:26 PM
>>> To: Benny Chen
>>> Cc: u-boot at lists.denx.de
>>> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
>>> programheaders" error
>>>
>>> Hello Benny
>>>
>>>  I have just checkout the build of the ml507_flash and works ok for
> me
>>> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
>>> Configuring for ml507 board...
>>>   text    data     bss     dec     hex filename
>>>  202132   10476   30032  242640   3b3d0 ./u-boot
>>>
>>>
>>>  I remember that when I was using another toolchain the final link
>>> failed (but showing different error). Try with another toochain, I am
>>> using one produced by OpenEmbedded, but you will get the same results
>>> with the ELDK
>>>
>>>
>>>  Best regards
>>>
>>>
>>>
>>> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
>>> wrote:
>>>> Hi there,
>>>>
>>>> I am trying to build a U-Boot image for the ML507 board running from
>>>> FLASH and got the "Not enough room for program headers" error.
>>>>
>>>>
>>>>
>>>> The main difference for my setup is the toolchain.  I am using the
>>>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>>>> ml507_flash design for U-Boot.
>>>>
>>>>
>>>>
>>>> I have seen a patch on the linker script for the mpc8555cds board
> and
>>>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds
> but
>>>> got the "relocation truncated to fit R_PPC_REL24" error.
>>>>
>>>> Before going further with debugging this problem, I would like to
>>> check
>>>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>>>
>>>>
>>>>
>>>> Thanks for your help.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Benny
>>>>
>>>>
>>>>
>>>> $ ./MAKEALL ml507_flash
>>>>
>>>> Configuring for ml507 board...
>>>>
>>>> powerpc-eabi-ld: u-boot: Not enough room for program headers
>>> (allocated
>>>> 2, need 5)
>>>>
>>>> powerpc-eabi-ld: final link failed: Bad value
>>>>
>>>> make: *** [u-boot] Error 1
>>>>
>>>> size: './u-boot': No such file
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> U-Boot mailing list
>>>> U-Boot at lists.denx.de
>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>
>>>>
>>>
>>> --
>>> Ricardo Ribalda
>>> http://www.eps.uam.es/~rribalda/
>>>
>>
>>
>>
>>
> ------------------------------------------------------------------------
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] MAKEALL ml507_flash return "Not enough room forprogramheaders" error
  2008-11-05  5:10       ` Benny Chen
  2008-11-05 18:13         ` [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
@ 2008-11-10 23:03         ` Benny Chen
  1 sibling, 0 replies; 9+ messages in thread
From: Benny Chen @ 2008-11-10 23:03 UTC (permalink / raw)
  To: u-boot

Hi Guys,

The above error message was resolved by using the ELDK cross compiler.
Previously I was using Xilinxs powerpc-eabi-xx cross compiler to build
U-Boot. 

Cheers,
Benny

-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
On Behalf Of Benny Chen
Sent: Wednesday, 5 November 2008 3:10 PM
To: Ricardo
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room
forprogramheaders" error

Hi Ricardo,

Thanks for helping with this issue.  My real option is to do a long jump
to the _start code.   However, I am not familiar with the PPC assembler
hence, I am not able to get the longcall working.

_start is written in assembler in cpu/ppc_4xx/start.S therefore, I need
to do a longcall from assembler which I am not sure how to do.  Could
you please help advise on how I can do a longcall in assembler?

Further, investigation I found that the other option is to do a function
pointer call to _start.  When written in C this should force the use of
the CTR register which is 32-bit to hold the _start address.  But I
don't know how to do this in assembler.  If you have any idea on this it
would be much appreciated.


Thanks once again mate.

Regards,
Benny


-----Original Message-----
From: Ricardo [mailto:ricardo.ribalda at gmail.com]
Sent: Tue 04/11/2008 19:13
To: Benny Chen
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
programheaders" error
 
Hello Benny

  Maybe if you move your _start to the booptg section you will solve
your problem.... or you can also modify the jump to be a long jump.


              Best regards

On Tue, Nov 4, 2008 at 06:11, Benny Chen <benny.chen@groundprobe.com>
wrote:
> Hi Ricardo,
> Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
> default ml507_flash project.  However, because my hardware design does
> not map the FLASH chip to 0xFE000000 but to 0x86000000 the build
failed
> with the following error.
>
> /******************************/
> cpu/ppc4xx/start.o: In function `rsttlb':
>
> /usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
> relocation truncated to fit: R_PPC_REL24 against symbol `_start'
defined
> in .text section in cpu/ppc4xx/start.o
> /*****************************/
>
> I think this issue maybe to do with the 24bit branch address limit
with
> the PPC440x5 core. Here the _start_440 function calls a "b _start" and
> in this case the _start is mapped to flash in address 0x8600xxxx.
> Meaning we now need to branch from 0xFFFFFxxx to 0x8600xxxx.  I think
> this is why the linker failed at the last stage.
>
> Does anyone have any idea with this issue?
>
> Regards,
> Benny
>
> -----Original Message-----
> From: Ricardo [mailto:ricardo.ribalda at gmail.com]
> Sent: Monday, 3 November 2008 6:26 PM
> To: Benny Chen
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
> programheaders" error
>
> Hello Benny
>
>  I have just checkout the build of the ml507_flash and works ok for me
>
> ricardo at aragorn:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
> Configuring for ml507 board...
>   text    data     bss     dec     hex filename
>  202132   10476   30032  242640   3b3d0 ./u-boot
>
>
>  I remember that when I was using another toolchain the final link
> failed (but showing different error). Try with another toochain, I am
> using one produced by OpenEmbedded, but you will get the same results
> with the ELDK
>
>
>  Best regards
>
>
>
> On Mon, Nov 3, 2008 at 07:59, Benny Chen <benny.chen@groundprobe.com>
> wrote:
>> Hi there,
>>
>> I am trying to build a U-Boot image for the ML507 board running from
>> FLASH and got the "Not enough room for program headers" error.
>>
>>
>>
>> The main difference for my setup is the toolchain.  I am using the
>> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
>> ml507_flash design for U-Boot.
>>
>>
>>
>> I have seen a patch on the linker script for the mpc8555cds board and
>> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds
but
>> got the "relocation truncated to fit R_PPC_REL24" error.
>>
>> Before going further with debugging this problem, I would like to
> check
>> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>>
>>
>>
>> Thanks for your help.
>>
>>
>>
>> Regards,
>>
>> Benny
>>
>>
>>
>> $ ./MAKEALL ml507_flash
>>
>> Configuring for ml507 board...
>>
>> powerpc-eabi-ld: u-boot: Not enough room for program headers
> (allocated
>> 2, need 5)
>>
>> powerpc-eabi-ld: final link failed: Bad value
>>
>> make: *** [u-boot] Error 1
>>
>> size: './u-boot': No such file
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>
>
>
> --
> Ricardo Ribalda
> http://www.eps.uam.es/~rribalda/
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-11-10 23:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03  6:59 [U-Boot] MAKEALL ml507_flash return "Not enough room for program headers" error Benny Chen
2008-11-03  8:25 ` [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error Ricardo
2008-11-04  5:11   ` Benny Chen
2008-11-04  9:13     ` Ricardo
2008-11-05  5:10       ` Benny Chen
2008-11-05 18:13         ` [U-Boot] =?us-ascii?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
2008-11-06  6:27           ` Benny Chen
2008-11-06  6:47             ` [U-Boot] ?Q?Re=3A=20=5BU=2DBoot=5D=20MAKEALL=20ml507=5Fflash=20return=20=22Not=20enough=20room=20for Michal Simek
2008-11-10 23:03         ` [U-Boot] MAKEALL ml507_flash return "Not enough room forprogramheaders" error Benny Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox