Difference between revisions of "Armbian on Orange Pi 4"

From Dejvino's Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Armbian]] for [[Orange Pi 4]].
 
[[Armbian]] for [[Orange Pi 4]].
  
{{Warning|As of 2020-03-21 the current kernel images are not production ready:
+
{{Warning|As of 2020-05-11 the images are not fully production ready:
* booting takes minutes
 
 
* display supports at most resolution of 1920x1080
 
* display supports at most resolution of 1920x1080
* ''double'' the power consumption compared to [[BSP Linux on Orange Pi 4]]
+
* higher power consumption compared to [[BSP Linux on Orange Pi 4]]
* crashes and reboots under load (might be a power source issue?)}}
+
(tested with ''dev'' kernel 5.6.12, Ubuntu Focal 20.04 LTS)
 +
}}
  
 
== Installation using a Prebuilt Image ==
 
== Installation using a Prebuilt Image ==
Line 36: Line 36:
 
# Start the VM: {{code|vagrant up}}
 
# Start the VM: {{code|vagrant up}}
 
# Log into the VM: {{code|vagrant ssh}}
 
# Log into the VM: {{code|vagrant ssh}}
## cd armbian
+
## {{code|cd armbian}}
## sudo ./compile.sh (see [[#Building an Image|details below]])
+
## {{code|sudo ./compile.sh}} (see [[#Building an Image|details below]])
# Copying the resulting image from guest to host:
+
# Locate the resulting image:
#* {{code|vagrant plugin install vagrant-scp}}
+
#* {{code|ls output/images/}}
#* <pre><nowiki>$ cd build/config/templates/ ; vagrant scp :armbian/output/images/Armbian_20.05.0-trunk_Orangepi4_bionic_current_5.4.27_desktop.img ~/armbian/</nowiki></pre>
 
 
# Stop the VM at the end (or after every finished build): {{code|vagrant halt}}
 
# Stop the VM at the end (or after every finished build): {{code|vagrant halt}}
  
Line 60: Line 59:
 
==== Ubuntu Desktop ====
 
==== Ubuntu Desktop ====
 
{{codeblock|<nowiki>./compile.sh  BOARD=orangepi4 BRANCH=current RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=yes KERNEL_ONLY=no KERNEL_CONFIGURE=yes</nowiki>}}
 
{{codeblock|<nowiki>./compile.sh  BOARD=orangepi4 BRANCH=current RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=yes KERNEL_ONLY=no KERNEL_CONFIGURE=yes</nowiki>}}
 +
 +
== Using the System ==
 +
Source: [https://www.armbian.com/orange-pi-4/#faq-section]
 +
 +
=== Boot ===
 +
Insert the SD card into the slot, connect a cable to your network if possible or a display and power your board. (First) boot (with DHCP) takes up to 35 seconds with a class 10 SD Card.
 +
 +
=== Login ===
 +
Log in as: '''root'''  Password: '''1234'''. Then you are prompted to change this password (US-Keyboard setting). When done, you are asked to create a normal user-account for your everyday tasks.
 +
  
 
== Troubleshooting ==
 
== Troubleshooting ==

Latest revision as of 17:47, 19 May 2020

Armbian for Orange Pi 4.

(!) As of 2020-05-11 the images are not fully production ready:

(tested with dev kernel 5.6.12, Ubuntu Focal 20.04 LTS)

Installation using a Prebuilt Image

Armbian provides several pre-built SD Card images ready to be flashed and used. See www.armbian.com/orange-pi-4

See Flashing Linux to SD Card on what to do with the downloaded *.img file.

Installation using a Custom Image

Requires a x86_64 machine with 2+ GB of RAM running Ubuntu 18.04 Bionic Beaver.

(!) You can't build the image on the target device itself since it has an ARM processor.

Source: docs.armbian.com/Developer-Guide_Build-Preparation/

  1. Prepare build environment (see #Using Vagrant)
  2. Configure and Build (see #Building an Image)
  3. Flash the image to SD Card

Using Vagrant

Source: docs.armbian.com/Developer-Guide_Using-Vagrant/

Prerequisites

  1. Install git, vagrant, virtualbox
  2. Install virtualbox plugins: vagrant plugin install vagrant-disksize
  3. Clone the armbian build repository: git clone --depth 1 https://github.com/armbian/build
  4. Fetch the guest VM image: vagrant box add ubuntu/bionic64

Building

  1. Go to VM template directory: cd build/config/templates
  2. Start the VM: vagrant up
  3. Log into the VM: vagrant ssh
    1. cd armbian
    2. sudo ./compile.sh (see details below)
  4. Locate the resulting image:
    • ls output/images/
  5. Stop the VM at the end (or after every finished build): vagrant halt

Cleanup

  1. To remove the VM after you are done: vagrant destroy

Building an Image

Source: docs.armbian.com/Developer-Guide_Build-Preparation/

Kernel + U-Boot Only

./compile.sh  BOARD=orangepi4 BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=yes

Produces *.deb packages usable for kernel updates. Or for flashing to an SD Card if you unpack the deb archive (via ar x *.deb)

Minimal Debian Bullseye server

./compile.sh BOARD=orangepi4 BRANCH=current RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes

Produces a standalone *.img file (about 700 MB) for flashing to SD Card.

Ubuntu Desktop

./compile.sh BOARD=orangepi4 BRANCH=current RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=yes KERNEL_ONLY=no KERNEL_CONFIGURE=yes

Using the System

Source: [1]

Boot

Insert the SD card into the slot, connect a cable to your network if possible or a display and power your board. (First) boot (with DHCP) takes up to 35 seconds with a class 10 SD Card.

Login

Log in as: root Password: 1234. Then you are prompted to change this password (US-Keyboard setting). When done, you are asked to create a normal user-account for your everyday tasks.


Troubleshooting

cannot initialize curses

When using e.g. Termite terminal emulator without terminfo installed on the guest VM, you get this error:

$ sudo ./compile.sh
...
cannot initialize curses
[ error ] ERROR in function source [ main.sh:141 ]
[ error ] No option selected 
[ o.k. ] Process terminated

One solution is to set a known working TERM:

$ TERM=xterm
$ sudo ./compile.sh

External Links