Unable to enter upgrade mode

Hi,

I have a VIM1 since a long time ago, I use it mainly with LibreElec.
I would like to upgrade the version of LibreElec I am using because it is quite outdated (9.2 ^^").
Sadly, I am having troubles getting my Khadas VIM1 board into upgrade mode.
I may have screwed something at one moment, but I do not have some needed commands in U-Boot:

kvim# run update
Unknown command 'update' - try 'help'
Unknown command 'sdc_burn' - try 'help'
kvim# echo $update
run usb_burning; run sdc_burning;
kvim# echo $usb_burning
update 1000
kvim# echo $sdc_burning
sdc_burn ${sdcburncfg}

So, is there a way for me to build a U-Boot with these commands?
Then, how can I boot from this custom U-Boot.
I also tried doing the M-register way but I had no luck.

Also, please note that I tried booting on the sdcard (to simulate update) by hand but I failed so far.
To do so, I first took a look at boot.ini:

#------------------------------------------------------------------------------------------------------
#
# boot.ini
#
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!
# Set your own settings in config.ini
#
#------------------------------------------------------------------------------------------------------
KHADAS-UBOOT-CONFIG

setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=0505-4706 disk=UUID=a4e24c60-95da-4b3a-85cb-be3d994ee96c"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput   "1"
setenv vpu          "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000

fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img

if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi

setenv khadas "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "console=${condev} ${bootrootfs} ${khadas} ${cec} ${libreelec}"

# Device tree modifications
bootm start
bootm loados
bootm fdt
if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
# Remove aml partition layout from device tree (required for eMMC boot)
fdt rm /partitions
bootm prep

# Boot the board
bootm go

And I adapted it to my sdcard:

# UUIDs are taken from:
# kvim#mmc part
#
# Partition Map for MMC device 0  --   Partition Type: DOS
#
# Part    Start Sector    Num Sectors     UUID            Type
#   1     8192            1048576         3ec82689-01     0c Boot
#   2     1056768         29478912        3ec82689-02     83
kvim# setenv bootrootfs "BOOT_IMAGE=kernel boot=UUID=3ec82689-01 disk=UUID=3ec82689-02"
kvim# setenv condev "ttyS0,115200"
kvim# setenv hdmimode "1080p60hz"
kvim# setenv hdmioutput   "1"
kvim# setenv vpu          "1"
kvim# setenv libreelec "quiet"
kvim# setenv hdmi_cec "1"
kvim# setenv uenv_addr 0x13000000
# Taken from
# kvim# fatls mmc 1
#             extlinux/
#             amlogic/
#  12643197   kernel
#  132276224   system
#        48   kernel.md5
#        48   system.md5
#
# 4 file(s), 2 dir(s)
# And:
# kvim#fatls mmc 1 amlogic
#             ./
#             ../
#     ...
#     41392   meson-gxl-s905x-khadas-vim.dtb
#     ...
#
# 75 file(s), 2 dir(s)
kvim# fatload mmc 1:1 ${loadaddr} kernel
kvim# fatload mmc 1:1 ${dtb_mem_addr} amlogic/meson-gxl-s905x-khadas-vim.dtb
kvim# if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
kvim# setenv khadas "no_console_suspend vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs "
kvim# if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
kvim# setenv bootargs "console=${condev} ${bootrootfs} ${khadas} ${cec} ${libreelec}"
kvim# bootm start
kvim# bootm loados
kvim# bootm fdt
kvim# if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi
kvim# if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi
kvim# fdt rm /partitions
kvim# bootm prep
kvim# bootm go
uboot time: 1081315020 us
domain-0 init dvfs: 4

Sadly, the kernel prints nothing.
But, I am not really sure about the values for the UUIDs, particularly as I do not know from where the original values, i.e. boot=UUID=0505-4706 disk=UUID=a4e24c60-95da-4b3a-85cb-be3d994ee96c come from.
So, does anyone have an idea on how I can boot to this sdcard to then upgrade my system?

Best regards.

Can you just try update command on the u-boot command line ?

Sorry for the late delay, I did not have the board with me for some time.
I tested with update but got the same error message about unknown command:

kvim#run update
Unknown command 'update' - try 'help'
Unknown command 'sdc_burn' - try 'help'
kvim#update
Unknown command 'update' - try 'help'
kvim#sdc_burn
Unknown command 'sdc_burn' - try 'help'

Do you know if there is a way for me to flash a U-Boot with the update command?

Hello @another-vim-user

You can try MRegister Mode to enter upgrade mode and flash the images with via usb tool, then it will support run update command.

Hi,

I no more remember the password and the mail associated with my previous account…

Anyways, I was able to upgrade my khadas VIM by first erasing the mmc, so the board went to boot from SDcard and I was able to install a new LibreElec version directly from the SDcard towards the mmc using dd.

So, a 2016 board now runs upstream and up to date software and will continue to serve for ages. Congratulations for building hardware that last!

Best regards,

Hello @yet-another-vim-user

Thank you so much for sharing this! Hearing that a first-generation Khadas VIM from 2016 is still running strong with the latest upstream LibreELEC makes our day.

Longevity, open-source maintainability, and durable hardware design have always been at the core of what we build. It’s truly rewarding to see our early boards continuing to deliver value in the community after all these years.

Welcome back to the forums under your new handle! If you ever need help recovering your old account details, feel free to send a DM to the admin team.