Little bit out off topic
I have an existing kernel module that I want to patch. It concerns the pcm1794a codec (max sample rate from 192kHz to 384kHz).
Rebuilding the kernel with all modules, including the patched one, works fine and if I install the alternative kernel it also works great.
I would really like to only install this patched module (don't mind if the entire kernel and all modules are build also) to the current kernel tree, but that gives the following result:
I have no clue of about how to fix this.
Any help would be greatly appreciated.
The followed build steps are used:
output from modinfo and file:
orginal:
after build:
I have an existing kernel module that I want to patch. It concerns the pcm1794a codec (max sample rate from 192kHz to 384kHz).
Rebuilding the kernel with all modules, including the patched one, works fine and if I install the alternative kernel it also works great.
I would really like to only install this patched module (don't mind if the entire kernel and all modules are build also) to the current kernel tree, but that gives the following result:
Code:
$ sudo modprobe snd-soc-pcm1794a
modprobe: ERROR: could not insert 'snd_soc_pcm1794a': Exec format error
$dmesg
[ 261.823205] snd_soc_pcm1794a: disagrees about version of symbol module_layout
I have no clue of about how to fix this.
Any help would be greatly appreciated.
The followed build steps are used:
Code:
sudo apt install git bc bison flex libssl-dev make
sudo wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source
/usr/local/bin/rpi-source -q --tag-update
cd linux
KERNEL=kernel7l
make bcm2711_defconfig
make -j4 SUBDIRS=sound/soc/codecs modules
sudo mv /lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs/snd-soc-pcm1794a.ko /lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs/snd-soc-pcm1794a.ko.org
sudo cp ~/distr/lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs/snd-soc-pcm1794a.ko /lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs
sudo depmod
output from modinfo and file:
orginal:
Code:
$ modinfo snd-soc-pcm1794a
filename: /lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs/snd-soc-pcm1794a.ko
license: GPL v2
author: Florian Meier <florian.meier@koalo.de>
description: ASoC PCM1794A codec driver
srcversion: EFA9CD3DD0D6BA9E5094846
alias: of:N*T*Cti,pcm1794aC*
alias: of:N*T*Cti,pcm1794a
depends: snd-soc-core
intree: Y
name: snd_soc_pcm1794a
vermagic: 5.4.61-v7l+ SMP mod_unload modversions ARMv7 p2v8
Code:
$ file snd-soc-pcm1794a.ko
/home/pi/snd-soc-pcm1794a.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=8c3f58317069cac3e4019bf5aa37b06cbac18cf2, not stripped
after build:
Code:
$ modinfo snd-soc-pcm1794a.ko
filename: /home/pi/distr/lib/modules/5.4.61-v7l+/kernel/sound/soc/codecs/snd-soc-pcm1794a.ko
license: GPL v2
author: Florian Meier <florian.meier@koalo.de>
description: ASoC PCM1794A codec driver
srcversion: EFA9CD3DD0D6BA9E5094846
alias: of:N*T*Cti,pcm1794aC*
alias: of:N*T*Cti,pcm1794a
depends: snd-soc-core
intree: Y
name: snd_soc_pcm1794a
vermagic: 5.4.61-v7l+ SMP mod_unload modversions ARMv7 p2v8
Code:
$ file snd-soc-pcm1794a.ko
snd-soc-pcm1794a.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=ead94a9e462ec72d7687e838bb2abd7fab3c62f4, not stripped