please choosego to mobile | Continue to access the PC version
View: 1172663|Reply: 1240

Linux Distributions for Orange PI H3 boards

  [Copy link]

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
Published in 2015-6-17 03:16:05 | Show all floors |Read mode
Edited by loboris at 2015-11-9 16:12

You are welcome to try
    Debian,  Ubuntu, Fedora 22, Kali Linux, Arch Linux, OpenSuse, Gentoo, and Slackware
images for OrangePI H3 boards,

You can also build your own image using build scripts (see bottom of the post).


Download from  Mega  or Google Drive
Last update: 11/09/2015 14:10 UTC
Last kernel update (scriptbin_kernel.tar.gz): 10/17/2015 13:30 UTC
Last install (desktop & emmc) scripts update (desktop_scripts.tar.gz): 09/02/2015 17:45 UTC

Review of the OPI boards with Debian Jessie XFCE image on CNXSoft (updated with video).
And more about OPI camera and GPIO.


Available images:

  • <distro_rel>_mini.img                                   basic Debian and Ubuntu images, base for server or desktop, many usefull console programs installed (mc, htop, tmux, ...)
  • OrangePI_Ubuntu_Vivid_Mate.img              Ubuntu 15.04 with Mate Desktop
  • OrangePI_Lubuntu_Vivid.img                      Lubuntu 15.04 with LXDE/Lubuntu Desktop
  • OrangePI_Jessie_Xfce.img                          Debian 8 with XFCE Desktop
  • OrangePI-PC_Ubuntu_Vivid_Mate.img    prepared for OrangePI users, just copy to SDCard, no configuration needed !
  • Fedora22_Minimal.img                                Fedora 22 minimal image (without Desktop)
  • Fedora22_Mate.img                                    Fedora 22 full Mate Desktop
  • Fedora22_LXDE.img                                   Fedora 22 LXDE Desktop
  • Kali_2.0-Xfce.img                                       Kali Linux 2.0 with full XFCE Desktop
  • ArchLinux_Minimal.img                            Arch Linux basic image (without Desktop GUI)
  • OpenSUSE_Tumbleweed_JeOS.img        OpenSuse JeOS  minimal image (without Desktop GUI)
  • OpenSUSE_Tumbleweed_XFCE.img        OpenSuse with full XFCE Desktop
  • Gentoo_full_cli.img                                   Gento Linux, configured (network, ssh, ntp, gentoolkit, tmux, mc, btrfs-progs installed)
  • OPI_slackware_14.1.img                           Slackware Arm 14.1  minimal image (without Desktop GUI)


! user name
orangepi, password for user and root orangepi !


All images are ready to be installed on any Orange Pi H3 board, tested on Orange PI 2, Orange PI PLUS, Orange PI PLUS2, Orange PI PC.

In case of any problem, please first check if you have the latest kernel, desktop scripts, etc.

Installation on SD Card

  • Download any of the available images (xz archive) from Mega or GoogleDrive
  • Download scriptbin_kernel.tar.gz, it contains the latest kernel (uImage) and script.bin
  • Unpack the archive.
  • Write the xxx.img file (disk image) to your SD Card
  • on Linux use dd command ( sudo dd if=image_name.img of=/dev/sdX bs=1M oflag=direct )
  • on Windows use disk image writing software such as Win32 Disk Imager
  • After writing the image, mount SD Card FAT partition (BOOT)
  • Copy uImage_OPI-2 or uImage_OPI-PLUS (depending on your board type) to uImage (for OPI-PC use uImage_OPI-2)
  • Copy one of the script.bin.OPI-XXXX (depending on your board type and desired monitor resolution) to script.bin
  • use uImage_OPI-XX and script.bin.OPI-XXXX from scriptbin_kernel.tar.gz if it is newer (probably it is).
  • Boot your Orange PI board from SD Card
  • After booting resize Linux partition to fit your SD Card size:
    1. sudo fs_resize
    Copy code

  • Reboot

You can find the more detailed instructions for begginers here (thanks @Thumos)


Installation on internal EMMC

  • Install the image on SD Card as described above
  • Boot your Orange PI board from SD Card
  • Run:
    1. sudo install_to_emmc
    Copy code

  • Power off the board.
  • Remove SD Card
  • Power on, the board will boot from EMMC
  • You don't have to resize SD Card before installation on EMMC if you don't plan to use it.
  • You can use btrfs option to format your emmc Linux partition as btrfs, it will be mounted with compress=lzo option and you can save up to 40% of emmc size.
    1. sudo install_to_emmc btrfs
    Copy code

Backup internal EMMC to SD Card

  • Boot your Orange PI board from EMMC without SD Card inserted
  • login
  • insert your SD Card
  • Run:
    1. sudo install_to_sdcard [btrfs]
    Copy code

  • Your emmc Linux installation will be transfered to SD Card
  • You can boot from that SD Card on another or the same OPI board
  • If booting on different OPI board, remember to copy the kernel (uImage) and script.bin for that board


Booting from USB drive:

  • You can also boot from USB drive partition.
  • The file named cmdline.txt must exist on BOOT (fat) partition on sd card or emmc.
  • The content of that file must be: root=/dev/sdXn, where /dev/sdXn is the USB drive partition (as visible from OPI) to which to boot (for example root=/dev/sda1).
  • The line which mounts / in /etc/fstab on USB partition Linux must point to the right partition.
  • You can use install_to_usb script to install Linux oun USB drive partition and automaticaly create right cmdline.txt and fstab.
  • If cmdline.txt does not exist, or USB drive partition is not accesible (USB drive not attached), system boots to /dev/mmcblk0p1 (sdcard if inserted, otherwise emmc, if available)
  • Bootable SD Card or EMMC must be accesible when booting to USB, but it is not necessary that the second partition contains valid Linux fs, sd card can have only the 1st (fat) partition
  • You can have different Linux installations on different USB drive partitions, just edit the cmdline.txt to select to which to boot.
  • The latest uImage must be used.

Using install_to_usb script:

  • Use install_to_usb script to install Linux to USB drive partition. Can be used to backup your SDCard/EMMC installation.
    1. sudo install_to_usb /dev/sdXn [btrfs]|[noformat]
    Copy code

  • /dev/sdXn is the USB drive partition to which to install (for example /dev/sda1)
  • if the second parameter is btrfs, USB partition will be formated as btrfs, otherwise as ext4
  • if the second parameter is noformat, USB partition will not be formated, content of the partition will be updated (in case you have used install_to_usb to backup your sdcard/emmc before)
  • be careful not to select the wrong USB partition, it will be erased/updated!
  • If the script does not exist on your image, download desktop_scripts.tar.gz, unpack to /usr/local/bin.
  • You must have the new uImage version, with boot to usb enabled.


If you are using an older image:

  • Download scriptbin_kernel.tar.gz from Mega, unpack.
  • Copy uImage_OPI-2 or uImage_OPI-PLUS (depending on your board type) to uImage on SD Card FAT partition
  • Copy one of the script.bin.OPI-XXXX (depending on your board type and desired monitor resolution) to script.bin on SD Card FAT partition
  • Copy lib/modules/3.4.39 directory to SD Card Linux partition (delete old first)
  • Copy all files (without lib directory) to /boot directory on linux partition in case you planing to install to emmc.
  • Backup your old kernel, script.bin and lib/modules/3.4.39 in case something goes wrong.



Features:

  • boot0_sdcard.fex, u-boot.fex and kernel (uImage) created from sources
  • kernel built with many features enabled (btrfs, USB serial adapters, bluetooth, hdmi sound, nfsd ...)
  • CPU runs at 1.53GHz, termal management adjusted so that all 4 cores are active up to 100 °C
  • GPIO, i2c (TWI), SPI enabled
  • Linux fs created from scratch with debootstrap
  • mimimal image can be the base for server or desktop
  • framebuffer console works
  • serial (uart) console works
  • ssh installed, root login ower ssh enabled
  • initial filesystem size less then 500 MB
  • initial RAM usage less then 50 MB
  • some usefull console programs installed (mc, htop, tmux, ...)
  • you can install server componnents (tested apache2, php, firebird, webmin, ...)
  • you can install full desktop, tested LXDE, XFCE and Mate desktop (recommended)
  • scripts to install lxde, xfce or mate desktop included, run (with lubuntu option the script will install Lubuntu core package, so you can get real Lubuntu look):
  1. sudo install_lxde_desktop [lubuntu]
  2. sudo install_mate_desktop
  3. sudo install_xfce_desktop
Copy code
  • script to install x2go server (install only after desktop is installed), run
  1. sudo install_x2goserver
Copy code

Notes
  • user name orangepi, pass for user and root orangepi
  • to enable wifi connection from command line run: sudo nmcli -a d wifi connect and enter your wifi credentials
  • to always run at full speed install heatsink and fan !
  • How to enable AP mode, see this post.

Building the system

You can try to build Debian/Ubuntu for OrangePI yourself.
  • Clone my GitHub repository.
  • You will need running Ubuntu or Debian system (you can even run it on OrangePI).
  • Before running the script install debootstrap and qemu-user-static packages.
  • Read carefully and edit params.sh to adjust the parameters to your needs.
  • Run sudo create_image to create Ubuntu system. I recommend to build to local directory, then you can run image_from_dir to transfer the system to sd card or image.


GitHub

Kernel sources and Ubuntu/Debian building scripts are available on github.

OrangePi kernel sources
Ubuntu/Debian building scripts


If you find my work usefull, you can DONATE

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-9-13 19:13:48 | Show all floors
Edited by loboris at 2015-9-13 12:46

Tested AP mode, works good using create_ap method.

Before using, install some packages:
  1. sudo apt-get install git iptables dnsmasq util-linux procps hostapd iproute2 iw haveged
Copy code
If you don't want to install git, just download create_ap-master.zip from git or my Mega or GoogleDrive and unpack.

Then run
  1. git clone https://github.com/oblique/create_ap
  2. cd create_ap
  3. sudo make install
Copy code

After that you can use
  1. sudo create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase &
Copy code
to start AP

See Examples on git page about how to start AP on boot.

Tested on OPI-PLUS, Ubuntu image, connecting from Android and Windows 10.


0

threads

12

posts

132

credits

Registered member

Rank: 2

credits
132
Published in 2015-10-9 23:18:59 | Show all floors
@loboris:
1 wire support is amazing!  

tested with 18DS20 TempSensor

[  84.108968] Driver for 1-wire Dallas network protocol.
[   90.052218] W1_SUNXI: Added w1-gpio on GPIO-20
[  114.093276] W1_GPIO: added w1 master on GPIO20
[  114.126649] w1_master_driver w1_bus_master1: Family 28 for 28.021502f97fff.48



root@OrangePI:/sys/bus/w1/devices/28-021502f97fff# cat w1_slave
41 01 55 00 7f ff 0c 10 c2 : crc=c2 YES
41 01 55 00 7f ff 0c 10 c2 t=20062


very good AAA+++

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-10-4 19:01:56 | Show all floors
Edited by loboris at 2015-10-4 21:12

KERNEL UPDATE (EXPERIMENTAL)
Uploaded scriptbin_kernel_test.tar.gz which contains the kernel with some new features:
mali kernel drivers (ump,mali,drm,mali_drm), 1wire, CH341 USB->Serial, cdc-acm, 800x480 support (uncomplete) ...

The kernel is not fully tested yet, please backup your old files/directories before upgrading.

To upgrade:
  • download scriptbin_kernel_test.tar.gz from Mega or GoogleDrive, unpack
  • copy uImage and script.bin for your board type to the fat partition
  • delete the old /lib/modules/3.4.39 directory
  • copy lib directory from the archive to the linux partition
  • run: sudo depmod -a
  • reboot

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-10-8 23:54:31 | Show all floors
Sitheek replied at 2015-10-8 08:54
Yes that is true. But i think such cheap boards like Orange Pi2 or Radxa Rock Lite suffer from poor ...

All my work is for free (well, I've got OPI-PC and OPI-PLUS for testing...)
I'm in absolutely no way related to the OrangePI manufacturer.
I agree with you that the manufactorer does not have the money to invest in software development, if they sell OPI-PC for 15 US$ I can't imagine how they can have any profit at all.

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-10-25 23:48:32 | Show all floors
@birky   @toxuin   @ALL  you can try new kernel version with included dvb, v4l drivers and CONFIG_BRIDGE=m

You can use the new kernel update script:

Download update_kernel.sh from Mega or GoogleDrive
Copy the script to /usr/local/bin and make it executable
  1. sudo cp <download_path>/update_kernel.sh /usr/local/bin
  2. sudo chmod +x /usr/local/bin/update_kernel.sh
Copy code
Run the script.
  1. sudo update_kernel.sh
Copy code


10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-10-10 20:35:33 | Show all floors
INFO

Kernel sources and Ubuntu/Debian building scripts are now available on github.

OrangePi kernel sources
Ubuntu/Debian building scripts

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-9-18 05:46:31 | Show all floors
Complete kernel sources, configs, and build scripts I'm using are uploaded to Mega. (kernel_3.4.9.tar.xz)

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2015-6-17 15:05:07 | Show all floors
Yeah!
That's how it should work.
Community makes the software, delivers patches, gives the support, makes drinks and offers free beer.
Xunlong and Allwinner makes the money.


This will maybe work if at least:
1. There would be complete and updated H3 documentation.
2. Updated SDK with all sources and patches available.
3. officialy released sources and patches GPL licensed so that we can use it.
4......
But that's only a dream this will never happen.


@loboris
Compliment, at least one that can publish a working debian image for opi2
Xunlong seems not able to do it.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

0

threads

5

posts

24

credits

Novice

Rank: 1

credits
24
Published in 2017-2-9 23:47:47 | Show all floors
I've tried some of those images on my OPI Plus 2E but none of them was compatible with wifi neither ethernet of my board... How can i install those drivers? (also, without no connection i cant get build-essential package to make drivers)

9

threads

634

posts

4398

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4398
Published in 2016-9-1 15:16:22 | Show all floors
That's usually nothing critical. You are trying to load a module (from /etc/modules) which does not exists.
Published in 2015-6-17 06:41:51 | Show all floors
@loboris  Thank you very much.

2

threads

37

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
Published in 2015-6-17 13:49:21 | Show all floors
@lobois,

Thanks. Downloading now to try.

Cheers

2

threads

10

posts

308

credits

Intermediate member

Rank: 3Rank: 3

credits
308
Published in 2015-6-17 13:52:43 | Show all floors
Thanks loboris!!

2

threads

37

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
Published in 2015-6-17 18:15:30 | Show all floors
@loboris,

Is AP supported in your img?

Cheers

2

threads

10

posts

308

credits

Intermediate member

Rank: 3Rank: 3

credits
308
Published in 2015-6-17 18:51:25 | Show all floors
Work on pi plus?

7

threads

100

posts

647

credits

Senior member

Rank: 4

credits
647
Published in 2015-6-17 20:56:58 | Show all floors
HI

I tried to boot with this image an orangepi plus.
It is starting an recognize the keyboard.

But : it do not recognize LAN connection.

is it possible to give me a solution?

Thanks

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-6-18 00:36:31 | Show all floors
Edited by loboris at 2015-6-18 00:45

Update:
  • new version of Ubuntu 15.04 uploaded to Mega
  • some bugs are corrected, framebuffer console works, wi-fi works.
  • it boots to console in 12 sec
  • to enable connecting wifi from command line run: sudo nmcli -a d wifi connect and enter your wifi credentials

Debian image will be updated soon.

You can download the script package to try to build your own installation from Mega (make_linux.tar.gz).
Extract to empty directory, edit params.sh and run create_image.
You must have  qemu-user-static package installed.

10

threads

448

posts

5022

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
5022
 Author| Published in 2015-6-18 00:54:01 | Show all floors
@derrickyee81
iw list reports:
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * monitor
                 * P2P-client
                 * P2P-GO

@rupertgti, @john0815
I don't have OrangePI PLUS to try...
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list