3

when I built up one vxworks in vmware it works. But when I create more two vxworks seperately with different IP, the second vxworks fails with(log is from vxware.log):

2015-09-02T09:10:45.057+08:00| vcpu-0| W110: VLANCE: RDP OUT to unknown Register 100 
2015-09-02T09:10:45.057+08:00| vcpu-0| I120: VNET: MACVNetPort_SetPADR: Ethernet0: can't set PADR (0) 
2015-09-02T09:10:45.057+08:00| vcpu-0| I120: Msg_Post: Warning 
2015-09-02T09:10:45.057+08:00| vcpu-0| I120: [msg.vnet.padrConflict] MAC address 00:0C:29:5A:23:AF of adapter Ethernet0 is within the reserved address range or is in use by another virtual adapter on your system. Adapter Ethernet0 may not have network connectivity. 

I am sure each vxworks OS got its own MAC address. Another point is that I created the second vxworks through copying the files from the first one.

Brucelan
  • 27
  • 2

2 Answers2

1

Forgive me.
Remove the macro VXWORKS_RUN_ON_VMWARE and any related code in sysLn97xEnd.c.
Everything works perfectly under VMWorkstation 11.
MAC can be set under vm machine's config page.
Maybe those macro is for the far previous version of vmworkstation.


setting mac address in vmware does not work.
you need a function to generate different mac address while system booting.
each copy of the vm machines will need to build a differenet bootrom and a vxworks.
(simplely use -D MACRO in (.wpj)MAKEFILE to switch macs between different projects with a single header.)
here is a dirty solution for setting multi macs in one vm machine:
0.
define the mac addresses and a function to access it in ln97xEnd.c.
\#define LN97_MAX_IP (4) int ln97EndLoaded = 0; char ln97DefineAddr[LN97_MAX_IP][6] = { {0x00, 0x0c, 0x29, 0x5a, 0x23, 0xa0}, {0x00, 0x0c, 0x29, 0x5a, 0x23, 0xa1}, {0x00, 0x0c, 0x29, 0x5a, 0x23, 0xa2}, {0x00, 0x0c, 0x29, 0x5a, 0x23, 0xa3} }; END_OBJ * ln97xEndList[LN97_MAX_IP] = {NULL, NULL, NULL, NULL}; char * ln97xFindDefinedAddr(LN_97X_DRV_CTRL * pDrvCtrl) { int i; for (i = 0; i endObj) { return ln97DefineAddr[i]; } } if (i 1.
Modify ln97xEndLoad() in ln97xEnd.c to init different mac (and store the END_OBJ* if needed).
END_OBJ * ln97xEndLoad ... DRV_LOG (DRV_DEBUG_LOAD, "Done loading ln97x...\n", 1, 2, 3, 4, 5, 6); /** add to save END_OBJ* */ if (ln97EndLoaded endObj; ln97EndLoaded++; } /** end add */ return (&pDrvCtrl->endObj); ... 2.
change sysLan97xEnetAddrGet() in sysLn97xEnd.c.
aprom should not be set by ln97xFindDefinedAddr() instead of "00:0C:29:5A:23:AF".
char * ln97xFindDefinedAddr(LN_97X_DRV_CTRL * pDrvCtrl); ... STATUS sysLan97xEnetAddrGet ... { char * addrDef = NULL; ... /* modify by frankzhou to support in VMware */ \#define VXWORKS_RUN_ON_VMWARE \#ifndef VXWORKS_RUN_ON_VMWARE /* check for ASCII 'W's at APROM bytes 14 and 15 */ if ((aprom [0xe] != 'W') || (aprom [0xf] != 'W')) { logMsg ("sysLn97xEnetAddrGet: W's not stored in aprom\n", 0, 1, 2, 3, 4, 5); return ERROR; } \#endif \#ifdef VXWORKS_RUN_ON_VMWARE /** add by bonex for multi mac addr */ addrDef = ln97xFindDefinedAddr(pDrvCtrl); if (addrDef == NULL) { aprom[0]=0x00; aprom\[1]=0x0c; aprom[2]=0x29; aprom[3]=0x5a; aprom[4]=0x23; aprom[5]=0xaf; } else { bcopy (addrDef, aprom, 6); } /** end by bonex */ \#endif /* end by frankzhou */ ...
3.
rebuild the bootrom, and rebuild the vxworks too.
result:
[telnet to vmware and check arpShow][1] [1]: https://i.stack.imgur.com/kR9Uy.jpg
-2

This is due to the setting of MAC address in sysLn97xEnd.c. This must be modified and rebuid the bootrom and vxworks image for another vxworks node, or it will render the conflict.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Brucelan
  • 27
  • 2