Armbian: How to update the Kernel and test the versions Nightly

Armbian is updated about every 3 to 4 months. If you have the taste of the adventure or you need the latest version of the Kernel that supports certain components of your mini-PC, Armbian offers a Nightly version and a procedure for updating the Kernel to the version in Development course. In February 2017, Armbian version 5.25 brings support for new Clearfog Base cards, Lime2 eMMC, Lime A33, NanoPi M1 +, OrangePi Zero, OrangePi PC2. The simplefb video driver for SoC H3 … all the new features can be found here.

Warnings. Installing a Nightly version or updating the kernel of the system can damage or destroy your system. Make a backup of your data before any updates. It is more prudent to try on a clone of the SD card. Do not make these updates on a system in production. This tutorial has only been tested on Orange Pi Lite and Orange Pi + 2e. There will be no support on this tutorial. By following this tutorial, you accept the risks and are solely responsible for any problems or loss of data.

Identify the Kernel and the installed version of Armbian

Before we start, let’s look at the installed versions. By connecting to SSH, you have noticed that more information is available. Here I used an Orange Pi Lite equipped with 512MB of RAM and an 8GB SD card. The kernel version is 3.4.112. It is based on the sun8i distribution (official Linux Sunxi page)

root@192.168.1.79's password: 
  ___                               ____  _   _     _ _       
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) | |   (_) |_ ___ 
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | |   | | __/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| | | |___| | ||  __/
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| |_____|_|\__\___|
                       |___/                                  

Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.112-sun8i 
System load:   0.09            	Up time:       4 min		
Memory usage:  14 % of 494Mb  	IP:            192.168.1.79
CPU temp:      44°C           	
Usage of /:    20% of 7.2G   	

Last login: Mon Feb 13 10:27:12 2017
root@orangepilite:~#

Otherwise, the uname -a  command lets you know the version of the Kernel installed from the Terminal.

uname -a
Linux orangepilite 3.4.112-sun8i #14 SMP PREEMPT Wed Sep 14 20:29:31 CEST 2016 armv7l GNU/Linux

All details of the release are in the release file. It can be accessed easily with the command cat /etc/*- release

cat /etc/*-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=orangepilite
BOARD_NAME="Orange Pi Lite"
VERSION=5.20
LINUXFAMILY=sun8i
BRANCH=default
ARCH=arm
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Here, the Orange Pi works with the Armbian distribution (version 5.20) which is based on Debian Jessie. The same as Raspbian that operates the Pi Raspberry.

Update the Orange Pi Lite Kernel (version 4.x)

Go to the Armbian website to find the update procedure that corresponds to your mini-PC. For example, for Orange Pi Lite, it’s here. It is possible to update the Kernel to the stable version or to the development version (currently 4.x)

armbian orange pi lite upgrade kernel

Identify yourself (su -) or log in SSH with the root account.

We start by removing

aptitude remove ~nlinux-dtb ~nlinux-u-boot ~nlinux-image ~nlinux-headers

You will have at least two warning messages that will have to be accepted by Y

 Remove the following packages:
1)     expect                      
2)     libexpat1-dev               
3)     libpython3-dev              
4)     libpython3.4-dev            
5)     python3-dev                 
6)     python3.4-dev               
7)     tightvncserver              
8)     xfonts-base                 



Accept this solution? [Y/n/q/?]

Similarly for these libraries

The following packages will be REMOVED:
  expect{a} libexpat1-dev{a} libpython3-dev{a} libpython3.4-dev{a} linux-headers-sun8i linux-image-sun8i linux-u-boot-orangepilite-default python3-dev{a} 
  python3.4-dev{a} tightvncserver{a} xfonts-base{a} 
0 packages upgraded, 0 newly installed, 11 to remove and 85 not upgraded.
Need to get 0 B of archives. After unpacking 141 MB will be freed.
Do you want to continue? [Y/n/?]

Then, execute

aptitude remove ~nlinux-firmware ~narmbian-firmware ~nlinux-$(lsb_release -cs)-root

Now that the old resources are no longer likely to interfere with the update, run these commands successively. The operation lasts long enough (about 30 minutes). At the end of the installation, you will need to restart the OrangePi.

apt-get install linux-image-dev-sun8i linux-dtb-dev-sun8i linux-headers-dev-sun8i 
apt-get install linux-u-boot-orangepilite-dev linux-$(lsb_release -cs)-root-dev-orangepilite 
apt-get install armbian-firmware sunxi-tools swconfig a10disp
reboot

Here is the log retrieved during the update of the Kernel of my Orange Pi Lite

root@orangepilite:~# apt-get install linux-image-dev-sun8i linux-dtb-dev-sun8i linux-headers-dev-sun8i
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  linux-firmware-image-dev-sun8i
The following NEW packages will be installed:
  linux-dtb-dev-sun8i linux-headers-dev-sun8i linux-image-dev-sun8i
0 upgraded, 3 newly installed, 0 to remove and 83 not upgraded.
Need to get 24.8 MB of archives.
After this operation, 116 MB of additional disk space will be used.
Get:1 http://apt.armbian.com/ jessie/main linux-dtb-dev-sun8i armhf 5.25 [59.7 kB]
Get:2 http://apt.armbian.com/ jessie/main linux-headers-dev-sun8i armhf 5.25 [10.3 MB]
Get:3 http://apt.armbian.com/ jessie/main linux-image-dev-sun8i armhf 5.25 [14.5 MB]                                                                                         
Fetched 24.8 MB in 1min 6s (374 kB/s)                                                                                                                                        
Selecting previously unselected package linux-dtb-dev-sun8i.
(Reading database ... 28601 files and directories currently installed.)
Preparing to unpack .../linux-dtb-dev-sun8i_5.25_armhf.deb ...
Unpacking linux-dtb-dev-sun8i (5.25) ...
Selecting previously unselected package linux-headers-dev-sun8i.
Preparing to unpack .../linux-headers-dev-sun8i_5.25_armhf.deb ...
Unpacking linux-headers-dev-sun8i (5.25) ...
Selecting previously unselected package linux-image-dev-sun8i.
Preparing to unpack .../linux-image-dev-sun8i_5.25_armhf.deb ...
Unpacking linux-image-dev-sun8i (5.25) ...
Setting up linux-dtb-dev-sun8i (5.25) ...
Setting up linux-headers-dev-sun8i (5.25) ...
Compiling headers - please wait ...
Setting up linux-image-dev-sun8i (5.25) ...
update-initramfs: Generating /boot/initrd.img-4.9.4-sun8i
root@orangepilite:~# apt-get install linux-u-boot-orangepilite-dev linux-$(lsb_release -cs)-root-dev-orangepilite
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libuuid-perl linux-base
The following NEW packages will be installed:
  libuuid-perl linux-base linux-jessie-root-dev-orangepilite linux-u-boot-orangepilite-dev
0 upgraded, 4 newly installed, 0 to remove and 83 not upgraded.
Need to get 576 kB of archives.
After this operation, 223 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://apt.armbian.com/ jessie/main linux-jessie-root-dev-orangepilite armhf 5.25 [362 kB]
Get:2 http://apt.armbian.com/ jessie/main linux-u-boot-orangepilite-dev armhf 5.25 [170 kB]                    
Get:3 http://httpredir.debian.org/debian/ jessie/main libuuid-perl armhf 0.05-1+b1 [10.0 kB]                                                                                 
Get:4 http://httpredir.debian.org/debian/ jessie/main linux-base all 3.5 [34.3 kB]
Fetched 576 kB in 1min 4s (8,990 B/s)
Preconfiguring packages ...
Selecting previously unselected package libuuid-perl.
(Reading database ... 51588 files and directories currently installed.)
Preparing to unpack .../libuuid-perl_0.05-1+b1_armhf.deb ...
Unpacking libuuid-perl (0.05-1+b1) ...
Selecting previously unselected package linux-base.
Preparing to unpack .../linux-base_3.5_all.deb ...
Unpacking linux-base (3.5) ...
Selecting previously unselected package linux-jessie-root-dev-orangepilite.
Preparing to unpack .../linux-jessie-root-dev-orangepilite_5.25_armhf.deb ...
Adding 'diversion of /etc/mpv/mpv.conf to /etc/mpv/mpv-dist.conf by linux-jessie-root-dev-orangepilite'
Unpacking linux-jessie-root-dev-orangepilite (5.25) ...
Selecting previously unselected package linux-u-boot-orangepilite-dev.
Preparing to unpack .../linux-u-boot-orangepilite-dev_5.25_armhf.deb ...
Unpacking linux-u-boot-orangepilite-dev (5.25) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for initramfs-tools (0.120+deb8u2) ...
update-initramfs: Generating /boot/initrd.img-4.9.4-sun8i
update-initramfs: Converting to u-boot format
Processing triggers for systemd (215-17+deb8u4) ...
Setting up libuuid-perl (0.05-1+b1) ...
Setting up linux-base (3.5) ...
Setting up linux-jessie-root-dev-orangepilite (5.25) ...
Setting up linux-u-boot-orangepilite-dev (5.25) ...
Updating u-boot on device /dev/mmcblk0
Processing triggers for initramfs-tools (0.120+deb8u2) ...
update-initramfs: Generating /boot/initrd.img-4.9.4-sun8i
update-initramfs: Converting to u-boot format
root@orangepilite:~# apt-get install armbian-firmware sunxi-tools swconfig a10disp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  a10disp armbian-firmware swconfig
The following packages will be upgraded:
  sunxi-tools
1 upgraded, 3 newly installed, 0 to remove and 82 not upgraded.
Need to get 1,670 kB of archives.
After this operation, 34.8 kB of additional disk space will be used.
Get:1 http://apt.armbian.com/ jessie/utils a10disp armhf 1.0-1~armbian5.25+1 [8,824 B]
Get:2 http://apt.armbian.com/ jessie/main armbian-firmware armhf 5.25 [1,617 kB]
Get:3 http://apt.armbian.com/ jessie/utils sunxi-tools armhf 1.4.2-1~armbian5.25+1 [35.8 kB]
Get:4 http://apt.armbian.com/ jessie/utils swconfig armhf 15.04-2~armbian5.25+1 [7,704 B]
Fetched 1,670 kB in 3s (434 kB/s)    
Selecting previously unselected package a10disp:armhf.
(Reading database ... 51708 files and directories currently installed.)
Preparing to unpack .../a10disp_1.0-1~armbian5.25+1_armhf.deb ...
Unpacking a10disp:armhf (1.0-1~armbian5.25+1) ...
Selecting previously unselected package armbian-firmware.
Preparing to unpack .../armbian-firmware_5.25_armhf.deb ...
Unpacking armbian-firmware (5.25) ...
Preparing to unpack .../sunxi-tools_1.4.2-1~armbian5.25+1_armhf.deb ...
Unpacking sunxi-tools (1.4.2-1~armbian5.25+1) over (1.3-1~armbian5.20+1) ...
Selecting previously unselected package swconfig.
Preparing to unpack .../swconfig_15.04-2~armbian5.25+1_armhf.deb ...
Unpacking swconfig (15.04-2~armbian5.25+1) ...
Setting up a10disp:armhf (1.0-1~armbian5.25+1) ...
Setting up armbian-firmware (5.25) ...
Setting up sunxi-tools (1.4.2-1~armbian5.25+1) ...
Setting up swconfig (15.04-2~armbian5.25+1) ...
root@orangepilite:~#

During the update of the Kernel, you will have two questions to accept

orangepi lite kernel update

Then

The format of the video output is normally not affected by the Kernel update. After re-connection in SSH, the Kernel has been updated. Here it is based on version 4.9.4-sun8i.

  ___                               ____  _   _     _ _       
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) | |   (_) |_ ___ 
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | |   | | __/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| | | |___| | ||  __/
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| |_____|_|\__\___|
                       |___/                                  

Welcome to ARMBIAN 5.25 stable Debian GNU/Linux 8 (jessie) 4.9.4-sun8i   
System load:   2.08            	Up time:       37 sec		
Memory usage:  11 % of 489Mb  	IP:            192.168.1.79
CPU temp:      48°C           	
Usage of /:    17% of 7.2G   	


[ 82 updates to install: apt-get upgrade ]

New to Armbian? Check the documentation first: docs.armbian.com

Last login: Mon Feb 13 11:24:25 2017
root@orangepilite:~#

Install version Nightly

Armbian also offers a Nightly version, ie a version under development that is compiled (usually) every night. This is a version for adventurers or developers who need a feature that is not yet finalized.

armbian nightly orangepilite orange pi plus 2e

The installation is much simpler since it is enough to declare the resources to be used for the updates and the upgrades. Precede a sudo if you are not logged in as root.

sed -i "s/apt/beta/" /etc/apt/sources.list.d/armbian.list

Then

apt-get update
apt-get upgrade

After the update and then the upgrade, Armbian is now upgraded to version 5.26. The Kernel has also been updated to version 4.10.0-sun8i

root@192.168.1.79's password: 
  ___                               ____  _   _     _ _       
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) | |   (_) |_ ___ 
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | |   | | __/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| | | |___| | ||  __/
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| |_____|_|\__\___|
                       |___/                                  

Welcome to ARMBIAN 5.26.170214 nightly Debian GNU/Linux 8 (jessie) 4.10.0-sun8i   
System load:   0.38            	Up time:       2 min		
Memory usage:  12 % of 489Mb  	IP:            192.168.1.79
CPU temp:      45°C           	
Usage of /:    18% of 7.2G   	

Last login: Mon Feb 13 12:08:51 2017

Reinstall the h3disp script

It is possible that the h3disp script disappears during the update to the Nightly version. This is very annoying because the script.bin file is overwritten during the update. All your settings as well as the video format are deleted. For the reinstalled, I found no other way than to create a new script from the source code available on GitHub here. I noticed that this can happen when migrating to the Nightly version before updating the kernel.

Log in to SSH and create a h3disp file in your user directory (for example)

nano h3disp

Paste the script and save it with CTRL + X then Y.

Make the script executable

chmod +x h3disp

Now you can change your video output again. For example.

./h3disp -m 33 -d

orangepi lite 2e upate upgrade armbian kernel

Here you can enjoy the latest versions of the Linux kernel and the Armbian distribution. Do not forget to back up your data before updating and the update can cause your system to be destroyed.

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.

Tags:

1 Comment

Leave a Reply

DIY Projects
%d bloggers like this: