[uClinux-dev] Build error on LPC22XX with CONFIG_PACKET_MMAP=y

Greg Ungerer gerg at snapgear.com
Fri Jan 5 01:56:05 EST 2007


Hi Brandon,

Brandon Fosdick wrote:
> In trying to build something that will run on my LPC2294 board, I 
> enabled CONFIG_PACKET_MMAP in the .config for the 2.6.x kernel. The 
> build failed with an undefined reference to vm_insert_page() in function 
> packet_mmap() (net/packet/af_packet.c:1734).
> 
> vm_insert_page() is in mm/memory.c, but mm/Makefile doesn't include it 
> in the !MMU case. Instead, mm/Makefile uses mm/nommu.c, which doesn't 
> have a vm_insert_page(). So, either nommu.c needs an equivalent for 
> vm_insert_page(), or CONFIG_PACKET_MMAP needs to be made dependent on 
> CONFIG_MMU.
> 
> Interestingly, CONFIG_PACKET_MMAP works fine in the 2.6.11.8 kernel w/o 
> MMU (Hyok's patches), but packet_mmap() calls remap_pfn_range() instead 
> of vm_insert_page(). It appears that vm_insert_page() was added to 
> mm/memory.c in 2.6.15. mm/nommu.c still has remap_pfn_range().

Hmm, ok, that looks like something that we need to fix then for
the non-MMU case. This will effect all non-MMU architectures too.

Regards
Greg



> Here's the build output...
> ---
> <snip>
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      vmlinux
> net/built-in.o: In function `packet_mmap':
> sysctl_net.c:(.text+0x55988): undefined reference to `vm_insert_page'
> make[1]: *** [vmlinux] Error 1
> make[1]: Leaving directory 
> `/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x'
> make: *** [linux] Error 1
> ---
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com


More information about the uClinux-dev mailing list