Updating Star Cloud PCG02U to Ubuntu 16.04 with WiFi and HDMI Audio Support

I completed my review of PCG02U Ubuntu TV stick a few days ago, and I was quite satisfied with the device, but since Ubuntu 16.04 was released last month, I thought it might be fun to upgrade to the latest version of Ubuntu. I’m go through the complete steps including building a new kernel for HDMI audio, and the drivers for WiFi, but you should be able to install Ubuntu 16.04 for Bay Trail and Cherry Trail processor with the image made by Linuxium and a USB stick.

Star Cloud PCG02U OS Support and Warranty

Before I go through the instructions, you may want to read the conditions on MeLE’s Aliexpress PCG02U page.

They meant Ubuntu 14.04 instead of 14.0.4, but the important part is that if something goes wrong trying alternative OS, you may lose your warranty.

Upgrade Ubuntu 14.04 to Ubuntu 16.04

Upgrading from one LTS version to the next should be easy using the update manager…

… or doing it through the terminal entirely:

However, it did not work for me, as it quickly ended with the message:

I noticed that PCG02U was still stuck on Ubuntu 14.04.3 LTS, despite running dist-upgrade:

After trying several solutions, I eventually changed the Ubuntu mirror, and the steps above completed successfully with Ubuntu 16.04 running.

Click to Enlarge

At least two little problems though: I lost HDMI audio with only Dummy Output available, and while Ethernet was still working after the update, WiFi support was gone… But if you don’t need either you’re good to go.

Enabling HDMI audio in PCG02U

Luckily we already have the instructions to enable HDMI audio for Bay Trail and Cherry Trail processors, all we need is a Linux 4.5 kernel and patch it. I’ll do everything inside PCG02U, and I have not used a separate build machine, which would likely be faster. Tip: you’ll need gcc 4.9 or greater. I used the instruction here and there.

First let’s build the dependencies required to build the kernel in Ubuntu.

Now let’s get the patches in a working directory

as well as the Linux 4.5.1 kernel patched for Ubuntu and the Intel Atom HDMI audio support:

Now we can configure the build:

This will ask which config files to configure for AMD64, i386, ARM and so on. We only need to edit the first one (AMD64). Once you are in the config menu, use menuconfig search function to locate SUPPORT_HDMI option and enable it. Exit and save.

Before starting the build add something like “+some_string” to the end of the first version number in the debian.master/changelog> file. I added +hdmi_audio string:

You can now start the build with:

However, the build did not complete for me, with the error:

I followed the instructions on askubuntu, and disabled set do_zfs = false in debian.master/rules.d/amd64.mk, and completed the build with the same command line. It took around 2 to 3 to complete the build on PCG02U, and I had a bunch of deb packages…

.. and I installed the headers and image:

Rebooted the system, which booted successfully, and I could confirm HDMI audio was back. Yes!

Click to Enlarge

But still no WiFi… and space was running now, so I did some cleaning which gave me a few gigabytes to play with:

Building Realtek RTL8723BS WiFi Driver in Ubuntu/Linux

Star Cloud PCG02U uses  a WiFi and Bluetooth module with the common Realtek RTL8723BS chip, but the driver is not currently in mainline, so it needs to be compiled separately. That part is straightforward, and only take 2 minutes or less:

That’s all and now the Wireless network is enabled:

Click to Enlarge

I had no problems connecting to my wireless router, and the module is automatically loaded at boot time. So now we have the same level of support as in Ubuntu 14.04 with HDMI audio and WiFi.

Realtek RTL8732BS Bluetooth in Linux

However, the hardware also supports Bluetooth, so it would be nice to have this enabled too, and again RTL8723BS Linux Bluetooth driver is available thanks to one independent developer (lwfinger).

In theory, it’s pretty easy:

But this did not work for me, despite Bluetooth apparently being located on /dev/ttyS4:

But the log would show a connection timeout:

Sadly, I haven’t been able to find a solution in a reasonable amount of time, and changing the baudrate from 115200 in the script to 2764800 (as shown in dmesg) does not help.

Of course everything would be so much easier if HDMI audio Cherry Trial and Bay Trial and RTL8723BS drivers would be in mainline linux, as all you would have to do would be to install Mainline linux in Ubuntu, and everything would just work. This does require some work however, but if you are motivated, lwfinger is ready to submit the RTL8723BS WiFi code to mainline if somebody takes care of all the errors and warnings generated by checkpatch.pl.

Share this:

Support CNX Software! Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples

23 Replies to “Updating Star Cloud PCG02U to Ubuntu 16.04 with WiFi and HDMI Audio Support”

  1. Thank you for this how-to I’ll try it whenever I’ll get the stick. But I read, that Atom Z3735F is unstable with 4.X Linux kernels, is that true? And what about the performance, is Ubuntu 16.04 faster or slower as 14.04 on this stick?

  2. BTW: The installed Ubuntu 14.04 is 64-bit version? Would hve sense to try 32-bit version? Because there is only 2GB RAM and 32-bit software has lower memory requirements.

  3. @Tomas Morkus
    Do you have persistent problems with stability of 16.04?

    Anyway, has anyone checked if preinstalled Ubuntu contains any malware or “calling home” software?

  4. I disabled WiFi yesterday evening, and today, the stick haven’t had any issues so far.
    So maybe it’s related to the WiFi driver.

  5. Hmm, this is good to hear – at least we know the source of the problem.

    What about installing 16.04 with an older (14.04) kernel?

  6. Hello,

    I tried to upgrade to 16.04 but after the upgrade the PCG02 wouldn’t boot again. So I downloaded the image of linuxium, but this one wouldn’t boot also, I think because his kernel is specific for the Intel Compute stick. So I downloaded the regular ubuntu 64 image and it install’s without issues. It’s even working better then the original installed ubuntu 14.04. Although no wifi and probably no hdmi sound and no bluetooth. I tried the linuxium kernel with the patches but these don’t work on the PCG02, the system doesn’t want to boot with them.

  7. Great article. I have a similar device but with only 1 GB of RAM. It would take quite a while to build the patched 4.5 kernel, so could you kindly share your finished .deb files somewhere?

  8. @Chris Al
    If you don’t feel like building your own kernel, you can always use Linuxium image mentioned in the introduction.
    Linux 4.5 does not seem quite as stable as Linux 3.16 on Bay Trail though.

  9. I have compiled the packages for HDMI audio on the Mele PCG02. If anyone wants them, I am happy to share them. Can anyone recommend a good place for sharing the packages?

  10. The link to compiled packages https://goo.gl/7nxPCy untar the packages and do sudo dpkg -i linux-headers-*.deb
    and sudo dpkg -i linux-image-*.deb. To stop Ubunto freezing up add intel_idle.max_cstate=1 to /etc/default/grub on the line GRUB_CMDLINE_LINUX_DEFAULT=”” add this between the quotes and any other command already there. Once saved do sudo update-grub. This stopped the Mele PCG02U from freezing up on Ubuntu 16.04.

  11. For anyone who wants to build their own packages these are the dependancies. It will save you a lot of time restarting the process of building:

    sudo apt-get install gcc-4.9
    sudo apt-get install git
    sudo apt-get install kernel-wedge
    sudo apt-get install libncurses5-dev
    sudo apt-get install libssl-dev
    sudo apt-get install gawk

  12. @Roel

    Thanks. I have to confess however that none of the work here is my own. I was just following the great article from cnx-software.com and wanted to contribute by making the package available. However as I understand StarCloud / Mele has been unprofessional by incorporating the 14.04 release into their hardware product without giving the credits to the community and developers which made it possible in the first place. It’s thanks to the Linux / Ubuntu community and Ian Morrison (Linuxium) https://plus.google.com/+IanMORRISON/posts that we can use it.

  13. I tried to flash it with the Azulle bios, but I have a brick now. So don’t try it. I will try to resurrect it with the original bios.

Leave a Reply

Your email address will not be published.