How to boot balbes150 libreelec image?

I am trying to boot @balbes150 libreelec on my khadas vim. I don’t need multiboot or anything else, just to boot it from microsd card. I don’t have Khadas VIM remote so this is also not needed. Have Any Logitech Smart Keyboard on USB.

I followed these instruction but it does not boot to libreelec on microSD. Any hints?

used this u-boot: Vim_Marshmallow_Root_170303.7z

find microSD card:
# dmesg | tail -n 10
  sd 6:0:0:0: [sdb] 3921920 512-byte logical blocks: (2.01 GB/1.87 GiB)
    sdb: sdb1 sdb2
#
unmount (if automounted)
# umount /dev/sdb1 /dev/sdb2
zero the beginning of the micro SD card:
# dd if=/dev/zero of=/dev/sdb bs=1M count=8
8+0 records in
8+0 records out
8388608 bytes (8,4 MB, 8,0 MiB) copied, 1,37043 s, 6,1 MB/s
#
write image to disk
# cd balbes150/
# gunzip -d LibreELEC-S905.aarch64-17.3_20170614.img.gz
# dd if=LibreELEC-S905.aarch64-17.3_20170614.img of=/dev/sdb bs=4M
137+0 records in
137+0 records out
574619648 bytes (575 MB, 548 MiB) copied, 92,1211 s, 6,2 MB/s
# sync

list partitions
# fdisk -l /dev/sdb
....
Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *       2048 1050624 1048577  512M  c W95 FAT32 (LBA)
/dev/sdb2       1052672 1118208   65537   32M 83 Linux

mount first partition and delete dtb.img
#  mount /dev/sdb1 /mnt/sdb1
# ls -al /mnt/sdb1
total 148676
drwxr-xr-x 2 root root     16384 Jan  1  1970 .
drwxr-xr-x 5 root root      4096 May 12 10:13 ..
-rwxr-xr-x 1 root root 143765504 Jun 14 18:18 SYSTEM
-rwxr-xr-x 1 root root        48 Jun 14 18:18 SYSTEM.md5
-rwxr-xr-x 1 root root       751 Jun 14 18:18 aml_autoscript
-rwxr-xr-x 1 root root       427 Jun 14 18:18 aml_autoscript.zip
-rwxr-xr-x 1 root root    159744 Jun 14 18:18 dtb.img
-rwxr-xr-x 1 root root      3781 Jun 14 18:18 install.sh
-rwxr-xr-x 1 root root   8210432 Jun 14 18:18 kernel.img
-rwxr-xr-x 1 root root        48 Jun 14 18:18 kernel.img.md5
-rwxr-xr-x 1 root root      3149 Jun 14 18:18 remote.conf.i7pro
-rwxr-xr-x 1 root root      2479 Jun 14 18:18 remote.conf.vegas95
-rwxr-xr-x 1 root root      1994 Jun 14 18:18 remote.conf.vim
-rwxr-xr-x 1 root root      1520 Jun 14 18:18 s905_autoscript
# rm /mnt/sdb1/dtb.img
# umount /mnt/sdb1
# eject /dev/sdb
#

@balbes150 wrote this, but here it does not work

  1. To write the image to the media (SD or USB)
  2. Delete media file “dtb.img”
  3. Rename the file “remote.conf.vim” in “remote.conf”
  4. To activate the multi-boot using this media (as an option, using the launch application in Android “Update&Backup”, details are in this thread and in the subject of Ubuntu).
  5. Start LE with external media, to verify and customize yourself. If you are satisfied, choose off menu item “Reboot to Install to eMMC”. The system will automatically install the LE in the internal memory (eMMC).

To work the remote control, you need to use the old version of the firmware (with Android 6). The new version of the firmware (with Android 7) changed the format of the processing codes for the remote control and this format is not compatible with existing images LE. Therefore, the remote LE will not work if you attempt to run LE on a version 7 Android. So for those who wanted to install the LE in the internal memory (eMMC), you need to have the firmware in eMMC with the previous version of Android 6. Only then, after the install LE in the eMMC, will operate the remote control.


In this paste log at the first are instruction i used and after line 30 the u-boot (from Vim_Marshmallow_Root_170303.7z) boot log.
These instruction i took from @Gouwa in this post without copying any new dtb, only your in image.
I also tested with deleting dtb.img but it still does not boot.

Thank you!

2 Likes

i only deleted the dtb.img, it works for me without any other steps but i think it depends on what bootloader is installed on the emmc. i have android running …

I wrote that i have u-boot (ok also Android on eMCC) from Vim_Marshmallow_Root_170303.7z .Which one do you have?

Vim_Nougat_20170421_root … did you try the update&backup way within android? maybe it will work …

well as @Gouwa wrote here seems I can just do “run update” from u-boot (should be same as update&backup within android) which does some stuff (see log), but just don’t boot.

The problem is that the user does NOT WANT to activate the multi-boot. Without activate the multi-boot you have to use other ways to launch LE with external media.

Are you sure that “run update” from u-boot is not the same as “update&backup” from within Android?

thank you balbes150 … you are great! so i cannot help … by the way, your build is working on my khadas pro, but without support for my usb-receiver and vdr-backend, so i have to wait …

i mean that way (multi-boot, but you don’t like… ) settings - about - update&backup - updateLocale-select - aml_autoscript.zip - update

1 Like

Ok i am going to try that later on just to check if “run update” from u-boot is not the same as “update&backup” from within android.
After doing that within Android will it automatically boot libreelec from microsd or i need to press and hold function button?

nothing else to do …

This is from your log (line 37). Please note - you seem to have tried to run the activation of the multi-boot, but the version of Kszaq. It does NOT support running other images LE. Ie multiboot image Kszaq can ONLY run images that are going to Kszaq. Please note that this does not mean that it is bad multiupload. It’s different variants, each with its own purpose.

bootcmd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run librefromsd; run librefromusb; fi; run storeboot

I used for sure your image “dd if=LibreELEC-S905.aarch64-17.3_20170614.img of=/dev/sdb bs=4M” . And before that i flashed u-boot and Android from “Vim_Marshmallow_Root_170303.7z” so the u-boot and Android were “clean”.

line 332-333

reading dtb.img
159744 bytes read in 14 ms (10.9 MiB/s)

you have not deleted the dtb.img
del “dtb.img” SD card

1 Like

Yes that was first log which I put online, i’ll check this again asap. But i am sure I deleted (after you wrote it) the dtb.imb file but nothing was on TV. And currently I don’t have serial console access to get new log.

Show the output of printenv from u-boot.

Ok using Android Menu “update&backup” actually works. here is complete log over serial console.
From 1 - 230 line ist just clean u-boot boot and printenv part.

Line 256 show actually reboot mode which is “update” which should be same as doing in “u-boot” the “run update” @Gouwa can you confirm this?
[ 281.279063@0] reboot: Restarting system(init) with command 'update'

From Line 372 shows actually update and activating multiboot mode
reboot_mode=update

@balbes150 if you check old paste log from line 131 you will see this same file. Also this pastelog have printenv which was in that time there.
reading aml_autoscript

Any way I have now @balbes150 LibreELEC booting from microSD. Why it does not work with u-boot “run update” I am not quite sure, but maybe @Gouwa or someone else write this.

Thank you @balbes150 and @harpmaster for your time and instruction.

1 Like

By the way, now you can immediately after burning the image to media, launch images, Kszaq (multiboot to activate more is NOT necessary). In his images has its own version of the script s905_autoscript. This script allows you to run images Kszaq on all systems with universal multiboot. In this script there are extra commands that increase startup time (I wrote about it with a patch to fix it, but he did not use), but the script is working.

This topic was not created to fix the boot issue with @kszaq image, but to use @balbes150 LibreELEC.

Anyway I tried the LibreELEC from @kszaq but it won’t boot (stops on same message as in log I posted in other topic where @kszaq was active. I just power off @balbes150 Libreelec, swaped microSD cards (left @kszaq dtb.img (cp gxl_p212_2g_kvim.dtb sdb1/dtb.img) and power on the device.

Here is boot log

Checked the latest image Kszaq. Everything works. Simply remove the dtb.img. It is not needed. System works fine with dtb data from the internal memory. The remote is recognized and works. I only did not test the installation in eMMC, but I think it will work. :slight_smile: