We need to use CAN devices with a Coral Dev Board. We have found that the Mendel image available for download does not have the drivers enabled.
We followed the instructions to download the kernel source files here: https://coral.googlesource.com/docs/+/refs/heads/master/GettingStarted.md
We found that the CAN driver source files, Makefiles, and Kconfig files are present in the kernel source, for example source files:
linux-imx/drivers/net/can/usb/gs_usb.c
linux-imx/drivers/net/can/spi/mcp251x.c
linux-imx/include/linux/can/platform/mcp251x.h
And the Makefile for gs_usb.c:
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the Linux Controller Area Network USB drivers.
#
obj-$(CONFIG_CAN_EMS_USB) += ems_usb.o
obj-$(CONFIG_CAN_ESD_USB2) += esd_usb2.o
obj-$(CONFIG_CAN_GS_USB) += gs_usb.o
obj-$(CONFIG_CAN_KVASER_USB) += kvaser_usb.o
obj-$(CONFIG_CAN_PEAK_USB) += peak_usb/
obj-$(CONFIG_CAN_8DEV_USB) += usb_8dev.o
obj-$(CONFIG_CAN_MCBA_USB) += mcba_usb.o
Looking through the Makefiles and Kconfig files, everything seemed to be in order with a possible exception of one line in the file:
linux-imx/drivers/net/Kconfig
We added:
source "drivers/net/can/Kconfig"
We have also tried adding the following enable flags to the defconfig files:
CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
CONFIG_CAN_DEV=y
CONFIG_CAN_AT91=m
CONFIG_CAN_RCAR=m
CONFIG_CAN_XILINXCAN=y
CONFIG_CAN_MCP251X=y
CONFIG_CAN_GS_USB=y
So far without success, the CAN drivers are not being compiled and installed in the image, and are not on the board after we flash it. If anyone has any suggestions, we are all ears.