Bring the build to libreelec community

I’m extremely happy with my PI2 and PI3 nightly builds: http://forum.kodi.tv/showthread.php?tid=298461

Would you please bring your build to the libreelec community?

https://forum.libreelec.tv/forum-38.html

One day when the official build is released, Khadas VIM will be supported from the upstream.

2 Likes

Thanks for your feedback, in fact, we had this plan, but for now, no idea how to let LibreELEC official community add the support of Khadas VIM.

Anybody knows how to do that? :slight_smile:

1 Like

I gave this information to the official representative of the LE community. :slight_smile:

4 Likes

You are the best balbes150! Thank you!

According to information from the representative of the LE community, he is ready to discuss the participation of Khadas to the development of the project LE. If You have the desire, You can create a LE on the forum topic, or ask directly in PM to the user Chewitt.

1 Like

Great news!

Where you got the information? I didn’t found any topic about this :wink:

From correspondence with Chewitt. I understand his statement that You can write him a PM or create a topic on the forum.

1 Like

Are there any news about Khadas VIM support in official LibreELEC release?

I have been watching how this thread goes. Unfortunately, the latest OpenElec firmware was from four months ago, not updated as frequently as the Android firmware.

I really like the looking, but lacking efirmware support made it less attractive.

I have added a device tree for Khadas Vim board that should make my LE community builds work. Please let me know if it works as I don’t have the board. You can follow the development here: https://forum.libreelec.tv/thread/2156-8-0-2b-libreelec-8-0-for-s905-s905x/

6 Likes

Then Khadas stuff should arrange you an :wink:

@Terry @Gouwa
which u-boot should be flashed in order to boot directly to micro SD / USB which have @kszaq libreelec image?
I found an older post where you wrote ubuntu-rom-for-khadas-vim :

Erase the eMMC and Khadas VIM will boot from the SD card automately.
Force enter into MaskRom mode first, then Khadas VIM will try to boot from SD card.
Long press the Function button to boot from SD card.(Need upgrade to the latest ROM first)

I did erase eMMC and on reset I just see this:

GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;CHK:AA;USB:8;

it was an Android Nougat u-boot/image before erase command.

With Android installed on eMMC, you should be able to boot my build from SD card by using Reset button for the first boot unless Khadas’ u-boot behaves differently from what I know from TV boxes.

Seems it is not like that with Khadas VIM, here is boot log (Vim_Nougat_Root_170612.7z flashed)

I also did ‘dd’ the u-boot-bin.sd-bin (from Vim_Uboot_170121.7z) as postet in that above thead from @Gouwa and erased eMMC again. But i have now only bootloop.

@Khadas Team please assist…

GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 167027

BL2 Built : 13:48:56, Sep 23 2016.
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
sd/emmc read data error: ret=16
aml log : SIG CHK : 260 for address 0x01700000
reset…

Not sure but I guess you didn’t have a HDMI Cable connected with VIM device, can you try again with a HDMI cable plug in?

It is for sure plugged in. I have had on TV picture from Android Nougat. still connected. But only loop. Can you check this @kszaq image yourself and let us know how to boot it?
As far i understand there are two partitions once they are burned to microSD (using Refus). Then i copied @kszaq gxl_p212_2g_kvim.dtb to first partition and overwrite dtb.img.
Tried to boot nothing happen over serial console.

Then i ‘dd’ that u-boot.bin.sd.bin to microSD by using Linux (tried u-boot.bin.sd.bin from Vim_Uboot_170121.7z and Vim_Uboot_170304.7z). Erased eMMC and only that bootloop.

Downloading the LE ROM, will keep you updated later.

1 Like

I did it now everything on Linux host, and in current state it does not boot. In your instruction you format sdb1 partition and flashed u-boot.bin.sd.bin but that I cannot do with @kszaq Libreelec build as this is where kernel and dtb files resides.

Here the commands I used:

[root@vdr01 /]# cd /opt/kszaq/
[root@vdr01 kszaq]# ls
LibreELEC-S905.arm-8.0-8.0.2b.img.gz  gxl_p212_2g_kvim.dtb
[root@vdr01 kszaq]# gunzip -d LibreELEC-S905.arm-8.0-8.0.2b.img.gz
[root@vdr01 kszaq]# ls
LibreELEC-S905.arm-8.0-8.0.2b.img  gxl_p212_2g_kvim.dtb
[root@vdr01 kszaq]# dd if=LibreELEC-S905.arm-8.0-8.0.2b.img of=/dev/sdb bs=4M
137+0 records in
137+0 records out
574619648 bytes (575 MB, 548 MiB) copied, 80,7735 s, 7,1 MB/s
[root@vdr01 kszaq]# sync
[root@vdr01 kszaq]# fdisk -l /dev/sdb
Disk /dev/sdb: 1,9 GiB, 2001731584 bytes, 3909632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0fdc8fac

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
[root@vdr01 kszaq]# mkdir /opt/kszaq/sdb1
[root@vdr01 kszaq]# mount /dev/sdb1 /opt/kszaq/sdb1/
[root@vdr01 kszaq]# ls sdb1/
SYSTEM  SYSTEM.md5  aml_autoscript  dtb.img  kernel.img  kernel.img.md5  s905_autoscript
[root@vdr01 kszaq]# cp gxl_p212_2g_kvim.dtb sdb1/dtb.img
[root@vdr01 kszaq]# umount /opt/kszaq/sdb1
[root@vdr01 kszaq]# mkdir /opt/kszaq/sdb2
[root@vdr01 kszaq]# mount /dev/sdb2 /opt/kszaq/sdb2
[root@vdr01 kszaq]# ls sdb2/
lost+found
[root@vdr01 kszaq]# ls -a sdb2/
.  ..  .please_resize_me  lost+found
[root@vdr01 kszaq]# umount /opt/kszaq/sdb2
[root@vdr01 kszaq]# eject /dev/sdb

With micro SD prepared with above instruction and nothing on eMMC i just see this loop:
LOOP:2;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;CHK:AA;USB:8;;LOOP:E;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;CHK:AA;USB:8;
so the u-boot.bin.sd.bin must be ‘dd’ to microSD crad in order to boot from it when there is nothing in eMMC.

Hi, Vrabac:
Here can boot into LE ROM from kszaq, but it seems that the ROM not works fine on VIM yet.

1) Upgrade to Vim_Marshmallow_Root_170303

2) Steps on Host for your reference:

gouwa@Wesion:~/Downloads$ gunzip -d LibreELEC-S905.arm-8.0-8.0.2b.img.gz 
gouwa@Wesion:~/Downloads$ sudo parted -l
[sudo] password for gouwa: 
Model: ATA ST1000LM014-1EJ1 (scsi)
Disk /dev/sda: 1000GB

...

Model: Mass Storage Device (scsi)
Disk /dev/sdb: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      16.5MB  7946MB  7929MB  primary  fat32        boot


gouwa@Wesion:~/Downloads$ sudo umount /dev/sdb1 
gouwa@Wesion:~/Downloads$ sudo dd if=LibreELEC-S905.arm-8.0-8.0.2b.img of=/dev/sdb bs=4M
137+0 records in
137+0 records out
574619648 bytes (575 MB, 548 MiB) copied, 69.3089 s, 8.3 MB/s
gouwa@Wesion:~/Downloads$ sync
gouwa@Wesion:~/Downloads$ cp -r gxl_p212_2g_kvim.dtb /media/gouwa/LIBREELEC/dtb.img 
gouwa@Wesion:~/Downloads$ sudo eject /media/gouwa/LIBREELEC/
gouwa@Wesion:~/Downloads$ 

3) Steps on VIM: Boot into U-Boot, and run below to boot into SD card:

kvim#run update
InUsbBurn
noSof
card in
[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 3
OEM: 5344
Name: SU08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
mmc clock: 40000000
Bus Width: 4-bit
Device: SDIO Port B
Manufacturer ID: 3
OEM: 5344
Name: SU08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
mmc clock: 40000000
Bus Width: 4-bit
reading aml_autoscript
1033 bytes read in 8 ms (126 KiB/s)
## Executing script at 01080000
Saving Environment to aml-storage...
mmc env offset: 0x27400000 
Writing to MMC(1)... done
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
[KM]Error:f[key_manage_query_size]L507:key[usid] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[mac] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
Device: SDIO Port B
Manufacturer ID: 3
OEM: 5344
Name: SU08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
mmc clock: 40000000
Bus Width: 4-bit
reading kernel.img
6885376 bytes read in 385 ms (17.1 MiB/s)
reading dtb.img
38228 bytes read in 6 ms (6.1 MiB/s)
sd dtb.img loaded
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
reloc_addr =73f51440
copy done
load dtb from 0x1000000 ......
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01aeb908
   Loading Ramdisk to 73d33000, end 73eb9411 ... OK
   Loading Device Tree to 000000001fff3000, end 000000001ffff553 ... OK
signature: 
fdt_instaboot: no instaboot image

Starting kernel ...

uboot time: 57687625 us
[    0.000000@0] Initializing cgroup subsys cpuset
[    0.000000@0] Initializing cgroup subsys cpu
[    0.000000@0] Initializing cgroup subsys cpuacct
[    0.000000@0] Linux version 3.14.29 (kszaq@FPGAWorker) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP Mon Jun 12 23:09:21 CEST 2017
[    0.000000@0] CPU: AArch64 Processor [410fd034] revision 4
[    0.000000@0] no prop version_code
[    0.000000@0] bootconsole [earlycon0] enabled
[    0.000000@0] fdt Reserved memory table:
[    0.000000@0]            linux,meson-fb: 0x000000007e000000 - 0x0000000080000000  (32 MiB)
[    0.000000@0]                  linux,di: 0x000000007c200000 - 0x000000007e000000  (30 MiB)
[    0.000000@0] DI: DI reserved memory: created CMA memory pool at 0x000000007c200000, size 30 MiB
[    0.000000@0]             linux,ion-dev: 0x0000000079200000 - 0x000000007c200000  (48 MiB)
[    0.000000@0]               linux,ppmgr: 0x0000000079200000 - 0x0000000079200000  (0 MiB)
[    0.000000@0]        linux,codec_mm_cma: 0x0000000067c00000 - 0x0000000073c00000  (192 MiB)
[    0.000000@0]              linux,picdec: 0x0000000079200000 - 0x0000000079200000  (0 MiB)
[    0.000000@0] Reserved memory: incorrect alignment of CMA region
[    0.000000@0]   linux,codec_mm_reserved: 0x0000000075100000 - 0x0000000079200000  (65 MiB)
[    0.000000@0] fdt Reserved memory total:  370 MiB
[    0.000000@0] cma: Reserved 8 MiB at 74800000
[    0.000000@0] psci: probing function IDs from device-tree
[    0.000000@0] PERCPU: Embedded 12 pages/cpu @ffffffc0750a1000 s17152 r8192 d23808 u49152
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 506004
[    0.000000@0] Kernel command line: rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=disabled logo=osd1,loaded,0x3d800000,2160p60hz420 maxcpus=4 vout=2160p60hz420,enable hdmimode=2160p60hz420 cvbsmode= hdmitx= cvbsdrv= androidboot.firstboot=0 jtag=apao androidboot.hardware=amlogic bootfromsd console=tty0 systemd.show_status=auto noswap
[    0.000000@0] logo: osd1
[    0.000000@0] logo: loaded
[    0.000000@0] logo: 0x3d800000
[    0.000000@0] logo: 2160p60hz420
[    0.000000@0] vout_serve: 2160p60hz420
[    0.000000@0] vout_serve: en: 1
[    0.000000@0] logo: get hdmimode: 2160p60hz420
[    0.000000@0] logo: get cvbsmode: 
[    0.000000@0] tv_vout: cvbs performance line = 
[    0.000000@0] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000@0] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000@0] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000@0] Memory: 1649160K/2060288K available (6672K kernel code, 694K rwdata, 2448K rodata, 844K init, 5194K bss, 411128K reserved)
[    0.000000@0] Virtual kernel memory layout:
[    0.000000@0]     vmalloc : 0xffffff8000000000 - 0xffffff8040000000   (  1024 MB)
[    0.000000@0]     vmemmap : 0xffffff8040010000 - 0xffffff8042380000   (    35 MB)
[    0.000000@0]     modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
[    0.000000@0]     memory  : 0xffffffc000000000 - 0xffffffc07e000000   (  2016 MB)
[    0.000000@0]       .init : 0xffffffc00196a000 - 0xffffffc001a3d300   (   845 kB)
[    0.000000@0]       .text : 0xffffffc001080000 - 0xffffffc0019691b4   (  9125 kB)
[    0.000000@0]       .data : 0xffffffc001a3e000 - 0xffffffc001aeb908   (   695 kB)
[    0.000000@0] PM: Registered nosave memory: [mem 0x01080000-0x01968fff]
[    0.000000@0] SLUB: HWalign=64, Order=0-1, MinObjects=0, CPUs=4, Nodes=1
[    0.000000@0] arch_multi_cluster:0
[    0.000000@0] Hierarchical RCU implementation.
[    0.000000@0] 	RCU debugfs-based tracing is enabled.
[    0.000000@0] 	CONFIG_RCU_FANOUT set to non-default value of 32
[    0.000000@0] NR_IRQS:64 nr_irqs:64 0
[    0.000000@0] Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000005@0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns
[    0.008242@0] meson_bc_timer: mclk->mux_reg =ffffff800000c990,mclk->reg =ffffff800000e994
[    0.016738@0] Console: colour dummy device 80x25
[    0.021087@0] console [tty0] enabled
[    0.024673@0] bootconsole [earlycon0] disabled
domain-0 init dvfs: 4

@kszaq as the printing log is disabled, so I can’t figure out the detailed issue at the moment, and follow are some information:

  • Stuck, see log above.
  • The monitor/display didn’t show anything, just black screen.
  • U-Boot ENV as following:
kvim# print
EnableSelinux=disabled
baudrate=115200
bootargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=disabled logo=osd1,loaded,0x3d800000,2160p60hz420 maxcpus=4 vout=2160p60hz420,enable hdmimode=2160p60hz420 cvbsmode= hdmitx= cvbsdrv= androidboot.firstboot=0 jtag=apao androidboot.hardware=amlogic
bootcmd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run librefromsd; run librefromusb; fi; run storeboot
bootdelay=1
bootfromnand=0
bootup_offset=0x10d82a0
bootup_size=0x3f4b8
cmdline_keys=if keyman init 0x1234; then if keyman read usid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if keyman read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;if keyman read deviceid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.deviceid=${deviceid};fi;fi;
combine_key=saradc open 0;if saradc get_in_range 0x0 0x1f; then echo Detect function key;if gpio input GPIOAO_2; then echo Detect combine keys;store init 3; fi;fi;
display_bpp=16
display_color_bg=0
display_color_fg=0xffff
display_color_index=16
display_height=2160
display_layer=osd1
display_width=3840
dtb_mem_addr=0x1000000
ethact=dwmac.c9410000
ethaddr=00:15:18:01:81:31
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; 
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
filesize=409
firstboot=0
gatewayip=10.18.9.1
hdmimode=2160p60hz420
hostname=KVim
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 
ipaddr=10.18.9.97
jtag=apao
librefromsd=if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi
librefromusb=if usb start 0; then if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi; fi
loadaddr=1080000
maxcpus=4
netmask=255.255.255.0
outputmode=2160p60hz420
preboot=run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run combine_key;run upgrade_key;run vim_check;run switch_bootmode;
reboot_mode=cold_boot
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
saradc_val=0x1f7
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
sddtb=if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; else store dtb read $dtb_mem_addr; fi
serverip=10.18.9.113
stderr=serial
stdin=serial
stdout=serial
storeargs=setenv bootargs ${initargs} androidboot.selinux=${EnableSelinux} logo=${display_layer},loaded,${fb_addr},${outputmode} maxcpus=${maxcpus} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic;run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = cold_boot; then fi;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;
upgrade_key=if gpio input GPIOAO_2; then echo detect upgrade key; sleep 1;if gpio input GPIOAO_2; then run update; fi;fi;
upgrade_step=2
usb_burning=update 1000
usbdtb=if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo usb dtb.img loaded; else store dtb read $dtb_mem_addr; fi
vim_check=saradc open 1;if saradc get_in_range 0x1d0 0x220; then echo Product checking: pass!;else if saradc get_in_range 0x0 0x1cf; then echo Product checking: fail!; sleep 5; reboot;fi;fi;
wipe_cache=successful
wipe_data=successful

Environment size: 5753/65532 bytes
kvim#

Anything you need me to assistant just let me know.

Thanks.