I'm setting up an embedded system that is built using the Yocto project. This outputs a root file system, kernel, u-boot, etc. I have an installer script that I run from an SD card that configures the eMMC on the board with partitions, copies in the rootfs, uboot, etc. It produces a bootable system when I boot from eMMC.

The problem I'm having is with the ethernet driver. Is isn't installed on the system by default. The installation script copies it to /lib/modules/4.14.98-imx8mq+gea48c83/kernel/drivers/net/ethernet/freescale/fec.ko and I can log in over serial and manually load it with insmod, and that works fine. But I'm not sure how to get it to load automatically.

Systemd looks in /etc/modules-load.d/ for lists of modules to load, but this process seems to use modprobe and not insmod. The modprobe system doesn't really know about the ethernet driver because I haven't run depmod on it. But I can't run depmod from the installer because it would install it on my SD card installation, not on the eMMC.

What is my best approach here? Do I need to find some way to run depmod during the installation? Maybe it could be done with chroot?

Or is there a good way to get my module to load automatically without using the depmod/modprobe system?

Any insight here would be very appreciated.

  • 1
    At least my depmod has a -b option which avoids the need to use chroot.
    – icarus
    Commented Feb 24, 2020 at 15:21
  • So I would just do -b and point to the mounted /lib/modules/4.14.98-imx8mq+gea48c83 on the eMMC?
    – Dave
    Commented Feb 24, 2020 at 15:30

1 Answer 1


User icarus was correct in their comment to my post.

I am issuing the following command from my installation script and that seems to be working:

depmod -b /mnt/root1 -a 4.14.98-imx8mq+gea48c83

The last argument is because the kernel version on the SD card system I'm booting from is different than the system I am modifying.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .