From time to time a file in the standard shipping image must be changed to enact some bug fix or hardware compatibility on an existing product.  At that time existing production environments may become broken unless that file is also updated in the downstream design's production image.  Technologic Systems makes every effort to ensure this event is rare, and only used as a solution when no other less expensive solutions are possible.  This practice, when used, is considered the least invasive solution available.


These instructions are an example that will use the TS-7300 image to demonstrate how to replace the FPGA file in the downstream developer's shipping .dd image with a new FPGA file.  In practice, replace the 2gbsd* file with the image file to be modified, and replace the ts7300* files and paths with the correct file for the actual item to be updated.


mkdir mount/

sudo fdisk -l 2gbsd-7300-sdhc_11mar2019.dd

# confirm sector size - default 512 bytes

sudo mount -oloop,offest=$((9728*512)) 2gbsd-sdhc_11mar2019.dd mount/

# replace 9728 with the actual sector start of 3rd partition, replace 512 with actual sector size.

# see fdisk -l output from above for actual values.

sudo cp ts7300-fpga-feb2019.rbf mount/boot/ts7300_cyclone2.rbf

sync

md5sum mount/ts7300_cyclone2.rbf

#confirm md5sum above is 06a75821ee7a6ed6d2e831aa9263fdab

sudo umount mount/


If the above commands run without errors, then the dd image is finished and ready to be tested for use in your updated production environment.