When ESXi boots up it create a RAM disk. It then extracts a number of packages into tha RAM disk to create the file system you see when you login to the console or via SSH. If you run ls -l you'll see some folders are mounted disk partitions, but the rest are gone when you reboot ESXi.
Drivers are placed in /usr/lib/vmware/vmkmod/. When ESXi boots it extracts the packages you see below into the file system. As you can see a lot of the packages are for drivers. The below file is boot.cfg and it is found in /bootbank and /altbootbank.
bootstate=0
kernel=tboot.b00
title=Loading VMware ESXi
kernelopt=no-auto-partition
modules=b.b00 --- useropts.gz --- k.b00 --- chardevs.b00 --- a.b00 --- user.b00 --- s.v00 --- ata_pata.v00 --- ata_pata.v01 --- ata_pata.v02 --- ata_pata.v03 --- ata_pata.v04 --- ata_pata.v05 --- ata_pata.v06 --- ata_pata.v07 --- block_cc.v00 --- ehci_ehc.v00 --- weaselin.t00 --- esx_dvfi.v00 --- xlibs.v00 --- ima_qla4.v00 --- ipmi_ipm.v00 --- ipmi_ipm.v01 --- ipmi_ipm.v02 --- misc_cni.v00 --- misc_dri.v00 --- net_be2n.v00 --- net_bnx2.v00 --- net_bnx2.v01 --- net_cnic.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_forc.v00 --- net_igb.v00 --- net_ixgb.v00 --- net_nx_n.v00 --- net_r816.v00 --- net_r816.v01 --- net_s2io.v00 --- net_sky2.v00 --- net_tg3.v00 --- net_vmxn.v00 --- ohci_usb.v00 --- sata_ahc.v00 --- sata_ata.v00 --- sata_sat.v00 --- sata_sat.v01 --- sata_sat.v02 --- sata_sat.v03 --- sata_sat.v04 --- scsi_aac.v00 --- scsi_adp.v00 --- scsi_aic.v00 --- scsi_bnx.v00 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_lpf.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 --- scsi_mpt.v00 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_qla.v00 --- scsi_qla.v01 --- scsi_rst.v00 --- uhci_usb.v00 --- xorg.v00 --- imgdb.tgz --- state.tgz
build=5.1.0-799733
updated=2
If you just copy a file to usr/lib/vmware/vmkmod it'll be gone when you need boot ESXi. So you need to create a tgz file that you can add to the boot sequence - see the steps here. http://www.vm-help.com/esx40i/customize_oem_tgz.php. Once you've created the file you would place it in bootbank and altbootbank and the edit boot.cfg in both locations to end with
-- xorg.v00 --- imgdb.tgz --- oem.tgz --- state.tgz
If you do a fresh ESXi 5.0 install, follow the above process and then upgrade to 5.1, the 5.0 driver will be used with 5.1. If the driver still works Ok with 5.1 is another question.
Thinking about it you wouldn't even need to create the file. You could just copy the file net_r816.v01 to say net_r816.v02 in both bootbank and altbootbank, then edit boot.cfg in both places to end with
- xorg.v00 --- imgdb.tgz --- net_r816.v02 --- state.tgz