Booting from USB NVMe enclosure

Which system do you use? Android, Ubuntu, OOWOW or others?

Android, Ubuntu, OOWOW…

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official

Please describe your issue below:

Unfortunately a console log is not possible right now, I’m trying to get UART going though. The specific issue is that I can’t boot from a USB enclosure housing a 256GB NVMe stick. This device is seen on OOWOW as /dev/sda without an issue. But the boot never goes through it. I’ve tried all USB ports (bar the power one, of course). On the USB-C port on the left I actually get a blink during startup, but I guess this is just the USB bus startup and not any indication that it’s considering the drive for boot.

Currently flashed on the eMMC is https://dl.khadas.com/products/edge2/firmware/android/edge2-android-12-v230625.img.xz and I’m intending on booting Ubuntu from the NVMe drive. The image in question is precisely https://dl.khadas.com/products/edge2/firmware/ubuntu/generic/edge2-ubuntu-22.04-gnome-linux-5.10-fenix-1.5-230425.img.xz, written with Etcher.

What could possibly be going wrong here? How do I get to see the u-boot environment without dropping to UART console?

cc: @hyphop

@andrebraga eMMC holds higher boot priority than SD/USB devices, so that is why it is not going past Android to boot from external devices.

Try putting your device into upgrade mode to switch boot mode from eMMC to SD/USB using the keys upgrade mode

Also, possibly NVMe Disks are quite power hungry, if you can confirm that you are able to use the disk to boot from other devices, this point might not matter.

Regards.

This doesn’t seem to work but I don’t have much of a clue about what should change, visually speaking (like different LEDs lit).

Is power really relevant there? When is it supposed to be “energised” enough for boot? And I don’t have another SBC to attempt a boot. I can say that the enclosure blinks its LED at the same moment as the keyboard (backlight) or mouse (also backlit) would.

Tried clearing the eMMC and using a regular Kingston 32GB USB thumb drive. It boots to OOWOW. I couldn’t otherwise make the PWR+RST trick…

If it boots into oowow then did you check what boot settings are there in KBI ? Change it to eMMC.
It’s absolutely possible to boot off the USB disk, it just seems something is misconfigured to not be able to.

It’s mmc. I tried SPI as well. Both result in the same behaviour after erasing the bootloader (OOWOW option) from eMMC.

I won’t discard that something is misconfigured, just need to understand how to even fetch the configuration without UART. For instance, u-boot environment.

Did you try it with ubuntu/debian installed on the eMMC ?

Not yet. Any version in particular that is known to work/hAs the right SPL?

Try using the latest ubuntu image for example, get it from oowow itself.
https://dl.khadas.com/products/edge2/firmware/ubuntu/emmc/edge2-ubuntu-22.04-server-linux-5.10-fenix-1.5-230425-emmc.img.xz

OK, this worked [Edit: no it didn’t, see below] (flashed the image with the same date offered by OOWOW wizard). Not sure how much of it was sheer luck but it worked and was repeatable.

Next question: is there a way to flash the Android image on the external drive? It doesn’t seem they’re of the “generic” kind.

Spoke too soon. What actually happened is that it booted from eMMC but mounted rootfs from the USB enclosure. lsblk told me this much. Both have the same UUIDs and I guess “sda2” won over “mmcblk0p2”, for whatever reason. /boot is mmcblk0p1 though. And sda1 is unmounted.

@Electr1 @hyphop please?

@andrebraga you can go to oowow → advanced → emmc → fast erase, so it purely boots from the external disk.

It loads OOWOW. After showing the usual splash screen and then the OOWOW letters below the logo.

Make sure you are using the KEYS upgrade mode to put it into external boot.

When I do this the board is absolutely dead. It doesn’t bring the splash screen, it doesn’t fan up, it only has a solid green* LED on the left and a breathing on the right. I just have no clue what’s going on.

* I said white before. I was wrong. It was green.

Also, I am not questioning whether this works on your side, but it doesn’t work on mine. So the question is: how do I make sure my board is in a pristine state, or at least in an identical state as yours? What should I be burning and how? SPL, system, u-boot, MaskROM mode; name it and I’ll do it, but then I need a way to check the results (assuming the proof of the pudding is not the USB boot itself…)

If you ensure these are in check then it’s most likely because the device isn’t entering upgrade mode properly.

  • oowow in spi flash
  • bootmode set to emmc
  • emmc fast erase is enough

After this making sure to properly release the power button during upgrade mode and not hold on to it for too long, you should see a solid green and heart beat white light which indicates it was done right.

Cool, it’s done right, only it doesn’t load anything :face_exhaling: Screen is pitch black. I’ll leave it be for a while, perhaps it’s sloooowly doing something.

Or it falls back to oowow again.

I’m wondering if my SPI is messed up.

On the rescue console spi_env finds nothing. Is it supposed to? Again I’m down to any troubleshooting procedure that doesn’t involve UART (I’m not even discarding this, it’s only that I’d rather exhaust the other options before buying it, plus delivery fees and waiting time.)