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.


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

RetroPie Released for Le Potato and Coming Soon to Tritium!

Fresh off the tasty build server is some RetroPie for Le Potato! After a 10 day hiatus in the software trenches, we have modified the RetroPie installer to utilize the latest software technologies we’ve enabled upstream. Some big terms like Kernel Mode Setting, Display Rendering Manager, EGL, and SDL2 were used. But solder on we did through undefined references, missing packages, blank screens, and more to bestow this wonderful img after six hours of build time.

This image runs on MicroSD cards and eMMC since it uses our upstream software foundation. It stays away from proprietary APIs like dispmanx like the Raspberry Pi does and is probably the first images for RetroPie to utilize the latest Linux display infrastructure APIs instead of the fbdev hack. Yes, standards are important! You can use lc_redetect_emmc and lc_distro_transfer to move the factory image from MicroSD card to eMMC just like our regular images.

With this image, we must let people know that they can really give back to the community with time and money. The libretro project is one much similar to ours with a community ethos. They have spent 8 years building the foundational layers necessary to preserving gaming history. They are the basis for RetroPie and Lakka but don’t receive as much press. Without them, it would be difficult for there to be a retro community. We have been a patron of the libretro project and have donated more than $5000 to their effort. If you really enjoy retrogaming, we highly recommend supporting these guys through Patreon.

We should have the Tritium image up within two days after some building and testing. The H2+ and H3 variants of Tritium will support more emulators since the 32-bit armhf dynarec engines for various architectures are in better shape than their 64-bit aarch64 equivalents. There are efforts to build a new dynarec for aarch64 for N64 and this is where you can help too by contributing either time or money. Needless to say, we have contributed monetary funds as well since we have no ability in this respect. You can also support this type of funding through purchasing our boards!

Look out for our La Frite Kickstarter campaign on Wednesday! It shares the same architectural basis as Le Potato in a smaller form factor.

You can get the image here. We hope you have a joyous Columbus day.

Posted on Leave a comment

Android Release for Tritium and Le Potato

Fresh off the build server are new image releases for Tritium and Le Potato. H3 and H5 variants of Tritium are receiving Android 7 Nougat while Le Potato is receiving Android 8 Oreo. These images require eMMC modules in order to work so make sure to grab the right eMMC modules for each respective platform.

Please note that Google does not license Google Apps such as the Play Store for single board computers. There are alternative app ecosystems such as Aptoide which you can use. The images come rooted so you have unrestricted access to the underlying OS for tweaking and installing APKs.

Make sure to follow the README.txt and use the appropriate vendor tools to flash the images. Android ROM flashing is not standardized so everyone has to rely on these proprietary tools unlike normal Linux images.

You can look for new Raspbian, Lakka, and RetroPie images coming for these two platforms in the next month.

Posted on 4 Comments

Tritium and Le Potato Ubuntu and Debian on Linux 4.18.8 and eMMC Support

With the completion of phase 1 of our image infrastructure, we have pushed out eight new images for Tritium and Le Potato based on the latest mainline Linux 4.18.8. These images include headless and desktop images of Debian and Ubuntu with LXDE, XFCE, and MATE flavors on X11 with OpenGL ES 2.0 and 4K support (even on Tritium H2+).

Please note that Tritium H2+/H3 images are named all-h3-cc-h3 and H5 images are named all-h3-cc-h5. If you are using the incorrect image, your board will not boot. Tritium H2+ does not have enough memory to run MATE desktop or full 4K desktop. It will work with static 4K content.

We reworked the filesystem layout as well as added a new tool for assisting flashing eMMC modules. The new tool is called lc_redetect_emmc and it re-detect the eMMC module by unbinding and rebinding the driver. You can do the following to flash the eMMC modules with the operating system you are currently running.

  1. Flash a MicroSD card with the desired image using Win32DiskManager or Etcher
  2. Boot up the boards via MicroSD card and without the eMMC module attached
  3. Attach the eMMC module while the board is running and be careful of short circuit
  4. Run sudo lc_redetect_emmc
  5. Run sudo lc_distro_transfer and follow the prompts for appropriate flags
  6. Shutdown and remove MicroSD card

This process only works on the Ubuntu and Debian images we release. This is not for flashing Android, Armbian, or anything else and it will not work on Armbian since it is not using our systems. We did not release the Gnome 3 Wayland variant for this release cycle.

You can find the download links under the Downloads tab for Tritium and Le Potato product pages.

Below is our software roadmap for the next 4 months. This is a guideline and not set in stone.

  • Phase 2 – October 2018: Raspbian and RetroPie images for Tritium and Le Potato
  • Phase 3 – November 2018: Automatic Update Infrastructure, Linux 4.19 LTS
  • Phase 4 – December 2018: Android 9 and Linux V4L2 for Le Potato and La Frite
  • Phase 5 – January 2018: Linux V4L2 for Tritium, Overlay Support for HATs

There are some interesting software efforts making the community more interesting including our sponsorship of the Amlogic V4L2 upstream work by BayLibre and Allwinner V4L2 upstream work by Bootlin, LibreELEC/Kodi 18 based on the aforementioned V4L2 work, RetroArch/Lakka, and PanFrost. We highly encourage people to look into those efforts and find ways to contribute.


Posted on Leave a comment

Le Potato Ubuntu and Debian with Linux 4.18

Linux 4.19 is a LTS release so we went ahead and created a spectrum of images for Le Potato based on Linux 4.18. These images come with three months of upstream Linux enablement by our partner @BayLibre. Some of this work will be showcased at @KernelRecipes and @EmbeddedRecipes along with free #LePotato boards for attendees.

These images are based on Linux 4.18.7, X11 up to 4K30, and Amlogic Mali (for non-Headless). When Linux 4.19 is tagged by Linus, we will work on final images with automatic package upgrade for Linux, u-boot, and user-space that is currently done through scripts.

  • Debian 9 Stretch Headless (Server)
  • Debian 9 Stretch LXDE
  • Debian 9 Stretch XFCE
  • Ubuntu 18.04 Bionic Headless (Server)
  • Ubuntu 18.04 Bionic MATE (Gnome 2)
  • Ubuntu 18.04 Bionic XFCE
  • Ubuntu 16.04 Xenial Headless (Server)
  • Ubuntu 16.04 Xenial MATE (Gnome 2)
  • Ubuntu 16.04 Xenial XFCE

You can grab them here: Ubuntu Debian

In other news, BayLibre is working with LibreELEC to get mainline hardware decoding working for Le Potato. This work will eventually make it into Kodi and we are very excited about it. The upstream V4L2 hardware video decoder work by Maxime Jourdan of BayLibre will not land in Linux 4.19 but will be backported. This work will coincide with two new products due in the following months: La Frite and Les Puree. These designs share the same underlying architecture as Le Potato to re-use the software technologies we have invested in.

Posted on Leave a comment

Raspbian (Stretch) Desktop for ALL-H3-CC H5 2GB 64-bit Variant (Tritium) Preview Image 1

Announcing our first image for ALL-H3-CC (Tritium) H5 2GB 64-bit boards based on Linux 4.18rc3. We originally planned to release images for the H3 and H2+ variants as well but there’s some bugs that still need to be ironed out with the Linux 4.18rc kernel.

Like the Raspbian image for AML-S905X-CC (Le Potato) released yesterday, this image features a 64-bit kernel running 32-bit Raspbian user space. It has the same limitations as well. Give it a go and let us know!

Posted on 2 Comments

Raspbian (Stretch) Desktop for AML-S905X-CC (Le Potato) Preview Image 1

Raspbian is a highly optimized Debian-derived Linux-based distro made for Raspberry Pi boards. It supports all of Raspberry Pi’s products going back to the very first Raspberry Pi from 2012. The BCM2835 found on that first board is based on ARMv6 technology so it cannot run Debian ports or Ubuntu ports compiled for ARMv7 or ARMv8 (64-bit). Thus Raspbian was created from Debian packages compiled to target ARMv6 with VFPv2 instead of VFPv3+ and NEON float point support found in ARMv7+.

The Raspberry Pi Foundation and the community maintains this light operating system and suited it with a bundle of utilities for the education market including Scratch, Mathematica, Wolfram, and more. The custom desktop UI uses LXDE which uses very little RAM and processing power compared to traditional PC desktop environments like Gnome and KDE. This allows students, educators, and other people without Linux terminal knowledge to use the devices in a format that they are accustomed to.

Because Debian is FOSS and community-driven, it is very easy to run Raspbian on top of other hardware. We have mated our Linux 4.14 LTS kernel and bootloader for AML-S905X-CC to Raspbian. If you are coming from a Raspberry Pi board, this image should provide the same intuitiveness and tools that you are familiar with. There were two improvements made: automatic swap partition creation and localization to US English.

The kernel is compiled as 64-bit ARMv8 and running the 32-bit ARMv6 Raspbian user-space. This means that the full performance benefits of 64-bit ARMv8 architecture will not be in the native applications but you get significant in-kernel improvements. Raspbian also doesn’t support multiarch so it is not simple to run 64-bit ARMv8 applications with this image. This also prevents 3D acceleration by the GPU although the LXDE desktop environment is plenty fast without it.

We will spin our own fully 64-bit Ubuntu image based on LXDE as well in the near future. Look forward to a full suite of Tritium images including Raspbian in another week as Linux 4.18 stabilizes.

You can grab this image from the AML-S905X-CC product page under Downloads. There’s also a Google Drive share link in the README.txt. Please give it a spin and let us know what you think. Have a wonderful July 4th!

Posted on 2 Comments

AML-S805X-AC (La-Frite) Announcement, Ubuntu 18.04 (Bionic Beaver) LTS for AML-S905X-CC (Le Potato) Preview Image 3, Raspbian, and Upstream Software Roadmap

Since we started our endeavor, we have made tremendous progress on the software side of the AML-S905X-CC (Le Potato) platform through our collaboration with BayLibre. We are happy to announce that the platform will be getting a mini-me, the AML-S805X-AC (La Frite). This smaller and more cost-oriented board shares the same underlying technology as its bigger brother and will utilize the upstream work completed so far. It is limited to 1080P instead of 4K60 like Le Potato. The crowdfunding will occur at the end of July after we release the images for ALL-H3-CC series (Tritium). This will coincide with the Indiegogo campaign for ROC-RK3399-PC (Renegade Elite). More details to come about both of these projects.

Meanwhile, we have released a new preview image for the current AML-S905X-CC. This image fixes two outstanding issues:

  • floating MAC address causing new DHCP IP leases
  • support for automatically generating timings for DMT resolutions

The images slipstreams the latest Linux 4.14.52. If you already have preview image 2, this is not much of an upgrade.

We have been quietly working on support for Raspbian. The work is relatively simple and we have been testing it internally for release in the next 10 days. It will come in two forms: an image and a script to install on top of existing Raspbian for Raspberry Pi. This will work for both Le Potato and Tritium platforms.

LXDE is much faster than Gnome 3 on these low power ARM hardware. It is the basis for the latest desktop UI for Raspbian. We will start rolling Ubuntu with LXDE on X11 along side the Gnome 3 with Wayland images for usability reasons.

Upstream roadmap items being worked on include the following:

  • 4K30 support in Linux (4K60 requires a lot of work still)
  • single resolution video output and framebuffer in u-boot
  • SPI-FC support for AML-S805X-AC in u-boot
  • DRM overlays in Linux
  • Device tree overlays (like HAT support in Raspbian for Raspberry Pi boards)

Logistical roadmap items being worked on include the following:

  • Unified kernel for ALL-H3-CC H5, AML-S905X-CC, ROC-RK3328-CC based on Linux 4.18
  • Debian repo infrastructure and packaging for kernel and u-boot for all of our boards
  • Continuous integration and image buildbot
  • European distribution

These two lists are not comprehensive. It will be a fun summer with lots to do.

Posted on 2 Comments

Determining Boot Duration Issues on Our Ubuntu 18.04 (Bionic Beaver) Preview Images for AML-S905X-CC (Le Potato)

One of the major issues with our previous Ubuntu 18.04 preview release images was the long 5 minute boot time. We did a little debugging on that front to find out the exact reason and to derive a resolution. In this article we go over the steps that we took to help people understand how to approach similar issues. Please note that the problem is not related or relevant for official Ubuntu images for x86 and Armbian Ubuntu 18.04 images.


To start off with a background of the boot process for our images, we have to begin with the disk layout for our Ubuntu images. Our images are released as a zip file of the raw block data. The raw image is 4GB in size using a MBR partition system composed of two primary partitions.

Disk Image (4GB):

  • MBR Partition System (512 Byte Sectors)
    • Empty Space – Sector 0 to 2047 (0MB to 1MB) – MBR and u-boot
    • Partition 1 – Sector 2048 to 524287 (1MB to 256MB) – FAT (EFI) – /boot
    • Partition 2 – Sector 524288 to 8191999 (256MB to End) – btrfs

When you flash this image onto a MicroSD card using dd or Win32DiskImager, you only have to flash 4GB even if the MicroSD card is much larger. Upon boot, the image has a run-once script, lc_repart_disk_once, that determines the actual MicroSD card size and re-formats the disk to make use of the empty space > 4GB.

It computes the last incomplete gigabyte (1024 ^ 3) and creates primary partition 3 in that space for a swap partition. Then it extends primary partition 2 to use all of the intermediary space. BTRFS can be resized online so there no need to reboot to extend it. The swap partition is added to /etc/fstab and turned on.


Since most of the early kernel actions happen when there isn’t a GUI, we used our trusty UART to USB adapter to get early access to the system. We connected it to the three pin 2J1 connector which is highlighted in red on the picture below.

AML-S905X-CC UART 2J1 Connector
2J1 Connector Highlighted in Red: Ground (BLACK) TX (WHITE) RX (GREEN)

We use Ubuntu/Debian internally so we ran sudo minicom -b 115200 -D /dev/ttyUSB0 on our computers after plugging in the UART cable. The baud rate for the board is set to 115200 in software. We had to disable the hardware flow control by pressing Control+A, O, Serial port setup, F.

Problem Isolation and Resolution

Ubuntu 18.04 like Ubuntu 16.04 before it uses systemd as the init system which allows for clear dependencies and parallel process execution. There are two valuable tools: journalctl for reading logs and systemd-analyze for determining the process tree that took the longest.

It takes about 20 seconds for the board to get to UART TTY prompt. We login using libre and computer as the username and password respectively. We crawled through the boot logs using sudo journalctl to find that lc_repart_disk_once was timing out after 5 minutes and getting restarted. The other way to determine this was by running sudo systemd-analyze criticial-chain. After a system is fully booted (or timed out), this will give you the process tree that took the longest time with each process itemized.

Next, we enabled debugging on the lc_repart_disk_once shell script by adding set -x to enable verbose output that can be examined via sudo journalctl -u lc_repart_disk_once. We noticed that the mkswap command in the script seems to hang for a few minutes even though it should only take a few seconds.

To trace what goes wrong with a process, we installed the handy strace utility via sudo apt-get install strace. This utility will report userspace and kernel interactions. By prefixing the mkswap command with strace a script, we were able to determine exactly what mkswap was doing.

After restoring the filesystem to its original state, we restarted the system. sudo journalctl -u lc_repart_disk_once reported that mkswap was hanging on a read from /dev/random which is a system entropy issue. The annoying thing with /dev/random is that reading from it is a blocking call when system entropy gets low and won’t unblock until system entropy recovers, which can be quite slow. We checked sudo cat /proc/sys/kernel/random/entropy_avail and sure enough it was below 100, which will cause reads from /dev/random to block.

Luckily, the Amlogic S905X found in Le Potato has a built-in hardware random number generator (RNG) and BayLibre upstreamed support for it in Linux 4.8. All that was missing is the rng-tools daemon that will back the /dev/random with the HWRNG in /dev/hwrng. By installing it via sudo apt-get install rng-tools, we were able to let mkswap finish within seconds instead of hanging on entropy.

This problem is not readily transparent or an issue with the application code. It is sometimes critical for an user or developer to understand how Linux (and system level design) works in order to develop an effective solution and not resort to workarounds like patching base utilities or working around system level problems in application level logic.


With this all being said and done, we have released our Ubuntu 18.04 Preview Image 3 which now boots in two minutes to the Gnome Display Manager instead of five minutes on the first run. Second boots takes less than 45 seconds. The headless boot times have not changed from the previous 20 seconds. This is a tremendous improvement to usability.

Other Thoughts

We have started putting images in Google Drive for faster downloads. You can find them in the README.txt. Other changes in PI3 include Linux LTS 4.14.50, defaulting to Wayland in GDM for the libre user, increased compressed memory pool, and a few more resolutions. Outstanding issues include overlay implementation, upstream Linux support for 2K/4K HDMI output, and VPU work for accelerated video decoding. Ely, a community member, has contributed work towards open source hardware video decoding which is very exciting.

We expect another preview release before we have a formal release. We are currently getting infrastructure in place to host repositories for the formal release so you can sudo apt-get update && sudo apt-get upgrade to keep everything up to date instead of re-flashing MicroSD cards.

By the time the next Linux LTS rolls around (4.19 in October), we should have an unified image for all three of the current CC and CM platforms.