Unable to change OS on VIM3

Hello!

I’m attempting to move my Home Assistant install over from a docker container to Homeassistant OS on my VIM3 pro, but I’m having great difficulties. I will do my best to list out all the steps and avenues I have explored here but it’s likely I’m missing some info as I’ve been back and forth between multiple different operating systems and SD cards for a while now.

Current state of the machine

The box is currently running Android TV, I’m decently sure that the image originally came from this post*, but the links seem to be dead so I can’t confirm. The firmware file used is:

SC_VIM3_DEBUG_ATV-v5.0-20211119.img

This is installed on the emmc, and works just fine. I just want to stop using the HA docker install and the VIM seems like the best target for it.

End goal

The image I’m attempting to install is from the HA git repository: haos_khadas-vim3-10.4.img.xz

However it seems that it’s actually impossible to install anything other than ATV

Problems

Unable to boot to SD

To install HAOS, my idea is to install to SD, and then copy over to the emmc. I used balena etcher to install to an sd card, however I can’t actually boot from it. Tried the steps of powering on and pressing Function 3 times quickly or holding Function and pressing Reset. The Blue LED flashes a few times and then the white one stays on.

The usual outcome is a boot loop with a garbled display (the bottom ~75% of the screen is just noise), this doesn’t go away until I power off and boot without the SD card.

This behaviour is very similar to the post here, but it looks like this is also unsolved?

It’s worth noting that I also tried this with krescue and got the same broken yellow khadas logo that is seen in the later posts, only it’s over the ATV boot image.

Unable to change eMMC (Windows)

Assuming that the issue here is something to do with the Android install somehow overriding the boot priority, I thought to overwrite the emmc with something else, however it looks like the USB tools are broken for me.

The USB_Burn_Tool_V2.2.0 gives the Parse burning image fail error every time, regardless of the image I try to load (even the previous one which is currently installed). The only thing I can think of is that initially it’s likely that this tool was used on Windows 10, and I’m now running Windows 11. I tried running with Windows 7 compatibility after seeing that someone was using it within a win7 virtual machine but that didn’t help.

The program can connect to the VIM in upgrade mode just fine, just not load images.

Unable to change eMMC (Ubuntu)

Failing Windows, I moved on to try Ubuntu. I have an ubuntu server install, which seems to get further but also falls short of actually writing to the emmc. Here’s the output:

Try to burn Amlogic image...
Burning image 'OS/vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.5-230425-emmc.raw.img' for 'VIM1/VIM2' to eMMC...
# It processes for a few seconds here
Unpacking image [KO]

This doesn’t overwrite the current install, so it seems to be stopping before the actual writing. For completeness, the ubuntu install is Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-78-generic x86_64)

Conclusion

So here I am, writing this post. I’ve been through multple SD cards (so it’s not a card problem).
If I insert a storage SD card into the slot, ATV can see the volume just fine, so I don’t think the slot is broken.

So in summary: I can’t write to the eMMC, and can’t boot from an SD card. So I can’t change installs.

Any help is appreciated, let me know if you want any more information.

*I’m limited to 2 links per post, so this is the url to the ATV post:
https://forum.khadas.com/t/vim3-android-t-12-v211126-preview-rom-release/14049

Hello,

I just moved my hass-os from vim1 to vim3.

Downloaded the image from their git release and flashed it on emmc.

Everything worked as expected.

The issue you’re facing is conflict if uboot between atv and mainline uboot used in hass-os image.

Insert sdcard and press function key, 3 times in a second.

It should boot into maskrom mode which ignores emmc boot.

You need to find a way to flash the image to emmc though. I did it manually dd the image to emmc.

I would advice you to use krescue hoping that dd is added to krescue.

Thanks for the response, I did actually attempt to flash that HAOS image to the emmc, but the burn tool seems to think that it’s an SD image:

utils/burn-tool -v aml -b VIM3 -i OS/haos_khadas-vim3-10.4.img
Try to burn Amlogic image...
ERROR: Try to burn to eMMC storage, but the image installation type is 'SD-USB', please use 'EMMC' image!

So I assume you mean you installed to SD and copied to emmc?

The problem I’m having is that none of the tools are working as expected, USB_Burn_Tool refuses to load any image, giving Parse burning image fail error for all images. This is even after a reinstall, and whether the VIM is connected or not.

Similarly, the Ubuntu version stops short of touching the emmc (not even wiping it): Unpacking image [KO]

The final issue is that the maskrom mode will not work with the AndroidTV install that’s on the emmc, since it seems to be overriding the boot somehow. The triple press method does something, causing a boot loop with a garbled screen. If I try it with krescue I can see a yellowified khadas logo in the “noise” just like the image in this post, only it’s mixed in with the android boot image.

So in short:

  • I can’t boot from SD card, because of the ATV install on the eMMC
  • I can’t wipe the eMMC because none of the burning tools will work

I’m assuming that if I can either force boot to SD somehow, or wipe the eMMC, the other problem should fix itself. I’m fairly sure it’s not a hardware issue.

Hopefully I’m just doing something stupid!

Please uncompress the image to .img file and try again.

HASS OS Image cannot be flashed using burning tool.

Same for this, It is a raw image and cannot be flashed using burning tool.

No, you cannot flash raw image using burning tool.

Why don’t you just use Krescue image which is made just for this purpose of helping end users have a smooth process of flashing os images.

Do the following:

  1. Download Krescue for you device from here - Download the correct image for your device and for sdcard.
  2. Flash the image to sdcard using Balena Etcher.
  3. Boot into it by inserting the sdcard and pressing function button 3times in 1 second,
  4. Select haos_khadas-vim3-9.5.img.xz from download list and flash it to emmc. (Can upgrade it after setting it up)

It is very simple when you follow the right tools and documentation.

Hope this will resolve your issue.

Cheers.

I’m using uncompressed images, even using the Recent files menu for the image that is currently installed doesnt work.

Is there a way to enable logging for the tool? I get the feeling that something deeper is going on, and I can’t think where.

@Spikerguy
Sorry, that’s something important that I left out. I’ve been using Balena for the SD cards, and the USB tools for the eMMC

I am using krescue, it will not boot.

I’ll do it all again, and list out every step

  1. Download VIM3.krescue.sd.220110_266.img.gz to desktop
  2. WinRAR → Extract Here
    2a. Produces file board.VIM3.time.1641796810.size.16693127 .SIZE.67108864.ver.220110_266.krescue.sd.img
  3. Open Balena Etcher and flash this image to a generic 8GB SD card
  4. Plug this card into the VIM
  5. Power on, white LED is on
  6. Press Function button 3 times, blue LED flashes once, then 3 (?) more times
  7. White LED is lit
  8. Get a boot loop with a garbled screen

Minor update, hinted by the mention of not being able to flash raw images:

Using the non raw ubuntu image, I was able to flash over ATV using the Ubuntu message. Not only that, but the windows tool was also able to load this image properly (didn’t try flashing). So it looks like the failure states I was seeing can be binned into these categories:

  • SD only image
  • raw image
  • missing path

Turns out the “recent files” is pointing at a file that does not exist anymore, I’d since moved that image to another drive. But since the error message is the same as the other failure states, I just assumed the tool was at fault.

Still as of yet unable to boot into krescue (similar situation, only the broken section is white), will work on that soon.

Are you sure you have Vim3 and not Vim3l, cause my vim3l have VIM3 printed on silkscreen of the board.

Yup, VIM3 V14

htop shows 6 cores and 3.62GB of RAM in ubuntu

Another update, it’s working now.

After playing around with some things in Ubuntu I went back to try krescue, and it all worked as expected. So it looks like the problem was being caused by the ATV image on the eMMC (as expected). I installed HAOS to the eMMC via oowow and now I’m just waiting for it to set up.

So to make this less of one of those “I solved it” posts with no elaboration, the key points really were:

  • changing the eMMC install fixed it for me
  • I wasn’t able to get the flashing tools to work because I was trying with images either destined for the SD card, or with raw images.
1 Like