How do I upgrade using a Linux computer?

All the instructions to upgrade are for using Windows computers. I don’t have access to a windows computer.

My desktop is Linux only. I purchased the VIM2 because the advertising said it had Ubuntu but now I learn it only has Android, which I have no use for.

I have deleted the Android according to the scattered instructions and now only get blank screen on boot.

1 Like

There are guides on the Khadas docs page for Linux (the ones that say “via CLI” or “via Command Line”). Nothing requires Windows except for the Amlogic USB Burning tool, which is only really useful for the Android ROMs (won’t even work for most of the other ROMs).

The easiest way is using bootable SD cards. The guides tell you to use dd(1) command but I recommend Etcher for writing images to SD card (Linux version available, very easy to use, very reliable and good quality results).

You might need to write Uboot to the SD card before using Etcher (you can find the uboot files on the Firmware page):

sudo dd if=u-boot.bin.sd.bin of=/dev/sdb conv=fsync,notrunc bs=1 count=444
sudo dd if=u-boot.bin.sd.bin of=/dev/sdb conv=fsync,notrunc bs=512 skip=1 seek=1

I’m not sure which images this is necessary for, though.

Booting from USB drive apparently also works but I haven’t tried that yet.

Most of the imgs I’ve tried from these forums work like Linux desktop Live CDs: you boot them, try them out and then install to internal memory from within the booted operating system. E.g. on the Ubuntu ones you run ./install.sh and on the Libreelec ones you choose “install to eMMC” from the shutdown menu. You will need to follow exact instructions from the relevant threads.

Booting from an SD card can be a bit tricky but I’ve used the MRegister method successfully when nothing else works.

Another method mentioned in these forums is using the Android 6.0 ROM, going into the Update&Backup app (Settings->Update or something like that). Then you choose aml_autoscript.zip from an img burnt to an SD card and apparently it can use the Android OTA update system to apply an update. This hasn’t worked for me.

Finally, advanced users can directly interract with Uboot using UART or TFTP. You can do lots of things with this, I guess, including flashing images, booting in different ways, etc. There are guides for that on the Khadas docs page, but you will probably need to use external resources to learn about Uboot.

A word of warning about Ubuntu on the Vim: graphics support is not very good but hopefully getting better.

There is nothing wrong with the Amlogic USB Burning tool. It works fine for all images that are designed for the emmc. Its my primary tool, but only because I do have a windows machine available (in a VM).

I would actually like to know if it is possible to write to emmc using linux too.

Using an SD card is a rubbish method. It is double handling, slow and pointless if you have made an image designed to go directly onto emmc - which is how all the images in Khadas docs are. And how all the Ubuntu images most people are making here are.

Somewhere, on this forum someone already asked this question but I cannot find it - and I dont remember it having a suitable answer (starting to be the normal here I am noticing)

I presume that when you plug the VIM into a PC and put it into upgrade mode, it presents itself somewhat like a flash drive of sorts.

When I use the Windows USB tool , and watch the VIM Serial output during a flash process, it appears that the process is just like a dd’ing a number of partitions onto the emmc. So there must be a method.

Also I doubt that AMLOGIC are building stuff on a Linux box then flashing it using Windows. I’ll bet they are not using SD cards either.

If they made a windows tool, there is either A) a Linux tool or B (more likely) a method to do it using built in tools within Linux.

@Gouwa - Do you know, or can you ask them. Then tell us.

I am so disappointed with this VIM2 device. Been building, programming, and doing system admin for 40 years and this is the worst nightmare I’ve ever come across.

The documentation is fragmented pieces of snippets, and most advice in this forum says “read the docs”. It’s a run around. I’ve spent 2 weeks already trying to get the device to work and now very close to just tossing it into the scrap pile of un-useful parts.

The instruction to poke around the circuitry of the board to short out the reset is one of the stupidest things I’ve ever been advised to do, and on top of that, to plug in the device while being sure the tiny, tiny jumper is connected and the tweezers not slipped. A totally stupid setup.

And none of the suggestions are working, just a blank screen, no boot messages or anything at all.

Booo!!!

No “specialist with 40 years of experience”, never will begin to break the device and erasing system until he figures out how to return to the initial state of the system if not properly steps. No one person, when it begins to change the system until you study the documentation and not find out important issues (associated with device). When you buy a PC preinstalled with the system, just start with the fact that fully format the hard drive, and then begins to write what this poor equipment, because it doesn’t work ? You at least asked questions in the forum ? 1. How to prepare (and protect yourself) to install Linux ? How to create a full backup BEFORE any manipulation with the existing system (IOS) that would be easily recover from any failures ? How to install Linux on your model ? FYI, the entire process of running Linux on Khadas VIM1\VIM2 takes 5-20 minutes (depending on the version and without time on sozdanie full backup).

2 Likes

I did try many of the fragmented documentation fragments before deleting which was also recommended. The fact is, the documentations is rubbish, misleading, suggest all tings possible but does not carry through .

The things you post are not clearly documented. The entire VIM2 is a catastrophe at this point.

Maybe it takes 5-10 minutes for someone who has the inside info but that info is not being shared.

Spoken like a politician. A lot of words without saying anything. I’m still waiting for the instructions how to install in 5 to 20 minutes. using a Linux computer.

I have never purchased a computer with pre-installed software. Even the SOC computers are set up by installing the OS n a SD card, pop it in and it’s off and running.

But not this one, it has booby traps and the support team tries to sidestep giving a solution that woks and instead puts blame on the customer.

I have fired customer support personnel for responding the way you did.

@balbes150 is not a customer support personnel but a hardworking member of the community who produces 3rd party builds and answers questions on the forum. @Gouwa, @Joseph, @Terry are the people responsible.

I would also love to see a Linux flashing tool! I don’t use Windows.

I agree that its disappointing that there are not more prebuilt tools and guides and that things are not easier. It would be good to see the manufacturer putting a bit more effort into the tooling and driver support. And of course documentation! (I’ve just tried to document what I did to help anyone else).

But at least there is some sort of community for this device and the platform, community builds, and a mainling effort involving a commercial embedded linux company, Baylibre (see the work of Neil Armstrong).

There are some knowledgeable people on this forum (not me), but I think English is a second language for most. So things can get lost in translation. Balbes150’s wiki is a great effort, with English translation, but it still takes a bit of reading and rereading to understand.

If this is the worst nightmare you’ve seen, I guess you’re lucky. I have no prior experience with embedded linux but what I’ve seen so far is the same situation or worse across the board (except for the raspberry pi, of course). These Chinese boards are very cheap. Most of the manufacturers have no intention of doing any after sales technical support or ongoing development (like Orange Pi for example, they just sell it and abandon it). At least the Khadas people contribute here a little.

1 Like

Thank you x011x, the information you post is informative and helpful. You have softened my opinion of this forum. Maybe even saved the VIM2 from a trip to the dump. :slight_smile:

I have many years experience with kermit, interfacing with control devices and point of sale devices. They have all had some documentation as to the commands but the docs provided by khadas tell how to setup kermit then stop there, giving no clue what the commands are to control the device. That’s just one example of the shoddy, incomplete documentation on the official web site.

Again thanks for clearing up a bit of confusion about the state of current development concerning SOC computers. Hopefully I’ll find some way to contribute.

Well, well…

I found the perfect solution, there is a program to update the VIM2 and all other ARM based computers. It runs on Linux, so no need to find a Windows computer to do the update.

The program extracts a couple of files from the “update.img” file. These 2 files are required to do an update. It’s what the windows update-tool does.

You then copy the 2 extracted files plus the update.img to a SD card, pop the SD card into the VIM and boot. It copies the new operating system to the built in eMMC.

EASY.

Here is the link to instructions:
http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/s912/others-aml-s912/knowledge-tutorials-av/608116-how-to-recover-so-you-bricked-your-box

And an updated link with better source code and more info:

4 Likes

I followed these instructions for “VIM2_Nougat_V170831” and I saw the “Upgrading…” screen momentarily and then the whole screen turned into green and even after reset or power off it stays green…

what’s the version of u-boot? May be the uboot is not match with the ROM ‘VIM2_Nougat_V170831’.

I followed the procedure and extracted the u-boot from the “update.img” file.

EDIT: It works, I missed this “rename the firmware to aml_upgrade_package.img to match the string in aml_sdc_burn.ini”

1 Like