Thursday, 29 December 2016

Cherry Picked Patches for Cherry Trail Devices

Benefits Bay Trail devices as well.

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've updated my 4.9.0-11.12 kernel to include Len Brown's patch to address kernel freezes (https://bugzilla.kernel.org/show_bug.cgi?id=109051#c628), Laszlo-Fiat's patch to stabilize the RTL8723BS driver (https://github.com/hadess/rtl8723bs/issues/76) and Hans de Goede's patches to address wifi issues (https://github.com/hadess/rtl8723bs/issues/80).

To upgrade your kernel download the shell script and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.9.0-11.12 (superseded)

Additionally I've respun yesterday's Ubuntu 17.04 (Zesty Zapus) Daily Build (Alpha 281216) ISO to include this updated 4.9.0-11.12 kernel together with firmware to support the Broadcom BCM4330 wifi chip (e.g. Tronsmart Ara X5) and the Broadcom BCM43340 wifi chip (e.g. ASUS EeeBook X205TA).

To try the ISO download it from the link below (in red) and write it to a USB using either 'Rufus' in Windows or 'dd' in Linux.

Ubuntu 17.04 Alpha 281216 (Daily Build) ISO (superseded)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.

To turn on wifi for mini PCs with Broadcom wifi chips it is often necessary to reload the driver. In a terminal window enter 'sudo modprobe -r brcmfmac' followed by 'sudo modprobe brcmfmac'.

Thursday, 22 December 2016

Updated Xenial Kernel 4.4.0-57.78 Upgrade Script

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've upgraded my Xenial kernel upgrade script in line with the latest Ubuntu Xenial kernel.

To upgrade your kernel first download the shell script for the kernel version you require and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.4.0-57.78 (superseded)

Updated Yakkety Kernel 4.8.0-32.34 Upgrade Script

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've upgraded my Yakkety kernel upgrade script in line with the latest Ubuntu Yakkety kernel.

To upgrade your kernel first download the shell script for the kernel version you require and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.8.0-32.34 (superseded)

Updated Zesty Kernel 4.9.0-11.12 Upgrade Script

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've updated my 4.9.0-11.12 kernel to include a small patch that hopefully will improve RTL8723BS wifi. 

To upgrade your kernel first download the shell script for the kernel version you require and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.9.0-11.12 (superseded)

To get audio running on a Mini PC with a headphone jack using the RT5640 codec (for example Tronsmart Ara) after using a kernel upgrade script simply:
  1. Open the URL https://github.com/plbossart/UCM in a browser
  2. Click the green coloured 'Clone or Download' button on the right and download as a 'zip' file
  3. In a terminal window go to the download directory and enter 'unzip UCM-master.zip'
  4. Install by entering 'sudo cp -rf UCM-master/bytcr-rt5640 /usr/share/alsa/ucm'
Then reboot, plug in your headphones and select sound using 'Sound Settings' and choose 'Headphones playback'. 

Updated 17.04 Alpha 131216 ISO

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've updated my 4.9.0-11.12 kernel to include a small patch that hopefully will improve RTL8723BS wifi. This new kernel has been included in a respin of my 17.04 Alpha 131216 ISO.


To try the ISO download it from the link below (in red) and write it to a USB using either 'Rufus' in Windows or 'dd' in Linux.

Ubuntu 17.04 Alpha 131216 (Daily Build) ISO (superseded)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.


A new look for 2017

When I started my blog my intention was for it to be the 'dynamic' update content partner to my 'static' core content pages on my website. Then some posts started to be linked from external sites so to simplify click-throughs I decided to 'maintain' them. That in itself became cumbersome when highlighting what had changed for return viewers. Now there is a problem with new comments not displaying on one of the blog postings so I've decided to reorganize and return to a multi-media format approach for sharing my work.

My website (www.linuxium.com.au) will contain the latest and complete documentation of my development work. All download links will be current and provide the most recent versions.

My blog (www.linuxiumcomau.blogspot.com) will highlight new development work which has been updated to my website. Additionally each blog posting has a comment facility where discussions can occur.

My social media G+ (https://plus.google.com/+IanMORRISON), Facebook (https://www.facebook.com/Linuxium) and Twitter (https://twitter.com/linuxium) accounts will be updated each time I post on my blog and serve both as notification media and for those wishing to subscribe for updates.

Comments including praise, criticism and suggestions are welcome on all media. Requests can be emailed and technical issues should be reported as comments on the relevant blog posting. The best way to help when reporting a technical issue is to include the name of your device and a copy of the output from 'dmesg' (which is basically a log of kernel messages). The easiest way to share the log is by using the 'pastebinit' command (see https://help.ubuntu.com/community/Pastebinit). After installing the command by entering 'sudo apt install pastebinit' you can share the kernel messages log by entering 'dmesg | pastebinit'. This will paste a copy of the output from 'dmesg' to Ubuntu's Pastebin and provide an URL to access it. So when reporting a technical issue please include:
- Outline of issue
- Name of device
- URL from pastebin (e.g. http://paste.ubuntu.com/23646692)

Finally I am totally dependent on donations to continue my work so a donation link (http://goo.gl/nXWSGf) rather than adverts is included on all sites. Please use this to donate.


Wednesday, 5 October 2016

Running Ubuntu on Intel Bay Trail and Cherry Trail Devices

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

Intel Atom based mini PCs currently use Bay Trail and Cherry Trail SOCs. Whilst they perform satisfactorily under Windows attempts to use Linux based operating systems have resulted in the loss of HDMI audio, wifi and bluetooth. I've attempted to address this with a series of Ubuntu ISOs and kernel patches.
Official Ubuntu releases are provided as ISO images which are single files that represent an entire CD/DVD of software. An ISO image can be written to a USB to create a 'live' USB drive that containing a full operating system that can be booted or used as installation media. Ubuntu has recognized flavours with the difference being the set of packages included within the release:

  • Ubuntu uses Unity (a graphical shell for the GNOME desktop environment)
  • Lubuntu uses LXDE (the Lightweight X11 Desktop Environment)
  • Xubuntu uses the Xfce desktop environment
  • Kubuntu uses KDE's Plasma desktop environment
  • Ubuntu GNOME uses the GNOME desktop environment
  • Ubuntu MATE uses the MATE desktop environment

Ubuntu is well suited to mini PCs as the flavours provide the option of running a fast but lightweight operating system that can take advantage of the lesser hardware specifications.

By combining recent patches and source code and porting them with Ubuntu kernel source I've created ISO images that fully support HDMI audio, wifi and bluetooth on Intel Compute Sticks. They will work on other Atom Bay Trail and Cherry Trail with varying success in part due to the functionality provided by the device's BIOS which typically affects the success of bluetooth and assuming the device has either Realtek 8723BS or other officially support wifi including Intel.  I've also included the latest patches that try to reduce the random freezes that have been known to occur.

Because the ISOs include a patched kernel to provide the missing functionality it means no automatic Ubuntu kernel updates although other application packages will update as normal. Consequently I've also developed a manual patching process where a script can be downloaded and then executed to update the kernel to match the latest releases.

I've also configured the ISOs to both run and install using either a 32-bit or 64-bit bootloader to provide the ability to easily dual-boot without needing to modify the BIOS.

Each ISO can be written to a USB using either 'Rufus' in Windows or 'dd' in Linux. The USB can then be used to boot from after powering-on the device. For installation to the device's internal storage simply run the installer and follow the on-screen instructions.

Some cautionary advice: The initial menu screen takes slightly longer to appear than with the official ISOs. Depending on the speed of the USB drive used it can be anything from fifteen to forty-five seconds before anything appears on the screen. After installing with a 32-bit bootloader booting sometimes results just in a blank/coloured (e.g. purple) screen. To prevent this and to ensure a successful boot it is best boot through the BIOS menu followed by selecting the Ubuntu option. If dual booting with Windows I recommend installing/re-installing 64-bit Windows to circumvent this issue if your device supports it.

Previous Update: Whilst two ISO sets of various Ubuntu flavours for both 16.04.1 and 16.10 releases are provided, I recommend first trying one of the 16.10 ISOs as these are the most recent and incorporate the latest kernel, patch sets and fixes based on previous releases and feedback. In particular, the Yakkety 16.10 ISO kernels support micro SD cards (although with some limitations), includes a patch for I2C bus, has improved RTL8723BS wifi and bluetooth support and most recently I've included support for full disk encryption on Lubuntu and fixed the home directory encryption for all flavours. /Previous Update


Ubuntu 16.04.1 LTS


To try an ISO download it from one of the links below (in red) and write it to a USB using either 'Rufus' in Windows or 'dd' in Linux.

Ubuntu (superseded)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.


Lubuntu (superseded)
Lubuntu is a fast, energy saving and lightweight variant of Ubuntu using LXDE. It is popular with PC and laptop users running on low-spec hardware.


Xubuntu (superseded)
Xubuntu is an elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.


Kubuntu (superseded)
Kubuntu offers the KDE Plasma Workspace experience, a good-looking system for home and office use.


Ubuntu GNOME (superseded)
Ubuntu GNOME uses GNOME Shell along with a plethora of applications from the GNOME Desktop Environment.


Ubuntu MATE (superseded)
Ubuntu MATE expresses the simplicity of a classic desktop environment. MATE is the continuation of the GNOME 2 desktop which was Ubuntu's default desktop.



Alternatively you can just download a kernel and upgrade your existing installation. Note that the disadvantage of this approach is that you will need to find and install the wifi firmware files in order to get wifi working on a Bay Trail device.

To upgrade your kernel first download the shell script for the kernel version you require and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.4.0-31.50

4.4.0-38.57

4.4.0-42.62

4.4.0-45.66

4.4.0-53.74 (update: current latest Xenial kernel - superseded)

Previous Update: Thanks to a comment from Камлаю однако (sae762) a solution to the Cherry Trail device I2C bus kernel error is now known. However when I included it as a patch in the latest build of the v4.4 kernel (4.4.0-42.62) I subsequently discovered that some Cherry Trail devices failed to boot due to new errors being encountered. As a result I have excluded my patch from the v4.4 kernels and recommend Cherry Trail device owners to either install my Yakkety 16.10 ISO with kernel updates or try upgrading to the latest Yakkety kernel (v4.8.0-26.28) using the script below. As a result the ISO kernels will not be recompile with this patch although I am still planning on re-spinning the ISOs to include other fixes I have been working on.

Starting from the 4.4.0-42.62 kernel the source now includes an earlier patch 'Reduce Baytrail eMMC/SD/SDIO hangs' which previously was available in the v4.6 and later kernels which people still said hung. This will not be back-ported to the ISOs.

I have also created a new update script 4.4.0-45.66 containing the latest Xenial kernel build which has been released to address the 'Dirty COW bug' or CVE-2016-5195 (see http://dirtycow.ninja or http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-5195.html) which is a privilege escalation vulnerability involving a race condition in handling copy-on-write breakage of private read-only memory mappings. /Previous Update

Latest Update: I have created a new update script 4.4.0-53.74 containing the latest Xenial kernel build. As noted above this does not include the Cherry Trail I2C bus kernel solution which can be found in the latest Yakkety and Zesty builds below. /Latest Update

One issue that has been reported with Linux kernel versions newer than 3.16 on Bay Trail processors is a random freeze where the whole system hangs. Unfortunately no complete fix currently exists however if you encounter freezes an accepted workaround is to limit the processor (CPU) to a certain power state, or 'C-state', if such freezes are encountered.

Open a terminal session and enter the following command (on a single line):
sudo sed -i 's/\(GRUB_CMDLINE_LINUX=\)""/\1"intel_idle.max_cstate=1"/' /etc/default/grub
To implement the change enter:
sudo update-grub
and then reboot the system by entering:
sudo reboot
The above change only needs to be made once, typically following installation to eMMC storage.


Ubuntu 16.10


To try an ISO download it from one of the links below (in red) and write it to a USB using either 'Rufus' in Windows or 'dd' in Linux.

Ubuntu (superseded)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.


Lubuntu (superseded)
Lubuntu is a fast, energy saving and lightweight variant of Ubuntu using LXDE. It is popular with PC and laptop users running on low-spec hardware.


Xubuntu (superseded)
Xubuntu is an elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.


Kubuntu (superseded)
Kubuntu offers the KDE Plasma Workspace experience, a good-looking system for home and office use.


Ubuntu GNOME (superseded)
Ubuntu GNOME uses GNOME Shell along with a plethora of applications from the GNOME Desktop Environment.


Ubuntu MATE (superseded)
Ubuntu MATE expresses the simplicity of a classic desktop environment. MATE is the continuation of the GNOME 2 desktop which was Ubuntu's default desktop.



Alternatively you can just download a kernel and upgrade your existing installation. Note that the disadvantage of this approach is that you will need to find and install the wifi firmware files in order to get wifi working on a Bay Trail device.

To upgrade your kernel first download the shell script for the kernel version you require and after making it executable (enter 'chmod 755 <script>') you can install it as 'root' (by entering 'sudo <script>'). Once the script has finished executing the device will need to be rebooted to use the updated (patched) kernel.

4.8.0-22.24

4.8.0-26.28

4.8.0-30.32 (update: current latest Yakkety kernel - superseded)

Previous Update: Thanks to a comment from Камлаю однако (sae762) a solution to the Cherry Trail device I2C bus kernel error is now known and I have included it as a patch starting with the 4.8.0-22.24 build of the v4.8 kernel. This kernel already includes the 'Reduce Baytrail eMMC/SD/SDIO hangs' patch mentioned above. however all the ISOs will need to be re-spun as they contain an unpatched 4.8.0-22.24 built of the v4.8 kernel.

I have also created a new update script 4.8.0-26.28 containing the latest Yakkety kernel build which has been released to address the 'Dirty COW bug' or CVE-2016-5195 (see http://dirtycow.ninja or http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-5195.html) which is a privilege escalation vulnerability involving a race condition in handling copy-on-write breakage of private read-only memory mappings.

I have also re-spun the ISOs and the above links now point to the updated ISOs. These ISOs include the 4.8.0-22.24 build of the v4.8 kernel patched with the solution to the Cherry Trail device I2C bus kernel error. I've also included support for full disk encryption on Lubuntu and fixed the home directory encryption for all the Ubuntu flavours. I recommend that after installation the kernel update script (4.4.0-45.66) should be applied to upgrade to the latest kernel. /Previous Update

The Yakkety kernels brings SD card support to Cherry Trail devices although Sandisk card support is not complete and can fail completely. The random freeze issue is still present so if you encounter freezes use the workaround above to limit the processor (CPU) to a certain power state, or 'C-state'. Some devices hang on reboot or halting without powering off. The exact cause for this has not been identified. If bluetooth fails to initialize then toggling the device's power and rebooting has been found to work. Any other functionality issues should be re-checked using the equivalent official ISO as they maybe existing bugs or deficiencies.

Latest Update: I have created a new update script 4.8.0-30.32 containing the latest Yakkety kernel build which includes the Cherry Trail I2C bus kernel solution.

I've also built the first fully patched Zesty kernel update script 4.9.0-8.9 which may be of interested:

4.9.0-8.9 (update: current latest Zesty kernel - superseded)

This can be tested with either 16.04 or 16.10 as the official 17.04 release will not be available until April next year.

Finally to get audio running on a Mini PC with a headphone jack using the RT5640 codec (for example Tronsmart Ara) simply:

  1. Open the URL https://github.com/plbossart/UCM in a browser
  2. Click the green coloured 'Clone or Download' button on the right and download as a 'zip' file
  3. In a terminal window go to the download directory and enter 'unzip UCM-master.zip'
  4. Install by entering 'sudo cp -rf UCM-master/bytcr-rt5640 /usr/share/alsa/ucm'

Then reboot, plug in your headphones and select sound using 'Sound Settings' and choose 'Headphones playback'.  /Latest Update


Ubuntu 17.04 Alpha

Breaking News:

Pierre-Louis Bossart has been rewriting the HDMI audio patches with the intent to replace them entirely with a new HDMI LPE audio driver which enables support for HDMI LPE audio mode on Bay Trail and Cherry Trail devices when an HDaudio controller is not detected.

Once the driver has been approved upstream by the GFX team it will hopefully be mainlined possibly as early as 4.11.

Latest Update: I have been pointed to a set patches that better address the Cherry Trail PUNIT semaphore issue. They are from the Linux I2C development team and are currently ready for review. Consequently I've updated my 4.9 kernel and they are now included in both my kernel update script and 17.04 Alpha 131219 ISOs. /Latest Update

In order to ensure the success of this work I would like to provide feedback on any issues encountered through the early adoption of the driver. So I've decided to build my 4.9 kernels using this driver and provide kernel upgrade scripts to allow anyone to test on their own devices. I've also respun a recent daily Ubuntu Alpha build ISO so that the kernel and driver can be tested independently of whatever is currently installed.

4.9.0-11.12 (patched Zesty 4.9 kernel with including new HDMI LPE audio driver - superseded)

Ubuntu 17.04 Alpha 131216 (Daily Build) ISO (superseded)
Ubuntu comes with everything. All the essential applications, like an office suite, browsers, email and media apps come pre-installed and thousands more games and applications are available in the Ubuntu Software Centre.


In order to build up a list of what devices work with the new driver and document any issues identified please add a comment below detailing your experiences.

Reporting Issues

The best way to help when making a comment is to include the name of your device and a copy of the output from 'dmesg' (which is basically a log of kernel messages). The easiest way to share the log is by using the 'pastebinit' command (see https://help.ubuntu.com/community/Pastebinit). After installing the command by entering 'sudo apt install pastebinit' you can share the kernel messages log by entering 'dmesg | pastebinit'. This will paste a copy of the output from 'dmesg' to Ubuntu's Pastebin and provide an URL to access it.

So when reporting an issue please include:


/Breaking News



Ubuntu 16.10 Beta 2 (superseded)


The Beta 2 images and earlier are superseded by the final images above. The following section remains as an archive only.

The Ubuntu team has just announced the final beta release of Ubuntu 16.10 Desktop, Server, and Cloud products. Codenamed "Yakkety Yak" 16.10 the beta release also includes images for the Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, and Ubuntu Studio flavours.

So I've created an Ubuntu 16.10 Beta 2 ISO suitable for Intel Atom devices. It can be downloaded from here and used as LiveUSB or it can be installed. Similarly I've created a Lubuntu 16.10 Beta 2 ISO here together with Yakkety kernel upgrade scripts:

4.8.0-14.15

4.8.0-17.19 (current latest Yakkety kernel)

The Yakkety kernel brings SD card support to Cherry Trail devices although Sandisk card support is not complete and can fail completely.

If installing the Lubuntu 16.10 Beta 2 ISO on the original Ubuntu Intel Compute Stick (STCK1A8LFC) you will loose the initial F10 boot option. The NVRAM entry the system creates doesn't match the installation as with the v4.8 kernel and ZRAM the storage device becomes /dev/mmcblk1. You can still manually boot by going through the EFI shell (once enabled in BIOS) and you can fix by deleting and then recreating the correct boot entry using 'efibootmgr'. So if you didn't understand this paragraph don't install it on the STCK1A8LFC and wait for me to find either a simpler solution or provide some additional instructions.

Acknowledgements:  Canonical Ltd. (Ubuntu), Pierre-Louis Bossart (HDMI audio), Linuxium (v4.8 HDMI audio), Daniel Bilik (C-state), Bastien Nocera (WiFi) and Larry Finger (Bluetooth).

Source code: GitHub (Linuxium).

Sunday, 2 October 2016

Ubuntu 16.10 Beta 2 for Intel Baytrail and Cherrytrail Devices

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

I've decided to re-spin my Ubuntu 16.10 Beta 2 ISO with a kernel that supports HDMI audio and wifi on any Intel Baytrail or Cherrytrail device. The kernel and ISO were developed for Intel Compute Sticks and this version hasn't been extensively tested on multiple devices simply due to the fact that I don't own them! As your mileage may vary depending upon device there are two options available.

The first option is to download my ISO and write to a USB (use 'Rufus' on Windows or 'dd' on Linux). You can then try Ubuntu and/or perform a fresh installation.

Ubuntu 16.10 Beta 2 ISO


The second option is to download just my kernel and upgrade your existing installation. First download the shell script and after making it executable (enter 'chmod 755 linuxium-install-yakkety-kernel-4.8.0-14-linuxium-linuxium.sh') you can install it as 'root' (by entering 'sudo ./linuxium-install-yakkety-kernel-4.8.0-14-linuxium-linuxium.sh'). Note that the disadvantage of this approach is that you will need to find and install the wifi firmware files in order to get wifi working on a Baytrail device. This is something I can look at fixing later.

Additionally I've released an upgraded kernel: 4.8.0-17.19 called 'linuxium-install-yakkety-kernel-4.8.0-17-linuxium-linuxium.sh' which can be downloaded for those wishing to be on the very latest release. Another thing I can look at removing is the abundance of the text 'linuxium' at a later stage.

Acknowledgements: Canonical Ltd. (Ubuntu), Pierre-Louis Bossart (HDMI audio), Linuxium (v4.8 HDMI audio), Daniel Bilik (C-state), Bastien Nocera (WiFi) and Larry Finger (Bluetooth).

Saturday, 1 October 2016

Second Beta for Ubuntu 16.10 (Yakkety Yak) on Intel Compute Sticks Released

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

The Ubuntu team has just announced the final beta release of Ubuntu 16.10 Desktop, Server, and Cloud products. Codenamed "Yakkety Yak" 16.10 the beta release also includes images for the Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, and Ubuntu Studio flavours.

So that Intel Compute Stick owners do not miss out I have re-spun the official Ubuntu and

Ubuntu 16.10 Beta 2 Intel Compute Stick ISO

Lubuntu ISOs to include a modified kernel that supports HDMI audio and wifi on all Intel Compute Stick models which can be downloaded by clicking on the captions below the images.

Lubuntu 16.10 Beta 2 Intel Compute Stick ISO

The included kernel 4.8.0-14.15 can also be downloaded as an upgrade script by clicking on the link and installed after making it executable (enter 'chmod 755 linuxium-install-yakkety-kernel-4.8.0-14-linuxium-ics.sh') and then running it as 'root' ('sudo ./linuxium-install-yakkety-kernel-4.8.0-14-linuxium-ics.sh').

Additionally I've released an upgraded kernel: 4.8.0-17.19 called 'linuxium-install-yakkety-kernel-4.8.0-17-linuxium-ics.sh' for those wishing to be on the very latest release.

Acknowledgements: Canonical Ltd. (Ubuntu), Pierre-Louis Bossart (HDMI audio), Linuxium (v4.8 HDMI audio), Daniel Bilik (C-state), Bastien Nocera (WiFi) and Larry Finger (Bluetooth).


Sunday, 25 September 2016

Chromium OS for Intel Compute Sticks


Google's Chromium projects include Chromium and Chromium OS which are the open-source projects behind the Google Chrome browser and Google Chrome OS.  Chromium OS aims to provide a fast, simple and more secure computing experience for 'web-centric' orientated users.

I've previously tried Chromium OS on earlier Intel Compute Sticks as Google provides both the source-code and documentation to build and install Chromium OS on your own device. However I thought I'd revisit the project and incorporate the latest patches and fixes together with the most recent kernel.

The build results in an image that can be written to a USB and then booted on any of Intel's Compute Sticks giving you a pseudo Chromiumbit:

STCK1A8LFC
STCK1A32WFC
STK1AW32SC
STK2m3W64CC
Performance is dependent on your USB and with a Sandisk Ultra Fit USB3.0 for example it is pretty good:

STCK1A8LFC
STCK1A32WFC
STK1AW32SC
STK2m3W64CC
and runs YouTube at 1080p even on the basic model STCK1A8LFC:

STCK1A8LFC
Furthermore Crouton can be installed to provide a full Ubuntu OS:

STCK1A8LFC
STCK1A32WFC
STK1AW32SC
STK2m3W64CC
Interestingly whilst wifi works on each device audio is only available on the Core m devices even though the Intel HDMI driver is loaded:

STCK1A8LFC and STCK1A32WFC
STK1AW32SC
STK2m3W64CC
So it is back to using a USB audio adapter if sound is a mandatory requirement. If anyone can work out how to configure Chromium to use the Intel HDMI driver please comment below.

To try my latest Intel Compute Stick Chromium OS image you will first need to download it from here and after uncompressing it ('7z x linuxium-ics-chromiumos_image.bin.7z') write it to a USB ('dd if=linuxium-ics-chromiumos_image.bin of=/dev/sdX bs=4M' where 'X' is the appropriate drive letter).

Installation to your device's eMMC storage is also possible noting that it will overwrite the entire internal storage and a resize of the first partition is necessary to fully utilize all available storage space. See the following picture for all the necessary commands:


Acknowledgements: Google (Chromium), Pierre-Louis Bossart (HDMI audio), Daniel Bilik (C-state) and Bastien Nocera (WiFi).

Thursday, 15 September 2016

Yocto for Intel Compute Sticks



Most 'end-users' of 'consumer' products like the Intel Compute Stick who want to either use or at least try a Linux OS will often pick Ubuntu. However given the limited hardware configurations of affordable mini PCs, performance may not be optimal with resource hungry distributions. In the world of embedded systems rather than use a 'proprietary' Linux distribution typically the operating systems are developed from Linux build systems like Yocto, OpenEmbedded, Buildroot and OpenWrt etc.

Unfortunately trying a Yocto Linux build on an Intel Compute Stick is not necessarily that straight forward. It is probably too daunting for most owners to build an initial image just to see what Yocto is all about and most images available for download don't include key drivers or simple installation instructions.

So I've created a Yocto ISO with documentation specifically for Intel Compute Sticks to provide a very basic Linux operating system with wifi and audio support together with the capability to install some additional packages including the Chromium browser.

The ISO can be used either as a LiveUSB or to install Yocto. As the standard installation is to overwrite the entire storage device (i.e. no support for dual booting) I also provide a script to install to pre-existing partitions. The rationale being that you can temporarily replace a current Linux installation (for example Ubuntu) with Yocto and then replace it with the previous Linux installation without affecting any other installed operating systems like Windows etc. As booting the ISO directly on Baytrail models is extremely slow (once booted it works fine) I also provided a script to directly install to the device rather than try to use the LiveUSB approach. Finally I provide some templates to build a repository to allow updates (package installation) from another PC acting as a web server. I also provide the packages which can be installed from the web server or directly if preferred.

Let's get started.

First download my Yocto ISO 'core-image-sato-ics.iso'.

To use as a LiveUSB write the ISO to a USB using the 'dd' command. You can also use the LiveUSB to install from the GRUB boot menu or you can install using one of my installation scripts. For the later option download either 'make-install-mmcblk0.sh' or 'make-install-partition.sh' and copy this to a USB along with the Yocto ISO 'core-image-sato-ics.iso'. On a different USB download and write one of my latest Ubuntu ISOs for the Intel Compute Stick using the 'dd' command and boot your Intel Compute Stick using the Ubuntu LiveUSB. Once booted insert the other USB with the Yocto ISO and install script and change directory to where these files are. If you are installing to existing partitions use the 'lsblk' command or similar to confirm which partitions should be used in the installation. Alternatively you can make new partitions specifically for the Yocto installation. The script assumes that three partitions are available: one each for boot, the root file system and swap. Edit the script to ensure the correct partitions will be used (or modify the script as required). Then run the installation script as root/sudo and reboot your Intel Compute Stick to run Yocto.

Next create a web server on another Linux PC. It is really simple and easy to do. Chose a name for your Yocto repository web server (e.g. 'archive.linuxium.com.au'). Download my documentation/script to create the web server 'make-repository-server.sh' and replace all the occurances of the string '<repo.website.name>' with the name you chose. Now download the compressed Yocto repository 'yocto.7z'. If you are happy to 'rcp' this file to your Yocto repository web server you need to edit 'make-repository-server.sh' and update '<user@ip-address>' as appropriate or you can just delete these lines if you want to manually copy the file over after the next step. Now you can either manually run the commands in the file 'make-repository-server.sh' or run the file as a script and in both cases do so as root/sudo.


The next step is to set up wifi on Yocto. This is probably the hardest step as it involves configuring wifi from the command line and it will depend on your individual environment. If initially you don't feel confident enough to attempt this or in the worst case can't get it working then using a USB ethernet dongle is a quick and simple work around. Whilst there is a lot of information on the web on configuring wifi to help I've included some example files and a script to show how to set up a WPA2 wifi connection with a static address on a hidden network because this is probably the hardest to configure. Download onto a USB the following '_etc_network_interfaces'; '_etc_wpa_supplicant.conf' and 'start_wifi.sh' files. Edit  '_etc_network_interfaces' and for a static address update the IP address details or for a dynamic address change 'static' to 'dhcp' and delete the remaining lines. Copy the file to '/etc/network/interfaces' as root/sudo on your Intel Compute Stick running Yocto. Next run the command 'wpa_passphrase' to get your wifi network pre-shared key (psk). Update the file '_etc_wpa_supplicant.conf' with your wifi name and your psk and change the rest of the parameters according to your wifi network requirements (hint: google 'set up wpa_supplicant' with 'wep' or 'wpa' if you get stuck). Once finished copy the file to '/etc/wpa_supplicant.conf' as root/sudo. Finally run the script 'start_wifi.sh' on your Intel Compute Stick running Yocto. Hopefully this will start your wifi connection.

Once wifi is working (or ethernet if you cheated!) you can now set up access to your Yocto repository web server. As root/sudo edit the file '/etc/hosts' and add a line at the top with the IP address of your Yocto repository web server and its name (e.g. 'archive.linuxium.com.au') similar to how 'localhost' is defined. Now download the  file '_etc_apt_sources.list' and replace all the occurances of the string '<repo.website.name>' with the name of your Yocto repository web server. Then copy the file to '/etc/apt/sources.list' as root/sudo.


Having set up wifi (or ethernet) and your Yocto repository web server you can now update your packages and install new ones. I've built Yocto to use the Debian package manager so it is familiar for existing Ubuntu users. First update your sources as root/sudo with the usual 'apt-get update'. If you want to install Chromium simply enter 'apt-get install chromium'. You can also use 'apt-cache search' to see what other packages are available.

The performance of Chromium is very good on the basic 'Ubuntu' Intel Compute Stick (STCK1A8LFC) and allows you to watch 1080p YouTube.


Hopefully my ISO appeals as a primer for Yocto and similar building tools and encourages some to experiment further.

Acknowledgements: Yocto Project, OpenEmbedded, Emutex, O.S. Systems, Pierre-Louis Bossart and Bastien Nocera.