Using time limited SOF with Arria 10 SoC and U-boot

Any advice on a workflow that includes loading a time limited SOF when running U-boot on the Arria 10 SoC? The prepared U-boot source in the 16.0.0.218 EDS is setup to load an RBF file from a MMC/QSPI/NAND FAT partition and then process the bootloaders fdtb. Ideally, I would like to start U-boot, pause for user to load the SOF via JTAG, and continue with fdtb initialization.

Is there another way? Any advice?

I inserted the following code to U-boot to check if the RBF file is present and then prompt for externally programmed one instead. Seems to work for now.

--- a/uboot-socfpga/arch/arm/cpu/armv7/socfpga_arria10/cff.c
+++ b/uboot-socfpga/arch/arm/cpu/armv7/socfpga_arria10/cff.c
@@ -155,25 +155,35 @@
         }
     }
 
     if (do_init) {
         ret = read_rbf_header_from_fat(dev_part, filename,
             temp, temp_sizebytes);
-        if (ret) {
+        if (ret == -2) {
+            printf("Program FPGA and press any key...\n");
+            /* User expected to program the FPGA independently.
+             * Wait for key press from user and exit normally. */
+            while (!serial_tstc()) {
+                udelay(1000);
+                WATCHDOG_RESET();
+            }
+            return ++num_files;
+        } else if (ret) {
             printf("cff_from_mmc_fat: error reading rbf header\n");
             return ret;
-        }
+        } else {
 
-        WATCHDOG_RESET();
+            WATCHDOG_RESET();
 
-        /* initialize the FPGA Manager */
-        status = fpgamgr_program_init(temp, temp_sizebytes);
-        if (status) {
-            printf("FPGA: Init failed with error ");
-            printf("code %d\n", status);
-            return -1;
+            /* initialize the FPGA Manager */
+            status = fpgamgr_program_init(temp, temp_sizebytes);
+            if (status) {
+                printf("FPGA: Init failed with error ");
+                printf("code %d\n", status);
+                return -1;
+            }
         }
     }
 
     while (len > 0) {
         printf("FPGA: writing %s\n", filename);
         if (to_fpga_from_fat(dev_part, filename, temp,

Are you committing this to the u-boot git? Other users might find this helpful.