When I patch the Altera boot loader as follows, placing the modified code in on chip ram, and change the nios2 to boot from this on chip ram then it boots off of the EPCQ256 jit image configured with the hdw followed by software.
Index: boot/boot_loader_epcs_bits_sii_siii_ciii.S
===================================================================
--- boot/boot_loader_epcs_bits_sii_siii_ciii.S (revision 359)
+++ boot/boot_loader_epcs_bits_sii_siii_ciii.S (working copy)
@@ -525,7 +525,7 @@
//
// Search until we expect configuration data to start
- movi r_findp_count, 32
+ movi r_findp_count, 31
// What we'll accept until we see the pattern
movi r_findp_temp, 0xFF
@@ -549,15 +549,15 @@
//
// The configuration bitstream length is encoded in a particular bit of a
// run of bytes. Total length field is 32 bits, which goes from CB Option
- // bits 86..55 corresponding to bit[3] of byte[39] to byte[33] (for the most
+ // bits 86..55 corresponding to bit[3] of byte[38] to byte[32] (for the most
// significant 7 bits) followed by the range of bits made up of bit[2] of
- // bytes[72..48].
+ // bytes[71..47].
//
// The note about EPCS bit reversal still applies (so we're really looking
// at bits[4] and [5], respectively.
//
- // First, loop through bits in bytes [48..72] - LSB of the length first
+ // First, loop through bits in bytes [47..71] - LSB of the length first
// Number of bytes we'll traverse to get the length
movi r_findp_count, 25
@@ -565,7 +565,7 @@
movi r_findp_temp, 0
// Close & re-open EPCS where we will start extracting the length
- movi r_flash_ptr, 48
+ movi r_flash_ptr, 47
nextpc return_address_less_4
br sub_epcs_close
nextpc return_address_less_4
@@ -596,13 +596,13 @@
bne r_findp_count, r_zero, fp_assemble_configuration_length
// We've assembled 25 bits of the length; 7 to go.
- // We're gonna look at bit[3] of byte[33..39].
+ // We're gonna look at bit[3] of byte[32..38].
// Number of bytes we'll traverse to get the length
movi r_findp_count, 7
- // Close & re-open EPCS at byte 33
- movi r_flash_ptr, 33
+ // Close & re-open EPCS at byte 32
+ movi r_flash_ptr, 32
nextpc return_address_less_4
br sub_epcs_close
nextpc return_address_less_4