I have a Lenovo X1 Carbon gen 5 and it only has USB3, no USB2. Is it possible to boot this machine off the NVME somehow and install? It will not boot via a USB stick no matter what I try, hangs with USB errors late in the boot process, at the blue desktop screen with just a mouse cursor, which shortly stops moving. Nothing else loads. Logs show plenty of USB errors and Haiku is unable to recover from them.
This is with a 64-bit nightly about a week ago. But I had the same issues with 32-bit and nightlies from March as well as Beta 1. I have tried other memory sticks and various methods of writing to them, all with the same results.
As noted in the current ticket about boots off USB3 failing: using a USB2 drive on a USB3 port seems to work around the problem.
Do you mean a USB2 thumbdrive? That is what I have, but it seems to make no difference. This is the drive I’ve been doing most of the testing with: https://www.oempcworld.com/OEMPCworld-com/022350.html
You are absolutely certain it is this thumb-drive and not a similar looking model? I.e. when plugged into some other machine, the USB ID shows it is a USB2 device?
Well, then your hardware seems broken in some other way. I really need to try and find time to repair this; unfortunately, it is extremely excruciating to debug because it never occurs after booting finishes
I’m a dev too (not Haiku, yet), would be happy to test for you. I am sure it is this one, the model is stamped on the back and its a pretty old thumb drive. I have an even older one and that doesn’t work either
Here’s the system profiler report on a Mac:
That indeed appears to be a USB 2.0 device. I guess I don’t know what’s going on here then; it may be a different symptom of that ticket, or it may be a different problem entirely…
It looks like its coming back with a COMP_STALL during a transfer. I think after a stall, there is a need to reset the endpoint (ResetEndpoint()), based on the OpenBSD XHCI driver. The current Haiku XHCI driver doesn’t seem to do this. I don’t know why it stalls to begin with though, unless it’s just normal for these slow flash drives. Don’t know if that would allow it to recover properly. It looks like the flash drive’s LED indicates sleep mode after the stall, so it does look like it needs to be reset.
Right. I’ve been extremely hesitant to add that since I have no way of testing it (the devices I have here that fail to boot via USB3 do not even get to this point, they just say “new device connected” and nothing else occurs.) Even changes I have tested rigorously often break devices that previously worked, etc. And as you noted, it really should not stall in this situation, so adding that change either would not fix the issue, or just cover up some other one.
I didn’t realize you had prior driver development experience – feel free to add the ResetEndpoint invocation and see if that helps here, and if so, submit the change to Gerrit. And please do ping me in Freenode#haiku if you’re interested in helping out more generally
I may have a bit of time this weekend to go back to USB3. We’ll see, there were a couple other issues I needed to get sorted first.
I know there was some work done to try to get clang working, is it possible to build using clang yet?
No, Clang builds require a lot of hacks to complete, and they fail to boot. Why?
Default cc on FreeBSD and Mac. I’ll install gcc tomorrow and see if I can get it building on my FreeBSD machine.
Building Haiku involves building our own fork of gcc first. So you don’t need to install anything, just follow the instructions for building as usual. You will use your host compiler to build our gcc and some haiku-specific tools, but that’s it.