Hi Jeff, jeffrey.fuller@xxxxxxxxx wrote:
An update on this problem. I tried running with v0.30 of the Petalinux distro uclinux (non-MMU microblaze) and got the same problem. I also modified the rng-core.ko module (random number driver) included in the Petalinux Microblaze with MMU v0.10 to include some printks, then used make "menuconfig" to turn the build of the module on. I then loaded the resulting module using insmod. The output of the printks was incorrect.So, what I am seeing so far is that I am unable to get reliable output from loadable modules running on Microblaze. This includes modules that I didn't write and that I didn't compile (i.e. makefiles for the rng-core.ko module were part of the distro). Has anyone else actually seen valid printk or /proc output from a loadable module running on Microblaze? My next step might be to compile my driver into the kernel and see if printks work then.
Here's what I get on a board here (noMMU) running petalinux-v0.30-rc1 (with a few additions, but nothing that should relate to modules).
# insmod ./modtest.ko Using ./modtest.ko modtest: module license 'unspecified' taints kernel. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 a b c d e f g h i j k l m n o p q r s t All looks fine. Here are my busybox insmod configs: CONFIG_USER_BUSYBOX_INSMOD=y CONFIG_USER_BUSYBOX_LSMOD=y CONFIG_USER_BUSYBOX_MODPROBE=y CONFIG_USER_BUSYBOX_RMMOD=y # CONFIG_USER_BUSYBOX_2_2_MODULES is not set CONFIG_USER_BUSYBOX_2_4_MODULES=y CONFIG_USER_BUSYBOX_2_6_MODULES=y # CONFIG_USER_BUSYBOX_INSMOD_VERSION_CHECKING is not set CONFIG_USER_BUSYBOX_CHECK_TAINTED_MODULE=y # CONFIG_USER_BUSYBOX_INSMOD_LOADINKMEM is not set CONFIG_USER_BUSYBOX_INSMOD_KSYMOOPS_SYMBOLS=y # CONFIG_USER_BUSYBOX_INSMOD_LOAD_MAP is not setI've attached the module binary I built and loaded - maybe you can give it a try on your board (noMMU). CPU settings are
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 CONFIG_XILINX_MICROBLAZE0_USE_FPU=0yours will need to match or it will not work - I can rebuild with a subset if you like.
I'll test it on an MMU boot when I get the chance - Michal maybe you can give it a try if you have one handy?
Regards, John
Attachment:
modtest.ko
Description: Binary data