From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Sun, 6 Sep 2015 19:28:08 +0800 Subject: [U-Boot] [PATCH v2 4/8] nios2: enlarge the code relocation range In-Reply-To: <201509051450.47060.marex@denx.de> References: <1441336526-23505-1-git-send-email-thomas@wytron.com.tw> <201509041559.43604.marex@denx.de> <55EA50A1.8020108@wytron.com.tw> <201509051450.47060.marex@denx.de> Message-ID: <55EC2348.7040409@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de HI Marek, On 09/05/2015 08:50 PM, Marek Vasut wrote: >> We didn't include relocation records in nios2 binary image, so there is >> no real relocation like that of ARM. > > Can we add them instead ? I think it is possible. I recalled that we have an old flat image format with elf2flt to run nonmmu uclinux, which does a similar relocation. But I would suggest that we should keep thing simple and small in a boot loader like U-Boot. > >> Altera provides small boot loaders for cfi/sf along with their nios2 >> jtag flash programmer, which will load the image to the linked address >> in sdram. The relocating loop in start.S works only if such Altera boot >> loader is not used, ie, booting directly from cfi flash. > > Hm, Im not using the Altera loader :) > Neither am I. Look like we all use custom boot copiers, and we don't need the relocation in the patch above. It doesn't make sense to copy the code twice. Right? :) Best regards Thomas Chou