Skip to content

Advanced Features

How to switch kernels?

Check this for more info.

How to troubleshoot?

How to unbrick the system?

Both of above headings have been moved to a new page and expanded upon: Recovery

How to build a wireless driver?

Install and recreate kernel headers scripts (optional)

Text Only
1
2
3
4
5
armbian-config -> install kernel headers
exit

cd /usr/src/linux-headers-$(uname -r)
make scripts

Go back to root directory and fetch sources (working example, use ARCH=arm64 on 64bit system)

Text Only
1
2
3
4
5
cd
export KSRC="/usr/src/linux-headers-$(uname -r)"
git clone https://github.com/pvaret/rtl8192cu-fixes.git
cd rtl8192cu-fixes
make -C "$KSRC" M="$PWD" ARCH=arm

Refer to Linux Kernel Documentations: Building External Modules for more information.

Load driver for test

Text Only
1
insmod 8192cu.ko

Check dmesg and the last entry will be:

Text Only
1
usbcore: registered new interface driver rtl8192cu

Plug the USB wireless adaptor and issue a command:

Text Only
1
iwconfig wlan0

You should see this:

Text Only
1
2
3
4
5
6
7
8
9
wlan0   unassociated  Nickname:"<WIFI@REALTEK>"
        Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated
        Sensitivity:0/0
        Retry:off   RTS thr:off   Fragment thr:off
        Encryption key:off
        Power Management:off
        Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
        Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
        Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Check which wireless stations / routers are in range

Text Only
1
iwlist wlan0 scan | grep ESSID

How to run Docker?

Docker works reliably with the distribution-provided builds. It is as simple as apt-get install docker.io.
If you prefer to use the latest Docker builds provided directly by Docker, please follow the guide below.
Though if you run into trouble using those please revert back to distribution binaries before complaining.

Preinstallation requirements:

  • Armbian 20.08.17 or newer with Kernel 3.10 or higher
  • Debian Buster (might work elsewhere with some modifications)
  • root access

This method is based on Docker Debian installation documentation. Execute this as root:

Bash
1
2
3
4
5
6
7
apt-get remove docker docker-engine docker.io containerd runc
apt-get install ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Test if Docker works correctly:

Bash
docker run hello-world

If you get that kind of output, then Docker install went fine:

Bash
Hello from Docker!
This message shows that your installation appears to be working correctly.

If you would like to use Docker as a non-root user, you should now consider adding your user to the docker group with something like:

Bash
usermod -aG docker your-user

You will have to log out, and log in once more in order to be able to run Docker without being root.

Let’s try a last test to see if a Docker container can be seen outside of your Armbian machine:

Bash
docker run -d -p 80:80 hypriot/rpi-busybox-httpd

… and point the browser of any device in the same network to http://<IP OF YOUR DEVICE>/

More info in this forum topic

How to set wireless access point?

There are two different HostAP daemons. One is default and the other one is for some Realtek wifi cards. Both have their own basic configurations and both are patched to gain maximum performances.

Sources: igorpecovnik/hostapd

Default binary and configuration location:

Text Only
1
2
/usr/sbin/hostapd
/etc/hostapd.conf

Realtek binary and configuration location:

Text Only
1
2
/usr/sbin/hostapd-rt
/etc/hostapd.conf-rt

Since its hard to define when to use which you always try both combinations in case of troubles. To start AP automatically:

  1. Edit /etc/init.d/hostapd and add/alter location of your conf file DAEMON_CONF=/etc/hostapd.conf and binary DAEMON_SBIN=/usr/sbin/hostapd
  2. Copy /etc/network/interfaces.hostapd to /etc/network/interfaces
  3. Reboot
  4. Predefined network name: “BOARD NAME” password: 12345678
  5. To change parameters, edit /etc/hostapd.conf BTW: You can get WPAPSK the long blob from wpa_passphrase YOURNAME YOURPASS

How to connect IR remote?

Required conditions:

  • IR hardware
  • loaded driver

Get your remote configuration (lircd.conf) or learn.

You are going to need the list of all possible commands which you can map to your IR remote keys:

Text Only
1
irrecord --list-namespace

To start with learning process you need to delete old config:

Text Only
1
rm /etc/lircd.conf

Then start the process with:

Text Only
1
irrecord --driver=default --device=/dev/lirc0 /etc/lircd.conf

And finally start your service when done with learning:

Text Only
1
service lirc start

Test your remote:

Text Only
1
irw /dev/lircd

Outdated

How to freeze your filesystem? (outdated)

In certain situations it is desirable to have a virtual read-only root filesystem. This prevents any changes from occurring on the root filesystem that may alter system behavior and it allows a simple reboot to restore a system to its clean state.

You need an ODROID XU4 or Allwinner A10, A20 or H3 board with legacy kernel where we added support for overlayfs. Works only on Ubuntu Xenial. Login as root and execute:

Text Only
1
2
3
apt-get install overlayroot
echo 'overlayroot="tmpfs"' >> /etc/overlayroot.conf
reboot

After your system boots up it will always remain as is. If you want to make any permanent changes, you need to run:

Text Only
1
overlayroot-chroot

Changes inside this will be preserved.