temp.vm-help.com
http://www.vm-help.com/forum/

r8169 Driver "Works"
http://www.vm-help.com/forum/viewtopic.php?f=17&t=1525
Page 1 of 8

Author:  guybrush [ Tue Nov 03, 2009 12:47 pm ]
Post subject:  r8169 Driver "Works"

Made a few changes, looks like it works and hasn't thrown any great wobblers yet.

Attached zipfile contains three files:

r8169.c - Modified sourcefile
build-vmkdrivers.sh - Modified buildscript
r8169 - Module

Attachments:
File comment: r8169.c - Modified sourcefile
build-vmkdrivers.sh - Modified buildscript
r8169 - Module

r8169.zip [46.34 KiB]
Downloaded 5817 times

Author:  Dave.Mishchenko [ Tue Nov 03, 2009 3:23 pm ]
Post subject:  Re: r8169 Driver "Works"

Thanks for posting this.

Author:  guybrush [ Tue Nov 03, 2009 3:45 pm ]
Post subject:  Re: r8169 Driver "Works"

I should state a few things about the method I used to compile this module:

I used Debian Lenny (5.0.3) AMD64 with build-essentials and the Open Source tarball available on VMWare's website. The r8169.c is based on the latest version from git.kernel.org. I found the example Sky2 compile invaluble when starting out.

There were a few issues with unresolvable symbols or undefined items (ntohs, skb_pad, PREPARE_DELAYED_WORK, bool, true, false, bitreverse)

As I am not heavy in the land of Linux Kernel and Modules (FreeBSD has spoiled me), I simply duplicated sections from the includes from the tarballs.

At first, I attempted to compile and use the included sourcefiles for the missing methods, but when I attempted to load the module, it complained of colliding symbols with existing modules (Which may be the fault of me using -E with ld in the shell script.)

I made no attempt to modify any files on my ESXi 4 install, nor did I make changes to any of the files distributed with the tarballs, besides reusing portions of them in the r8169.c file.

Author:  stefa.rossi [ Wed Nov 04, 2009 11:23 am ]
Post subject:  Re: r8169 Driver "Works"

Thank you guybrush for your work.

Please, could you write a little guide on how to use this driver? Or, if it's legal, could you send me the .iso of ESXi with this patch already applied?

Thanks :)

Author:  Dave.Mishchenko [ Wed Nov 04, 2009 1:42 pm ]
Post subject:  Re: r8169 Driver "Works"

Take a look at this script viewtopic.php?f=12&t=4 on how to modify the install ISO. You might also consider booting or installing from a USB flash drive if you don't want to edit the ISO. You can also go to the home page and see the article on customizing oem.tgz to incorporate the driver into oem.tgz.

Author:  stefa.rossi [ Wed Nov 04, 2009 1:47 pm ]
Post subject:  Re: r8169 Driver "Works"

Thank you so much, Dave, I'll try the script to install from USB.

Author:  stefa.rossi [ Wed Nov 04, 2009 2:29 pm ]
Post subject:  Re: r8169 Driver "Works"

Sorry but... how to create the oem.tgz file from the files provided from geobrush?

I tried to build it (using Ubuntu), but it gave me this output:
Code:
[b]./build-vmkdrivers.sh[/b]
gcc: vmkdrivers/src26/drivers/net/r8169/r8169.c: Nessun file o directory
gcc: no input files
gcc: vmkdrivers/src26/common/vmklinux_module.c: Nessun file o directory
gcc: no input files
ld: bora/build/scons/build/vmkdriver-r8169.o/release/vmkernel64/SUBDIRS/vmkdrivers/src26/drivers/net/r8169/r8169.o: No such file: No such file or directory
All done


It created the folders bora/build/scons/build/vmkdriver-r8169.o/release/vmkernel64/SUBDIRS/vmkdrivers/src26/drivers/net/r8169, but they're empty.

Any suggestion?

Author:  Dave.Mishchenko [ Wed Nov 04, 2009 2:41 pm ]
Post subject:  Re: r8169 Driver "Works"

You'll just need the module (driver) from the zip. Rename it have .o as the extension and the add it to an oem.tgz file.

Author:  guybrush [ Wed Nov 04, 2009 2:53 pm ]
Post subject:  Re: r8169 Driver "Works"

The method I used to install this was a little less complex than setting up an ISO AFAIK...

I enabled SSH on the ESXi box (by using the <BLINK>UNSUPPORTED</BLINK> mode,) scp'ing over the very handy SSH and FTP oem.tgz (which I stripped the FTP side out), scp'd the module from my build system into /tmp, copied it into /usr/lib/vmware/vmkmod, ran esxcfg-module r8169, ran esxcfg-module -e r8169, and then ran esxcfg-nic -a vmnic32 (which is what it appeared as on my SC440)

To make it persist, I created a directory on the local store with the path /vmfs/volumes/(datastore)/foo/, untarred the SSH_FTP_oem.tgz into foo/, cd'd into foo, mucked about a bit to take out the FTP side, copied the module into usr/lib/vmware/mkmod under foo, ran tar cvzf /bootbank/oem.tgz * and it stuck.

I did have a few problems initially when I rebooted where the vswitch I had it attached to was confused, but bopping into SSH and running esxcfg-vswitch -r (vswitchID) made things work better.

As a note, ESXi4 does give good feedback in /var/log/messages as to what might be wrong with modules (such as missing symbols and whatnot.) There are a few complaints about the driver being unsigned. To test the module, I sshed into the ESXi box, ran vmkload -v16 (module) and if it didn't load succesfully, I looked at the last 100 lines of /var/log/messages.

Note, this method does require a few things like having a supported NIC already installed and a live ESXi4 install. I'm too laz^W^Wnot quite sure how to actually roll a ISO together.

Author:  stefa.rossi [ Wed Nov 04, 2009 2:57 pm ]
Post subject:  Re: r8169 Driver "Works"

But I have no compatible NIC available...

Anyway, I tried to include it in an ISO:
I renamed the file r8169 to r8169.o, then I created the file oem.tgz using
Code:
tar -cvfz oem.tgz r8169.o


But, when I ran the script, it told me:
Code:
No inetd.conf file..  Exiting

What is the inetd.conf file?

Page 1 of 8 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/