The issue you're going to run into, regardless of how you do this is that you'll always have to program the SOF and the software at one time. This is because the software follows directly after the hardware.....not on a sector boundary.
In any case, you should be able to use the following steps:
1. sof2flash your SOF file.
2. elf2flash your ELF file.
3. Use the nios2-flash-programmer to program the two files, hardware then software.
Alternately, you could use the Quartus Programmer, but I don't exactly remember the flow. Something like this:
1. Add your SOF to your JIC file.
2. Convert your software to hex. (I think objcopy will do.)
3. Store the hex file at the correct offset.
- This will be the tricky part. You've got to place it right after the hardware image.
Best of luck,
- slacker