Closed yslys closed 2 years ago
The solution is as follows:
kernel_source/arch/arm/configs/--defconfig
, it just means the file with defconfig
as suffix. So you could simply modify the file kernel_source/arch/riscv/configs/defconfig
to set CONFIG_YOUR_DRIVER=y
.-kernel
option to QEMU, then run QEMU.mknod
as what you would normally do after insmod
when dealing with out-of-tree kernel modules.
Hi, I would like to make some changes to the Linux kernel, recompile it, and pass it in with
-kernel
option toqemu-system-riscv64
.I did the above without changing the disk image, in which it contains the Linux kernel version 5.10.25-yocto-standard.
I booted up the VM and checked the kernel version with
uname -r
, which showed5.16.15
, as expected.In order to compile the kernel module I designed myself, I executed the following command line:
But it did not work, so I changed a bit to the following:
It worked, but when I was trying to load the kernel module, it showed the following:
May I know how to solve it without changing to the same version of Linux kernel (5.10.25-yocto-standard)?
If the only solution is to change to 5.10.25-yocto-standard, may I know where I could download the source of Linux 5.10.25-yocto-standard?
Is there another way of generating the disk image which allows me to put the kernel I specified (for instance, v5.16.15) into it?
Note: I noticed that there is a disk image tar file in
build/tmp-glibc/deploy/images directory
with namedemo-coreip-cli-qemuriscv64-20220101074232.rootfs.tar.bz2
.Thanks in advance!