LibreELEC for the VIM2


#1

Please note: adding a heatsink to the CPU is highly recommended!

As you may already know, I build LibreELEC also for S912 devices. In my 8.1.7 I added vsync support - this means smooth GUI animations and pleasant Kodi experience on S912 devices.

For now I don’t have the VIM2 so I’d like to ask you to test if in current state it can run LE. Everything should work except for IR remote and WiFi/BT on VIM2 Max/Pro - I need to implement AP6359SA driver in my builds.

Thank to Khadas Team generosity I now have VIM2 boards and DTV extension board. The VIM2 is supported since 8.1.10-rc1 build. DTV board is also supported! There are a few things not yet implemented, e.g. cooling fan driver or a customised u-boot.

How to run LE on your VIM2:

  1. Android is required to be installed on internal eMMC, other OS were not tested but may work.
  2. Download the latest build image from this address: https://sx05.eu/s912/8.2/8.1.10/LibreELEC-S912.arm-8.2-8.1.10.img.gz
  3. Use Rufus (on Windows) or gunzip+dd (on Linux) to burn the image to SD card.
  4. Delete dtb.img from SD card.
  5. Download https://sx05.eu/s912/8.2/device_trees/1Gbit_Ethernet/gxm_kvim2.dtb rename it to dtb.img and copy to your SD card.
  6. Insert SD card to your VIM2 and use “Keys mode” to run LibreELEC: http://docs.khadas.com/develop/HowtoBootIntoUpgradeMode/

DVB/DTV Extension Board for VIM2 (VTV)
Is Libreelec better than SPMC on Android on the VIM2
#2

Hi @kszaq,

I’ve tried this image on VIM2 MAX, but I can’t boot to LibreELEC. The android I used is Nougat. And I use Win32DiskImager to burn the image to SD card.You can find the log here.Thanks.

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 91364

BL2 Built : 11:58:42, May 27 2017. 
gxl gc3c9a84 - xiaobo.gu@droid05

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR4 chl: Rank0+1 @ 1008MHz
Rank0: 2048MB(auto)-2T-18
Rank1: 1024MB(auto)-2T-18
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x00018400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x00055400
NOTICE:  BL3-1: v1.0(release):3348978
NOTICE:  BL3-1: Built : 15:44:01, May 12 2017
NOTICE:  BL3-1: BL33 decompress pass
mpu_config_enable:ok
[Image: gxl_v1.1.3221-2cfba69 2017-05-27 16:03:58 qiufang.dai@droid07]
OPS=0x82
wdt: reset registers!
b3 9d ba 42 d4 a4 f2 11 93 3b f4 1b [0.286092 Inits done]
secure task start!
high task start!
low task start!
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g5809655 (Aug 21 2017 - 10:28:19)

DRAM:  3 GiB
Relocation Offset is: b6ed0000
register usb cfg[0][1] = 00000000b7f594a0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpu: vpu_clk_gate_init_off
vpp: vpp_init
MMC:   aml_priv->desc_buf = 0x00000000b3ed0640
aml_priv->desc_buf = 0x00000000b3ed2960
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
init_part() 293: PART_TYPE_AML
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=00000000b3ed51b0,dt_addr=00000000b3ed51b0
parts: 10
00:      logo   0000000002000000 1
01:  recovery   0000000002000000 1
02:       rsv   0000000000800000 1
03:       tee   0000000000800000 1
04:     crypt   0000000002000000 1
05:      misc   0000000002000000 1
06:      boot   0000000002000000 1
07:    system   0000000080000000 1
08:     cache   0000000020000000 2
09:      data   ffffffffffffffff 4
init_part() 293: PART_TYPE_AML
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x27400000 
In:    serial
Out:   serial
Err:   serial
reboot_mode=cold_boot
Unknown command 'cvbs' - try 'help'
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970000
HPLL: 0xc000027b
config HPLL done
j = 4  vid_clk_div = 1
hdmitx: set enc for VIC: 16
HDMITX-DWC addr=0x10004006 rd_data=0x40
Error: HDMITX-DWC exp_data=0xff mask=0x9f
rx version is 1.4 or below  div=10
hdmtix: set audio
hdmitx phy setting done
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-917: calc c2a92e62, store c2a92e62
_verify_dtb_checksum()-917: calc c2a92e62, store c2a92e62
dtb_read()-1039: total valid 2
dtb_read()-1106: do nothing
vpp: vpp_pq_load pq val error !!!
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in...
Net:   __phy_realtek_initdwmac.c9410000amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0

Start read misc partition datas!
info->attemp_times = 0
info->active_slot = 0
info->slot_info[0].bootable = 1
info->slot_info[0].online = 1
info->slot_info[1].bootable = 0
info->slot_info[1].online = 0
info->attemp_times = 0
attemp_times = 0 
active slot = 0 
wipe_data=successful
wipe_cache=successful
upgrade_step=2
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[CANVAS]addr=0xbd851000 width=3840, height=2160
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
[BL31]: tee size: 0

mac address: 98:aa:fc:60:46:de
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
saradc - saradc sub-system

Usage:
saradc saradc open <channel>            - open a SARADC channel
saradc close    - close the SARADC
saradc getval   - get the value in current channel
saradc get_in_range <min> <max> - return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass!
normal power on
boot wol: disable
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 74
OEM: 4a60
Name: 00000 
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
mmc clock: 40000000
Bus Width: 4-bit
reading kernel.img
7534592 bytes read in 433 ms (16.6 MiB/s)
reading dtb.img
** Unable to read file dtb.img **
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in...
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
reloc_addr =b3f55360
copy done
load dtb from 0x1000000 ......
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01b6cea8
   Loading Ramdisk to b3cca000, end b3ebe0a1 ... OK
   Loading Device Tree to 000000001fff2000, end 000000001fffff84 ... OK
fdt_instaboot: no instaboot image

Starting kernel ...

uboot time: 2401124 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@cvm) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP Tue Sep 12 17:54:38 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,di: 0x00000000b6200000 - 0x00000000b8000000  (30 MiB)
[    0.000000@0] DI: DI reserved memory: created CMA memory pool at 0x00000000b6200000, size 30 MiB
[    0.000000@0]             linux,ion-dev: 0x00000000afcca000 - 0x00000000b3cca000  (64 MiB)
[    0.000000@0]           linux,vdin1_cma: 0x00000000b5000000 - 0x00000000b6000000  (16 MiB)
[    0.000000@0] cma: Reserved 16 MiB at b5000000, total cma pages:4096
[    0.000000@0]               linux,ppmgr: 0x00000000b6200000 - 0x00000000b6200000  (0 MiB)
[    0.000000@0]        linux,codec_mm_cma: 0x00000000a3c00000 - 0x00000000afc00000  (192 MiB)
[    0.000000@0] cma: Reserved 192 MiB at a3c00000, total cma pages:53248
[    0.000000@0]              linux,picdec: 0x00000000b6200000 - 0x00000000b6200000  (0 MiB)
[    0.000000@0] Reserved memory: incorrect alignment of CMA region
[    0.000000@0]   linux,codec_mm_reserved: 0x000000009fb00000 - 0x00000000a3c00000  (65 MiB)
[    0.000000@0] fdt Reserved memory total:  371 MiB
[    0.000000@0] cma: Reserved 12 MiB at b4400000, total cma pages:56320
[    0.000000@0] psci: probing function IDs from device-tree
[    0.000000@0] PERCPU: Embedded 12 pages/cpu @ffffffc0b6160000 s17152 r8192 d23808 u49152
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 736448
[    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=permissive logo=osd1,loaded,0x3d800000,1080p60hz maxcpus=8 vout=1080p60hz,enable hdmimode=1080p60hz cvbsmode= hdmitx= ddr_size=3 cvbsdrv= pq= androidboot.firstboot=0 jtag=disable androidboot.hardware=amlogic mac=98:aa:fc:60:46:de androidboot.mac=98:aa:fc:60:46:de androidboot.slot_suffix=_a wol_enable=0 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: 1080p60hz
[    0.000000@0] vout_serve: 1080p60hz
[    0.000000@0] vout_serve: en: 1
[    0.000000@0] vout_serve: set_vout_init_vmode: 1080p60hz
[    0.000000@0] vout_serve: 1080p60hz
[    0.000000@0] vout_serve: enable: 1
[    0.000000@0] logo: get hdmimode: 1080p60hz
[    0.000000@0] logo: get cvbsmode: 
[    0.000000@0] tv_vout: cvbs performance line = 
[    0.000000@0] [amvecm] pq string error !!!
[    0.000000@0] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000@0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000@0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000@0] Memory: 2533916K/3010560K available (6837K kernel code, 815K rwdata, 2616K rodata, 908K init, 2918K bss, 476644K reserved)
[    0.000000@0] Virtual kernel memory layout:
[    0.000000@0]     vmalloc : 0xffffff8000000000 - 0xffffff8040000000   (  1024 MB)
[    0.000000@0]     vmemmap : 0xffffff8040010000 - 0xffffff8043f50000   (    63 MB)
[    0.000000@0]     modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
[    0.000000@0]     memory  : 0xffffffc000000000 - 0xffffffc0b8000000   (  2944 MB)
[    0.000000@0]       .init : 0xffffffc0019bd000 - 0xffffffc001aa0300   (   909 kB)
[    0.000000@0]       .text : 0xffffffc001080000 - 0xffffffc0019bc684   (  9458 kB)
[    0.000000@0]       .data : 0xffffffc001aa1000 - 0xffffffc001b6cea8   (   816 kB)
[    0.000000@0] PM: Registered nosave memory: [mem 0x01080000-0x019bbfff]
[    0.000000@0] SLUB: HWalign=64, Order=0-1, MinObjects=0, CPUs=8, Nodes=1
[    0.000000@0] arch_multi_cluster:1
[    0.000000@0] Hierarchical RCU implementation.
[    0.000000@0]        RCU debugfs-based tracing is enabled.
[    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.008245@0] meson_bc_timer: mclk->mux_reg =ffffff8000014990,mclk->reg =ffffff8000016994
[    0.016783@0] Console: colour dummy device 80x25
[    0.021087@0] console [tty0] enabled
[    0.024672@0] bootconsole [earlycon0] disabled
domain-0 init dvfs: 4
domain-1 init dvfs: 4


#3

Hi Kszaq.

It might be useful to facilitate the use of your assemblies by normal users, add a few small changes to the composition of the image. Are you interested ?


#4

@numbqq Thank you for testing. Now I need to locate the issue…

@balbes150 I’m always open to all suggestions and patches that can improve the builds. :slight_smile:


#5

I suggest to use universal multi-boot. This will solve several problems (including the current problem faced by numbqq). It’s enough to make a few small changes.

  1. To change the activation script multi-boot and to add to the project archive file (which will, in addition to the “toothpick method”, run the activation using the standard app from the Android).
  1. Change existing (legacy) script s905_autoscript (which is used in the system multi-boot) and a small change in the file platform_init.

These changes will allow you to run LE with any carrier, and optionally will allow you to use different options to put system files and data in various combinations (including you can even have a combined Android and LE in eMMC). As used in this thread.

Then to be able very easy to use partition in eMMC for data and run the system from USB or SD cards using just a simple renaming of the desired script s905_autoscript_data_emmc to s905_autoscript (on the media will be immediately placed all the right versions of the scripts).


MultiOS_3in1 (Android+Libreelec+Linux) install to eMMC
#6

Hi @kszaq

If you’re interested, here’s a script that no additional steps to use the internal eMMC for storage and the settings LE (when the system starts from any external media SD card or USB flash drive). Can add it to the Assembly image, if users he’s going to need to use the internal memory to accommodate data and settings, just rename it from s905_autoscript_data_to_emmc in s905_autoscript .


#7

Thank you @balbes150. I think I can implement your ideas for testing soon. I would like to keep backwards compatibility with older builds but I know how to do this.

For now I am working on integrating the new BCM WiFi driver to make WiFi work on VIM2 Pro/Max.


#8

For those who have a system already in eMMC - a new version of platform_init as does not hurt (it uses the same data to the kernel command-line). For those who use the system from external media - I hope to not make the big work to perform the reactivation multi-boot “toothpick method” or using the update from Android (which is already available in the new version of the image). By the way, I wanted to suggest a few small changes that can improve the usability.

  1. To reduce the waiting time after the extension section with 15 seconds to 5. The process has already happened, so there is no point the user to wait extra time, or what he has to cancel will not.
  1. To change the algorithm for adding the dtb. This allows you to add dtb image file , even if it is one (going for the same model).
  1. Add in the collected image, the first FAT partition two subdirectories dtb (and put all your dtb files, which have to be put on the website), something users have them immediately after recording it and had to download them separately. To add a remote subdirectory and place the set of files for the remotes. The size of the FAT partition of 512 MB and it is enough to embed the data.
  1. Maybe you will be interested to add a menu item install LE to eMMC using remote control (somewhere in the system menu or menu off).

#9

@kszaq

To add a new script in the Assembly is sufficient to correct a one line template and add the script.


#10

Hi @kszaq

I tried briefly to see what can be the reason for the absence of the start of the kernel in the last build LE. A few points, if change the kernel configuration, start the kernel manages to pass on, but in the end gives a kernel panic. I tried my old test image LE that I was going in June (20170622). If remove dtb file, the system starts normally and works with external drives and when installing to eMMC (WiFi and remote do not work). It turns out that the possible cause of the failure, changed the kernel or its configuration.


#11

@balbes150 Thank you for your insight. I shall receive a VIM2 next week so I can start testing. I have also some ideas to implement your autoscript improvements while keeping backward compatibility. :slight_smile:


#12

Funnily enough I have encountered the same boot issue with Khadas VIM(1) and I was able to develop a fix. Hopefully it’ll also work for the VIM2. @numbqq would you be able to test once again? I updated the link in the first post.


#13

Hi kszaq,

Yes, of course, I will do this tomorrow.:grinning:


#14

Hi @kszaq,

I’ve tried LibreELEC-S912.arm-8.2-devel-20170926155701-r26290-gedf16bd.img on VIM2 MAX, but still failed to boot to LibreELEC.

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 91603

BL2 Built : 11:58:42, May 27 2017. 
gxl gc3c9a84 - xiaobo.gu@droid05

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR4 chl: Rank0+1 @ 1008MHz
Rank0: 2048MB(auto)-2T-18
Rank1: 1024MB(auto)-2T-18
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x00018400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x00055400
NOTICE:  BL3-1: v1.0(release):3348978
NOTICE:  BL3-1: Built : 15:44:01, May 12 2017
NOTICE:  BL3-1: BL33 decompress pass
mpu_config_enable:ok
[Image: gxl_v1.1.3221-2cfba69 2017-05-27 16:03:58 qiufang.dai@droid07]
OPS=0x82
wdt: reset registers!
b3 9d ba 42 d4 a4 f2 11 93 3b f4 1b [0.286442 Inits done]
secure task start!
high task start!
low task start!
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g5809655 (Aug 21 2017 - 10:28:19)

DRAM:  3 GiB
Relocation Offset is: b6ed0000
register usb cfg[0][1] = 00000000b7f594a0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpu: vpu_clk_gate_init_off
vpp: vpp_init
MMC:   aml_priv->desc_buf = 0x00000000b3ed0640
aml_priv->desc_buf = 0x00000000b3ed2960
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
init_part() 293: PART_TYPE_AML
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=00000000b3ed51b0,dt_addr=00000000b3ed51b0
parts: 10
00:      logo   0000000002000000 1
01:  recovery   0000000002000000 1
02:       rsv   0000000000800000 1
03:       tee   0000000000800000 1
04:     crypt   0000000002000000 1
05:      misc   0000000002000000 1
06:      boot   0000000002000000 1
07:    system   0000000080000000 1
08:     cache   0000000020000000 2
09:      data   ffffffffffffffff 4
init_part() 293: PART_TYPE_AML
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x27400000 
In:    serial
Out:   serial
Err:   serial
reboot_mode=cold_boot
Unknown command 'cvbs' - try 'help'
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970000
HPLL: 0xc000027b
config HPLL done
j = 4  vid_clk_div = 1
hdmitx: set enc for VIC: 16
HDMITX-DWC addr=0x10004006 rd_data=0x40
Error: HDMITX-DWC exp_data=0xff mask=0x9f
rx version is 1.4 or below  div=10
hdmtix: set audio
hdmitx phy setting done
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-917: calc 59447022, store 59447022
_verify_dtb_checksum()-917: calc 59447022, store 59447022
dtb_read()-1039: total valid 2
dtb_read()-1106: do nothing
vpp: vpp_pq_load pq val error !!!
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in...
Net:   __phy_realtek_initdwmac.c9410000amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0

Start read misc partition datas!
info->attemp_times = 0
info->active_slot = 0
info->slot_info[0].bootable = 1
info->slot_info[0].online = 1
info->slot_info[1].bootable = 0
info->slot_info[1].online = 0
info->attemp_times = 0
attemp_times = 0 
active slot = 0 
wipe_data=successful
wipe_cache=successful
upgrade_step=2
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[CANVAS]addr=0xbd851000 width=3840, height=2160
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
[BL31]: tee size: 0

mac address: 98:aa:fc:60:46:de
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
saradc - saradc sub-system

Usage:
saradc saradc open <channel>            - open a SARADC channel
saradc close    - close the SARADC
saradc getval   - get the value in current channel
saradc get_in_range <min> <max> - return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass!
normal power off
boot wol: enable
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 9c
OEM: 534f
Name: USD00 
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
7407616 bytes read in 419 ms (16.9 MiB/s)
reading dtb.img
** Unable to read file dtb.img **
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in...
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
reloc_addr =b3f55360
copy done
load dtb from 0x1000000 ......
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01b1fa10
   Loading Ramdisk to b3cca000, end b3ebde45 ... OK
   Loading Device Tree to 000000001fff2000, end 000000001fffff84 ... OK
fdt_instaboot: no instaboot image

Starting kernel ...

uboot time: 2379661 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@cvm) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP Tue Sep 26 15:47:00 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,di: 0x00000000b6200000 - 0x00000000b8000000  (30 MiB)
[    0.000000@0] DI: DI reserved memory: created CMA memory pool at 0x00000000b6200000, size 30 MiB
[    0.000000@0]             linux,ion-dev: 0x00000000afcca000 - 0x00000000b3cca000  (64 MiB)
[    0.000000@0]           linux,vdin1_cma: 0x00000000b5000000 - 0x00000000b6000000  (16 MiB)
[    0.000000@0] cma: Reserved 16 MiB at b5000000, total cma pages:4096
[    0.000000@0]               linux,ppmgr: 0x00000000b6200000 - 0x00000000b6200000  (0 MiB)
[    0.000000@0]        linux,codec_mm_cma: 0x00000000a3c00000 - 0x00000000afc00000  (192 MiB)
[    0.000000@0] cma: Reserved 192 MiB at a3c00000, total cma pages:53248
[    0.000000@0]              linux,picdec: 0x00000000b6200000 - 0x00000000b6200000  (0 MiB)
[    0.000000@0] Reserved memory: incorrect alignment of CMA region
[    0.000000@0]   linux,codec_mm_reserved: 0x000000009fb00000 - 0x00000000a3c00000  (65 MiB)
[    0.000000@0] fdt Reserved memory total:  371 MiB
[    0.000000@0] cma: Reserved 8 MiB at b4800000, total cma pages:55296
[    0.000000@0] psci: probing function IDs from device-tree
[    0.000000@0] PERCPU: Embedded 12 pages/cpu @ffffffc0b6160000 s17216 r8192 d23744 u49152
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 736448
[    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=permissive logo=osd1,loaded,0x3d800000,1080p60hz maxcpus=8 vout=1080p60hz,enable hdmimode=1080p60hz cvbsmode= hdmitx= ddr_size=3 cvbsdrv= pq= androidboot.firstboot=0 jtag=disable androidboot.hardware=amlogic mac=98:aa:fc:60:46:de androidboot.mac=98:aa:fc:60:46:de androidboot.slot_suffix=_a wol_enable=1 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: 1080p60hz
[    0.000000@0] vout_serve: 1080p60hz
[    0.000000@0] vout_serve: en: 1
[    0.000000@0] vout_serve: set_vout_init_vmode: 1080p60hz
[    0.000000@0] vout_serve: 1080p60hz
[    0.000000@0] vout_serve: enable: 1
[    0.000000@0] logo: get hdmimode: 1080p60hz
[    0.000000@0] logo: get cvbsmode: 
[    0.000000@0] tv_vout: cvbs performance line = 
[    0.000000@0] [amvecm] pq string error !!!
[    0.000000@0] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000@0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000@0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000@0] Memory: 2538324K/3010560K available (6745K kernel code, 722K rwdata, 2496K rodata, 904K init, 2919K bss, 472236K reserved)
[    0.000000@0] Virtual kernel memory layout:
[    0.000000@0]     vmalloc : 0xffffff8000000000 - 0xffffff8040000000   (  1024 MB)
[    0.000000@0]     vmemmap : 0xffffff8040010000 - 0xffffff8043f50000   (    63 MB)
[    0.000000@0]     modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
[    0.000000@0]     memory  : 0xffffffc000000000 - 0xffffffc0b8000000   (  2944 MB)
[    0.000000@0]       .init : 0xffffffc001988000 - 0xffffffc001a6a340   (   905 kB)
[    0.000000@0]       .text : 0xffffffc001080000 - 0xffffffc001987684   (  9246 kB)
[    0.000000@0]       .data : 0xffffffc001a6b000 - 0xffffffc001b1fa10   (   723 kB)
[    0.000000@0] PM: Registered nosave memory: [mem 0x01080000-0x01986fff]
[    0.000000@0] SLUB: HWalign=64, Order=0-1, MinObjects=0, CPUs=8, Nodes=1
[    0.000000@0] arch_multi_cluster:1
[    0.000000@0] Hierarchical RCU implementation.
[    0.000000@0]        RCU debugfs-based tracing is enabled.
[    0.000000@0] NR_IRQS:64 nr_irqs:64 0
[    0.000000@0] Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000004@0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns
[    0.008244@0] meson_bc_timer: mclk->mux_reg =ffffff8000014990,mclk->reg =ffffff8000016994
[    0.016781@0] Console: colour dummy device 80x25
[    0.021087@0] console [tty0] enabled
[    0.024672@0] bootconsole [earlycon0] disabled
domain-0 init dvfs: 4
domain-1 init dvfs: 4

#15

Hi,

I am also trying your LibreElec build, but to no avail. My VIM2 MAX is stuck at Khadas “logo”. How do you even get those logs?

Thanks!


#16

You can collect the logs over serial console.

I will further try to resolve the issue but I have to wait for the shipment with VIM2 to arrive.


#17

OK, many thanks! :slight_smile:


#18

One more test build if anyone wants to try:
http://kszaq.libreelec.tv/s912/8.2/test/LibreELEC-S912.arm-8.2-devel-20170927120728-r26291-g7f4f0b6.img.gz

If this one doesn’t work, I give up trying until VIM2 arrives. :wink:


#19

Append the dtb file (for model VIM2 MAX).

https://sx05.eu/s912/8.2/device_trees/1Gbit_Ethernet/gxm_q200_3g.dtb

I checked the latest version and a generic version

https://sx05.eu/s912/8.2/8.1.9/

of the LE with that dtb. Everything works (except WiFi, I know that this is a for it is not proper parameters \ firmware).
So, Kszaq, congratulations, your images are quite efficient on the VIM2 is almost out of the box. :+1:
You only need to add fixed dtb.
I compiled a test version and testing (need to check on the fan).

I think on the model with VIM2 2 GB should make this version of dtb.
https://sx05.eu/s912/8.2/device_trees/1Gbit_Ethernet/gxm_q200_2g.dtb


#20

dtb for VIM2
https://yadi.sk/d/l1bfWhcr3NGncC

@kszaq
Maybe you need a patch for file dtb (VIM2).
https://github.com/150balbes/LibreELEC.tv/blob/Amlogic-Krypton/projects/S912/patches/linux/kvim2-dts.patch