how to modify my ld scripts
Hi all:
Whatever I modify my scripts ,The u-boot.bin is
seemed no effect!
So my ppcenv cant locate to a right room! Help please!
joe
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
Dear Joe,
Quoted 4 lines · in message <[email protected]> you wrote:
Whatever I modify my scripts ,The u-boot.bin is
seemed no effect!
So my ppcenv cant locate to a right room!
The location of the environment (in flash or in other type of memory,
where in flash, etc.) is determined by the #defines in your board config file. Your u-boot.lds linker script must match this
definition.
Quoted 1 line
Help please!
How could we? You don't provide any information.
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de You cannot propel yourself forward by patting yourself on the back.
[U-Boot-Users] how to modify my ld scripts--the detail!
dear Wolf Denk:
This is my scripts OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")OUTPUT_ARCH(arm)ENTRY(_start)
SECTIONS
{
. = 0x00000000;
. = ALIGN(4);
.text :
{
cpu/arm720t/start.o (.text)
*(.text)
}
. = ALIGN(4);
.rodata : { *(.rodata) }
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.got : { *(.got) }
armboot_end_data = .;
. = ALIGN(4);
.bss : { *(.bss) }
. = ALIGN(76 * 1024);
.ppcenv :
{
common/environment.o (.ppcenv)
}
armboot_end = .;
}and my board config files
#define #define CFG_ENV_ADDR (PHYS_FLASH_1
+ 0x13000)
Is it wrong? What i need to do?
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
[U-Boot-Users] how to modify my ld scripts--the detail!
Dear Joe,
Quoted 2 lines · in message <[email protected]> you wrote:
This is my scripts
...
Quoted 4 lines
. = ALIGN(4);
.bss : { *(.bss) }
. = ALIGN(76 * 1024);This _alignes_ on a 76 kB boundary (which makjes absolutely no sense to me), but it does not _place_ the segment at a certain address.
Quoted 4 lines
#define #define
CFG_ENV_ADDR(PHYS_FLASH_1
+0x13000)Is it wrong? What i need to do?
Calculate result=PHYS_FLASH_1+0x13000 and use ". = result" in your linker script.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de When you say "I wrote a program that crashed Windows", people just stare at you blankly and say "Hey, I got those with the system, *for free*". - Linus Torvalds in <[email protected]>
[U-Boot-Users] how to modify my ld scripts--3nd
Dear Wolfgang Denk:
Thank you for your instance help!
. = ALIGN(76 * 1024);
you say:
"Calculate result=PHYS_FLASH_1+0x13000 and use ". = result" in your
linker script."
so The PHYS_FLASH_1 = 0;
Can i modify my scripts as this?
. = 0x13000;
. = ALIGN(76 * 1024);
.ppcenv :
{common/environment.o (.ppcenv)
}
Thanks a lot!
Joe
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
[U-Boot-Users] how to modify my ld scripts--the detail!
In reply to Wolfgang DenkDear Wolfgang Denk:
This is my scripts after modified!
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")OUTPUT_ARCH(arm)ENTRY(_start)
SECTIONS
{
. = 0x00000000;
. = . + 0x10000; /*as a test,but it seem no
efect to ppcboot.bin */
. = ALIGN(4);
.text :
{
cpu/arm720t/start.o (.text)
*(.text)
}
. = ALIGN(4);
.rodata : { *(.rodata) }
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.got : { *(.got) }
armboot_end_data = .;
. = ALIGN(4);
.bss : { *(.bss) }
. = 0x00014000; /* as you say*/
.ppcenv :
{
common/environment.o (.ppcenv)
}
armboot_end = .;
}It do not work! I am crazy!
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
[U-Boot-Users] how to modify my ld scripts--3nd
In reply to JoeQuoted 5 lines · In message <[email protected]> you wrote:
so The
PHYS_FLASH_1= 0;
Can i modify my scripts as this?
. =0x13000;
. =ALIGN(76 * 1024);
This makes no sense. Remove this align statement.
The rest is fine - assuming you really want to place your environment at an offset of 76 kB.
BTW - you can check the result of the linker run in the u-boot.map file.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Quote from a recent meeting: "We are going to continue having these meetings everyday until I find out why no work is getting done."
[U-Boot-Users] how to modify my ld scripts--the detail!
In reply to JoeQuoted 4 lines · In message <[email protected]> you wrote:
. = 0x00000000; . = . + 0x10000; /*as a test,but it seem noefect to ppcboot.bin */
Except that it will probably break U-Boot.
Quoted 1 line
. = ALIGN(4);
Well, in both cases (with or without the "+ 0x10000") the alognment is already much more strict than a 4 byte boundary, so this ALIGN is not needed or even confusing.
Quoted 1 line
It do not work! I am crazy!
It probably does not work because of your modification above.
Also, I'd be very surprised if you managed to squeeze all of U-Boot code, data _and_ _bss_ to be smaller than 76 kB.
Hm, I'm afraid I cannot help you. "It do not work" is not exactly a precise problem description.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Imagination is more important than knowledge. -- Albert Einstein