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.

PCG02U_Linux_OS_WarningThey 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
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.
CONFIG_SUPPORT_HDMI

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
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
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 cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
23 Comments
oldest
newest
Tomas Morkus
Tomas Morkus
8 years ago

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?

Tomas Morkus
Tomas Morkus
8 years ago

cnxsoft :
@Tomas Morkus
Done. http://openbenchmarking.org/result/1605279-GA-1605228GA19
PCG02U appears to be much slower with Ubuntu 16.04 compared to Ubuntu 14.04.
It’s also less stable, as the system hanged twice this morning.

: Thank you for your effort. So seems, that Ubuntu 14.04 will be better option. BTW: Is there possible to get working Bluetooth also under 14.04 version?

Tomas Morkus
Tomas Morkus
8 years ago

cnxsoft :
@Tomas Morkus
I’ve read Bluetooth requires Linux 3.13 or greater, and Ubuntu 14.04 ships with 3.16, so it should work if you can find why it’s not working. Others have exactly the same problem as I have by the way: https://github.com/lwfinger/rtl8723bs_bt/issues/7. But no solution so far.

I thought, that the Bluetooth issue is only in Ubuntu 16.04. It is bad, that there is no working solution so far.

Tomas Morkus
Tomas Morkus
8 years ago

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.

Matej Kovačič
Matej Kovačič
8 years ago

@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?

Matej Kovačič
Matej Kovačič
8 years ago

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?

roel
roel
8 years ago

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.

Chris Al
Chris Al
8 years ago

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?

Laurens
Laurens
8 years ago

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?

Laurens
Laurens
8 years ago

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.

Laurens
Laurens
8 years ago

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

Roel
Roel
8 years ago

@Laurens

thanks for sharing your work!

Laurens
Laurens
8 years ago

@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.

roel
roel
6 years ago

Does somebody have the guts to try to upgrade the bios with the one of the Azulle Quantum access lan?
According me it’s just the same device: https://azulletech.com/product/quantum-access-lan-windows-10-fanless-mini-pc-stick/
Link to the bios: ftp://ftp.azulletech.com/Software/BIOS/Quantum%20Access/

roel
roel
6 years ago

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.

Boardcon Rockchip and Allwinner SoM and SBC products