The method I used is to dd the full SD/USB image to eMMC directly. You can use Fenix script to build such image, but you need some patches.
Download U-boot patch here.
Download Linux 4.9 patch here.
Download Fenix patch here.
After apply these patches, try to build SD/USB image.
Version: 0.5
Current environment:
===========================================
#KHADAS_BOARD=VIM2
#VENDOR=Amlogic
#CHIP=S912
#LINUX=4.9
#UBOOT=2015.01
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=bionic
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB
===========================================
Build image:
$ make kernel && make debs && make
When you built the image, you need to boot from SD card first (any SD card image is OK), and then copy the image to your SD card, and write it to eMMC use dd
command.
khadas@Khadas:~$ sudo dd if=VIM2_Ubuntu-server-bionic_Linux-4.9_arm64_SD-USB_V20190107.img of=/dev/mmcblk0 bs=8M
khadas@Khadas:~$ sync
Remove the SD card, then reset the board, you will boot from eMMC with MBR partition table.
Note: If you change the patition table, you will can’t use Amlogic burn tool to upgrade your firmware anymore.
Thanks.