From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rogan Dawes Date: Fri, 22 Apr 2011 14:45:16 +0200 Subject: [U-Boot] How does u-boot know where to put its start code? In-Reply-To: <4DAEB2AC.6000204@dawes.za.net> References: <4DADFAF3.8090301@dawes.za.net> <4DAE722F.3090804@aribaud.net> <4DAE8F6D.8040807@dawes.za.net> <4DAE9971.5040204@aribaud.net> <4DAEB2AC.6000204@dawes.za.net> Message-ID: <4DB1785C.4070509@dawes.za.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2011/04/20 12:17 PM, Rogan Dawes wrote: > Now if I can just figure out how to write to my flash using OpenOCD, I > can hopefully recover. > > Regards, > > Rogan Phew! Thanks to Albert's sloflash utility, I was finally able to get something back into my flash, and get the board booting again. What a relief! :-D Now I need to solve the problem of placing the _start code at the address of the reset vector, since I have 3 64kB sectors to play with, but one of them is 99% empty, other than the reset vector code which just jumps to _start. And of course, a mainline u-boot will not fit into just 128kB. Any thoughts on how to link u-boot to place _start or any other routine that can jump to _start at 0xffff0000? I had this suggestion on IRC: . = .; __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } __u_boot_cmd_end = .; . = _start + 0x70000; .reset_vector_sect : { arch/arm/cpu/arm926ejs/start.o (.reset_vector_sect) *(.reset_vector_sect) } #include #include #include #include .section ".reset_vector_sect",#alloc, #execinstr _reset_vector: b _start Although I'm not sure how to interpret it :-) Regards, Rogan