[uClinux-dev] Boot from Rom Patch + Memory problems

Manigandan.V manigandanv at myw.ltindia.com
Tue Mar 4 23:37:27 EST 2003


Well,your rom.ld is almost right except data section .
you have to add   AT(__data_rom_start) at the begining of data section (see
changes below)

Regards,
Mani

> Here is the rom.ld
>
> Thanks.
>
> MEMORY {
> rom    : ORIGIN = 0xffe40000, LENGTH = 0x1c0000
> ram    : ORIGIN = 0x20000, LENGTH = 0x3e0000
> }
>
> SECTIONS {
>
> .text : {
> _stext = . ;
>         *(.text)
> . = ALIGN(0x4) ;
> *(.text.*)
> . = ALIGN(0x4) ;
> *(.exitcall.exit)
> . = ALIGN(0x4) ;
> *(.kstrtab)
>
> . = ALIGN(16);          /* Exception table              */
> __start___ex_table = . ;
> *(__ex_table)
> __stop___ex_table = . ;
>
> __start___ksymtab = . ;  /* Kernel symbol table          */
> *(__ksymtab)
> __stop___ksymtab = . ;
>
> . = ALIGN(0x4);
> _etext = . ;
> __data_rom_start = . ;
> } > rom
>
> .data : AT(__data_rom_start) { /******Add this *******/
> _sdata = ALIGN(0x4) ;
> __data_start = . ;
>
> . = ALIGN(0x4) ;
> *(.rodata)
> . = ALIGN(0x4) ;
>         *(.data)
> . = ALIGN(0x4) ;
> *(.data.*)
>
> . = ALIGN(0x4);
> __setup_start = . ;
> *(.setup.init)
> __setup_end = . ;
>
> . = ALIGN(0x4);
> __initcall_start = .;
> *(.initcall.init)
> __initcall_end = . ;
>
> . = ALIGN(0x2000) ;
>         *(.data.init_task)
> . = ALIGN(0x2000) ;
>
> _edata = ALIGN(0x4) ;
> } > ram
>
> .bss : {
> _sbss = ALIGN(0x4) ;
> *(.bss)
> . = ALIGN(0x4) ;
> *(COMMON)
> _ebss = ALIGN(0x4) ;
> _end = ALIGN(0x4) ;
> } > ram
> }
>
>
>
> --
>
> On Tue, 4 Mar 2003 16:11:34
>  Manigandan.V wrote:
> >I guess that your rom.ld is having problem .Can you post your rom.ld
> >
> >> I've patched uClinux with the boot from rom patch. However when I've
> >compiled the kernel I've get the following error:
> >> m68k-elf-objcopy -O binary /uClinux-dist/linux-2.4.x/linux \
> >>   /uClinux-dist/images/linux.bin
> >> BFD: Warning: Writing section `.text' to huge (ie negative) file offset
> >0xffe200
> >> 00.
> >> m68k-elf-objcopy: /uClinux-dist/images/linux.bin: File truncated
> >>
> >> What is going wrong here?
> >
> >Regards,
> >Mani
> >
> >
> >_______________________________________________
> >uClinux-dev mailing list
> >uClinux-dev at uclinux.org
> >http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> >This message was resent by uclinux-dev at uclinux.org
> >
>
>
> _____________________________________________________________
> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org




More information about the uClinux-dev mailing list