Skip to content

Ubuntu_16.04

AAEONAEU-SW edited this page Nov 26, 2020 · 2 revisions

Ubuntu 16.04 is supported only for UP Board, UP Core, UP Squared, and UP Core Plus. If you need an OS for UP Xtreme or newer boards, please refer to the Ubuntu 18.04 page.


Install Ubuntu for UP, UP2, UP Core, and UP Core Plus

Prerequisites

  • a UP, UP2, UP Core, or UP Core Plus board
  • a USB stick with at least 8Gb of space
  • Keyboard, mouse, a screen and an internet connection

Installation

  • Download Ubuntu 16.04.7 ISO from the Ubuntu download page (works with desktop and server edition)
 http://releases.ubuntu.com/16.04/ubuntu-16.04.7-desktop-amd64.iso

 http://releases.ubuntu.com/16.04/ubuntu-16.04.7-server-amd64.iso 
  • Burn the downloaded image on a USB stick. We suggest using etcher for doing that. You can download it from,
 https://etcher.io
  • Insert the USB installer disk in an empty USB port and proceed with a normal Ubuntu installation.
    • While installing, do not select the option "automatic updates"

Install Ubuntu kernel 4.15.0 for UP from PPA on Ubuntu 16.04

After the reboot you need to add our repository:

sudo add-apt-repository ppa:aaeon-cm/up

Update the repository list

sudo apt update

Remove all the generic installed kernel

sudo apt-get autoremove --purge 'linux-.*generic'

Install our kernel (we use suffix 18.04 because the kernel is valid and built for both Ubuntu 16.04 and 18.04):

sudo apt-get install linux-image-generic-hwe-18.04-upboard

Install the updates (please make sure to not upgrade the system to Ubuntu 18.04):

sudo apt dist-upgrade -y

sudo update-grub

Reboot

sudo reboot

After the reboot you can verify that the kernel is indeed installed by typing

 $ uname -a
 Linux upsquared-UP-APL01 4.15.0-37-generic #40~upboard07-Ubuntu SMP Wed Dec 12 16:21:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Install Ubuntu kernel 4.15.0 for UP locally from debian packages on Ubuntu 16.04

Download the next debian packages from our Launchpad site listing the archives inside linux-hwe - 4.15.0-37.40~upboard07:

https://launchpad.net/~aaeon-cm/+archive/ubuntu/up/+packages

 linux-headers-4.15.0-37_4.15.0-37.40~upboard07_all.deb
 linux-headers-4.15.0-37-generic_4.15.0-37.40~upboard07_amd64.deb
 linux-image-unsigned-4.15.0-37-generic_4.15.0-37.40~upboard07_amd64.deb
 linux-modules-4.15.0-37-generic_4.15.0-37.40~upboard07_amd64.deb
 linux-modules-extra-4.15.0-37-generic_4.15.0-37.40~upboard07_amd64.deb
 linux-source-4.15.0_4.15.0-37.40~upboard07_all.deb

Then, copy all the .deb files to your USB stick and connect to the USB port on your board.

Remove all the generic installed kernel

sudo apt-get autoremove --purge 'linux-.*generic'

To install the kernel locally you have to go to the directory where you saved the debian packages. There, just run the dpkg command to install all packages together:

sudo dpkg -i *.deb

Once the installation is done successfully, be sure the GRUB is updated to include the newst kernel:

sudo update-grub

Finally, reboot your machine and check your new kernel installed:

sudo reboot

 uname -a
 Linux upsquared-UP-APL01 4.15.0-37-generic #40~upboard07-Ubuntu SMP Wed Dec 12 16:21:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Configure WiFi/BT for UP Core and UP Core Plus

Install the Ampak firmware for WiFi and Bluetooth

This firmware is available for UP Core (AP6214A chipset) and UP Core Plus (AP6355 chipset).

Just run the next command:

sudo apt install firmware-ampak

Reboot your machine to get the firmware working:

sudo reboot

WiFi

First of all, you may need to connect a WiFi antenna to your UP Core board [ANT1 connector].

Check the UP Core connectors in https://downloads.up-community.org/download/up-core-connectors-description/.

Scan your available WiFi networks:

sudo iwlist wlan0 scan

You will see all the WiFi interfaces in your area.

Bluetooth

Check your Bluetooth devices in your area:

hcitool scan

Install the Ampak firmware for WiFi and Bluetooth locally from debian package on Ubuntu 16.04

Download the next debian package from our Launchpad site listing the archives inside firmware-ampak - 1.2.0-0:

https://launchpad.net/~ubilinux/+archive/ubuntu/up/+packages

firmware-ampak_1.2.0-0_all.deb

Then, copy the .deb file to your USB stick and connect to the USB port on your board.

To install the Ampak firmware locally you have to go to the directory where you saved the debian package. There, just run the dpkg command to install the package:

sudo dpkg -i *.deb

Reboot your machine to get the firmware working:

sudo reboot

WiFi

Scan your available WiFi networks:

sudo iwlist wlan0 scan

You will see all the WiFi interfaces in your area.

Bluetooth

Check your Bluetooth devices in your area:

hcitool scan

Setup for other WiFi/BT modules tested on UP Series

Install the Realtek firmware to enable WiFi with the 5M02.B module on Ubuntu 16.04

To enable support on Ubuntu for WiFi when using our UP WiFi Kit 5M02.B module, please follow the steps available on the readme of our GitHub repository: Add WiFi/BT support for 5M02.B

Additional Audio configuration

Fixing HDMI Audio not working on UP Board and UP Core on Ubuntu 16.04

On Recent Ubuntu images the HDMI Audio configuration is broken. Once the installation of Ubuntu is complete from the terminal you can run this command to fix it:

 sudo sed -i '/module-detect/ {n;a\
  ## fix HDMI audio on Intel Cherry Trail platforms with latest Ubuntu releases\
  unload-module module-alsa-card\
  load-module module-alsa-sink device=hw:0,2
  }' /etc/pulse/default.pa

Once the system is rebooted the HDMI audio will work automatically.

Enable the HAT functionality from userspace

To be able to use the GPIO, PWM, SPI, I2C, and UART functionality with a normal user we need to set the correct permission.

NOTE: this could create a security problem, do only if you know what are you doing

Install upboard-extras

Run the following command to install the upboard-extras package:

sudo apt install upboard-extras

The command will add rules.d file as follows. The step is necessary.

/lib/udev/rules.d/99-gpio.rules
/lib/udev/rules.d/99-i2c.rules
/lib/udev/rules.d/99-leds.rules
/lib/udev/rules.d/99-spi.rules
/lib/udev/rules.d/99-ttyAMA0.rules

Add Groups

You can create a bash script (e.g. permissiongroups.sh) script with the following content:

 #!/bin/sh
 set -e
 
 for group in gpio leds spi i2c; do
 	if ! getent group $group >/dev/null; then
 		addgroup --system $group
 	fi
 done

Then add execution permissions

($ chmod +x permissiongroups.sh)

and run it ($ ./permissiongroups.sh)

You need to add the user that needs to access the HAT functionality to the corresponding groups:

for example, this command permits the current user to access the GPIO functionality

sudo usermod -a -G gpio ${USER}

LEDs

sudo usermod -a -G leds ${USER}

SPI

sudo usermod -a -G spi ${USER}

I2C

sudo usermod -a -G i2c ${USER}

UART

sudo usermod -a -G dialout ${USER}

to apply the permission changes after issuing the previous command a reboot is needed

sudo reboot

Hang on Shutdown or Reboot for UP Board and UP Core

Hang on shutdown or reboot with certain Kernel releases. This is a problem related to kernel modules for HSUART DMA support that get loaded on Cherry Trail SoC, used by UP Board and UP Core.

The HSUARTs can still be used in PIO mode even after disabling DMA support but will be less CPU efficient.

Source: http://www.reddit.com/r/Atomic_Pi/wiki/ubuntu

edit /etc/modprobe.d/blacklist.conf and add lines to the bottom

 blacklist dw_dmac_core
 install dw_dmac /bin/true
 install dw_dmac_core /bin/true
Clone this wiki locally