On 7/5/07, Adrian Bunk <[EMAIL PROTECTED]> wrote:

On Thu, Jul 05, 2007 at 01:56:39PM -0400, Keppler Alecrim wrote:
> Hi all,
>  I'm testing low memory watermark(available in linux-omap kernel tree)
with
> OLPC, but I'm with some problem to compile the feature as a module.
Error
> below.
>
> [EMAIL PROTECTED] ~/kernel/tree/linux-linus-2.6 $ make modules
>  CHK     include/linux/version.h
>  CHK     include/linux/utsrelease.h
>  CALL    scripts/checksyscalls.sh
>  Building modules, stage 2.
>  MODPOST 3 modules
> ERROR: "nr_swap_pages" [security/lowmem.ko] undefined!
> ERROR: "vm_acct_memory" [security/lowmem.ko] undefined!
> ERROR: "hugetlb_total_pages" [security/lowmem.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>...
> Where:
> "nr_swap_pages"  defined in #include <linux/swap.h>
> "hugetlb_total_pages" defined in #include <linux/hugetlb.h>
> "vm_acct_memory" defined in #include <linux/mman.h>
>
> What did I forget? Can anyone help me?
>...

Symbols must be exported explicitely to modules.

What you need are
  EXPORT_SYMBOL_GPL(nr_swap_pages);
  EXPORT_SYMBOL_GPL(hugetlb_total_pages);
  EXPORT_SYMBOL_GPL(vm_acct_memory);
in some file that gets built statically (non-modular) into your kernel.


Thanks!!! It's working!!!

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed




--
--
Francisco Keppler Silva Alecrim
INdT - OSMRC http://franciscoalecrim.blogspot.com/

Reply via email to