By following our previous blog Build
GCC, we should be able to CROSS-BUILD GCC for
various ARM architectures. Today, we are building GCC 9.1.0 for Hikey 970, which
is of aarch64
architecture. (More details about aarch64 can be found
on ARM
architecture )
➜ aarch64 mkdir build-binutils ➜ aarch64 cd build-binutils lvision@hikey970:~/Downloads/Programming/GCC/build-binutils$ ../binutils-2.32/configure --prefix=/opt/aarch64 --enable-shared --enable-vtable-verify checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /bin/sed checking for gawk... gawk checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether g++ accepts -static-libstdc++ -static-libgcc... yes checking for gnatbind... gnatbind checking for gnatmake... gnatmake checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for objdir... .libs checking for isl 0.15 or later... yes checking for default BUILD_CONFIG... checking for --enable-vtable-verify... yes checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... expect checking for runtest... no checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for readelf... readelf checking for cc... cc checking for c++... c++ checking for gcc... gcc checking for gfortran... gfortran checking for gccgo... gccgo checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for objcopy... objcopy checking for objdump... objdump checking for ranlib... ranlib checking for readelf... readelf checking for strip... strip checking for windres... no checking for windmc... no checking where to find the target ar... just compiled checking where to find the target as... just compiled checking where to find the target cc... host tool checking where to find the target c++... host tool checking where to find the target c++ for libstdc++... host tool checking where to find the target dlltool... just compiled checking where to find the target gcc... host tool checking where to find the target gfortran... host tool checking where to find the target gccgo... host tool checking where to find the target ld... just compiled checking where to find the target lipo... host tool checking where to find the target nm... just compiled checking where to find the target objcopy... just compiled checking where to find the target objdump... just compiled checking where to find the target ranlib... just compiled checking where to find the target readelf... just compiled checking where to find the target strip... just compiled checking where to find the target windres... just compiled checking where to find the target windmc... just compiled checking whether to enable maintainer-specific portions of Makefiles... no configure: creating ./config.status config.status: creating Makefile ➜ build-binutils make -j4 ...... ➜ build-binutils make install ➜ build-binutils cd ..
➜ aarch64 mkdir -p build-gcc ➜ aarch64 cd build-gcc $ ../gcc-9.1.0/configure --prefix=/opt/aarch64 --enable-multiarch --enable-languages=c,c++,fortran,go --disable-multilib --disable-libvtv --enable-vtable-verify checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /bin/sed checking for gawk... gawk checking for libatomic support... yes checking for libitm support... yes checking for libsanitizer support... yes checking for libhsail-rt support... no checking for libphobos support... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether g++ accepts -static-libstdc++ -static-libgcc... yes checking for gnatbind... gnatbind checking for gnatmake... gnatmake checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for objdir... .libs checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... yes checking for the correct version of the gmp/mpfr/mpc libraries... yes checking for isl 0.15 or later... yes *** This configuration is not supported in the following subdirectories: gnattools target-libada target-libhsail-rt target-libphobos target-zlib target-libobjc target-liboffloadmic target-libvtv (Any other directories should still work fine.) checking for default BUILD_CONFIG... bootstrap-debug checking for --enable-vtable-verify... yes checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... expect checking for runtest... no checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for otool... no checking for readelf... readelf checking for cc... cc checking for c++... c++ checking for gcc... gcc checking for gfortran... gfortran checking for gccgo... gccgo checking for gdc... no checking for ar... /opt/aarch64/aarch64-unknown-linux-gnu/bin/ar checking for as... /opt/aarch64/aarch64-unknown-linux-gnu/bin/as checking for dlltool... no checking for dlltool... no checking for ld... /opt/aarch64/aarch64-unknown-linux-gnu/bin/ld checking for lipo... no checking for lipo... no checking for nm... /opt/aarch64/aarch64-unknown-linux-gnu/bin/nm checking for objcopy... /opt/aarch64/aarch64-unknown-linux-gnu/bin/objcopy checking for objdump... /opt/aarch64/aarch64-unknown-linux-gnu/bin/objdump checking for otool... no checking for otool... no checking for ranlib... /opt/aarch64/aarch64-unknown-linux-gnu/bin/ranlib checking for readelf... /opt/aarch64/aarch64-unknown-linux-gnu/bin/readelf checking for strip... /opt/aarch64/aarch64-unknown-linux-gnu/bin/strip checking for windres... no checking for windres... no checking for windmc... no checking for windmc... no checking where to find the target ar... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target as... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target cc... just compiled checking where to find the target c++... just compiled checking where to find the target c++ for libstdc++... just compiled checking where to find the target dlltool... host tool checking where to find the target gcc... just compiled checking where to find the target gfortran... just compiled checking where to find the target gccgo... just compiled checking where to find the target gdc... host tool checking where to find the target ld... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target lipo... host tool checking where to find the target nm... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target objcopy... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target objdump... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target otool... host tool checking where to find the target ranlib... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target readelf... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target strip... pre-installed in /opt/aarch64/aarch64-unknown-linux-gnu/bin checking where to find the target windres... host tool checking where to find the target windmc... host tool checking whether to enable maintainer-specific portions of Makefiles... no configure: creating ./config.status config.status: creating Makefile ➜ build-gcc make -j4 all-gcc ➜ build-gcc make install-gcc ➜ build-gcc cd ..
Today, let's try to build the MOST RECENTGCC 9.1. We strictly follow the
TERRIFIC blog How
to Build a GCC Cross-Compiler with trivial modifications for my
x86_64 desktop instead of aarch64
cross compile.
Preparations
Packages Required on HOST
Some packages are required to install on the host computer,
including: * g++ * make * gawk * bison * flex * expect * gnat etc.
Get ALL Packages for Building
GCC
A wget-list.txt
file is provided to download ALL required packages
up-to-date. After having downloaded this single text file, the
UNIQUE command to download all files is as follows:
1
➜ gcc ✗ wget -i wget-list.txt
You can of course download the files one by one. All concerned files
are listed below: *
https://gnu.freemirror.org/gnu/binutils/binutils-2.32.tar.gz *
https://gnu.freemirror.org/gnu//gcc/gcc-9.1.0/gcc-9.1.0.tar.gz *
https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.1.12.tar.gz
* https://ftp.gnu.org/glibc/glibc-2.29.tar.xz *
https://ftp.gnu.org/mpfr/mpfr-4.0.2.tar.xz *
https://ftp.gnu.org/gmp/gmp-6.1.2.tar.xz *
https://ftp.gnu.org/mpc/mpc-1.1.0.tar.gz *
ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 *
ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1.tar.gz
Then, we extract all .tar files in whatever way you
prefer.
➜ gcc mkdir build-binutils ➜ gcc cd build-binutils ➜ build-binutils ../binutils-2.32/configure --prefix=/opt/native --target=x86_64-linux-gnu --enable-vtable-verify checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /usr/bin/sed checking for gawk... gawk checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether g++ accepts -static-libstdc++ -static-libgcc... yes checking for gnatbind... gnatbind checking for gnatmake... gnatmake checking whether compiler driver understands Ada... yes checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for objdir... .libs checking for isl 0.15 or later... no required isl version is 0.15 or later checking for default BUILD_CONFIG... checking for --enable-vtable-verify... yes checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... expect checking for runtest... no checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for readelf... readelf checking for x86_64-linux-gnu-cc... no checking for cc... cc checking for x86_64-linux-gnu-c++... no checking for c++... c++ checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc checking for x86_64-linux-gnu-gfortran... x86_64-linux-gnu-gfortran checking for x86_64-linux-gnu-gccgo... no checking for gccgo... no checking for x86_64-linux-gnu-ar... x86_64-linux-gnu-ar checking for x86_64-linux-gnu-as... x86_64-linux-gnu-as checking for x86_64-linux-gnu-dlltool... no checking for dlltool... no checking for x86_64-linux-gnu-ld... x86_64-linux-gnu-ld checking for x86_64-linux-gnu-lipo... no checking for lipo... no checking for x86_64-linux-gnu-nm... x86_64-linux-gnu-nm checking for x86_64-linux-gnu-objcopy... x86_64-linux-gnu-objcopy checking for x86_64-linux-gnu-objdump... x86_64-linux-gnu-objdump checking for x86_64-linux-gnu-ranlib... x86_64-linux-gnu-ranlib checking for x86_64-linux-gnu-readelf... x86_64-linux-gnu-readelf checking for x86_64-linux-gnu-strip... x86_64-linux-gnu-strip checking for x86_64-linux-gnu-windres... no checking for windres... no checking for x86_64-linux-gnu-windmc... no checking for windmc... no checking where to find the target ar... just compiled checking where to find the target as... just compiled checking where to find the target cc... host tool checking where to find the target c++... host tool checking where to find the target c++ for libstdc++... host tool checking where to find the target dlltool... just compiled checking where to find the target gcc... host tool checking where to find the target gfortran... host tool checking where to find the target gccgo... host tool checking where to find the target ld... just compiled checking where to find the target lipo... host tool checking where to find the target nm... just compiled checking where to find the target objcopy... just compiled checking where to find the target objdump... just compiled checking where to find the target ranlib... just compiled checking where to find the target readelf... just compiled checking where to find the target strip... just compiled checking where to find the target windres... just compiled checking where to find the target windmc... just compiled checking whether to enable maintainer-specific portions of Makefiles... no configure: creating ./config.status config.status: creating Makefile ➜ build-binutils make -j4 ...... ➜ build-binutils make install ➜ build-binutils cd ..
Linux Kernel Headers
1 2 3
➜ gcc cd linux-5.1.12 ➜ linux-5.1.12 make ARCH=x86 INSTALL_HDR_PATH=/opt/native/linux headers_install ➜ linux-5.1.12 cd ..
C/C++ Compilers
1 2 3 4 5 6
➜ gcc mkdir -p build-gcc ➜ gcc cd build-gcc ➜ build-gcc ../gcc-9.1.0/configure --prefix=/opt/native --target=x86_64-linux-gnu --enable-languages=c,c++,fortran,go --disable-multilib --enable-vtable-verify ➜ build-gcc make -j4 all-gcc ➜ build-gcc make install-gcc ➜ build-gcc cd ..
The overview of Official Orange Pi's Ubuntu Desktop for Orange Pi 3
looks as:
2. Kernel Doublechecking
1 2 3 4 5 6 7 8 9 10
orangepi@OrangePi:~$ uname -r 4.9.118+ orangepi@OrangePi:~$ uname -a Linux OrangePi 4.9.118+ #5 SMP PREEMPT Mon Apr 15 09:45:02 CST 2019 aarch64 aarch64 aarch64 GNU/Linux orangepi@OrangePi:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial
3. Enable SSH
After having successfully enabled SSH, you are able
to login Orange Pi
3 remotely. Well, you may still need to figure out how to:
setup Wifi for Orange Pi 3, which
is pretty simple with Ubuntu Desktop GUI
further setup static IP addresses in your router for both Wifi and
Wired connections
4. Update & Upgrade
1 2 3 4 5 6 7 8 9 10 11
orangepi@OrangePi:~$ sudo apt update [sudo] password for orangepi: Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial InRelease Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-updates InRelease Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-backports InRelease Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. root@orangepi3:~#
Since I've already updated/upgraded all packages, it'll tell you from
terminal that All packages are up to date.. BTW, it
seems Orange Pi is a team from TsingHua Universiity?
orangepi@OrangePi:~$ sudo dpkg-reconfigure tzdata perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = "en", LC_ADDRESS = "en", LC_MONETARY = "en", LC_NUMERIC = "en", LC_TELEPHONE = "en", LC_IDENTIFICATION = "en", LC_MEASUREMENT = "en", LC_CTYPE = "en_CA.UTF-8", LC_TIME = "en", LC_NAME = "en", LANG = "en_CA.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory /usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Current default time zone: 'America/Vancouver' Local time is now: Wed Jun 5 09:43:12 PDT 2019. Universal Time is now: Wed Jun 5 16:43:12 UTC 2019.
During the above process, you'll set the following 2 pages
correspondingly:
By using the command date, we can see the timezone
has been successfully reset.
1 2
orangepi@OrangePi:~# date Wed Jun 5 12:05:40 PDT 2019
For the 1st time, we successfully had distro-info, Markdown,
Pygments, PyGObject installed, but failed to install
pycups. For the 2nd time, after
libcups2-dev had been installed from Ubuntu repository,
we had pycups installed successfully.
However, we still have one LAST issue: why
distro-info is still oudated? ^_^ Can anybody give me
an explanation?
Skill 2 - How
to list all auto-removable packages?
➜ ~ nmap -sP 192.168.1.254/24 Starting Nmap 7.70 ( https://nmap.org ) at 2019-06-03 08:03 PDT Nmap scan report for 192.168.1.64 Host is up (0.082s latency). Nmap scan report for 192.168.1.65 Host is up (0.0092s latency). Nmap scan report for 192.168.1.66 Host is up (0.010s latency). Nmap scan report for 192.168.1.67 Host is up (0.037s latency). Nmap scan report for 192.168.1.71 Host is up (0.032s latency). Nmap scan report for 192.168.1.73 Host is up (0.032s latency). Nmap scan report for 192.168.1.74 Host is up (0.061s latency). Nmap scan report for 192.168.1.98 Host is up (0.044s latency). Nmap scan report for 192.168.1.103 Host is up (0.15s latency). Nmap scan report for lvision-GT72-6QE (192.168.1.200) Host is up (0.00047s latency). Nmap scan report for _gateway (192.168.1.254) Host is up (0.015s latency). Nmap done: 256 IP addresses (11 hosts up) scanned in 8.21 seconds ➜ ~
12 ✔ python 4s ~/.local/lib/python3.6/site-packages Python 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>> print(Path().read_text) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'PosixPath' object has no attribute 'read_text'
Skill 15 - Run gdb with user
root
Create a script called gdb in e.g. my home
directory, containing: pkexec /usr/bin/gdb "$@"
make it executable
modify the launch.json in VSCode to
call the script (obviously change username accordingly) by adding
miDebuggerPath:
➜ pip list --outdated WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Therefore, python -m pip is used instead:
1 2 3
➜ bin python -m pip list --outdated ➜ bin python -m pip --version pip 21.3.1 from /home/jetbot/.local/lib/python3.6/site-packages/pip (python 3.6)
Skill
18 - HOWTO – Resize partitions in raw disk (dd) image files (.img)
➜ myWebsite git:(master) git push Enumerating objects: 1498, done. Counting objects: 100% (1498/1498), done. Delta compression using up to 48 threads Compressing objects: 100% (1227/1227), done. Writing objects: 100% (1498/1498), 1.20 MiB | 10.40 MiB/s, done. Total 1498 (delta 182), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (182/182), done. remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: is denied, because it will make the index and work tree inconsistent remote: with what you pushed, and will require 'git reset --hard' to match remote: the work tree to HEAD. remote: remote: You can set the 'receive.denyCurrentBranch' configuration variable remote: to 'ignore' or 'warn' in the remote repository to allow pushing into remote: its current branch; however, this is not recommended unless you remote: arranged to update its work tree to match what you pushed in some remote: other way. remote: remote: To squelch this message and still keep the default behaviour, set remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To XXX.XXX.XXX.XXX:~/myWebsite.git ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'XXX.XXX.XXX.XXX:~/myWebsite.git'
PART
A: Install Ubuntu Desktop Nightly Built By Armbian onto Orange Pi 3
1. Download
Armbian Ubuntu Desktop for Orange Pi 3
We FIRST go visiting the website https://dl.armbian.com/orangepi3/nightly/
and click on the LAST link, for today May 12,
2019, a file named
Armbian_5.86.190512_Orangepi3_Ubuntu_bionic_dev_5.1.0.7z
will be automatically downloaded.
➜ ~ ssh root@192.168.1.101 root@192.168.1.101's password: You are required to change your password immediately (root enforced) ___ ____ _ _____ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) |___ / | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | |_ \ | |_| | | | (_| | | | | (_| | __/ | __/| | ___) | \___/|_| \__,_|_| |_|\__, |\___| |_| |_| |____/ |___/ Welcome to ARMBIAN 5.86.190512 nightly Ubuntu 18.04.2 LTS 5.1.0-sunxi64 System load: 0.01 0.13 0.08 Up time: 5 min Memory usage: 4 % of 1997MB IP: 192.168.1.101 CPU temp: 40°C Usage of /: 3% of 29G Last login: Mon May 13 08:59:30 2019 from 192.168.1.11 Changing password for root. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: You are using an Armbian nightly build meant only for developers to provide constructive feedback to improve build system, OS settings or user experience. If this does not apply to you, STOP NOW!. Especially don't use this image for daily work since things might not work as expected or at all and may break anytime with next update. YOU HAVE BEEN WARNED!
This image is provided AS IS with NO WARRANTY and NO END USER SUPPORT!.
Creating a new user account. Press <Ctrl-C> to abort
Please provide a username (eg. your forename): Sky Trying to add user sky Adding user `sky' ... Adding new group `sky' (1000) ... Adding new user `sky' (1000) with group `sky' ... Creating home directory `/home/sky' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for sky Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
Dear sky, your account sky has been created and is sudo enabled. Please use this account for your daily work from now on.
root@orangepi3:~#
2. Kernel Doublechecking
1 2 3 4 5 6 7 8 9 10
root@orangepi3:~# uname -r 5.1.0-sunxi64 root@orangepi3:~# uname -a Linux orangepi3 5.1.0-sunxi64 #5.86.190512 SMP Sun May 12 22:26:37 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux root@orangepi3:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic
Hello, everybody. I'm now back in ShenZhen, China, and testing
several types of Single Board Computers. I've got to
say: Made In China is amazing. Banana Pi M3 is a
SBC with AllWinner
A83T ARM CPU, which is also of credit-card size. Some detailed
features can be found on the open source technical supporter Sunxi. Please pay attention to
the following key points:
PART
A: Install Ubuntu Desktop Built By Armbian onto Banana Pi M3
1. Download
Armbian Ubuntu Desktop for Banana Pi M3
We FIRST go visiting the website https://www.armbian.com/bananapi-m3/
and click Armbian Bionic icon, a file named
Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop
will be automatically downloaded.
Files: 4 Size: 1946176594 Compressed: 441800089 ➜ operatingsystems ll Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop total 1.9G -rw-rw-r-- 1 jiapei jiapei 1.9G Feb 10 22:50 Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop.img -rw-rw-r-- 1 jiapei jiapei 833 Feb 10 22:50 Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop.img.asc -rw-r--r-- 1 jiapei jiapei 19K Feb 10 22:50 armbian.txt -rw-rw-r-- 1 jiapei jiapei 129 Feb 10 22:50 sha256sum.sha
2. Install
Armbian Ubuntu Desktop for Banana Pi M3
After the extracted image file is prepared, it's the time to install
the Armbian Ubuntu Desktop onto our TF card. We FIRST
format the TF card:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
➜ ~ sudo umount /dev/mmcblk0p1 umount: /dev/mmcblk0p1: not mounted. ➜ ~ sudo mkfs.ext4 /dev/mmcblk0 mke2fs 1.44.1 (24-Mar-2018) Found a gpt partition table in /dev/mmcblk0 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 7579648 4k blocks and 1896832 inodes Filesystem UUID: 5c3be436-4e8c-43e4-ab21-6d5232420881 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000
Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
Afterwards, use dd to install the downloaded Armbian
Ubuntu Desktop image.
1 2 3 4
➜ Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop sudo dd bs=4M if=Armbian_5.83_Bananapim3_Ubuntu_bionic_next_4.19.38_desktop.img of=/dev/mmcblk0 conv=fsync 464+0 records in 464+0 records out 1946157056 bytes (1.9 GB, 1.8 GiB) copied, 258.486 s, 7.5 MB/s
PART
B: SSH Into Armbian, Update & Upgrade, Network Configuration, Locale
Configuration
NOTE: Whenever you met some
unsolvable issue after you boot into Armbian, please use the command
armbianmonitor -U to log the issue.
1. SSH Into Banana Pi M3
We now unplug the TF card from the host and put it into the Banana Pi M3, Armbian Ubuntu
Desktop boots successfully. The default username and password are
respectively: root and 1234. In our
case, Banana Pi M3 is
connected to a network cable first, and it's NOT hard
for us to get the IP address of Banana Pi M3 by using
command line nmap (Details can be checked via
Google). After setting up a NEW user
as well as password by following the previous blog Install
Armbian Ubuntu Desktop onto Banana Pi Pro, you should be able to log
into Banana Pi M3 with
account root:
➜ ~ ssh root@192.168.1.80 The authenticity of host '192.168.1.80 (192.168.1.80)' can't be established. ECDSA key fingerprint is SHA256:xLRt0ppGzbutHHcE3JRyaKw9A0baub3MDAxFF9GNfdk. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.80' (ECDSA) to the list of known hosts. root@192.168.1.80's password: ____ ____ _ __ __ _____ | __ ) __ _ _ __ __ _ _ __ __ _ | _ \(_) | \/ |___ / | _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |\/| | |_ \ | |_) | (_| | | | | (_| | | | | (_| | | __/| | | | | |___) | |____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_| |_| |_| |_|____/
Welcome to ARMBIAN 5.83 stable Ubuntu 18.04.2 LTS 4.19.38-sunxi System load: 0.08 0.10 0.08 Up time: 33 min Memory usage: 12 % of 2013MB IP: 192.168.1.80 Usage of /: 6% of 29G
[ General system configuration (beta): armbian-config ]
Last login: Thu Apr 18 08:53:31 2019 from 192.168.1.21
root@bananapim3:~#
2. Kernel Doublechecking
Finally, we have the system and kernel doublechecked.
1 2 3 4 5 6 7 8 9 10
root@bananapim3:~# uname -r 4.19.38-sunxi root@bananapim3:~# uname -a Linux bananapim3 4.19.38-sunxi #5.83 SMP Sun Feb 10 21:36:17 CET 2019 armv7l armv7l armv7l GNU/Linux root@bananapim3:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic