On a Beelink X2 I booted armbian from microSD and then I dd Lakka-H3.bx2.arm-devel-20161128115707-r21681-gb8cc538.img to the Beelink X2 onboard eMMC 8GB storage.
sudo dd if=Lakka-H3.bx2.arm-devel-20161128115707-r21681-gb8cc538.img of=/dev/mmcblk1
Lakka boots fine from the Beelink X2 onboard eMMC 8GB storage when there is no microSD present.
If an empty SDFormatter FAT32 formatted microSD card (16GB) is present, Lakka won’t boot, Lakka logo shows in middle of the screen, the error “sh: can’t access tty; job control turned off” and a # prompt is shown!
When a microSD is present the microSD is /dev/mmcblk0 and the onboard eMMC is /dev/mmcblk1, when there is no microSD present the onboard eMMC is /dev/mmcblk0.
Would be nice to have Lakka on the onboard eMMC storage and a microSD with only roms.
How can this be resolved?
Problem solved with instructions from https://docs.armbian.com/User-Guide_Getting-Started/#how-to-install-to-emmc-nand-sata-usb and https://forum.armbian.com/index.php/topic/1702-orange-pi-plus-2e-where-is-16ghz-and-sd/?p=13163.
I powered on the Beelink X2 without a microSD present to boot Lakka from the onboard eMMC.
Lakka > Settings > Lakka Services > SSH > SSH Enable > ON.
Did the following over SSH:
mount -o remount,rw /flash ;
cp /flash/script.bin /flash/script.bin.sdc_detmode3 ;
bin2fex /flash/script.bin /flash/script.fex ;
sed -i '/\[mmc0_para\]/,/^\[/ s/sdc_detmode = 3/sdc_detmode = 1/g' /flash/script.fex ;
fex2bin /flash/script.fex /flash/script.bin.sdc_detmode1 ;
cp /flash/script.bin.sdc_detmode1 /flash/script.bin ;
mount -o remount,ro /flash ;
I powered on the Beelink X2 with a microSD present and Lakka boots fine from the onboard eMMC.
The microSD with only roms is available in Lakka
But is it permanently fixed or will it be overwritten by a future update?
Update test 1 failed
Not sure what happened, but Lakka broke during the update procedure. Lakka would not boot with or without a microSD present.
Lakka logo showed in the middle of the screen, the error “sh: can’t access tty; job control turned off” and a # prompt was shown!
Update test 2 and 3 was a success
Running Lakka from the onboard eMMC flashed with Lakka-H3.bx2.arm-devel-20161128115707-r21681-gb8cc538.img, with a modified /flash/script.bin to allow boot from onboard eMMC with a micrSD present and there is a MicroSD present with roms.
Lakka > Main menu > Online Updater > Update Lakka > Lakka-H3.bx2.arm-devel-20161209140640-r21701-gfa407b3.tar > 100% downloaded > Back > Back > Reboot > MicroSD is present > Lakka updates and reboots > Lakka boots normal.
The modified /flash/script.bin file was not replaced and Lakka updated successfully