Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I

Rebooting uClinux with custom bootloader

Hi guys, 



I'm here again to ask your precious help. I have a project in which I have a SoPC with a Nios2 processor, some peripherals, an on-chip RAM and a SDRAM. Within the on-chip RAM there is a custom bootloader whose role is to load a zImage from a SPI Flash and to place it into the SDRAM. 



When I turn on my board the system works properly, the bootloader copies the zImage into the SDRAM and then jumps to the first istruction to execute. But If I try to reboot the board by jumping on the reset vector contained in the on-chip RAM it stops while trying to uncompress the kernel. I don't have the same error message each time, I remember "Uncompressed format error" and "crc error", in both cases system is stopped. 



I have noticed that once the board is turned on, if I download the bootloader via JTAG the first time, the system can be always rebooted without any problems (obviously I'm not downloading bootloader each time via JTAG to make it working but just the first time). 



Any idea on how to solve this problem? 



Thanks in advance 





0 Kudos
1 Reply
Honored Contributor I

Hi all, 


I solved this problem a few time ago, I'm sorry for the delay. It was simply a problem related to the link address offset value, previously it was 0x00A00000 and it worked well until the zImage has increased its dimension. With a zImage of about 3.5 MB I had to set this value to 0x00C00000 and this solved the problem. 


I hope this can help