Armbian + KODI (Ubuntu\Debian) for SD & USB & eMMC

If you use latest android then it doesnt have multiboot.

This means your manually booting to sd/usb.

This will remove part of the bootloader as Vim3 still doesnt have multi boot support.

To boot Armbian from emmc you need to have a working bootloader.

The script you’re using was for older version of android which had multiboot support so using that multiboot support it used to boot from emmc with armbian in emmc.

I tried the same with vim1 android in emmc and manjaro in usb, the script was run successfully but board didnt boot. Then had to flash emmc firmware again.

Thanks for fast reply, Spikerguy! :slight_smile:

Yeah, I installed Android_VIM3_Pie_V190809. Okey, so it is not currently possible to install to eMMC with VIM3 since the latest versions of Android doesn’t have multi-boot and I can’t copy everything from mSD to eMMC as I don’t have a working bootloader.

I’ll have to look into how to get a working bootloader then so I’m able to use my VIM3 SBC

You have a working bootloader but once you flash armbian in emmc using the script the boot partition is erased. Thatsy we need to have multiboot working in the bootloader.

Maybe khadas team can update on this.

I clearly have to read up on this to fully understand it. I thought that multi-boot was necessary when dual-booting, example if you want to have Android on eMMC with Armbian Debian/Ubuntu. In my case I give a shit about Android as it is a pain in the ass and I rather install CoreELEC to a mSD or USB if I ever want to use my VIM3 as a Multimedia station.

Since I only want to use my VIM3 as a server with Armbian, I probably have to build it by myself to get the eMMC and u-boot v.2019 part working

@balbes150 I am so sorry. I will repair it today.

hello, this story of needing to flash android first to be able to have the linux we wanted at the first place is a real pain in the ass, i hope someone will build an directly (one step) emmc flashable image for armbian in the future, either via usb or ethernet

It’s even more pain in the ass given the current status as functions such as install to eMMC doesn’t work and there doesn’t seem to be any testing by the Khadas devs etc given that the latest Android version doesn’t support multi-boot.

It’s a jungle and it gets even worse when some new information and changes have been made recently, however, everything still depend on multi-boot information given for over two years ago as mentioned in the first topic.

balbes and the other devs who have made Armbian for S9xx devices possible have done a marvellous job, so it’s sad to see how poorly the Khadas devs are testing and making it possible to be used with latest Vims given the status of Android, u-boot etc. for example VIM3…

i 've never tested armbian , mainly because of this need of android in emmc with its multiboot ability+boot on sd+install to emmc as 3rd step,; it should be possible to fork and hack the armbian build process to generate an emmc flashable image,but this does not seem to be planned at all by the vim
maintainers at armbian

Yes that’s right.
If khadas team can advice on how to make the device can boot from full image, starting from boot partition, header, preloader and uboot in the bootloader then it is possible to make emmc flashable image.
Once the whole linux os is running from usb with full bootloader and rootfs then we can just dd it to the emmc. Currently all the builds are built over multiboot concept except the official linux image from khadas.

Write detail, what button were used. I checked on VIM3 factory firmware Android activation universal multi-boot and install LE and Armbian in eMMC works fine.

Installing to eMMC works strictly with the standard Android. If you tried to use any other system in the eMMC before this (version of Ubuntu from Khadas with the nucleus of 4.9, or any run coreelec), you will have to perform a complete removal of the entire eMMC (using the command dd if=/dev/zero of=/dev/mmcblk<number_eMMC>) and a clean install of the regular firmware Android. And all of the steps for clean activation and multi-boot to run Armbian with external media. Only after completing these steps do I accept questions.

Do not write nonsense, works perfectly with VIM3 Armbian.

After starting coreelec, you won’t be able to run any other OS with external drives.

From the factory all VIM3 comes only with Android firmware. So I’m not going to waste time looking for problems if you’ve written another system to eMMC in your sample.

  1. See the correct manual on the official resource (forum Armbian).
  2. In the near future I plan to close this topic, because the modern system has significantly changed and the old legacy systems only confuses users.

You can forget about this option (using USB Burn Tool) to install modern systems with u-boot-2019 and kernel 5.x. No one will support the main kernel and u-boot, the old stuff that Amlogic developed.

This is just my observation :frowning:

I will try with Armbian first then will test the same method on Manjaro.

I’m happy to hear if everything is working perfectly for you, balbes! So the next step should be to get to know exactly how you did it :slight_smile:

Keys Mode (U-Boot is Running Normally) (Link)

  1. Power on VIM3.
  2. Long press the POWER key without releasing it.
  3. Short press the ‘Reset’ key and release it.
  4. Count for 2 to 3 seconds, then release the POWER key to enter into Upgrade Mode. You will see the sys-led turn ON when you’ve entered Upgrade Mode.

Okey, so burning latest Android to eMMC with USB burning tool and selecting full erase of flash and bootloader wont be enough? I still have to wipe the entire eMMC with the command above?

This is the part which I need help with. How do I activate multi-boot after latest Android is written to eMMC? Is your guide s905_multi_boot still relevant?

From your post at Armbian Forum - August 25 2019

Pay attention. The multi-boot scripts have been updated, I recommend to re-activate the multi-boot using the new scripts.

How do we activate multi-boot with the “new scripts”?

In my experience, these options do not perform a full wipe of all data in eMMC. Only manual execution of the command DD capture all the cells with zeros and subsequent real clean install.

The latest images contain the latest scripts.

Thx! I hope this is enough before I do everything from the start.

$ sudo dd if=/dev/zero of=/dev/mmcblk2
dd: writing to ‘/dev/mmcblk2’: No space left on device
61071361+0 records in
61071360+0 records out
31268536320 bytes (31 GB, 29 GiB) copied, 1132.26 s, 27.6 MB/s

So this is the procedure I’ll go with.

  1. Burn latest Android to eMMC with USB burning tool (full erase of flash and bootloader)
  2. Burn latest Armbian to mSD card with Etcher
  3. Change dtb filename in both /extlinux/extlinux.conf and uEnv.ini to meson-g12b-a311d-khadas-vim3.dtb
  4. Boot into Android while mSD card / USB is unplugged.
  5. Plug in mSD card / USB
  6. Activate multi-boot by
    6.1 Select Droid SettingsMore settingsDevice PreferencesAboutUPDATE
    6.2 Choose Select under UpdateLocale and BOOT/aml_autoscript.zip
    6.3 Select Update and Update again.
  7. Log in with root, change root password and add new user
  8. Run ./install with root and shutdown after successful installation to eMMC
  9. Unplug power and mSD card / USB before powering on again

Try after installing to eMMC Armbian (after using Scripta “install.sh”), does not disable external media Armbian, and perform again the activation of the multi-boot (using the buttons “Power” + “Reset”). Perhaps the latest firmware versions have a bug that causes deactivation of multi-boot.

From step 6.3 above, I get the following error after pressing Update two times:

Supported API: 3
charge_status 2, charge 1, status SUCCESS, capacity 100
Finding update package…
Opening update package…
Verifying update package…
E: footer is wrong
Update package verification took 0.0 s (result 1).
E: Signature verification failed
E:error 21
Installation aborted.

From here, what should I do? Is this really necessary? Is the Keys Mode (U-Boot is Running Normally) - using Power + Reset buttons - equivalent to the old method in regard of activating multi-boot? Which means that step 6.1-6.3 is equivalent to booting into external media with Keys Mode?

I do not know what broke in update mode through the U&B app, use to activate the multi-boot button (Power+Reset). Buttons should work on all firmware.

I still can’t get it to boot to Armbian from eMMC. The last step I’ve done is to run ./install.sh with the following output:

./install.sh output

root@aml : ~ # ./install.sh

Start script create MBR and filesystem

/dev/mmcblk2

Start backup u-boot default

4+0 records in

4+0 records out

4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0678512 s, 61.8 MB/s

Start create MBR and partittion

./install.sh: 55: ./install.sh: parted: not found

./install.sh: 56: ./install.sh: parted: not found

./install.sh: 57: ./install.sh: parted: not found

Start restore u-boot

442+0 records in

442+0 records out

442 bytes copied, 0.00463437 s, 95.4 kB/s

8191+0 records in

8191+0 records out

4193792 bytes (4.2 MB, 4.0 MiB) copied, 0.257218 s, 16.3 MB/s

Done

Start copy system for eMMC.

Formatting BOOT partition..../install.sh: 87: ./install.sh: mkfs.vfat: not found

done.

mount: /ddbr/install: special device /dev/mmcblk2p1 does not exist.

Cppying BOOT...done.

Edit init config...done.

umount: /ddbr/install: not mounted.

Formatting ROOT partition...

./install.sh: 112: ./install.sh: mke2fs: not found

./install.sh: 113: ./install.sh: e2fsck: not found

done.

Copying ROOTFS.

mount: /ddbr/install: special device /dev/mmcblk2p2 does not exist.

Copy BIN

Create DEV

Copy ETC

Copy HOME

Copy LIB

Create MEDIA

Create MNT

Copy OPT

Create PROC

Copy ROOT

Create RUN

Copy SBIN

Copy SELINUX

Copy SRV

Create SYS

Create TMP

Copy USR

Copy VAR

Copy fstab

umount: /ddbr/install: not mounted.

*******************************************

Complete copy OS to eMMC 

*******************************************

After installing to eMMC and unplugging my mSD card my VIM3 always boots to Android. I’ve tried to activate multi-boot again with the keys mode (power+reset buttons) and it boots to Armbian from mSD when mSD card is inserted, otherwise it boots to Android Recovery.

parted package ia not present. Install it first.
sudo apt install parted

The package parted is installed as seen below

$ sudo apt-cache policy parted
parted:
Installed: 3.2-25
Candidate: 3.2-25
Version table:
*** 3.2-25 500
500 Index of /debian buster/main arm64 Packages
100 /var/lib/dpkg/status