Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHi Scott
Thx for your patience with me Scott!!! <div class='quotetop'>QUOTE </div> --- Quote Start --- 1. Copy the kernel to its run-time address (vma). In which case your boot code must know the correct address.[/b] --- Quote End --- I am copying the kernel code to the VMA. I have pasted in what objdump say about my vmlinux file [SOPC Builder]$ nios2-elf-objdump -h vmlinux vmlinux: file format elf32-littlenios2 Sections: Idx Name Size VMA LMA File off Algn 0 .text 00158108 01000000 01000000 00000074 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 0002fef0 01158110 01158110 0015817c 2**4 CONTENTS, ALLOC, LOAD, DATA 2 .init 0000c390 01188000 01188000 0018806c 2**3 CONTENTS, ALLOC, LOAD, CODE 3 .bss 0000f08c 01194390 01194390 001943fc 2**4 . . . When I use 0x1000000(which is the SDRAM base adr) the loader simply dies. I tried using 0x1100000 as the VMA. Here it starts up the kernel, but when it died a horrible dead when it tries to start up a kernel thread. I copy the binary vmlinux.bin file simply from startadr until there is no more data to copy. <div class='quotetop'>QUOTE </div> --- Quote Start --- 2. Copy the kernel up high in RAM, then let it relocate itself to a lower address.[/b] --- Quote End --- I tried this. THAT WORKED!!! But I cannot do this in my final target board. I copied the data to 0x1200000 and then executed the code. Then the kernel started up(VMA=0x1000000). What am I doing wrong in the other case??? Regards from a bit more optimistic GreateWhite.DK http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif