This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BEAGLEBK: Using VirtualBox for USB RNDIS boot

Part Number: BEAGLEBK

Tool/software: Linux

Hello,

I am testing the am335x processors using a Beaglebone Black.  I am trying to boot using RNDIS and tftp to do an initial dataload.  It would make life easier if this could be managed from a VirtualBox linux machine.

On the beaglebone, I have zeroed out the eMMC so there is nothing on the board.  When the USB mini cable is plugged in, I get a USB RNDIS device on my Linux Host.  I can see DHCP requests over the USB network device.

To move this to Virtualbox, I have used vagrant to configure a virtual machine like this:

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"

  config.vm.box_check_update = false
  config.ssh.forward_agent = true

  config.vm.synced_folder "../../tisdk/build/arago-tmp-external-linaro-toolchain/deploy", "/yocto_deploy"

  config.vm.provider "virtualbox" do |vb|
    vb.memory = '256'
    vb.customize ['modifyvm', :id, '--usb', 'on', '--usbehci', 'on']
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
    vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'Texas Instruments AM335x USB', '--vendorid', '0x0451', '--productid', '0x6141']
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
  end

  config.vm.provision "shell", inline: <<-SHELL
    apt-get update
    apt-get dist-upgrade -y
    apt-get install -y tftpd-hpa tftp isc-dhcp-server
  SHELL
end

But when the Beaglebone Black  is plugged in, the VirtualBox log file says:

00:09:35.220858 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR)}, preserve=false aResultDetail=0

Other USB devices can be inserted into the virtual machine without any issues.  It's just the AM335x processor in USB boot mode that has an issue.

vboxmanage list usbhost

UUID:               8424bdc3-bbf3-4be4-bb8e-7d691bb91b2a
VendorId:           0x0451 (0451)
ProductId:          0x6141 (6141)
Revision:           0.0 (0000)
Port:               2
USB version/speed:  2/Full
Manufacturer:       Texas Instruments
Product:            AM335x USB
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3//device:/dev/vboxusb/001/044
Current State:      Available

Has anyone managed to get USB boot working with an AM335x processor under VirtualBox?

Thanks,
Matt

  • Never had much luck with USB RNDIS boot in VMWare or VirtualBox.

    Linux box steps are here (had to remove Network Manager in Ubuntu): e2e.ti.com/.../1139985

    But wasn't too bad using Uniflash in Win7 (with steps and screenshot) here: e2e.ti.com/.../1165070

  • Part Number: BEAGLEBK

    Tool/software: Linux

    This isn't an actual question, I just wanted to post a follow up to my original question which is now locked:

    Linux/BEAGLEBK: Using VirtualBox for USB RNDIS boot - Processors forum - Processors - TI E2E support...

    e2e.ti.com
    Part Number: BEAGLEBK Tool/software: Linux Hello, I am testing the am335x processors using a Beaglebone Black. I am trying to boot using RNDIS and tftp

    Not being able to use a Virtual Machine is a real problem for me as I run Ubuntu and don't want to mess up my machine configuration with the RNDIS / DHCP configuration.

    Although VirtualBox does not currently support RNDIS devices (at least I couldn't find a solution), I found a work around by bridging network devices into the virtual machine.

    1.  On the Linux Host, setup UDEV to run a script when the Sitara RNDIS device is inserted:

    /etc/udev/rules.d/40-setup_rndis.rules:
    ACTION=="add", SUBSYSTEM=="net", KERNEL=="usb*", RUN+="/usr/local/bin/setup_rndis.sh start '%E{INTERFACE}' %k %n"
    ACTION=="remove", SUBSYSTEM=="net", KERNEL=="usb*", RUN+="/usr/local/bin/setup_rndis.sh stop"

    2.  On the Linux Host, edit /usr/local/bin/setup_rndis.sh

    IF=${INTERFACE}

    cat <<EOF > /etc/NetworkManager/conf.d/$IF.conf
    [keyfile]
    unmanaged-devices=mac:$(ifconfig $IF | head -n 1 | awk '{print $5}')
    EOF

    service network-manager force-reload

    ifconfig ${IF} 0.0.0.0 up
    ifconfig br0 up || brctl addbr br0
    brctl addif br0 ${IF}


    3.  In VirtualBox, make your network interface "Bridged" to br0

    Yes, you are bridging your VBox interface to a bridge.  :)   The USB interface frequently goes up and down, so adding it to a bridge stabilizes the connection between the Host and VM.

    Now, whenever the RNDIS device is inserted, the USB Interface will be added to the br0 bridge.  The virtual machine is bridged to that interface, so it will get all network traffic from the Sitara.  The VirtualMachine can run the DHCP server and TFTP and serve u-boot, zImage, etc to the Sitara.

  • Matt,

    Thanks so much for sharing your solution!