[U-Boot-Users] 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,
in message 20031027065406.94199.qmail@web41104.mail.yahoo.com 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.
Help please!
How could we? You don't provide any information.
Wolfgang Denk

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/

Dear Joe,
in message 20031027101440.84892.qmail@web41110.mail.yahoo.com you wrote:
This is my scripts
...
. = 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.
#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

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/

In message 20031027105423.91301.qmail@web41110.mail.yahoo.com 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

Dear 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/

In message 20031027111633.64522.qmail@web41111.mail.yahoo.com you wrote:
. = 0x00000000; . = . + 0x10000; /*as a test,but it seem no
efect to ppcboot.bin */
Except that it will probably break U-Boot.
. = 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.
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
participants (2)
-
Joe
-
Wolfgang Denk