LibreELEC for Khadas EDGE (RK3399)

Dear balbes150, please make a step by step instructions for installing your image in eMMC. Or give me a link where I can watch it. If You not difficult. I’m afraid to break something permanently)))

  1. Download, unzip, burn to SD card.
  2. Check the name of the DTB used in the file (/extlinux/extlinux.conf), it should fit your model. You can see the list of available DTB files in the directory (/dtb) on the SD card.
  3. Connect SD card and power on. After the initial setup (expansion of the partition on the SD card), the system will automatically reboot and start KODI.
  4. Perform the initial setup of the LE. Check the operation of all the functions you need.
  5. To install to eMMC, open the Libreelec Setting → eMMC menu.
  6. Start creating a full EMMC backup (the process may take 15-25 minutes). When the copy is finished, EDGE is automatically turned off.
  7. To enable and start “Install to eMMC”. At the end of the system will automatically turn off. Pull out the SD card and run EDGE without it.

  1. Скачать, распаковать, записать на SD карту.
  2. Проверить имя используемого DTB в файле (/extlinux/extlinux.conf), он должен соответствовать вашей модели. Список доступных файлов DTB вы можете увидеть в каталоге (/dtb) на SD карте.
  3. Подключить SD карту и включить питание. После первичной настройки (расширения раздела на SD карте) система автоматически перезагрузится и запустит KODI.
  4. Выполнить первичную настройку LE. Проверить работу все нужных вам функций.
  5. Для установки в eMMC, открыть меню Libreelec Setting → eMMC.
  6. Запустить создание полной резервной копии eMMC (процесс может занять 15-25 минут). После окончания создания копии EDGE автоматически выключается.
  7. Включить и запустить режим “Установка в eMMC”. По окончанию система автоматически выключится. Вытащить SD карту и запустить EDGE без нее.
6 Likes

Thanks! Post worthy Caps!)
Last night after praying, I passed some of the mounting points on the SD card at my own risk, the truth is eMMC install did not have the courage!) By the way, the temperature at the arm not raised above -65 Celsius, compared to аrhi64 -78 celsius. Cooling passive radiator.

@mo123 where do you recommend I go to follow the HDR development? Do you think there will be a specific thread about it? Unfortunately I’m not sure what to do with @Kwiboo’s excellent HDR patches. I think that’s for Mainline Linux kernel? The process to test it is a little out of my reach without some instructions unfortunately.

Kwiboo said he will add gigabit ethernet support for some Rockchip devices later this week and also add preliminary H264 hardware accelerated video playback support.
The HDR patches aren’t merged yet, but think some of balbes150’s images contain them already.

I also tested LibreELEC in the past on my older Rockchip RK3328 with a 4.4 kernel about six months ago and HDR was working. But the LibreELEC developers now want all support to happen against Linux 5.1 latest kernel to avoid doing double work and Kodi also requires ARM devices to use GBM now which is easier with the mainline kernel.

In future any change made for Rockchip, Amlogic, Allwinner or other ARM devices will benefit all devices and code can be shared among most devices since most of them contain the same HDMI & GPU chips. That’s also the main reason they use the mainline kernel and rewriting almost everything(video playback, audio, HDR, HDMI CEC etc) from scratch.

You can follow kwiboo’s github activity for all the recent LE development, the LE forum, the LE Github account PR/Issues and commits and this Khadas forum.
HDR on Linux on Intel devices was non existent until last month when Intel started to write most of the code for Linux which will now also be adapted and used for other ARM devices, so HDR is still very new and just being tested and supported now.

So we all are waiting patiently for the next few weeks, months until all the mainline kernel work is done and merged :slight_smile:

3 Likes

Friends, help me please install PVR IPTV Simple Client plugin, it was previously installed by default, and in the 18th version of LE it should be installed manually. I connected by SSH, introduced " sudo apt install code-pvr-iptvsimple ", "apt install kodi-pvr-iptvsimple ", “install kodi-pvr-iptvsimple” does not work. Further my knowledge of Linux is not enough. I hate Linux, I’m a child of Windows!))) Colleagues, help!
Maybe somebody can suggest a more elegant working solution for watching IP TV on 18.2 Кodi using a playlist format .m3u8?

Thank you so much for the thorough reply! Very helpful and informative.

There are no apt (packages) in LE. All additives are made through the installation of Addons. Search on the WiKi about Addons. And I recommend checking out the latest official nightly builds.

2 Likes

I’m having some trouble with your new images. The NVMe, WiFi/Ethernet, and CEC work (at least on one TV), but when I go browse the movies on the NVMe drive it crashes. I’ll see if I can set up remote debug logging or something to see what’s going on, but this is a New Problem so to speak.

@mo123 I was just finishing some more testing and I’m realizing that I have no audio in your build dated 2019-06-29. Do you perhaps have a newer build that incorporates the dtb fixes you talked about?

@balbes150 perhaps you have a newer build as well? I was able to successfully build yours from source, but unfortunately I don’t know how to merge yours with the master LibreELEC.tv git which has some commits that are useful (I see a fix for NVMe drives automounting, for example).

Edit: I fixed the no sound issue by stealing @balbes150’s dtb file :slight_smile: I guess the one I was using was out of date. Still curious about new images though.

Sigh. It just locks up after ~30 minutes of video playback now. I don’t know what to do at this point and feel like I’ve wasted a lot of money. :cry:

I plan to release new versions by the end of the week.

I work a few hours without a problem. You didn’t specify any details (the version of the image, EDGE fan\nofan, a video where are running, etc.).

That’s fair @balbes150, I apologize. I was frustrated last night and did not provide a full accounting because I’ve now spent several weeks trying to get this platform to work and I didn’t realize when I bought it that it was in an alpha state. There was no mention on the website that the Edge-V v13 could not (yet) do the things listed on the website.

Platform: Edge-V v13

Fan: No fan available yet for Edge-V v13, it is pre-ordered; I have a small heatsink for now. Watching the debug the “KODI-CPU” line was between 15-30%.

Image: LibreELEC-RK3399.arm-9.80-devel-20190627110741-97ea5a2-khadas-edge.img provided by @numbqq

DTB: rk3399-khadas-edge-v.dtb from @balbes150’s LibreELEC-RK3399.arm-9.80-devel-20190629140320-f9ecb5d-khadas-edge.img (this image crashes when trying to scan too many videos at once)

Video: Stream #0:0(eng): Video: hevc (Main), yuv420p(tv, bt709/unknown/unknown), 1920x696, SAR 1:1 DAR 80:29, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default) (forced)

Audio: Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)

Debug log: Nothing at time of crash. I used tail -F ~/.kodi/temp/kodi.log and there had been no activity for ~20ish minutes. The latest log message was that my Kodi Remote app session had disconnected:

2019-07-15 22:12:24.223 T:3653641088 DEBUG: Thread JobWorker 3653641088 terminating (autodelete)
2019-07-15 22:12:24.223 T:3685335936 DEBUG: Thread JobWorker 3685335936 terminating (autodelete)
2019-07-15 22:21:32.235 T:3782460288 INFO: JSONRPC Server: Disconnection detected

Crashed @ 22:40 or so.

New version of images 20190718.

When checking, I found a strange behavior. We perform the first start of the system (perform the primary setup wizard) and if you do not turn off and restart the LE, the system works fine for several hours (you can install Addons, run any video, etc.). But if you shut down the system or reboot, I get system crash and it is no longer possible to start the system from this SD card (constant kernel crash and panic). I don’t understand why this behavior.

@Frank
Can you check with yourself ?

@balbes150 ,I will check it . I met once and the system crashed, but after I restarted it was all right. So I didn’t record the question at that time.Does that happen every time? Which version of firmware do you use?

It happens all the time. On different SD cards. On EDGE-V regular firmware, which came from the factory. This happens on different edge models (EDGE+Captain, EDGE-V). I can’t understand why the first run works without problems and there are no errors, but shutting down (rebooting) completely breaks the system.

@balbes150 , It’s a strange question. I’ll confirm it as soon as possible and see if I can find out why.

@balbes150 , I check it just now . In my test,Caption Kodi won’t start every time after first start.Sometimes the system crashes, sometimes the Kodi doesn’t start, but the EL boot is normal.In EDGE-V.The probability of collapse is about 50%. Sometimes it can be started.I found that the system crashed when the kernel reported an error, but this happened after the system started normally, so I guess the system crash should have happened during the Kodi boot process.
This is the log when the system crashes.

Starting kernel ...


[    0.905238] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    0.905840] iep: failed to find iep power down clock source.
[    0.907778] rk-vcodec ff650000.vpu_service: could not find power_model node
[    0.908989] rk-vcodec ff660000.rkvdec: could not find power_model node
[    0.934170] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
[    1.071532] rockchip-dwc3 usb0: failed to get drvdata dwc3
[    1.076364] rockchip-dwc3 usb1: fail to get drvdata hcd
[    1.193250] rk_tsadcv2_temp_to_code: Invalid conversion table: code=1023, temperature=2147483647
[    1.227425] vccio_sd: unsupportable voltage range: 3300000-3000000uV
[    1.289078] rockchip-dmc dmc: unable to get devfreq-event device : dfi
[    1.465198] rt5651 1-001a: Device with ID register 0xffffffc0 is not rt5651
[    1.473178] i2c i2c-9: of_i2c: modalias failure on /hdmi@ff940000/ports
[    1.475503] i2c i2c-10: of_i2c: modalias failure on /dp@fec00000/ports
[    2.286196] rockchip-dmc dmc: Failed to get leakage
[    2.286770] rockchip-dmc dmc: Failed to get pvtm
[    2.287476] rockchip-dmc dmc: failed to get vop bandwidth to dmc rate
[    2.288290] rockchip-dmc dmc: could not find power_model node
LibreELEC:/ # [    6.722784] Internal error: Oops: 96000047 [#1] SMP
[    6.722796] SQUASHFS error: zstd decompression failed, data probably corrupt
[    6.723961] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    6.723966] SQUASHFS error: zstd decompression failed, data probably corrupt
[    6.723970] pgd = ffffff80093bf000
[    6.723976] [00000000] *pgd=00000000f7ffe003, *pud=00000000f7ffe003, *pmd=0000000000000000
[    6.724592] VFS: brelse: Trying to free free buffer
[    6.724609] ------------[ cut here ]------------
[    6.724611] WARNING: at fs/buffer.c:1207
[    6.724614] Modules linked in:
[    6.724615] 
[    6.724620] CPU: 5 PID: 317 Comm: systemd-udevd Not tainted 4.4.154 #1
[    6.724621] Hardware name: Khadas Captain (DT)
[    6.724624] task: ffffffc0dc6b5100 task.stack: ffffffc0dc6ac000
[    6.724639] PC is at __brelse+0x54/0x5c
[    6.724641] LR is at __brelse+0x54/0x5c
[    6.724643] pc : [<ffffff80081e3c68>] lr : [<ffffff80081e3c68>] pstate: 60000145
[    6.724644] sp : ffffffc0dc6af770
[    6.724646] x29: ffffffc0dc6af770 x28: ffffffc0dde42000 
[    6.724649] x27: 0000000000000080 x26: ffffffc0da1c0300 
[    6.724651] x25: ffffffc0dc6af7e0 x24: ffffff80091a1f10 
[    6.724654] x23: 0000000000000000 x22: ffffffc0d9c84dd0 
[    6.724656] x21: ffffffc0dc3c21a0 x20: 0000000000000010 
[    6.724658] x19: ffffffc0d9c84dd0 x18: 0000000000000000 
[    6.724660] x17: 0000000000000000 x16: ffffff80081f4870 

So I think the crash happened in the process of starting Kodi.

1 Like

@balbes150,

[   15.540548] BUG: spinlock lockup suspected on CPU#1, systemd-udevd/374
[   15.545441]  lock: 0xffffffc0ecca8740, .magic: dead4ead, .owner: pulseaudio/342, .owner_cpu: 4
[   15.550568] CPU: 1 PID: 374 Comm: systemd-udevd Tainted: G      D         4.4.154 #1

I found that all the cpu was locked.

1 Like

I remembered I saw similar behavior on Armbian with the Khades kernel for EDGE. Then it helped me to disable this option in the kernel config. Now, disabling this option does not help. If I build the LE version with the audio completely muted , everything works without crashes. Hence the reason for the wrong kernel config (or DTS) for audio devices at the EDGE (or KODI) ?

https://github.com/150balbes/Build-Armbian/commit/d947f512370d20f90d8206c498960cdcd4a62a0c#diff-5d3b6c94cc0882735663e8a7f9fb9450L3195