Posted on Leave a comment

Linux 4.19 LTS Images for Le Potato

Happy 2019 from the Libre Computer Team! In our never ending march towards full upstream support, we have setup another basecamp at Linux 4.19. This release culminates in nearly nine months of work from BayLibre, community members, and our internal efforts.

Major Improvements

  • Linux 4.19 LTS
    • HDMI 2.0 support
    • H.265 and H.264 V4L2 M2M support
    • Device Tree Overlay support
    • ~10% Performance improvement
  • u-boot 2019.01
    • Video Output support
    • USB Keyboard Support
    • USB Mass Storage support
  • Userspace
    • Desktop Images Autologin as default
    • lc_overlay Utility for Device Tree Overlay support
    • GL4ES integration
    • armhf OpenGL ES support for legacy applications
    • Headless armhf Userspace images
  • Image Variants
  • Images Coming Soon
    • Debian Stretch – xfce desktop, lxde desktop
    • Raspbian Stretch – desktop armhf

Consistent LED Indication

Many end-users do not have UART cables for debugging various issues from bad SD cards, bad flash, bad power, and more. We created a consistent indication that we plan to follow. This will hopefully solve question about what the LEDs mean.

  • Power-On: Green LED is off, Blue LED is on
  • u-boot Loaded: Blue LED is off
  • Linux Loaded: Green LED is heartbeating, Blue LED is linked to CPU activity
  • Userspace Loaded: Green LED is linked to root media activity whether eMMC or SD
  • Kernel Panic: Green LED is blinking at consistent rate

This will allow us to know at least which stage there was a failure for those without an UART cable. We will highly recommend one because it is the best way to debug problems.

Video Output in u-boot

With our La Frite project, we will be moving u-boot to SPI-NOR in preparation for ARM EBBR. As part of that initiative, BayLibre added video output and USB mass storage support to u-boot on our behalf. This provides visual access to u-boot. You still need an UART cable to change u-boot behavior. USB keyboard support was added so that you can access the u-boot command line to get the full capabilities.

Device Tree Overlay Support for HATs and Expansion

The 40-pin GPIO header was limited to controlling GPIO unless the end-user know how to modify device trees. People have requested SPI, I2C, PWM, and various HAT support and we have made the implemented our first revision of this capability.

Utilizing the out-of-tree device-tree code from Renesas, we have combined it with an userspace script called lc_overlays. There are some basic device-tree-overlay for things such as SPI, I2C, PWM, Raspberry Pi Sense HAT (limited features), and SPI display already included in the images.

HDMI 2.0 and Video Decoder Support

Before, only resolutions up to 4K30 was supported since the HDMI 2.0 protocols were not supported in the upstream Linux kernel. This is our first image incorporating HDMI 2.0 protocol support for true 4K 60FPS support. However, this is only usable for projects like LibreELEC.

Don’t expect X11 to perform well at 4K60 but things like LibreELEC (Kodi) has been updated to utilize the VPU’s hardware decoder to display 4K 60FPS videos on overlay planes. Another note about X11 performance is that the bit-blit capability within the 2D and mali engines are not upstream in kernel space or user-space so GUI is done through software rendering.

Note that not every feature of HDMI 2.0 is supported yet such as 10-bit metadata, frame buffer compression, and many others that the hardware is capable of. There’s still extensive work in this area. Accelerated video decode in X11/Wayland is still a bit away due to the length of the software pipeline that need to be updated. The kernel space APIs have experienced marked attention recently and it is a good sign since user space need stable work in this area. By our estimates, video decoding on Linux will mature around the end of the year as audio/visual becomes an important cornerstone of Linux.

If you using Le Potato strictly for 4K media, we highly recommend using CoreELEC.

OpenGL Support via GL4ES

ARM Mali GPUs only ship with OpenGL ES support in their binary drivers. The open-source lima project is continuing at full steam in delivering a Mesa driver. Most Linux applications are targeted for OpenGL so we have added the GL4ES shim in order to emulate some OpenGL functions for those programs to run.

10% Performance Improvement

We optimized numerous small things and you should see a 10% performance improvement across the board. The performance numbers can be found at the test results using Phoronix Test Suite. For best performance from your board, we highly recommend a heatsink and active cooling case because the chip can use up to five watts at full load. You can find appropriate ones through our distributors or on Amazon.

32-bit ARM Hard Float Userspace Headless Images

Some people use 32-bit armhf exclusively so we are now building both 64-bit aarch64 and 32-bit armhf images including Debian, Ubuntu Bionic, and Ubuntu Xenial. The kernel is still 64-bit but all the user space applications pull from their respective armhf repositories. We also include 32-bit user space Mali binaries.

Autologin

For desktop images, we have enabled autologin since a lot of users complained that they could not figure out the username/password despite it being in the README when they download the file.

Just to re-interate, all the images we release use “libre” as the username and “computer” as the password with the exception of the Raspbian images. Please be security conscious and change this by typing “passwd” into a terminal as soon as you log in.

Additional Notes

First time booting a desktop image is slower than subsequent boots since some initialization has to happen for most desktop environments.

For best results, please use a high quality MicroSD card. Poor quality card will exhibit read and write errors resulting in crashes or slow experience. Do not trust the brand that is marked on the card if purchasing it from sources like Ali-Express or Amazon Third Party Sellers. Use reputable retailers and MLC-based MicroSD cards for best results. We have seen numerous cases of TLC data corruption over time on even brand name MicroSD cards.

Many people have asked us why they can’t play 4K videos in a browser on Linux. The browsers and underlying libraries do not support utilizing the hardware acceleration. This is slowly changing with work by numerous groups but it is a slow process. Currently, browsers like Chrome/Chromium and Firefox can only utilize software decoding which works for up to 1080P videos. We will be releasing Wayland-based images since the display stack is faster than X11 and will playback videos better.

Next Release for Ubuntu 18.04.2

The next point release of Ubuntu is coming out soon and we look forward to improvements specifically in the display stack. Hopefully they adopt some improvements in Gnome 3 for Wayland so that the desktop UI performance can utilize the upstream work. According to Ubuntu’s schedule, it is due around Febuary 7th which is just after Chinese New Years. We will be making another set of releases then with some additional internal improvements we have been working on but that didn’t quite make it into this release cycle.

 

Posted on 1 Comment

GPIO Headers Reference for AML-S905X-CC

GPIOs (General Purpose Input/Output) are single-bit pins capable of digital input or output typically used for controlling LEDs or signaling. There is a total of 35 GPIO pins operating at 3.3V logic level on Le Potato which is 7 more than what is found on the Raspberry Pi series of boards. GPIOs are half duplex which means they can only be in either input or output mode but not both simultaneously.

When setup for input, applying 3.3V or 0V to the pin will correspond to 1 or 0 respectively when read in software. When setup for output, the pins will be either 3.3V or 0V depending on whether it is set as 1 or 0 in software. GPIOs typically provide only a few milli-amps of current so they should only directly drive low power things like LEDs. They cannot drive power hungry things like DC motors, which need power transistors to deliver adequate current.

Some of the GPIO pins have secondary functionality for signaling SPDIF, I2S, I2C, SPI, SDIO, UART, PCM, clock-generation, and more. They still operate at the same 3.3V logic level but these pins are usually connected to internal specialized hardware that can generate precisely timed signals without using the CPU to bit bang. This frees up the CPU to do other things like running your operating system and software.

There are two interfaces in the Linux kernel for controlling and reading from GPIO pins. Since the interfaces are standardized, you do not need to use libraries to read from and write to GPIOs. We have put together a simple guide for utilizing these interfaces. As an addition, we also mapped out the functionality and software pin numbers on Le Potato for easy access.

Screenshot from 2018-05-21 11-48-00

On the picture at the top of the page, GPIOs on the Le Potato are highlighted in green. 5V pins are red, 3.3V pins are orange, ADC pins are blue. Other un-highlighted pins are ground with the exception of the pins on the top right header.

Posted on 1 Comment

Comprehensive Documentation for ROC-RK3328-CC by Firefly Team

ROC-RK3328-CC (Renegade) is a powerful SBC platform powered by the Rockchip RK3328 SoC and equipped with high bandwidth DDR4. It features high performance IO like Gigabit Ethernet and USB 3.0 operating near native speeds. It is perfect for media center and IO intensive applications.

The Firefly Team, who designed this board with us, has accumulated and digested various guides into coherent documentation and put them here: http://roc-rk3328-cc.readthedocs.io/en/latest/intro.html

Since the board has only been out for two months, there is only sparse documentation available on the web so this is a great central resource for getting started with the Renegade. Did we mention that it is backed by GitHub it can be improved upon?

The documentation covers images for Android, Ubuntu, and LibreELEC by the Firefly team based on Rockchip’s SDK (Linux 4.4 LTS). We will also be rolling out Ubuntu 16.04 Xenial and Ubuntu 18.04 Bionic images for Renegade based on the latest upstream Linux LTS as soon as we are able to digest and test patches that are needed. We have no concrete timeline yet but will provide updates when we are close.