So I believe the issue is that the prebuilt boot container in Yocto partitions the SoC in such a way that the M4 has control over the CAN subsystem.
Please try the following in Yocto:
- add this line to the bottom of local.conf - IMXBOOT_TARGETS_imx8qmmek_append = " flash"
- rebuild the image with bitbake imx-image-multimedia, or whatever image you were building previously
- once the build completes, you should see "imx-boot-imx8qmmek-sd.bin-flash" in the images directory
Insert the SD card with your Linux image into your host machine, and run the following dd command to reprogram the boot container with this new image:
- sudo dd if=<path to imx-boot-imx8qmmek-sd.bin-flash> of=/dev/sdX bs=1k seek=32 && sync, where sdX is the SD card device as enumerated on your machine
Once the above steps are completed you should be able to boot up into Linux with the default dtb, verify the flexcan module is loaded, and then run ifconfig -a to see the CAN interfaces.