Power & Source of Big Ideas

LibreELEC for RK3399

Moderators: chensy, FATechsupport

Perhaps someone will be interested in the possibility of running LibreELEC on RK3399.

https://forum.libreelec.tv/thread/14078 ... post128204

Link to current topic with new images and descriptions

https://forum.libreelec.tv/thread/20823 ... 28-rk3399/


Direct link to download universal images

https://yadi.sk/d/xhF45Z3BK-joGA
Update image Libreelec 20191112
New versions of images with kernel 4 and kernel 5 were released.

If there are those interested, it would be interesting to check the images of LE and Armbian on NanoPI M4 and any rk3399 models.


Maybe someone will want to try generic images Armbian for RK33xx with the new kernel 5.

https://forum.armbian.com/topic/12162-s ... rk-aml-aw/
Very helpful, thank you :D
Update image 20200109
ver 20200201
v 20200226 kernel 5.6
Hi guys,

can someone please help me with installing LE on my NanoPi M4V2 (NOT V1). What I've done so far:

1. I downloaded the image file from here and unpacked it:
https://yadi.sk/d/8vNYuuxynz1L0w/20200308
I took the first image in the list.

2. I deleted my eMMC Storage completely in Windows with on board software (it is called something like "create and format drive partitions"). I deleted all volumes and formatted it to FAT32.

3. With the latest version of balena Etcher, I flashed the image file to the eMMC card.

4. I mounted the new created partitions and in the LIBREELEC partition, I edited the first line of the uEnv.txt file and replaced the name of the dtb file to rk3399-rock-pi-4.dtb. After saving, I unmounted the eMMC Storage, put it in the NanoPi M4V2 and connected the power supply. Unfortunately, only the Power LED turns on, the LED for the storage remains off.

I did this whole procedure for eMMC and also for microSD card, but it didn't work.


Can someone help me with this?

Unfortunately I don't know, what balbes150 exactly means in his guide on this site:
https://forum.freaktab.com/forum/tv-player-support/rockchip-based-tv-players/rk3399-devices/783324-libreelec-and-linux-for-rk3399/page3

"You need to uncomment the two lines that are responsible for your platform and specify the correct DTB for your model."

I don't know, how I should uncomment the two lines and I also don't know, which two lines are responsible for my platform. It is likely the first one, but I don't have any idea, what is the second line.



Thank you for your help!

Maginos
Maginos wrote:
Hi guys,
I did this whole procedure for eMMC and also for microSD card, but it didn't work.

Try adding the correct u-boot for your model to the SD\eMMC card. After recording the main LE image, download and record the same u-boot image for your model. Unfortunately I don't have a Nanopi-M2 , so I can't test how it will work. By the way, what was previously recorded on your media on which you record the LE image ? You may still need to re-complete the cleanup with full formatting to remove the remaining partition table from GPT (from older systems). It is better to use formatting in NTFS (you must choose full formatting to remove the remnants of the old system, which are located at the very end of the media in the last sectors).

u-boot for Nanopi M4 V2
https://yadi.sk/d/hoJT1wACQj8tLA
I uploaded a new version of 20200311-aarch64 to the site. it contains a test image for NanoPi M4. Please ask M4 owners to try running this image. Download the image for nanopi-m4, unpack and write to the SD card, do not need to change anything, connect to M4 and check the overall system startup. I am interested in u-boot's work, whether it can start on M4 or not.

https://yadi.sk/d/8vNYuuxynz1L0w
Version with a bug fix for BT. I checked with myself, BT headphones-works. Please check how BT works with other devices on T4.

https://yadi.sk/d/UJi7et6ycGuVbA
balbes-150 wrote:
Try adding the correct u-boot for your model to the SD\eMMC card.

Where should I put the u-boot file? I put it in the "root" folder, so the top layer, in the u-boot folder and I also replaced the u-boot file with it, but nothing worked.

In macOS I formatted the eMMC storage with disk utility and under Windows with MiniTool Partition Wizard. For flashing I use Balena Etcher (macOS) and Rufus (Windows).
Before there was the official Armbian on it.

I also tried with the two latest versions you uploaded, but they didn't work.
Maginos wrote:
balbes-150 wrote:
Try adding the correct u-boot for your model to the SD\eMMC card.

Where should I put the u-boot file? I put it in the "root" folder, so the top layer, in the u-boot folder and I also replaced the u-boot file with it, but nothing worked.

In macOS I formatted the eMMC storage with disk utility and under Windows with MiniTool Partition Wizard. For flashing I use Balena Etcher (macOS) and Rufus (Windows).
Before there was the official Armbian on it.

I also tried with the two latest versions you uploaded, but they didn't work.

Describe the behavior of M4 in more detail , if you write the LE image to the SD card (the image name must indicate that it is for nanopi-m4) and check its launch ( be sure to disable the eMMC module, there is a chance that its u-boot blocks the launch of other systems). That is, you need to check the clean start of the system from the SD card.
balbes-150 wrote:
Describe the behavior of M4 in more detail , if you write the LE image to the SD card (the image name must indicate that it is for nanopi-m4)


I took the first image of this link:
https://yadi.sk/d/UJi7et6ycGuVbA
I flashed it to the eMMC module and in the uEnv.txt I changed the end of the first line to ..../rk3399-rock-pi-4.dtb
I did this because of NicoDs guide or should I use the dtb file for the nanopi m4? Are the dtbs for NanoPi M4 and NanoPi M4v2 the same?

balbes-150 wrote:
be sure to disable the eMMC module

How do I do that?

Maybe it would be easier, if you just write precisely step by step, what I should do, I think this would shorten this whole discussion. Thank you very much in advance!
I took the first image of this link:


This option is difficult for you, it requires additional steps to configure DTB and add u-boot. You need to use this image. It is already configured for NanoPI M4.

https://yadi.sk/d/Sex_1DyygvL4wA

1. Disconnect the eMMC module from M4 (you don't use it during the verification stage).
2. Completely erase the SD card with the DD command (dd if=/dev/zero of=you_sd_card bs=64M).
3. Download, unpack and burn the image to the SD card using the link provided in this message.
4. do not change anything on the SD card. Connect the SD card to the M4 and turn on the power.
5. Wait for 3-5 minutes .

If nothing starts, you will need the UART console for further tests (without it, it is impossible to see at what stage u-boot has an error).
I did now step 1-5 and again it didn't work.

I set up Armbian on the NanoPi M4V2 on the eMMC module, downloaded and unpacked the image you provided, then I zeroed out the SD card, which took almost 2 h, then I flashed the image to the SD card via dd as well. Then I put the SD card in the NanoPi M4V2, removed the eMMC and plugged in the power supply. Again, only the red LED flashes, but not the green one.

balbes-150 wrote:
If nothing starts, you will need the UART console for further tests (without it, it is impossible to see at what stage u-boot has an error).


How do I work with the UART console? Do I need a USB to Serial cable, which I connect to the M4V2?
then I zeroed out the SD card, which took almost 2 h

What equipment did you use to do this ????

I flashed the image to the SD card via dd as well.

Do not use DD to write images of work systems. Very often this does not work correctly, and the system cannot start from such a medium. This has been discussed many times on the Armbian forum.

How do I work with the UART console? Do I need a USB to Serial cable, which I connect to the M4V2?

Enter "UART" in the search on the Armbian forum and you will find a lot of information.
balbes-150 wrote:
What equipment did you use to do this ????


A NanoPi M4 (NOT V2). On my MacBook Pro it took only around 45 minutes, but the transfer rates were much higher. On MBP I had 11.8 MB/s on average, on NanoPi M4 around 4.5 MB/s.

balbes-150 wrote:
Do not use DD to write images of work systems. Very often this does not work correctly, and the system cannot start from such a medium. This has been discussed many times on the Armbian forum.


Ok, then I can try again this evening, because I did everything on my MBP. I zeroed out with dd and flashed the image to the SD card with balena Etcher. So concerning this, everything should be ok.

balbes-150 wrote:
Enter "UART" in the search on the Armbian forum and you will find a lot of information.


Thank you. I already ordered a USB to serial ttl cable and read some stuff about this. I hope, that I know now, how to connect to the console. And if I set the baudrate correctly, it should work.
A NanoPi M4 (NOT V2)

Do I understand correctly that you have an M4 model (not M4V2) ? If this is the case, you need a different u-boot. My images use the version for M4V2, I think it will not be able to run on your model (without replacing the u-boot). You can show a link or the exact name of the Armbian image that runs on your model from the SD card. I can try to make a u-boot file from it to work with LE.
Sorry balbes for the confusion, I have two NanoPi M4. One V1 and one V2. On V1 I have already installed OMV and on the V2, I want to have LE.

My tests yesterday were unfortunately not successful, I hope, that I get the USB to serial cable today and in the evening I will try to connect to the console of the NanoPi M2V2. I will send you the output of the console hopefully as text file. If this is not possible, I will send you a screen recording.
Sorry balbes, I was not able to get anything out of the NanoPi M4V2.

I connected GND, TX and RX to the board, opened Putty, selected serial, entered COM7 (looked that up in device manager), changed the baudrate to 1 500 000 and connected. After connecting the power supply (jumper cable or external power supply), nothing happened, even after five minutes. I also did this with a baudrate of 115200.

Is my procedure correct or do I have to do something else?
Maginos wrote:
Sorry balbes, I was not able to get anything out of the NanoPi M4V2.

I connected GND, TX and RX to the board, opened Putty, selected serial, entered COM7 (looked that up in device manager), changed the baudrate to 1 500 000 and connected. After connecting the power supply (jumper cable or external power supply), nothing happened, even after five minutes. I also did this with a baudrate of 115200.

Is my procedure correct or do I have to do something else?

Try configuring the UART console on a running system ( which you have running normally).
balbes-150 wrote:
Try configuring the UART console on a running system ( which you have running normally).


Yes, I tried to connect to Armbian on the NanoPi M4V2 and to Coreelec on an Odroid N2, but that doesn't work either.
Under macos I tried to connect via "screen -L /dev/tty.usbserialxyz 115200 -L" and "screen -L /dev/cu.usbserialxyz 115200 -L" to the Odroid N2, but that didn't work.
I installed minicom on the Mac, but this gives me the output, that /dev/modem/ is not a file or directory. Then I turned to screen again, but that didn't work.

I try to solve this over the weekend, I'm sure some guys at FB can help me with this.
Ok, now I have something, but I'm not sure if it helps you. I am no able to use the UART console on the NanoPi M4V2 and checked it with Armbian on the eMMC storage. That works as intended.

When I log into the console of the NanoPi M4V2, I get these messages:

With this command I logged into the console: picocom -b 1500000 /dev/tty.SLAB_USBtoUART --log d


picocom v3.1

port is : /dev/tty.SLAB_USBtoUART
flowcontrol : none
baudrate is : 1500000
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
hangup is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is :
emap is : crcrlf,delbs,
logfile is : d
initstring : none
exit_after is : not set
exit is : no

Type [C-a] [C-h] to see available commands
Terminal ready


I think, these are just the settings for picocom, so I'm not sure, if they will help you. Normally the NanoPi boots then and further entries occur in this window, but not with that.

As I said before, the blue LED doesn't start to blink and nothing happens.
ver 20200421
kernel 5.7-rc1
Version 20200425.
Added support for analog audio (Jack 3.5) for the NanoPC T4.
Now everyone has the opportunity to build a new version of the LE at once on your device RK3399. If there are people who want to try it, I will write a step-by-step guide on how to do it.
ver 20200512
added decoders for 4K
ver 20200516
Hi Balbes,

Sounds good, can you provide your step by step guide to build LE on-board, kernel 5.7.y? HW decoding?

BR
@lex wrote:
Hi Balbes,

Sounds good, can you provide your step by step guide to build LE on-board, kernel 5.7.y? HW decoding?

BR

I understand correctly, you want to collect the latest versions of the LE image on the NanoPC T4 itself ?
Yes, I would like to follow your step by step instructions to build the latest LE natively on NanoPi M4 (does not matter if it is for NanoPC T4). Kernel 5.7.y.

That is what i understand by your post: "Now everyone has the opportunity to build a new version of the LE at once on your device RK3399. "
@lex wrote:
Yes, I would like to follow your step by step instructions to build the latest LE natively on NanoPi M4 (does not matter if it is for NanoPC T4). Kernel 5.7.y.

That is what i understand by your post: "Now everyone has the opportunity to build a new version of the LE at once on your device RK3399. "

I don't have a Nanopi M4, so I haven't tested how it works specifically on this model, but I think it's possible (under certain conditions).

1. the build System makes the most of all the features of the equipment, so I recommend adding active cooling (fan).
2. You have the opportunity to use NVMe ? You can use an eMMC or USB 3.0, SD card. The build time depends significantly on the speed of the media. I have on T4 with NVMe build the primary image (download all sources, build, and so on) takes about 4.5 hours.
3. Media size (free space) - you need at least 35-40Gb.
4. Access to the Internet to download a lot of source code.

If all this does not frighten you, I am ready to write you step-by-step instructions :)
By the way, now you can build not only LE, but also ArmbianTV (kernel 5.7-rc6) on the TV box itself (with some restrictions - the u-boot build is not ready yet and it must then be added to the image according to the instructions from the Armbian forum themes) :)
[quote]3. Media size (free space) - you need at least 35-40Gb. [/quote]
This can be a problem right now for me.

Can you provide the kernel source code after all patches applied in tar.gz? Don't worry if it's for NanoPC T4.
@lex wrote:
3. Media size (free space) - you need at least 35-40Gb.

This can be a problem right now for me.

Can you provide the kernel source code after all patches applied in tar.gz? Don't worry if it's for NanoPC T4.

If you only need the core, you can get it without the LE build, which is common to Armbian and LE. For example, you can take the latest deb package with this kernel here and install it as usual in Armbian.

https://yadi.sk/d/AkOP4k-Ct4qLwQ

Or build your own version from the source code (I repeat, they are almost common in Armbian and LE).

https://github.com/150balbes/Amlogic_s905-kernel
Ver 20200527
kernel 5.7-rc7
Ver 20200529
add support 4K TV


P.S. It would be nice if FriendlyElec representatives could provide me with a sample of NanoPI M4. Then I can immediately create and test all systems for NanoPI M4.
Update ver 20200604
ver 20200622 kernel 5.7.5
ver 20200706 kernel 5.7.7
ver 20200710 kernel 5.7.8
ver 20200715 fix NVMe
ver 20200720 kernel 5.7.9
Ver 20200810 kernel 5.7.14
Ver 20200821 kernel 5.7.16
Ver 20200825 kernel 5.8.3
ver 20200901 kernel 5.8.5
fix audio 3.5 Nanopc t4
ver 20200929 kernel 5.9-rc7 u-boot-2020.10-rc5

Who is online

In total there are 35 users online :: 0 registered, 0 hidden and 35 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 35 guests