It’s been awhile since the last Ubuntu release, here we release an new Ubuntu Server ROM V170515 first, and regarding the new Ubuntu-Mate ROM will be follow in a next few days.
Check Firmware Page to download the ROM.
ROM Infos:
- ROM version: Vim_Ubuntu-server-16.04_V170515.7z
- MD5SUM: 5dace63f5b6db06377ea241b4ef7e153
- The ROM is for eMMC installation
- Account info:
- User: root
- Password: khadas
- LED state:
- Booting: heartbeat
- Boot up: breathe
Change logs:
- better 32-bit display(Before was 24-bit)
- Add standard Linux GPIO Lib support, and setup PIN29/30/31/32/33/37 as generic IO
- Enable UART bus (PIN15/16) as default
- Enable I2S bus(PIN25/26) as default
- Add bluetooth support
- Add more HDMI output resolutions(haven’t full completed yet)
- Upgrade to the latest ubuntu-16.04.2 packages
Upgrade guidance:
Setup
1) Create Admin user with ‘sudo’ permission
# adduser khadas
# usermod -aG sudo,adm khadas
It’s not recommended to login as root user directly, you can login as the Admin user you create above:
root@Khadas:~# su khadas
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
khadas@Khadas:/root$
2) HDMI Overscan
# echo 10 10 1909 1069 > /sys/class/graphics/fb0/window_axis
# echo 0x10001 > /sys/class/graphics/fb0/free_scale
Tips: window_axis parameter valued as: left + bottom + right + top
- left + right = 1919
- bottom + top = 1079
3) Setup network
Note to plug in the LAN cable and run:
# echo "auto eth0" >> /etc/network/interfaces
# echo "iface eth0 inet dhcp" >> /etc/network/interfaces
# /etc/init.d/networking restart
Restarting networking (via systemctl): networking.service.
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:18:01:81:31
inet addr:192.168.1.109 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:18ff:fe01:8131/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1778 (1.7 KB) TX bytes:1996 (1.9 KB)
Interrupt:40
...
$
4) Setup bluetooth via CLI
As we haven’t achive the bluetooth firmware mach automate, and currently our build is for VIM Pro. So if you are a VIM Basic(2GB + 8GB + AP6212) user, you should edit /usr/local/bin/bluetooth-khadas.sh
manually first by comment the VIM Pro line and uncomment the VIM line:
#!/bin/sh
# VIM Pro
#/usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/BCM4345C0.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyS1
# VIM
/usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a1.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyS1
/bin/sleep 1
/usr/bin/hciattach /dev/ttyS1 any
It’s common way with other Ubuntu OS to pair & connect bluetooth devices on Khadas VIM, and follows two for reference:
If everything works fine, the bluetooth service should be running. You can run systemctl
to check it:
# systemctl status bluetooth-khadas
● bluetooth-khadas.service - Khadas Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth-khadas.service; enabled; vendor
preset: enabled)
Active: active (running) since Thu 2016-02-11 16:28:15 UTC; 40s ag
o
Process: 2109 ExecStart=/usr/local/bin/bluetooth-khadas.sh (code=exited, statu
s=0/SUCCESS)
Main PID: 2179 (hciattach)
CGroup: /system.slice/bluetooth-khadas.service
└─2179 /usr/bin/hciattach /dev/ttyS1 any
Feb 11 16:28:06 Khadas systemd[1]: Starting Khadas Bluetooth service...
Feb 11 16:28:14 Khadas bluetooth-khadas.sh[2109]: Done setting line discpline
Feb 11 16:28:15 Khadas bluetooth-khadas.sh[2109]: Device setup complete
Feb 11 16:28:15 Khadas systemd[1]: Started Khadas Bluetooth service.
#
5) Using GPIO
GPIO list:
- PIN29 / GPIOH7: 178
- PIN30 / GPIOH6: 177
- PIN31 / GPIOH9: 180
- PIN32 / GPIOH8: 179
- PIN33 / GPIOAO6: 151
- PIN37 / GPIOH5: 176
To use a GPIO, shoud export first, example:
# echo 176 > /sys/class/gpio/export
Output mode:
# echo out > /sys/class/gpio/gpio176/direction
# echo 0 > /sys/class/gpio/gpio176/value
# echo 1 > /sys/class/gpio/gpio176/value
Input mode:
# echo in > /sys/class/gpio/gpio176/direction
# cat /sys/class/gpio/gpio176/value
6) Install Mate desktop[Optional]
Edit source.list
to add [universe] and [multiverse] repositories:
# sed -i "s/^# deb/deb/g" /etc/apt/sources.list
Update:
# apt update
# apt upgrade
Install the mate packages:
# apt install mate-desktop-environment ubuntu-mate-core
Install bluetooth GUI packages:
# apt install bluetooth blueman bluez bluez-tools
7) Setup different HDMI output resolutions
TBD
Have fun!