Altera_Forum
Honored Contributor
15 years agoloading custom sections from zImage
As suggested in another thread here, I am using a custom linker script to put some kernel functions into SRAM instead of DRAM to speed things up, like so:
/* Begin SRAM */
. = KERNEL_REGION_BASE + SSRAM_BASE;
.ssram :
{
. = ALIGN(4);
*(.ssram)
} This works nicely when I use nios2-download -g linux.initramfs.gz to load the image. However, if I use zImage instead, it doesn't work -- the extra section gets left out, presumably during uncompression. If I try to program the linux.initramfs.gz into flash using nios2-flash-programmer, it doesn't work, but zImage does. So my big question is, how do I get an image with custom linker sections to boot from flash? Do I need u-boot to do this? Do I need to write my own bootloader instead of using the Altera one? Do I need to fix the boot loader used by zImage to uncompress and copy itself to the beginning of RAM? Where is that?