Jump to content

pro777

Members
  • Posts

    42
  • Joined

  • Last visited

Reputation Activity

  1. Like
    pro777 reacted to JMCC in RK3288/RK3328 Legacy Multimedia Framework   
    IT'S FINALLY HERE...

    THE OFFICIAL ROCKCHIP-LEGACY MULTIMEDIA INTEGRATION
     
    After two years of using a separate script to enable the multimedia features in RK3288/3328 Legacy Kernel, the whole framework has been incorporated to the official Armbian packaging system. The choice distro for this integration is Debian Buster (see FAQ at the end of this post about the reasons).
     
    I. Installation
    Download a Armbian Buster Legacy Desktop image for your board, and install it with the standard Armbian method. Install the complete multimedia solution with sudo apt update && sudo apt upgrade sudo apt install media-buster-legacy-tinkerboard --install-recommends ## Or ## sudo apt install media-buster-legacy-rk3328 --install-recommends The switch "--install-recommends" will add the whole Kodi binary addons collection (retro-gaming cores, music visualizations, screensavers, additional media decoders/encoders, vfs, etc.), plus the GLES-to-OpenGL wrapper "gl4es".  
    II. Features
    Accelerated GLES/EGL X desktop: No action needed. Accelerated Chromium, with WebGL and video display acceleration: No action needed Desktop video player capable of smooth 4K HEVC-HDR: Use the "Rockchip Gst Player" from the Multimedia menu, or choose it with right-click on the media file. Command-line 4K playing is also possible with "gst-play-1.0 --videosink=kmssink". RKMPP-accelerated MPV: Use normally for standard operation (windowed with mouse-operated GUI). For fullscreen, keyboard-operated mode, use the command line switch "--gpu-context=drm" (this will allow you to play smooth 4K).
            - See instructions below, in the next post, for playing Youtube videos up to 4k with this MPV. ISP Camera with real-time h.264/1080p HW encoding (RK3288 only): Using the Gstreamer Plugin. Check this wiki for instructions on how to use it. Most of it applies to Armbian, except for the selection of ov5647/imx219 camera, which must be done using DT overlays. OpenCL 1.2 support (RK3288 only): It will be fully functional, no further action needed. You can download some tests and examples from this link. Kodi 18.9 Leia with full RKMPP+GBM acceleration, 4K-HDR capable: You can start it from Light DM menu as your user account: 
     
    Alternatively, you can also run it as a system service with these command lines: sudo systemctl disable lightdm sudo systemctl enable kodi-gbm sudo reboot  
    Full collection of Kodi binary add-ons: Includes retrogaming cores, media encoders and decoders, PVR, screensavers, vfs and audio visualizations. They are all installed with the package "kodi-addons-full", but are disabled by default. They need to be enabled individually within the Kodi GUI. OpenGL 2.1 support through the gl4es wrapper: It is installed with the package "gl4es", with no further action needed.  
    III. Sources
    This is the list of the sources used for the packages:
     
    IV. FAQ
    ¿Why did you use Debian Buster as a base for this implementation?
    It was the most appropriate for several reasons. Upstream Rockchip-Linux developers use Debian buster, so the software could be ported with less modifications than if we chose a different distro. Besides, it is a completely stable distro, unlike Bullseye, which is a moving target as of today. It also has Chromium as a package, unlike Focal that uses snap instead. For last, it has a good backports repo, with several libs that would otherwise need to be compiled and maintained if we chose, for example, Focal.
      ¿Why Legacy instead of Mainline?
    This is an implementation based on the vendor's BSP kernel. It has been tested and is reliable, which many people will prefer rather than having a bleeding-edge, less stable implementation. In addition to that, Mainline upstream multimedia support is still a WIP, and lacks many features that are only present on Legacy kernels.
      ¿Will you add new features to this implementation?
    No, this implementation will only receive bug fixes if necessary. From now on, all multimedia work will be focused on Mainline and recent distros (like Focal or Bullseye). All new features will go there.
  2. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    @Attilatilla Ok, fixed the device tree and updated the legacy kernel images in the first post.
    They are still for testing, but seems to work fine so far with the media installer for tinkerboard in the apt repositories (don't remember the actual package, just search for tinkerboard and you'll probably find with ease).
    I tried only the debian minimal image and Kodi was starting fine. Did not try any video though.
     
    Feel free to report here!
  3. Like
    pro777 reacted to JMCC in Mainline VPU   
    I just posted the announcement for the official Armbian Rockchip Legacy Multimedia Framework. As you can see on the announcement, I say that from now on all multimedia work will be done in Mainline.
     
    That means integrating GPU and VPU acceleration into the official Armbian repos. The timeline is for next Armbian release, in February, if possible.
     
    As of today, I am planning to include Kodi and MPV. So if anybody wants to help, it will be much appreciated. 
  4. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    New Armbian 20.08 Ubuntu Focal Desktop image with kernel 5.8.1, on my box it works pretty fine, but feel free to test it on yours:
     
    https://drive.google.com/file/d/14iUGANr_-Cr3LvAP6wm3K0kLJAveHPhF/view?usp=sharing
  5. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    @Sergei Steshenko Apparently the purple line and audio issues with HDMI are gone in kernel 5.1! Here is an experimental image (Armbian 5.88 + Kernel 5.1.7) if you want to give it a chance.
  6. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    Hello guys, I'm proud to say that the Q8 boards are now in mainline Armbian as CSC supported boards!
     
    https://www.armbian.com/xt-q8l-v10/
  7. Like
    pro777 got a reaction from 8a8asik in Armbian for Amlogic S912   
    No OpenGL/EGL/GLES X11 drivers available at this time for S912 SoC.
    Hardware rendering via GLES fbdev, as well hardware decoding video and audio is used in the player c2play.
    Look at this message.
  8. Like
    pro777 got a reaction from 8a8asik in Armbian for Amlogic S912   
    It seems that kodi and mpv need to be build from the source..
     
    To activate hardware acceleration OpenGL ES in Debian download this firmware and deb package of libhybris for Debian. Follow the instructions listed in my post above.
  9. Like
    pro777 got a reaction from 8a8asik in Armbian for Amlogic S912   
    To obtain the hardware acceleration OpenGLES fbdev on the S912 platform, do the following:
    - Download the firmware of Armbian 5.44 Ubuntu Mate with the kernel 3.14, created by balbes150.
    - Burn the loaded image on the SD-card and and run Ubuntu Mate from the SD card. 
    - Download the archive with the kernel 3.14 packages with the Mali driver and the archive with Mali samples and libhybris package. Install all deb packages with the 3.14 kernel from the archive. To do this, go to the unzipped folder aml-s9xx-kernel-3.14.29-with-mali-r16p0-debs, run the command: sudo dpkg -i *.deb.
    - Unzip the mali-hybris-s912-packages.tgz. Copy the folder etc to the root of ROOTFS partition to set permissions for the mali and ion devices, and also for configuring ld for libhybris.
    - Unzip the system.tgz and copy the contents to the root of ROOTFS partition (sudo tar xzvf system.tgz -C / )
    - Unzip Mali-OpenGL-ES-Samples-Linux-Arm-Bin.tgz in the home directory.
    - Reboot system.
    - After reboot the system, add the armhf architecture for the system:
    sudo dpkg --add-architecture armhf sudo apt update sudo apt install libc6:armhf libstdc++6:armhf - Install libhybris-arm_0.1-1-opt_arm64.deb package and configure ld: sudo ldconfig.
    - Everything is ready for the test, run: /opt/libhybris/bin/test_glesv2.  A picture should appear, as shown in the first screenshot.
    - To run Mali OpenGLES Samples, go to the Mali-OpenGL-ES-Samples-Linux-Arm-Bin folder and start the executable files.
     - Freeze the kernel update with the armbian-config.
     

     
  10. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    Bump up due to some news:
    New Xenial image with mainline 4.14.68 kernel New Xenial image with latest and greatest 4.18.6 dev kernel (which seems pretty stable to me) Both new images now fully support the IR Remote out of the box, in native mode via kernel keymappings and drivers. Kernel keymap table can be customized using ir-keytable tool. Kernel 4.18.6 also exposes the native lirc interface, so in theory any remote controller can be trained to work with the box Both new images enables the SPDIF connector (it is untested though due to lack of a Optical DAC at home) Added devfreq support for the GPU: at the moment the base frequency is 100 Mhz and maximum frequency is 600 Mhz. The GPU may be too lazy to switch frequency, so you can force a minimum frequency issuing (as root) echo 300000000 > /sys/class/devfreq/devfreq0/min_freq to force the pre-devfreq default operating frequency. You may also force 600000000 (600 Mhz) as minimum to run the GPU always at full speed. Beware the thermals anyway, when the core reaches 70°C it starts throttling and your performance may not be as you expect if you don't cool enough the SoC Every other thing which has been put into Armbian lately is also in the images Enjoy!
     
     
  11. Like
    pro777 got a reaction from balbes150 in Armbian for Amlogic S912   
    Hello everybody!
    I assembled a video player c2play, created by crashoverride, with the possibility of hardware decoding and rendering for a boxes on the S912 SOC. To achieve this, was used EGL and GLES libraries from Android, libhybris, libamcodec and ffmpeg with the support of the above library, as well kernel package with Mali driver for T820 GPU. All this was integrated into the firmware of Ubuntu Armbian 16.04 Mate Desktop, building by balbes150. You can download this firmware from here.
    c2play perfectly playing, both local and network video H.264 and H.265 10-bit, checked up to 4K. Declared support of MP4, MKV and AVI containers.
    A small help to managing the c2play from the keyboard:
    ESC - to finish playing, LEFT - 30 sec. back, RIGHT - 30 sec. forward, DOWN - 10 min ahead, UP - 10 min. back. SPACE - pause.
    To play video, open the terminal window or go to the virtual console (Ctrl-Alt-F1). enter the command: c2play <path to your video>. Or, assign c2play as the default application for the desired file type. More details here or here.
    In the folder /opt are deb-packages with libhybris and kernel 3.14.29 with the driver Mali.
    For those who want to build c2play itself, I bring links to resources on the github.
    Libhybris: https://github.com/libhybris/libhybris.
    Libamcodec: https://github.com/osmc/libamcodec.
    FFMPEG: https://github.com/roman-rybalko/FFmpeg-aml.
    c2play: https://github.com/OtherCrashOverride/c2play.
     
  12. Like
    pro777 got a reaction from Nofan Tasi in Armbian for Amlogic S912   
    Hello everybody!
    I assembled a video player c2play, created by crashoverride, with the possibility of hardware decoding and rendering for a boxes on the S912 SOC. To achieve this, was used EGL and GLES libraries from Android, libhybris, libamcodec and ffmpeg with the support of the above library, as well kernel package with Mali driver for T820 GPU. All this was integrated into the firmware of Ubuntu Armbian 16.04 Mate Desktop, building by balbes150. You can download this firmware from here.
    c2play perfectly playing, both local and network video H.264 and H.265 10-bit, checked up to 4K. Declared support of MP4, MKV and AVI containers.
    A small help to managing the c2play from the keyboard:
    ESC - to finish playing, LEFT - 30 sec. back, RIGHT - 30 sec. forward, DOWN - 10 min ahead, UP - 10 min. back. SPACE - pause.
    To play video, open the terminal window or go to the virtual console (Ctrl-Alt-F1). enter the command: c2play <path to your video>. Or, assign c2play as the default application for the desired file type. More details here or here.
    In the folder /opt are deb-packages with libhybris and kernel 3.14.29 with the driver Mali.
    For those who want to build c2play itself, I bring links to resources on the github.
    Libhybris: https://github.com/libhybris/libhybris.
    Libamcodec: https://github.com/osmc/libamcodec.
    FFMPEG: https://github.com/roman-rybalko/FFmpeg-aml.
    c2play: https://github.com/OtherCrashOverride/c2play.
     
  13. Like
    pro777 got a reaction from Gee in Armbian for Amlogic S912   
    To obtain the hardware acceleration OpenGLES fbdev on the S912 platform, do the following:
    - Download the firmware of Armbian 5.44 Ubuntu Mate with the kernel 3.14, created by balbes150.
    - Burn the loaded image on the SD-card and and run Ubuntu Mate from the SD card. 
    - Download the archive with the kernel 3.14 packages with the Mali driver and the archive with Mali samples and libhybris package. Install all deb packages with the 3.14 kernel from the archive. To do this, go to the unzipped folder aml-s9xx-kernel-3.14.29-with-mali-r16p0-debs, run the command: sudo dpkg -i *.deb.
    - Unzip the mali-hybris-s912-packages.tgz. Copy the folder etc to the root of ROOTFS partition to set permissions for the mali and ion devices, and also for configuring ld for libhybris.
    - Unzip the system.tgz and copy the contents to the root of ROOTFS partition (sudo tar xzvf system.tgz -C / )
    - Unzip Mali-OpenGL-ES-Samples-Linux-Arm-Bin.tgz in the home directory.
    - Reboot system.
    - After reboot the system, add the armhf architecture for the system:
    sudo dpkg --add-architecture armhf sudo apt update sudo apt install libc6:armhf libstdc++6:armhf - Install libhybris-arm_0.1-1-opt_arm64.deb package and configure ld: sudo ldconfig.
    - Everything is ready for the test, run: /opt/libhybris/bin/test_glesv2.  A picture should appear, as shown in the first screenshot.
    - To run Mali OpenGLES Samples, go to the Mali-OpenGL-ES-Samples-Linux-Arm-Bin folder and start the executable files.
     - Freeze the kernel update with the armbian-config.
     

     
  14. Like
    pro777 got a reaction from balbes150 in Armbian for Amlogic S912   
    Hi everyone,
    I'm working on the task of using the fbdev GLES driver from Android 7.1.1 with the help of Libhybris for my KM8P on S912 for Armbian Ubuntu (Debian). In the framework of this task, I managed to build an legacy kernel 3.14.29 with the Mali driver r16p0. And also the mainline kernel 4.18-rc2 with the Mali driver r19p0. You can download the deb packages for the system update by clicking on the links above. 
    For a start, it's enough to install the corresponding package linux-image-amlogics905x_5.44_arm64.deb for update of the system and also put mali.conf (taken from the LibreElec distributive) in the directory /lib/modprobe.d/ from the archive.
    sudo dpkg -i linux-image-amlogics905x_5.44_arm64.deb After the system with the 3.14 kernel is upgraded, the device /dev/mali0 appears.
    Unfortunately, this did not happen for the mainline kernel. It seems that the reason is that there is no description of the GPU in the device tree. I'm use gxm_q201_1g.dtb.
    Next, I build a package of Libhybris from git. For the 64-bit version, I used the following commands:
    git clone https://github.com/libhybris/libhybris cd libhybris/hybris git clone https://github.com/Halium/android-headers/ -b halium-7.1 ./autogen.sh \ --prefix=/opt/libhybris \ --build=aarch64-linux-gnu \ --host=aarch64-linux-gnu \ --target=aarch64-linux-gnu \ --with-android-headers=android-headers \ --enable-adreno-quirks \ --enable-mali-quirks \ --enable-debug \ --enable-trace \ --enable-arch=arm64 \ --enable-experimental \ --with-default-egl-platform=fbdev \ --with-default-hybris-ld-library-path=/vendor/lib:/system/lib To build the 32-bit version of Libhybris I installed two packages for cross-compilation: arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-g++.
    And compiled with the following parameters:
    CC=arm-linux-gnueabihf-gcc \ CXX=arm-linux-gnueabihf-g++ \ ./autogen.sh \ --prefix=/opt/libhybris \ --with-android-headers=android-headers \ --enable-adreno-quirks \ --enable-arch=arm \ --enable-experimental \ --with-default-hybris-ld-library-path=/system/lib \ --enable-debug \ --enable-trace \ --with-default-egl-platform=fbdev \ --enable-mali-quirks Next:
    make -j8 sudo make install Then copied the /system/lib directory from the Android firmware to the root of the file system.
     
    Running /opt/libhybris/bin/test_glesv2, unfortunately, failed:
    user@amlogic:/opt/libhybris/bin$ ./test_glesv2 library "libgui.so" wasn't loaded and RTLD_NOLOAD prevented it test_glesv2: test_glesv2.c:117: main: Assertion `eglGetError() == EGL_SUCCESS' failed. Aborted For some reason, the system could not create a surface, test_glesv2.c, s.117:
    surface = eglCreateWindowSurface((EGLDisplay) display, ecfg, (EGLNativeWindowType)NULL, NULL); assert(eglGetError() == EGL_SUCCESS); assert(surface != EGL_NO_SURFACE); I hope that someone will be interested in this task and will achieve a better result.
  15. Like
    pro777 reacted to JMCC in RK3288 Media Script (TinkerBoard)   
    THE MEDIA SCRIPT IS DEPRECATED, IN FAVOR OF THE OFFICIAL LEGACY MULTIMEDIA FRAMEWORK. PLEASE REFER TO THIS TOPIC:
     
     
     
    The UN-official, UN-supported, UN-necessary, UN-popular, UN-precedented...
    RK3288 MEDIA TESTING SCRIPT [2.0: Bionic update]
     
    So here is the final release of the RK3288 media testing script. Basically, the script provides the following functionality:
    Installing all the libraries and system configurations necessary for GPU accelerated X desktop, Chromium WebGL, full VPU video play acceleration up to 4k@30 HEVC (the maximum supported by the SoC), and GLES 3.1 / OpenCL 1.2 support. Three video players supporting full VPU acceleration (RKMPP) and KMS display (GBM or a X11 DRM "hack", as described by the authors), namely: MPV, Gstreamer and Kodi 18.0 alpha preview. Two example programs using the OpenCL functionality: Examples form the Arm Compute Library, and a GPU crypto miner (an old version, but small and simple). A library that will act as an OpenGL to OpenGL-ES wrapper, allowing you to run programs that use OpenGL 1.5-2.0. Two additional small packages, that have no big interest from the developer prospective, but I find them interesting to play with: Support libraries for commercial web video streaming (tested with Netflix), and a simple Pulseaudio GTK equalizer using LADSPA.  
    Here is a more thorough documentation:
     
    Version 2.0 (Bionic):
     
    Version 1.0 (Xenial):

    >>> DOWNLOAD LINK (2.0, FOR BIONIC DESKTOP) <<<
     
    > Older Download link (1.0, for Xenial) <
     
    Instructions:
    Download the file above Untar it: tar xvf media-rk3288_*.tar.xz cd media-script ./media-rk3288.sh  
    Notes:
    This script is not officially supported by the Armbian project. It is just a community effort to help the development of the main build, by experimenting with a possible implementation of the media capabilities of this particular SoC. Therefore, questions about the script should not be laid out as support requests, but as commentaries or community peer-to-peer assistance. That being said, all commentaries/suggestions/corrections are very welcome. In the same way, I will do my best to help solve any difficulty that may arise regarding the script.  
    Enjoy!
     
     
     
  16. Like
    pro777 reacted to jock in CSC Armbian for RK3288 TV Box boards (Q8)   
    DISCLAIMER (PLEASE READ): everything you can find in this thread (binaries, texts, code snippets, etc...) are provided AS-IS and are not part of official Armbian project. For this reason not people from Armbian project nor myself are responsible for misuse or loss of functionality of hardware.
    Please don't ask about support or assistance in other non-community forums nor in the official Armbian github repository, instead post your questions in this thread, in the TV Boxes forum section (hardware related) or in the Peer-to-peer support section (general linux/software related).
    Thank you!
     
    This is CSC Armbian for XT-Q8L-V10 boards, also known as Chiptrip Q8, Vsmart Q8, ENY 3288 Q8, etc...
     

     
    All source code has been merged into Armbian mainline project.
    I still keep my personal public Armbian fork for experimental features: https://github.com/paolosabatino/armbian-build
     
    Nightly images: download directory
     
    Quick installation instructions on eMMC:
    Build or download your preferred Armbian image from Download directory and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian image in images folder of the SD card NTFS partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn image to flash" from the menu, then select the destination device (usually mmcblk2) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the sd card, then push the power button for 1 second (the led will turn blue) After 10 seconds HDMI will turn on and you will get logging messages; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Boot from SD Card/USB stick (with Armbian already installed in eMMC, empty eMMC or no eMMC😞
    Build or download your preferred Armbian image from Download directory; Burn the image on your SD card/USB stick; Plug the SD card/USB stick in the device; Push the power button for 1 second (the led will turn blue); After 10 seconds HDMI will turn on and you will get logging messages; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Boot from SD Card/USB stick (with original firmware or other firmware):
    In case your box has the original firmware installed, use the Multitool to erase the internal flash.
    Don't worry, you will not brick your box: once the eMMC is emptied, the box will automatically boot from SD Card. This is called Maskrom mode and is common to all Rockchip devices. Instructions and download links for the Multitool are at the bottom of this post.
    After erasing the internal eMMC, just follow the "Boot from SD Card" procedure above and then you are fine.
     
    Boot priority:
    Newer images (those with mainline kernel >= 4.14.50) now support booting from multiple devices.
    Priority is fixed and boot devices are probed in this order:
     
    External SD card External USB storage device (Any USB Stick/Hard drive attached to USB host ports) Internal eMMC  
    This way even if you install armbian to internal eMMC, you can still easily test different images booting from external devices.
    Experts notes: when armbian is installed into eMMC you get U-boot installed too in eMMC. This is important to know because the box won't boot in Maskrom Mode, but instead will always boot the embedded U-boot, no matter if you put an sdcard/usb stick. In practice the embedded U-boot is totally responsible for the boot priority. If you want to restore the Maskrom Mode, just erase U-boot from eMMC using this command:
    dd if=/dev/zero of=/dev/mmcblk2 seek=64 count=8128 conv=sync,fsync  
    Current status:
    Wireless: works. pretty fast and stable, signal is strong on my box; Bluetooth: works. I was able to transfer files and stream audio without problems USB ports: works, with autosuspend too. A quick benchmark show that transfer rate is quite good (topped at 34 MB/s) USB OTG: works in host mode. Transfer rate is very good (> 40 MB/s) MMC: works and is perfectly accessible as storage device. The images above with "eMMC friendly" have been tested and work when installed in eMMC using the standard armbian-config eMMC installer SDCard: works. legacy kernel is limited to high speed, while mainline works fine in UHS mode too. A quick benchmark with a Samsung EVO card shows the promised 48Mb/s read speed. Gigabit Ethernet: works, fast and reliably HDMI: works perfectly Serial: works Audio: both HDMI audio and SPDIF connector works IR remote: works on legacy and mainline kernels Reboot/Suspend process: rebooting the device is a working in progress, at the moment sometimes it works and sometimes it doesn't. Suspend is still not available. Hardware acceleration: everything which works for rk3288 boards applies here too. This guide or maybe the Media Testing Script will help you gain an hardware accelerated X11 and Chromium (using GL4ES I enjoyed Quake 2 from the start till the end, but also Quake and Quake III Arena work flawlessy, here a quick how-to to compile and install GL4ES)  
    Multimedia:
    On mainline kernel 3D acceleration is provided by Panfrost driver and is already enabled.
    Hardware video decoding: https://forum.armbian.com/topic/19258-testing-hardware-video-decoding-rockchip-allwinner/
     
    Multitool:
    The Multitool is a small but powerful tool to easy operate on internal eMMC flash of RK3288 devices.
     
    Features:
    Backup the content of internal eMMC Restore a previously backed-up image to eMMC Erase the eMMC (via fast blkdiscard or zero-fill as fallback) Burn an Armbian (or LibreELEC) image directly on the eMMC Provide a recovery shell for manual maintenance Windows-friendly: everything is placed in a NTFS partition Image compression format autodetection: they are decompressed on-the-fly during burn process Network support for remote maintenance via SSH (instructions to access via network here)  
    Instructions are simple:
    Download the image from here Burn it on an sdcard Open the NTFS partition with your preferred file manager Place the images you want to burn on the device in images directory (backups will be stored in backups directory) Plug the sd card in the RK3288 device Power the device and wait few seconds, the Multitool menu will appear on screen and can be navigated with the keyboard  
    Last edit: 07/06/2020 - updated installation instructions
     
  17. Like
    pro777 reacted to JMCC in Tutorial: 3D, video acceleration and OpenCL in RK3288 boards with new 4.4 (default) kernel   
    I'm working on a script to install all the stuff at once, but I'm not sure when it will be finished. In the meantime,in case anyone wants to try MPV with GBM (dsiplay) and RKMPP (decoding) acceleration, here are the instructions:
    After installing the base libs, configs and MPV according to the first post, download this package and install it. From then, you can launch mpv like this, in order to have full acceleration: LD_LIBRARY_PATH=/opt/libmali-gbm:$LD_LIBRARY_PATH mpv --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=drm <file> The deb package above will install the GBM version of libmali. I packaged it to install under /opt, so it did not interfere with system libs and we can still have X11 acceleration with the libmali-X11 version.
     
    MPV can still be run normally, through X11-EGL, with the known performance limitations (see first post). But if you launch it with the command above, it will completely ignore the X server, and use directly GBM/KMS. That means it will only run in fullscreen, with no mouse support. You can control it with the keyboard and (I suppose) with a remote control or HDMI CEC. MPV on-screen display works normally,  so when you press the appropriate keys info is displayed on the screen (see MPV manpage for a list of keyboard controls). When you press "q" or "Q", it will exit and you will have your X11 session back as you left it.
     
    In MPV's implementation of RKMPP, it is bound to GBM display, so the only way to use hardware video decoding is with this launcher. Performance is outstanding: Silk-smooth 4K playback, with minimal CPU usage.
  18. Like
    pro777 reacted to JMCC in Tutorial: 3D, video acceleration and OpenCL in RK3288 boards with new 4.4 (default) kernel   
    I made an updated build, with the current master branch from the Rockchip repo.  I noticed we were formerly using the 1.19 "release" version, which did not incorporate many fixes and performance improvements. I was also able to compile against the standard Xenial 1.18 X server, so no need to use the backport anymore.
     
    Installation steps (provided that you already configured your system according to the first post of this thread):
    Restore the regular 1.18 X server packages: sudo aptitude install xserver-xorg-core xserver-xorg xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-fbdev Aptitude will ask you if you want to remove the backported ("-hwe-") packages, so answer Yes.
    Download the 7z archive: https://mega.nz/#!oywWCaDA!wDtzXQuohJeVDuePCxHej4xkqDfUmhaPj6XNU7ZXyCk
    Unzip it
    cd xserver-1.18-ubuntu
    sudo dpkg -i *.deb
    sudo apt -f install
    I see a big performance improvement, and also bug fixes. Windows dragging is snappy, with or without compositing. No more icons disappearing with compositor enabled.
     
    However, I am afraid that the more recent version of the X server may have caused the problem with the DSI screen that @TonyMac32 described in another post. Can you test and see if you experience the same problem as with TinkerOS? (EDIT: Nope, the problem was a download link in the product page leading to a much older version instead of the last release: https://forum.armbian.com/topic/6870-rfc-tinker-board-uart-number/?do=findComment&comment=52161) So it seems safe to use this version.
     
  19. Like
    pro777 reacted to JMCC in Tutorial: 3D, video acceleration and OpenCL in RK3288 boards with new 4.4 (default) kernel   
    [UPDATE 2018/05/21: I have created a script to configure everything described in this tutorial, plus some more things. There will be no updates to the tutorial from now on. Please refer all the questions and bug reports to the script. It can be found here:]
     
    [UPDATE 2018/03/16: Fixed mpv package]
    [UPDATE 2018/03/01: Added OpenCL testing through GPU cryptocurrency mining]
     
    With the new default kernel based on rockchip-linux, boards with RK3288 SoC have now full kernel support for interacting with the GPU and hardware video decoder. Rockchip-linux also provides userspace libraries and other software to make everything work. In this tutorial, you'll learn to set everything up in a current Armbian Xenial default image.
     
    (Note: rockchip-linux uses Debian Stretch as their base distro for all their packages. So we would be better off using the Stretch Armbian image, but it is still not stable enough for production. Therefore, we are going to install a few backports over the Xenial image, to make everything work)
     
    Start by downloading and extracting this compressed file: https://mega.nz/#!hrxy0bra!pOD0L_vIaq3wn0DWwRGYGsT2PSUIJG-HZbcyrJ4m6As
    It contains all the packages I am going to refer to in the tutorial
     
     
    1. Install backported X server from the ubuntu repos
    $ sudo apt install xserver-xorg-hwe-16.04 xserver-xorg-video-fbdev-hwe-16.04 2. Install libraries
    Install all the packages under the "libs" directory, in the file you downloaded and extracted.
     
    3. Install and configure tweaked X server
    In order to make graphic acceleration work under X, rockchip-linux developers have created a tweaked X server. To enable it:
    You need to disable compositing. In the Xfce menu, navigate to "Settings > Window Manager Tweaks", choose the rightmost tab (Compositor), and uncheck "Enable display compositing". Install the packages under the "xserver" directory of our downloaded compressed file Make a backup of the file "/etc/X11/xorg.conf.d/01-armbian-defaults.conf", and replace its content with the following: Section "Device" Identifier "Rockchip Graphics" Driver "modesetting" Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable Option "DRI" "2" # You can disable Vsync for better 3D benchmark score, at the cost of worst video playing. Not recommended. # Option "Dri2Vsync" "false" EndSection Section "Screen" Identifier "Default Screen" SubSection "Display" Depth 24 Modes "1920x1080" "1280x1024" "1024x768" "800x600" EndSubSection EndSection 3. Restart X
     
    4. Test 3D acceleration
    $ sudo apt install glmark2-es2 $ glmark2-es2 If everything is working, you shoud see a window with rotating 3D objects, and console output shoud start like this:
    ======================================================= glmark2 2014.03+git20150611.fa71af2d ======================================================= OpenGL Information GL_VENDOR: ARM GL_RENDERER: Mali-T760 GL_VERSION: OpenGL ES 3.2 v1.r14p0-01rel0-git(966ed26).eedaf0c5244add8e249cecdd3c721329 =======================================================  
    5. Test video acceleration with MPV
    Install the package under the directory "mpv".
    When you play a video with this version, it will use GPU EGL accelerated video display, but decoding will still be via software. That means you can play up to 1080p@30fps HVEC quite smoothly, with around 80-90% CPU use. Anything above that resolution/fps will be jerky.
    In order to use full acceleration with MPV, you need to be under Wayland. I intend to do some other post on that, God willing.
     
    6. Test video acceleration with Gstreamer
    The "official" way of using full HW video acceleration under X is via a special Gstreamer plugin created by the rockchip-linux developers. But we need to install a backported version of Gstreamer, in order for the plugin to work.
    Install all the packages in the "gstreamer-backport" directory Install all the packages in the "gstreamer" folder (these are for the rockchip plugin) Do "sudo apt -f install" for the unmet dependencies You can now play a video from command line with either of these commands: $ gst-launch-1.0 filesrc location=<videofile> ! decodebin ! videoconvert ! rkximagesink $ gst-play-1.0 --videosink=rkximagesink <videofile> This plugin uses GPU acceleration for display, through a KMS overlay, and also hardware decoding via the rockchip mpp interface. You can play 4k@30fps HEVC with perfect smoothness, while the CPU stays under 15% use. If you don't have any 4k video, you can try with this one: http://www.libde265.org/hevc-bitstreams/sintel-4096x1744-cfg02.mkv
    (Notice that if you try to display any subtitle, it will make the plugin crash).
     
    7. Install a Gstreamer demo player
    Instead of launching videos through the command line, you can also install a simple video player that will use the rockchip plugin.
    Install the following packages: $ sudo apt-get install libqt5opengl5 libqt5qml5 libqt5quick5 libqt5widgets5 libqt5gui5 libqt5core5a qml-module-qtquick2 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 qtmultimedia5-examples qtmultimedia5-doc-html 2. Create the file "/usr/share/applications/demo-player.desktop" with the following content:
    #!/usr/bin/env xdg-open [Desktop Entry] Categories=Qt;KDE;AudioVideo;Player;Video; Comment=A gstreamer base player Exec=env QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/arm-linux-gnueabihf/qt5/examples/multimediawidgets/player/player --geometry 960x640+0+0 GenericName=Media Player Icon=/usr/share/icons/gnome/48x48/categories/applications-multimedia.png Name=Media Player Type=Application X-KDE-StartupNotify=false Keywords=movie;player;media;kde;qt; X-Ayatana-Desktop-Shortcuts=Screen;Window Now you will see an entry "Media Player" in the Xfce menu, and you can also choose to play video files with this player by right-clicking on them and choosing "Open with..."
     
    8. Enable acceleration for Chromium
    For last, we are going to enable acceleration for Chromium Web Browser
    Backup the file "/etc/chromium-browser/default", and modify it to look like this: # Default settings for chromium-browser. This file is sourced by /bin/sh from # /usr/bin/chromium-browser # Options to pass to chromium-browser # A set of command line flags that we want to set by default. # Do not hide any extensions in the about:extensions dialog export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --show-component-extension-options" # Don't use the GPU blacklist (bug #802933) export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --ignore-gpu-blacklist" # Use EGL acceleration export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --use-gl=egl"  
    Launch Chrome, and enter in the address bar "chrome://gpu". If everything is OK, you should see something like this:

    Now, go to the Chrome Web Store and install the extension "h264ify". It will force youtube to use H264 instead of VP9, which has no acceleration with RK3288.
    Enter Youtube and play any 1080p video. It should play fairly well, dropping frames only when some kind of overlay pops up (like an ad on top of the video, or the controls overlay).
    Test WebGL, for example with this page: http://webglsamples.org/aquarium/aquarium.html
     
    9. NEW: Testing OpenCL with a GPU cryptocurrency miner
    Download either of these compiled GPU miners (each of them features diferent algorithms): https://goo.gl/gHrPGg / https://goo.gl/MTSgBG Untar them, cd into the directory and run them (in case you get an error, try doing "sudo make install"). E.g.: ./sgminer -k lyra2rev2 -o stratum+tcp://<url of pool>:<port> -u <your username> -p d=0.050 -I 14 -w 64  
    If you want to learn more, you can follow this tutorial: https://www.novaspirit.com/2017/12/21/gpu-mining-on-tinkerboard/ Mining with the skein algorithm:

     
     
    Please report your experiences and suggestions. Wayland testing stays in the to-do list. Thanks,.
     
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines