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

Proposal: Troubleshooting slow usb sticks #7

Closed
kosta opened this issue Feb 5, 2021 · 3 comments
Closed

Proposal: Troubleshooting slow usb sticks #7

kosta opened this issue Feb 5, 2021 · 3 comments

Comments

@kosta
Copy link

kosta commented Feb 5, 2021

First of all, thanks for this awesome repo! You saved my EdgeRouter today :)

I ran into the issue that the USB stick created using these scripts would not boot. Using the serial console I saw that the USB stick was too slow, so uboot aborted. Now typing usb start worked though, and thus run bootcmd worked as well.

My solution was to setenv bootdelay 10 (sadly, the delay is after trying to start usb so this alone does not work) and setenv bootcmd usb start \; followed by the rest of the bootcmd (warning: as the bootcmd contains semicolons, these must be escaped using backslash and be surrounded by spaces: \;). Afterwards, saveenv persists these settings for the next boot (but you can try them first by running run bootcmd).

On my EdgeRouter, the full uboot commands thus look like this:

setenv bootdelay 10

setenv bootcmd usb start \; fatload usb 0 $loadaddr vmlinux.64 \; bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@1024k(eeprom)

saveenv

Now, on every boot, uboot first fails to start usb, then waits 10 seconds, then initializes USB and boots the EdgeRouter. I think I can live with that :)

Do you want a PR to add this to a Troubleshooting section in your Readme?

@sowbug
Copy link
Owner

sowbug commented Feb 5, 2021

Wow, I'm sorry you had to slog through that debugging, especially when you probably had been planning to spend your evening watching Netflix. :) Yeah, I'll totally take the PR. Appreciate it!

@sowbug sowbug closed this as completed in 03c67f3 Nov 5, 2021
@Cyanic
Copy link
Contributor

Cyanic commented Apr 20, 2024

@kosta you said:

I saw that the USB stick was too slow

What do you define as slow?

Can you run something like CrystalDiskMark or something?

For example the USB I want to use can do: 15MB/s read 4MB/s write is that fast or slow?

I've tried to attach the picture.

CrystalDiskMark_Yellow1GB

@kosta
Copy link
Author

kosta commented Apr 22, 2024

I didnt mean slow as is read/write throughput; I meant slow as in power-up latency: After the device is powered up, the USB stick does not respond quickly enough to be available when the uboot bootloader tries to access it.

(My expectation is that the router should work with just about any slow read/write throughput - it would just write logs a bit slower)

Unfortunately, I didnt even know how to start searching for such USB sticks, hence my setenv bootdelay 10 workaround. It wastes 10 seconds on every reboot, but I find that acceptable.

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