Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The BeagleBone Black cannot be put in USB Flasing mode: Input/Output Error #25

Open
Sarcasm opened this issue May 22, 2016 · 10 comments
Open

Comments

@Sarcasm
Copy link

Sarcasm commented May 22, 2016

Hello,

I'm trying to use BBBlfs to flash my Beaglebone Black but I am not able to do it.

The issue I have seems similar to what was reported on IRC here: http://logs.nslu2-linux.org/livelogs/beagle/beagle.20150711.txt

My host system is ArchLinux.

My hardware setup:

  • USB cable
  • serial port
  • no 5V power supply (is that ok, only USB powering?)

When I execute the flash with a random image I have the following error:

$ sudo ./flash_script.sh ../../bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz

We are flashing this all mighty BeagleBone Black with the image from ../../bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz!
Please do not insert any USB Sticks or mount external hdd during the procedure.

When the BeagleBone Black is connected in USB Boot mode press [yY].y

Putting the BeagleBone Black into flashing mode!

SPL has started!

error #8: Input/Output Error!
The BeagleBone Black cannot be put in USB Flasing mode. Send  logs to [email protected] together with the serial output from the BeagleBone Black.

The error happens after something like ~15 seconds.

The LIBUSB_ERROR_IO error comes from debug I added here:

r = libusb_bulk_transfer(dev_handle, (129 | LIBUSB_ENDPOINT_IN),
             buffer, 450, &actual, 0);
if (r < 0) {
  printf("error #8: %s!\n", libusb_strerror(r));
  exit(1);
}

Serial console output:

U-Boot SPL 2014.07-00023-g3364b18-dirty (Jul 22 2014 - 13:57:54)
Using default environment

usb_ether
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC d0:5f:b8:f9:93:ef
HOST MAC de:ad:be:af:00:00
RNDIS ready
musb-hdrc: peripheral reset irq lost!
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2394/usb_eth_init()
Problem booting with BOOTP
### ERROR ### Please RESET the board ###

dmsg output:

[27481.012336] usb 3-1: new full-speed USB device number 23 using xhci_hcd
[27481.185830] usb 3-1: not running at top speed; connect to a high speed hub
[27481.239093] rndis_host 3-1:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, 9a:1f:85:1c:3d:0e
[27481.243099] rndis_host 3-1:1.0 enp0s20u1: renamed from usb0

[27493.099807] rndis_host 3-1:1.0 enp0s20u1: unregister 'rndis_host' usb-0000:00:14.0-1, RNDIS device
[27493.716622] usb 3-1: USB disconnect, device number 23
[27494.135511] usb 3-1: new high-speed USB device number 24 using xhci_hcd
[27494.313209] usb 3-1: config 1 has 0 interfaces, different from the descriptor's value: 1
[27494.322081] rndis_host 3-1:2.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, de:ad:be:af:00:00
[27494.325031] rndis_host 3-1:2.0 enp0s20u1c2: renamed from usb0
[27494.505127] rndis_host 3-1:2.0 enp0s20u1c2: unregister 'rndis_host' usb-0000:00:14.0-1, RNDIS device

[27508.813217] usb 3-1: USB disconnect, device number 24

Any idea if something is wrong in my setup?

I would really like to have a way to flash my beaglebone with a cable instead of an sdcard. :)

@ungureanuvladvictor
Copy link
Owner

Not running Arch inside a VM, right ?

@Sarcasm
Copy link
Author

Sarcasm commented May 22, 2016

No VM, it's my main system.

@ungureanuvladvictor
Copy link
Owner

When I wrote all the code I tested only on 12.04 Ubuntu if I remember right. I don't see anything wrong in your setup. Maybe you can get an ubuntu and try it. Do not run it inside a VM, nothing will work if the OS is virtualised.

@Sarcasm
Copy link
Author

Sarcasm commented May 22, 2016

Ok, I have Ubuntu 14.04 at work, I will try to try during the week.

@Sarcasm
Copy link
Author

Sarcasm commented May 23, 2016

I tested with Ubuntu 14.04 on another computer and it works.
I wonder what's wrong with Arch but at least I know the setup can work now.

@ungureanuvladvictor
Copy link
Owner

Yeah, I did not have time to investigate more. If you can take some time to look at why Arch is having sad times with bbblfs i'm more than helpful to refactor code or whatever is needed on this end. Any specific reason you want to flash over USB ?

@Sarcasm
Copy link
Author

Sarcasm commented May 23, 2016

I will definitely submit a PR if I manage to make any progress on this but I make no such promise, I do not have a clue for now on the cause.

Honestly, the first reason I want to flash over USB is because I know another board that do this and I find it convenient.
Secondly, I do not have any spare sdcard.

I could very well be wrong using this method, I don't know if sdcard flashing is supposed to be faster or better for some other reasons it just seems more natural to me to use the onboard eMMC.

@ungureanuvladvictor
Copy link
Owner

last time I checked flashing via sdcard took ~ 20 mins or something like that. u-boot has now support for USB booting as well (basically exposes eMMC as an usb drive to the host pc, what I am doing here as well).

@Sarcasm
Copy link
Author

Sarcasm commented May 23, 2016

Oh, if sdcard flash takes that much time I'm already happy with BBBlfs, it took me ~5 minutes for a 2GB.
Yeah u-boot is something I would like to experiment with more, I feel like a lot can be done with it: either export the eMMC as an usb drive like you say or maybe using DFU.

@ravikp7
Copy link

ravikp7 commented Aug 4, 2017

Hi @Sarcasm , I've made a node.js bootloader server for BeagleBone here . Well, almost a port of BBBlfs but with some changes. It can boot BB into USB mass storage utilising uboot's ums feature. Please try it, and provide feedback. I'm working on a complete GUI flashing tool also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants