Boot Into Upgrade Mode impossible

Gouwa , maybe to start the upgrade procedure (installing the new firmware from the SD card) use a simple script “boot.ini” ? There need only a few lines that will check for script updates on the media, upload the upgrade script from the media and give him control. Something like that.

mmc info
if fatload mmc 0 1020000 name_script_update; then autoscr 1020000; fi

Yep, especially VIM2 spec with a 2MB SPI Flash which can install the bootloader on it.

A boot.ini used on RPi or boot.scr of standard U-Boot will be a better solution for VIM2.

I withdraw my statement. I got some of the prebuilt ones to work.

Havent had any luck using the buttons on VIM2 to switch to Ubuntu in the dualOS though. That does not work at all. I have to do it by entering Android.

But while I am messing with my own builds, I suspect the problems I have noticed are of my own doing.

@Khadas @Gouwa @numbqq @Terry

Are you not tired of hearing the same things over and over. I have read them all in this forum already. Answers like ‘can you try with longer than 3 seconds’ are bull$hit responses. WE know how to count. We are smart enough to know that your “3 seconds” is actually closer to 6 seconds, because we are probably doing it more often than you are Gouwa!

BETTER documentation from Khadas would eliminate this type of nonsense, I can only assume that the problems I am having are related to poor management of code; the fact that I cannot find any of this code mainly!

And the fact that it is being fed to us using a drip feeder - the Fenix repo is still not updated, and it is INCOMPLETE. Still waiting to see answers posted to other topics that other people have asked - and topics that WE ALL want answers to. Just because one person asks, probably means 500 people are looking for the same answer.

There is no docs on what is changed in u-boot nor are there docs/patches for us to know what changes are being made to a kernel (or uboot).

It is like Khadas does not want us to know how to do it for ourselves OR , they dont want us to see their mistakes and incompetence.

I agree, the press and hold, then also do this and that BS is not working for me either.

I vote for a recall and refund.

Hi freeasinbeer,

If you use current u-boot from Khadas GitHub, you can’t enter upgrade mode via buttons, becase the environment variable upgrade_key is wrong, and I’ve fixed it.

--- a/board/khadas/configs/kvim2.h
+++ b/board/khadas/configs/kvim2.h
@@ -128,8 +128,8 @@
                        "\0"\
                "upgrade_key="\
             "if gpio input GPIOAO_2; then "\
-                "echo detect upgrade key; sleep 3;"\
-                "if gpio input GPIOAO_2; then run update; fi;"\
+                "echo detect upgrade key; sleep 1;"\
+                "if gpio input GPIOAO_2; then update; fi;"\
             "fi;"\
             "\0"\
                "vim2_check="\

But for firmware VIM2_Ubuntu-mate-16.04_Linux-4.9_V170818 , upgrade_key environment variable is right.

upgrade_key=if gpio input GPIOAO_2; then echo Found upgrade button pressed; sleep 1;if gpio input GPIOAO_2; then update; fi;fi;

I have found on the VIM2 that upgrade mode can be entered by…
1.) Start USB Burning Tool and load image.
2.) Press and hold power button.
3.) Connect USB-C to USB cable to PC.
4.) Keep holding power button until it connects.

Primary difference here is reset button not required.

I will be interested to see if others also observe this behavior.

3 Likes

Hi RDFTKV,

Yes, you are right. In this way power on instead of press reset button.

Yes, I have the same.

p/s/ I wanted to write about this yesterday, you beat me to it. :slight_smile:

1 Like

You are busy with many things, it was the least I could do.:smile:

Thanks for your help I finally managed to install the dual boot from the pc

Hi Numbqq.
Can you provide me the file of the new bootloader ? I want to try to build a version of the image to automatically update the existing system so that users can easily upgrade an existing system with a few simple steps.

Hi @RDFTKV

that is the exactly way I did it after I accidentally let supersu upgrade on stock VIM2.
So ended in bootloop and install from sdcard did not work for me.

The only way I could flash latest Vim2 was trough USB Burning Tool but of course after unnumbered try and error attempts :slight_smile: finally I managed the way you did it (accidentally) lol

Anyway Khadas guys you should spend more time on proper documentation and I fully agree with @freeasinbeer comment above.

S.

Hi all,

I have managed to make new ota zip for Vim2 but I am not sure how to flash it? I usually do that over recovery (TWRP) but don’t know how to do it on Vim2.

My ota zip is smaller than Vim2 original upgrade?

S.

Hi Balbes150,

I’m not in office today, and I’ll do this tomorrow.
And you can refer to u-boot for source code.:grinning:

Thanks.

Hello, Did you try the Update and Backup app at Settings/More Settings/About/System update? There you can use the Local Update section to flash zip.

May also find Update and Backup at Settings/About/System update.

Added:
@ssehovic
You may have luck with this method…
Install a terminal emulator like this

Open emulator and enter reboot recovery
Should reboot to recovery where you can navigate to the zip
.

1 Like

Hi Balbes150,

Here is the u-boot for VIM2.

Thanks.

1 Like

Hi Numbqq.
Do I understand correctly that this u-boot for firmware versions of Ubuntu (not DualOS) ?

Hi balbes150,

Yes, It’s only for Ubuntu, maybe @Terry can provide the u-boot for DualOS.

Thanks.

Which branch in git khadas\u-boot used to build the bootloader for DualOS ?
I see branches that you can use for Android (Nougat) or to Ubuntu.

Yup, works great for me. (Another benefit of no reset button is this is a lot easier for those of us with big, fat fingers :grinning:)

3 Likes