Forum Discussion
Altera_Forum
Honored Contributor
21 years agoomr22,
We just encountered the same problem you are seeing with modpost: Building modules, stage 2. MODPOST Signal 11 make[3]: *** [__modpost] Error 139 make[2]: *** [modules] Error 2 After much debugging, we finally tracked it down to the Modules.symvers file (which is generated when the kernel is compiled) has DOS line endings instead of unix. The read_dump() function in modpost.c is not properly parsing the symbols read in from this file which is causing the error you're seeing. If you run dos2unix on Modules.symvers to convert it to a unix text file before building your module it should build without error. When you compile your kernel, if you add the V=1 option to the make command you'll see much more information about the commands which are run. You should see a call to scripts/mod/modpost which has the Modules.symvers file as one of it's inputs. Even though we've apparently gotten the module to build without error; we're still having problems getting the module to load using busybox insmod: # insmod /modules/hello-1.ko insmod: cannot insert `/modules/hello-1.ko': Unknown symbol in module (-1): No such file or directory When I run it on the console I see additional error messages that indicate that the unresolved symbol is 'printk'. Has anyone else encountered this problem? Thanks, Terry