none
CEPC hosted by Virtual Box RRS feed

  • Question

  • The WEC2013 CEPC can be hosted by a Microsoft Virtual PC as described here.

    I have running a different virtualization host at my PC: Virtual box. It hosts the Platform Builder in a Windows 7 (64 bit). Virtual PC is not capable to host a 64 bit guest system. That's why the Virtual box is required.

    The two virtualization solutions (Virtual PC, Virtual Box) can't run at the same time since the use exclusive use of the virtualization support of the host. Therefore it's impossible to use Virtual PC.

    Did anybody found a way to run the CEPC as guest system on Virtual Box? Can you give the configuration parameters that are necessary to run the CEPC in Virtual Box?

    At least there will be a problem with the network adapter. Virtual Box provides only a few emulated adapters:

    • PCnet-PCI II (Am79C979A)
    • PCnet-PCI III (Am79C973)
    • Intel PRO/1000 MT Desktop (82540EM)
    • Intel PRO/1000 T Server (8243GC)
    • Intel PRO/1000 MT Server (8245EM)

    Are there any 3rd party drivers that I could add to the OS design?


    • Edited by Harper23 Tuesday, February 9, 2016 8:45 PM
    Monday, May 4, 2015 8:58 AM

All replies

  • Looks like someone has done it (Needs a VESA Graphics driver): https://forums.virtualbox.org/viewtopic.php?f=2&t=63799

    Tuesday, May 12, 2015 10:46 PM
    Moderator
  • I actually read the forum thread you pointed to.

    Do you see anything that "someone has done it". I can only read "someone has tried and failed at the display driver". There is nothing about network driver or anything about success.

    Maybe I am wrong, but...

    Wednesday, May 20, 2015 3:40 PM
  • The last two posts by Daniel & Martin seem to indicate they were able to get it to work.  Again, it is completely dependent on selecting the right hardware that the virtual host exposes.
    Wednesday, May 20, 2015 4:58 PM
    Moderator
  • Yea, they got something on the display. So they might have solve the display driver quest.

    And reading my question we see there is nothing about display drivers. The thread you mentioned doesn't give me anything about the (emulated) network card / network driver connection.

    Wednesday, May 20, 2015 5:11 PM
  • If you want to know what network cards Virtual Box supports, check out http://www.virtualbox.org/manual/ch06.html. I would think that the Intel cards should all work with a default NE2000 adapter if you can't find an option that is a better fit for your actual PC hardware.
    Wednesday, May 20, 2015 6:33 PM
    Moderator
  • Have you been able to launch CEPC in Virtual Box? Can you update this thread with your findings?

    Monday, June 8, 2015 10:11 PM
    Moderator
  • Yes, I could be able to launch CEPC in Virtual Box....

    The image was WEC2013 with source code updated in December 2015 and I just selected standard drivers, like VESA display driver, ATAPI PCI Support and etc... after, I created a VHD (Virtual Hard Drive) using the powertoy DiskPrep... then I imported that VHD to VirtualBox... well, that import is really easy because when you are creating a new virtual machine in VirtualBox it permits you select an existent VHD.

    In VirtualBox configuration I selected Type: Microsoft Windows and Version: Other Windows (32-bit).

    I hope it can be usefull for somebody

    Mauricio de Sousa Coelho

    Embedded Software Engineer

    Windows CE


    mauricio_scoelho1

    Wednesday, February 3, 2016 10:58 PM
  • Mauricio,

    Thanks for taking the time to post here.

    I unmarked this as answer because it doesn't contain any anwser to my questions in my post. I would appreciate it when you would read my post and recognize the questions. It would be great if you find an answer.

    In the case that my post was too cryptic, here once again:

    What combination of OS Design network driver and Virtual Box network settings allows to run a CEPC in Virtual Box with a working network connetion?

    Thursday, February 4, 2016 8:25 AM
  • Hi Harper23,

    Can you please update the thread with what you have actually tried and how it has failed? Mauricio indicated that his platform worked with just standard drivers.

    Sincerely,

    IoTGirl

    Thursday, February 4, 2016 8:07 PM
    Moderator
  • A quick search finds the driver that you need for the Intel NICs at Intel.

    https://downloadcenter.intel.com/product/1285/Intel-82540EM-Gigabit-Ethernet-Controller

    Search the page for "Windows CE".

    I haven't tried it, I prefer to use real hardware.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Saturday, February 6, 2016 12:27 AM
    Moderator
  • Hi Harper23,

    Can you please update the thread with what you have actually tried and how it has failed? Mauricio indicated that his platform worked with just standard drivers.

    Sincerely,

    IoTGirl

    Okay, I can do. I hope I will provide suffcient information.

    What did I do?

    I created a new CEPC OS design. The design template used is "Headless device". I have verified that the NE2000 settings are in the registry (reginit.ini) and the NE2000 DLLs are in the ce.bib.

    I used DiskPrep to build a VHD file with the options:

    • VHD I create or specify when I click OK
    • Use Fils System Format: FAT32
    • Use the default Windows CE splash
    • Place a BOOT.INI file on the disk
    • Physical Video Mode: Video is Off
    • Use "CEPC" as device name prefix
    • Load specific image file copied from _FLATRELEASEDIR\nk.bin
    • Create a new Virtual Hard Disk (VHD)
    • Size=256MB Static Size

    I have created a new Virtual Box VM with the settings

    • Name: CEPC2
    • Type: Microsoft Windows
    • Version: Microsoft Windows XP (32-bit)
    • 256 MB RAM on the Motherboard
    • Boot Order: Floppy, Optical, Hard Disk
    • Chipsset PIIX3
    • Pointing Device PS/2 Mouse
    • CPUs: 1
    • Execution Cap: 100%
    • Enable VT-x/AMD-V
    • Enable Nested Paging
    • Video Memeory: 20 MB
    • Monitor Count: 1
    • Scale Factor: 100%
    • Storage: Controller: IDE with the VHD connected
    • Type: PIIX4
    • Use Host I/O Cache: yes
    • Enable Audio: yes
    • Host Audio Driver: Windows DirectSound
    • Audio Controller: ICH AC97
    • Enable Network Adapter: yes
    • Attached to: NAT Network
    • Name: Not selected
    • Adapater Type: Intel PRO/1000 MT Desktop (8254OEM)
    • Promiscious Mode: Deny
    • MAC Address: 08002737DA9F
    • Cabel Connected: yes
    • Serial Port enabled: yes
    • Port Number: COM1
    • Port Mode: Host Pipe
    • Connect to existing port/socket: no
    • Path/Address: \\.\pipe\VirtualCEPC
    • Enable USB Controller: yes
    • USB 1.1 (OHCI) Controller
    • Shared Folders: none

    The connection of the COM1 to the pipe allows capturing the debug output:

    Microsoft Windows CE BIOS Bootloader Version 2.2 (Built Apr  7 2009)
    INFO: code=0x4.
    INFO: code=0x4.
    Jumping to image (address=0x227DA0)
    
    Debug Serial Init
    
    SysInit: GDTBase=81040000 IDTBase=81045b80 KData=80ffd800
    Windows CE Kernel for i486
    INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
    InitKitlNIC: Searching for PCI Ethernet NIC (dwIrq = 0, dwIoBase = 0, dwDfltType = 1) ...
    InitKitlNIC: skipping unknown PCI Ethernet NIC: (subclass=0, Vendor=8086, Device=100E)
    InitKitlNIC: Found PCI Ethernet NIC (type = 1, IRQ=10, IOBase=0xF0000000).
    Using a KITL device on the PCI bus, not a legacy device.
    DeviceId................. CEPC
    pArgs->flags............. 0x2D
    pArgs->devLoc.IfcType.... 5
    pArgs->devLoc.LogicalLoc. 0x300
    pArgs->devLoc.PhysicalLoc 0x0
    pArgs->devLoc.Pin........ 10
    pArgs->ip4address........ 0.0.0.0
    pDevice->Name............ CEPC
    pDevice->ifcType......... 5
    pDevice->id.............. 0x100E8086
    pDevice->resource........ 0
    pDevice->type............ 2
    pDevice->pDriver......... 0x80FFF048
    g_kitlLock = 0x81024900
    EDBG:NE2000Init:HWInit failed to read cmd reg
    ERROR: KITL call to pfnInit failed
    
    OEMKitlInit failed - trying again.

    The VirtualBox now shows a Guru Meditation and stops the execution.

    Why do I see the KITL flags with Enable KITL flag set (0x2D)?
    How to control the KITL flags when I don't specify a boot loader in DiskPrep?

    Monday, February 8, 2016 8:42 AM
  • Why don't you start by removing KITL from your OS?  I don't have it in front of me, but something like Project\<Project Name> Properties -> then remove KITL.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Monday, February 8, 2016 2:56 PM
    Moderator
  • Why don't you start by removing KITL from your OS?  I don't have it in front of me, but something like Project\<Project Name> Properties -> then remove KITL.

    Hi Bruce, 

    Thanks for the hint. This  doesn't answer the qestion about the value of the KITL flag, but I was able to change the behavior of the CEPC. There is no Guru Meditation exception anymore. The new debug log looks like this:

    Microsoft Windows CE BIOS Bootloader Version 2.2 (Built Apr  7 2009)
    INFO: code=0x4.
    INFO: code=0x4.
    Jumping to image (address=0x227DA0)
    
    Debug Serial Init
    
    SysInit: GDTBase=80feb000 IDTBase=80ff0b80 KData=80fe9800
    Windows CE Kernel for i486
    INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0xb
     Using ACPI location to determine RAM size
     ACPI Tables found at 0xfff0000
     RAM reported to kernel 255MB
    PID:00400002 TID:00560002 WARNING: COM1: has been reserved exclusively for Debug Messages.
    PID:00400002 TID:00560002 SoftRTC enabled

    So the system starts up further than in the last try. But there is no Ethernet activity. I've monitored the network for frames with the MAC address that is configured in VirtualBox, but nothing happens.

    Do you know a suitable settings for VirtualBox that allows using the Ethernet driver included in the WEC2013 image?

    @IoTGirl,

    You asked me to write what I've done. Do you found sufficient information about further steps I could do?

    Monday, February 8, 2016 5:31 PM
  • The steps Bruce refers to are documented at the bottom of this page: https://msdn.microsoft.com/en-us/library/jj200392(v=winembedded.70).aspx. Specifically, IMGNOKITL=0 or 1. This setting enables or disables KITL as a transport layer for communication between the development computer and the device for debugging.  If it is enabled and you are not deploying from Platform Builder the device will just wait forever for KITL and that is likely what is happening in your case.

    Monday, February 8, 2016 5:34 PM
    Moderator
  • Hi IoTGirl,

    Thanks for pointing out this. I changed already this settings, as I wrote in the last post. You can see there that KITL is not started anymore because it's not included. The question about the KITL flags passed in the BOOTARGS

    Why do I see the KITL flags with Enable KITL flag set (0x2D)?

    is not important anymore, although not answered by  https://msdn.microsoft.com/en-us/library/jj200392(v=winembedded.70).aspx.

    You asked me to write what I've done. Do you found sufficient information about further steps I could do?

    Monday, February 8, 2016 6:02 PM
  • Hi Harper23,

    Have you tried the VHD that comes with CEPC? Basically the boot floppy VHD? Can you upload your image through that? I think you will find HD0_Sample.VHD under WinCE800\platform\CEPC\vm. Enable Kitl and then see if you can upload the image that way. 

    Sincerely,

    IoTGirl

    Monday, February 8, 2016 9:04 PM
    Moderator
  • Hi Harper23,

    Have you tried the VHD that comes with CEPC? Basically the boot floppy VHD? Can you upload your image through that? I think you will find HD0_Sample.VHD under WinCE800\platform\CEPC\vm.

    I have setup a VM with the HD0_Sample.VHD.

    I have tried that VirtualBox VM with the following Network settings:

    • NAT Network, Intel PRO/1000 MT Desktop (82540OEM), Promiscuous=Deny, MAC 08002737DA9F, Cable Connected
    • NAT, Intel PRO/1000 MT Desktop (82540OEM), MAC 08002737DA9F, Cable Connected
    • Bridged, Name=Realtek PCIe GBE Family Controller, Intel PRO/1000 MT Desktop (82540OEM), MAC 08002737DA9F, Cable Connected
    • Bridged, Name=Intel(R) Gigabit CT Desktop Adapter, Intel PRO/1000 MT Desktop (82540OEM), MAC 08002737DA9F, Cable Connected
    • Internal Network, Name=intnet, Intel PRO/1000 MT Desktop (82540OEM), MAC 08002737DA9F, Cable Connected
    • Host-only Adapter, VirtualBox Host-Only Ethernet Adapter
    • Generic Driver, Intel PRO/1000 MT Desktop (82540OEM), MAC 08002737DA9F, Cable Connected

    The behavior is almost the same with all configurations. The debug output is always:

    Microsoft Windows CE BIOS Bootloader Version 2.2 (Built Apr  7 2009)
    INFO: code=0x4.
    INFO: code=0x4.
    ERROR: code=0xB.
    INFO: code=0x37.
    WARNING: code=0x7.
    ERROR: code=0x8.

    I get never a frame from the EBOOT MAC. But when I use the Host-Only Adapter, the PC sends NBNS Packets. I assume this is a result that the VirtualBox Host-Only Ethernet Adapter detects a cable connected condition and sends the packets as a result.

    There is never a KITL packet on the wire.

    Enable Kitl and then see if you can upload the image that way. 

    How do you enable KITL? Of course you noticed that I asked

    Why do I see the KITL flags with Enable KITL flag set (0x2D)?

    since I don't know how to set the KITL flags in the boot loader. Are there any settings in the DiskPrep tool? Is there any setting I missed in VirtualBox to enable KITL?


    Probably the use case is not as clear as possible in the original question (that I can't edit anymore). That's why I write it here:

    I don't want to connect the Platform Builder with anything running in the VirtualBox. All I need is a WEC2013 CEPC that is running in a VirtualBox. It must be connected to the IP network. It is desired to make a CoreCon connection to the CEPC to allow to connect a VS2013 to the CEPC.


    • Edited by Harper23 Tuesday, February 9, 2016 5:23 PM
    Tuesday, February 9, 2016 10:13 AM
  • Hi Harper,

    My experience is with Virtual PC & Hyper V but my thought was if you can get an image booting using the HD0_Sample connected over KITL you could debug it until you get the right components.

    Note that the vCEPC BSP NDIS driver configuration is under Wince800\platform\CEPC\src\drivers\VirtualPC\ndis_dc21x4.  Look at the reg file in this folder for the specific settings for the vCEPC NIC.

    My suspicion is that the "Virtual NIC" you chose is either not compatible with the Virtual PC NIC in the platform or not at the memory address and interrupt it expects. I think this is a great test because I wouldn't expect the OS image to work if HD0_Sample won't load.

    Sincerely,

    IoTGirl

    Tuesday, February 9, 2016 7:44 PM
    Moderator
  • Virtual PC is not the topic of the question. You can find in the initial question why Virtual PC is not an option.

    Tuesday, February 9, 2016 8:50 PM
  • Yes, I could be able to launch CEPC in Virtual Box....

    It would be great if you would share the experience and disclose the step necessary to get a running CEPC in VirtualBox.

    Tuesday, February 9, 2016 8:52 PM
  • Hi Harper,

    You could try Scott's solution for dual boot... http://www.hanselman.com/blog/SwitchEasilyBetweenVirtualBoxAndHyperVWithABCDEditBootEntryInWindows81.aspx

    Sincerely,

    IoTGirl


    Tuesday, February 9, 2016 9:01 PM
    Moderator
  • There is no need to reboot the PC to switch between VirtualBox and Virtual PC. You just don't have to run it at the same time. So, using Hyper-V would make it just more difficult as the blog in your link shows. 

    Since I want to use the Platform Builder VirtualBox VM I am still searching for a way to run CEPC in VirtualBox. Mauricio claimed that he find a way. But unfortunately I couldn't encourage him to share his experience.

    Wednesday, February 10, 2016 3:11 AM