I have a Raspbian image (4.9.59-v7) into which I am loading a kernel module that I have built myself since it is not in the default image (for an ICS43432 MEMS I2S microphone).
I have this working without issue on a Raspberry Pi B+; my module
snd_soc_ics43432 is listed as present after boot by
lsmod and I know it runs correctly 'cos I can record stuff. I've also modified the
rootfs partitions on this SD card to run read-only in preparation for using it in an environment where I have little control over the power supply. Hence the disk image is a fixed thing.
I have now plugged the same SD card into a Pi Zero W and it works there EXCEPT that it is unable to load the ICS43432 module. During boot it says:
systemd-modules-load: Failed to find module 'snd-soc-ics43432'
...and if I use
insmod to manually insert the module I get:
ERROR: could not insert module sound/soc/codecs/snd-soc-ics43432.ko: Invalid module format
sudo modinfo on this module file returns:
vermagic: 4.9.59-v7+ SMP mod_unload modversions ARMv7 p2v8
...which looks correct to me, and indeed it has to be since the goldarned SD card is read-only.
So what gives? Is there a difference between the Broadcom chips on the Pi Zero W versus the Pi B+ that would cause this? Or is it some sort of timing race condition? Any help/advice is appreciated.