Home > Audio, Hardware, Intel Atom, Linux, Ubuntu > Updating Star Cloud PCG02U to Ubuntu 16.04 with WiFi and HDMI Audio Support

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.

  1. Tomas Morkus
    May 27th, 2016 at 03:02 | #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. May 27th, 2016 at 09:17 | #2

    @Tomas Morkus
    I have not used it that much, but the system did freeze once
    I have not run benchmarks yet. I’ll post results soon.

  3. May 27th, 2016 at 13:44 | #3

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

  4. Tomas Morkus
    May 27th, 2016 at 15:50 | #4

    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.

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

  5. May 27th, 2016 at 16:12 | #5

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

  6. Tomas Morkus
    May 27th, 2016 at 16:17 | #6

    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.

  7. Tomas Morkus
    May 27th, 2016 at 16:29 | #7

    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.

  8. May 27th, 2016 at 16:33 | #8

    @Tomas Morkus
    Yes, it was Ubuntu 14.04 64-bit. Not sure the 32-bit version would work with 64-bit UEFI.

  9. Matej Kovačič
    May 28th, 2016 at 03:45 | #9

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

  10. May 28th, 2016 at 09:50 | #10

    @Matej Kovačič
    Maybe 2 to 3 times a day. When it happens I can see a kernel crash due to IRQ timeout.

  11. May 28th, 2016 at 16:11 | #11

    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.

  12. Matej Kovačič
    May 28th, 2016 at 16:38 | #12

    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?

  13. roel
    June 23rd, 2016 at 23:57 | #13

    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.

  14. Chris Al
    July 7th, 2016 at 02:33 | #14

    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?

  15. July 7th, 2016 at 09:12 | #15

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

  16. Laurens
    August 10th, 2016 at 20:00 | #16

    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?

  17. August 11th, 2016 at 09:33 | #17

    @Laurens
    Maybe upload then to Mega.

  18. Laurens
    August 11th, 2016 at 13:43 | #18

    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.

  19. Laurens
    August 11th, 2016 at 13:47 | #19

    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

  20. Roel
    August 12th, 2016 at 17:04 | #20

    @Laurens

    thanks for sharing your work!

  21. Laurens
    August 13th, 2016 at 19:07 | #21

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

  22. roel
    December 13th, 2017 at 15:01 | #22

    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/

  1. No trackbacks yet.