0

I have seen that when I do lsmod in petalinux , I get "not tainted" message. Is there any alternative for lsmod then ?

  • Is that the only output from lsmod? What do you expect. Not having tainted modules in your kernel is not a bad thing per se. – Anthon Mar 6 '14 at 12:11
  • 1
    cat /proc/modules – Stéphane Chazelas Mar 6 '14 at 12:19
  • cat /proc/modules is empty, why like that – msz Mar 6 '14 at 13:00
  • 1
    You likely don't have any modules loaded would be my guess. – slm Mar 6 '14 at 22:07
1

As most Unix commands, lsmod(8) keeps silent when it has nothing interesting to report. In your case, it means you don't have any modules loaded.

The Linux kernel can configure many parts as modules (to be loaded/unloaded at runtime) or builtin. Most distributions configure as much as possible as modules, there is a tiny performance penalty but a huge win in flexibility. It is certainly possible to tailor a kernel to a particular machine, with no modules. It might make sense to disable module loading completely, as ways of loading foreign code open a security risk.

Why this is so in your particular case, with that distribution, depends on the distribution's policies (I don't know about it) and your exact setup.

1

If the output from lsmod and /proc/modules does not show you anything, then the likely conclusion would be that your distro was potentially built with all the modules compiled into the kernel, and so there aren't any modules to see.

I'd encourage you to take a look at the PetaLinux website that's part of Xilinx's site, there's a FAQ which has the following topic: "How do I add kernel modules to my PetaLinux root file system?". The answer to this FAQ, Answer Record 55997.

That answer shows how to load the prebuilt kernel modules for your particular targeted architecture (Microblaze, ARM, etc.).

0

Both /proc/modules and lsmod command read from same kernel interfaces. The most common reason for tainting is loading a module which declares a license other than GPL. All official kernel modules have a GPL license.

I think the reason why your lsmod output is empty because during kernel compilation time, you didn't compile anything with modules support. You can refer to /boot/config-$(uname -r). I dont think you will get entry like

CONFIG_**=m
  • I see only this: - /boot/config-3.8.11 1/1 100% – msz Mar 7 '14 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.