[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Problem with packet_mmap



Hi Tom,

Sounds like something's a bit screwy in your kernel config. You shouldn't have to jump through these kind of hoops, DHCP and friends all are enabled and work in the various reference designs in PetaLinux.

I suggest you take a look at the relevant bits of the config.linux-2.6.x files in petalinux-dist/vendors/*/* - make sure you are correctly setting up the kernel networking subsystem.

Cheers,

John

Curran, Tom wrote:
Further examination of my issue with dhcpcd not working led me to
enabling "Packet socket" and "Packet socket:  mmapped IO" in the kernel
config networking options.  Enabling "Packet socket:  mmapped IO" leads
to a kernel build failure:

undefined reference to vm_insert_page() in function 'packet_mmap'

Console snippet of error message:
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      net/packet/af_packet.o
  LD      net/packet/built-in.o
  LD      net/built-in.o
  GEN     .version
  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':
net/built-in.o(.text+0x6b30c): undefined reference to `vm_insert_page'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/mnt/devtools/PetaLinux/software/linux-
2.6.x-petalogix'
make: *** [linux] Error 1
Xil_92:[root@localhost petalinux-dist]#

I found an old post from uclinux-dev
(http://readlist.com/lists/uclinux.org/uclinux-dev/0/4303.html) that
indicates this issue affects mmu-less architectures:

<snip>

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.

<snip>

That would obviously include my current Microblaze project with
PetaLinux.  Does anyone have any insights for a fix?  A patch?

BTW, interestingly enough, enabling "Packet socket" did not fix the boot
error message I get from dhcpcd (dhcpcd[41]: dhcpStart: socket: Address
family not supported by protocol).

Best Regards,
Tom

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/