Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel modules fail to insert on qemuriscv32 #268

Open
kraj opened this issue Feb 12, 2021 · 3 comments
Open

kernel modules fail to insert on qemuriscv32 #268

kraj opened this issue Feb 12, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@kraj
Copy link
Collaborator

kraj commented Feb 12, 2021

build a simple image which has some kernel modules also part of image and then it fails to insert the module.
see the below steps.

root@qemuriscv32:~# lsmod
Module                  Size  Used by
root@qemuriscv32:~# modinfo /lib/modules/5.10.12-yocto-standard/kernel/fs/binfmt_misc.ko
filename:       /lib/modules/5.10.12-yocto-standard/kernel/fs/binfmt_misc.ko
license:        GPL
alias:          fs-binfmt_misc
depends:        
intree:         Y
name:           binfmt_misc
vermagic:       5.10.12-yocto-standard SMP preempt mod_unload riscv
root@qemuriscv32:~# modprobe binfmt_misc
modprobe: ERROR: could not insert 'binfmt_misc': Invalid argument
root@qemuriscv32:~# uname -a 
Linux qemuriscv32 5.10.12-yocto-standard #1 SMP PREEMPT Thu Feb 11 20:16:28 UTC 2021 riscv32 riscv32 riscv32 GNU/Linux
root@qemuriscv32:~# zcat /proc/config.gz  | grep MODULE
CONFIG_MODULE_SECTIONS=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_COMPRESS is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
CONFIG_MODULES_TREE_LOOKUP=y
root@qemuriscv32:~# 
@pino-kim
Copy link
Contributor

pino-kim commented Apr 9, 2021

Hi, @kraj long time no see.
Is this issue still alive?

@kraj
Copy link
Collaborator Author

kraj commented Apr 9, 2021

yes it still fails

root@qemuriscv32:~# modprobe nfsd
[  141.976155] nfsd: target 00000000a06c442c can not be addressed by the 32-bit offset from PC = e173c030
modprobe: ERROR: could not insert 'nfsd': Invalid argument


root@qemuriscv32:~# uname -a
Linux qemuriscv32 5.10.25-yocto-standard #1 SMP PREEMPT Fri Apr 9 06:51:13 UTC 2021 riscv32 GNU/Linux

@kraj kraj added the bug Something isn't working label Apr 9, 2021
@pino-kim
Copy link
Contributor

pino-kim commented Aug 10, 2021

Hello @kraj

I think it is already fixed but I follow your command
And It looks fine.
But I can't find binfmt_misc.ko, which Kconfig should I turn on in kernel?

root@qemuriscv32:~# uname -a 
Linux qemuriscv32 5.13.5-yocto-standard #1 SMP PREEMPT Tue Aug 10 14:19:50 UTC 2021 riscv32 riscv32 riscv32 GNU/Linux
root@qemuriscv32:~# modinfo nfsd
filename:       /lib/modules/5.13.5-yocto-standard/kernel/fs/nfsd/nfsd.ko
license:        GPL
author:         Olaf Kirch <[email protected]>
alias:          fs-nfsd
depends:        
intree:         Y
name:           nfsd
vermagic:       5.13.5-yocto-standard SMP preempt mod_unload riscv
parm:           cltrack_prog:Path to the nfsdcltrack upcall program (string)
parm:           cltrack_legacy_disable:Disable legacy recoverydir conversion. Default: false (bool)
parm:           nfs4_disable_idmapping:Turn off server's NFSv4 idmapping when using 'sec=sys' (bool)
parm:           inter_copy_offload_enable:Enable inter server to server copy offload. Default: false (bool)
root@qemuriscv32:~# modprobe nfsd
root@qemuriscv32:~# dmesg | grep tail
root@qemuriscv32:~# lsmod
Module                  Size  Used by
sch_fq_codel           24576  1
nfsd                  499712  1
root@qemuriscv32:~# zcat /proc/config.gz | grep CONFIG_BINFMT_MISC                                       
CONFIG_BINFMT_MISC=m

vishwamartur added a commit to vishwamartur/meta-riscv that referenced this issue Nov 1, 2024
Related to riscv#268

Update kernel configuration and version for qemuriscv32

* Update `KBUILD_DEFCONFIG:qemuriscv32` to use `rv32_defconfig` in `linux-mainline-common.inc`.
* Remove `KERNEL_FEATURES:remove` entries for `features/debug/printk.scc` and `features/kernel-sample/kernel-sample.scc` in `linux-mainline-common.inc`.
* Update `SRC_URI` to include the new kernel version `5.13.5` in `linux-mainline_6.2.bb`.
* Update `LINUX_VERSION` to `5.13.5` in `linux-mainline_6.2.bb`.
* Add `qemuriscv32.conf` with updated `KERNEL_IMAGETYPE` to `Image` and `KERNEL_DEFCONFIG` to `rv32_defconfig`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants