协处理器M4的固件有两种方式来加载和运行:



U-Boot加载运行固件

Board $> ext4load mmc 0:4 ${kernel_addr_r} rproc-m4-fw.elf -> SDCARD is mmc 0, bootfs is ext4 partition number 4)
Board $> rproc init                                        -> initializes all coprocessors
Board $> rproc load 0 ${kernel_addr_r} ${filesize}         -> loads firmware for coprocessor 0 (code part found in .elf)
Board $> rproc load_rsc 0 ${kernel_addr_r} ${filesize}     -> loads resource table for coprocessor 0 (found in .elf)
Board $> rproc start 0                                     -> starts coprocessor 0



Linux kernel加载运行固件

Board $> echo -n <firmware_name.elf> > /sys/class/remoteproc/remoteprocX/firmware
Board $> echo start >/sys/class/remoteproc/remoteprocX/state