Which system do you use? Android, Ubuntu, OOWOW or others?
Android
Which version of system do you use? Please provide the version of the system here:
9
Please describe your issue below:
I have installed Android 9 on my Khadas VIM3 pro (in eMMC). It works perfect. After that I have installed Lakka on micro SD-card using Belena Etcher. I have inserted the microSD card in the Khadas and when I power on the khadas - the Android boots again. I have tried to press some side buttons on the Khadas - but didn’t find any method to change the boot priority.
I need to have the ability to load one of both OSes - Android by default and sometimes Lakka but it seems that my Khadas ignores micro SD card and I didn’t know - how to change the boot priority. On my Raspberry Pi 4B I have installed PINN (Pinn Is Not Noobs) and using PINN I have installed Android TV and Lakka. I can select now either Android TV or Lakka by a boot process on my Raspberry Pi. Maybe there are some same tools for Khadas.
Amlogic boards check for BL2 firmware (part of u-boot) on the eMMC before attempting to boot from SD or USB media so with the Android image on eMMC the device will always boot from eMMC. If the Amlogic u-boot on eMMC is preconfigured to check for boot files on SD media or recovery boot mode is forced, u-boot will search for boot files on SD (s905_autoscript or boot.scr, etc.) and if the files are found, they are read, and bootscript content in the files modifies the u-boot flow to always check for Lakka boot files on SD, and if present, boot them.
I’m not familar with Lakka, but it’s based on LibreELEC which I maintain so I’m going to assume it supports Amlogic boot in the same way. The VIM3 image is built to boot upstream u-boot and uses extlinux.conf to configure boot. The Amlogic u-boot used with Android images does not understand the extlinux.conf files, so u-boot on eMMC will never see them and you always end up booting into Android.
If you use a Lakka image for Android TV boxes (in LibreELEC this is the “box” image) there are files like s905_autoscript in the boot partition. Edit the uEnv.ini file and configure the dtb file to use (meson-g12b-khadas-vim3.dtb) and then force Android recovery boot (on TV boxes this is holding down a recovery button and releasing it 2-3 seconds after the board starts to boot). This forces Amlogic u-boot to find s905_autoscript on the SD card, and it will boot into Lakka. If the SD card is now removed the board will boot into Android as normal. Insert the card again and the board will boot into Lakka.
NB: There are no boot menu tools equivalent to PINN for Amlogic hardware.
If I right understood I need to eject the micro SD card from my Khadas and insert it in an another PC to edit uEnv.ini - file manually?
I don’t use a TV box - I use Khadas VIM3 pro, as I wrote before. It doesn’t have recovery button. It has only 3 side buttons: RESET, FUNCTION and POWER (see VIM3/3L Hardware Documentation [Khadas Docs] ). Which button should enter in the recovery boot menu?
If I will make all the steps you wrote before - I will change the boot priority by ejecting/inserting the micro SD card. Is it true? Or I will need every time I need to boot from the micro SD enter in the recovery mode. Which method should work as the result?
If I will change the places of the OSes - will it simpler? I mean - I will install Lakka in eMMC (OOWOW has the ability to install Lakka into eMMC) and I will install Android into the micro SD card. What should I do to have the ability to select one of the OSes by the booting process?
Your VIM3 with Android on eMMC is running Amlogic aka “vendor” u-boot so you need to use the generic Lakka “box” image https://le.builds.lakka.tv/AMLGX.aarch64/Lakka-AMLGX.aarch64-5.0-box.img.gz as this image contains the autoscript files, not the VIM3 board image which is designed to boot the board from SD (or eMMC) using upstream u-boot. Edit uEnv.ini on the SD card to define the dtb name to boot (as commented above).
I’ve no idea how you trip the recovery mode boot on the board, but once you have done this once the boot flow in vendor u-boot is persistently modified to look for the Lakka boot files; and if present (the SD card has been inserted) it will use them and boot Lakka. No SD card and you boot to Android.
Swapping the OS(s) around so Lakka is on eMMC will not work because this results in upstream u-boot on eMMC and upstream u-boot does not support the Amlogic proprietary partitioning scheme used in the Android image.
In your Lakka-image there are two files with “khadas” in the file-name. I don’t understand which should I select. I have selected one random from these.
I didn’t found any method to enter the recovery mode. I think I need to press something by booting but I can not understand - which buttons and in which time