Hi @Azkaaa , Here is a workaround for launching M4 on BSP7. As suggested by NXP community, M4 firmware will be loaded from SCFW instead of U-boot.
Disable kernel_comp_addr_r checking in u-boot/cmd/booti.c and rebuild U-Boot.
if (dest < gd->ram_base || dest > gd->ram_top) {
puts("kernel_comp_addr_r is outside of DRAM range!\n");
//return -EINVAL;
}
To load M4 firmware from SCFW, you have to custom the boot container according to the guide from this page. The built u-boot.bin is copied to imx-mkimage/iMX8QM. M4 firmware is copied to the same destination. Rename firmware file name to m4_image.bin for M4_1 and m4_1_image.bin for M4_1.
Assemble the boot container using the following command. It is make SOC=iMX8QM flash_b0 by default which doesn’t include M4 firmware in boot container.
make SOC=iMX8QM flash_regression_linux_m4
The boot container file iMX8QM/flash.bin can be renamed to imx-boot and replace the one from BSP 7 image. Toradex Easy Installer will update the image including the boot container. You can also update the boot container from U-Boot. So that you don’t have to reinstall the entire image.
A tftp server is required to update boot container file from U-Boot. Copy iMX8QM/flash.bin to the tftp directory.
Set tftp server and Apalis iMX8 IPs in U-Boot.
Apalis iMX8 # setenv ipaddr 192.168.3.181
Apalis iMX8 # setenv serverip 192.168.3.196
Apalis iMX8 # tftpboot $loadaddr flash.bin
Using ethernet@5b040000 device
TFTP from server 192.168.3.196; our IP address is 192.168.3.181
Filename 'flash.bin'.
Load address: 0x95400000
Loading: ################################################## 1.2 MiB
3.4 MiB/s
done
Bytes transferred = 1238016 (12e400 hex)
Apalis iMX8 # mmc dev 0 1
Apalis iMX8 # mmc write $loadaddr 0 0x973
Here 0x973 is calculated from (1238016+511)/512 and rounds the number up to the nearest integer. This number is the amount of blocks needs to be written for flash.bin.
This is a patch for imx8qm-apalis-v1.1-ixora-v1.2.dts.
rpmsg_bsp7.patch (4.1 KB)
Apalis iMX8 # setenv fdtfile imx8qm-apalis-v1.1-ixora-v1.2.dtb
Apalis iMX8 # saveenv