ReadyNASOS 6.9.X的内核模块

时间:2019-03-05 18:48:41

标签: linux-kernel kernel-module

我正在尝试构建pptp(ppp)模块,但我陷入困境,并出现错误“ slhc:不同意符号module_layout的版本”

我已经为此进行了大约1周的战斗,因此我认为现在已经过去了看看是否有人可以提供帮助。另外,在您说出来之前,是的,我已经用谷歌搜索了,但是所有答案要么过时,要么根本无法解决问题。我正在运行ReadyNAS 312。

这就是我已经完成的“应该”工作...

cd ~/src
wget https://www.downloads.netgear.com/files/GPL/ReadyNASOS_V6.9.5_WW_src.zip
mkdir ReadyNAS
cd ReadyNAS
7z x ../ReadyNASOS_V6.9.5_WW_src.zip
cd linux-4.4.157-x86_64
make readynas_defconfig
make menuconfig
#Nav to
# Device Drivers-->Network device support
# expand with an M "PPP (point-to-point protocol) support"
# Mark wtih an M:
# PPP MPPE compression (encryption)
# PPP support for async serial ports
# Mark with a * (space bar)
# PPP filtering

make prepare
make modules_prepare

#Since there is no 'Module.symvers'
make
make modules

sudo mkdir /lib/modules/$(uname -r)/kernel
sudo mkdir /lib/modules/$(uname -r)/kernel/lib
sudo mkdir /lib/modules/$(uname -r)/kernel/drivers
sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/net
sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/net/ppp
sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/net/slip
sudo cp drivers/net/ppp/*.ko /lib/modules/$(uname -r)/kernel/drivers/net/ppp/
sudo cp drivers/net/slip/*.ko /lib/modules/$(uname -r)/kernel/drivers/net/slip/
sudo cp lib/crc-ccitt.ko /lib/modules/$(uname -r)/kernel/lib

sudo depmod -a

sudo modprobe ppp_generic
#>modprobe: ERROR: could not insert 'ppp_generic': Exec format error
tail -n 1 /var/log/syslog
#>Mar  5 09:52:04 nas kernel: [443480.790854] slhc: disagrees about version of symbol module_layout

1 个答案:

答案 0 :(得分:0)

事实证明,我需要执行以下操作,而不是“ make readynas_defconfig”

sudo apt update
sudo apt install linux-image-extra
sudo depmod -a
sudo modprobe configs
zcat /proc/config.gz > .config