Orange Pi Zero2

OS/Orange PI 2021. 1. 21. 21:46 Posted by 파란크리스마스

출처

Orange Pi Zero2

Shenzhen Xunlong Software CO.,Limited 제공 이미지, 스펙

댓글을 달아 주세요

Orange Pi 4B : CodeTyphon 설치

OS/Orange PI 2020. 12. 23. 00:59 Posted by 파란크리스마스

출처

"sudo" 루트 권한 부여

$ sudo vi /etc/sudoers

orangepi ALL=(ALL) NOPASSWD: ALL

CodeTyphon 압축 해제

orangepi@orangepi4:~$ cd Downloads/
orangepi@orangepi4:~/Downloads$ unzip CodeTyphonIns.zip

Qt 버전 확인

orangepi@orangepi4:~$ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/aarch64-linux-gnu/qt4/bin"
QTLIBDIR="/usr/lib/aarch64-linux-gnu"
orangepi@orangepi4:~$ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/aarch64-linux-gnu

Qt4pas 라이브러리 설치 (Option : CodeTyphon 설치시 11) -- Platform (widget) Setup 에서 실행)

qt4-qmake 설치

orangepi@orangepi4:~$ sudo apt install qt4-qmake qt4-dev-tools libqtwebkit-dev

ln_Typhon1_QT4pas_Build.sh 수정

orangepi@orangepi4:~/Downloads/CodeTyphonIns/installbin/ScriptsLin$ vi ln_Typhon1_QT4pas_Build.sh

x86_64-linux를 aarch64-linux로 수정

# ---- these settings are for Ubuntu Linux -------
      if [ $vBits = 32 ] ;
       then
        vQMake=/usr/lib/i386-linux-gnu/qt4/bin/qmake
       else
        vQMake=/usr/lib/aarch64-linux-gnu/qt4/bin/qmake
       fi

qt4pas.7z 압축을 풀어서 x86_64-linux 폴더를 aarch64-linux 복사하고 다시 압축

수동 컴파일 및 설치

orangepi@orangepi4:~/Downloads/CodeTyphonIns/installbin/ScriptsLin$ ./ln_Typhon1_QT4pas_Build.sh
 
... 생략 ...
 
ln -s libQt4Pas.so.5.2.8 libQt4Pas.so
ln -s libQt4Pas.so.5.2.8 libQt4Pas.so.5
ln -s libQt4Pas.so.5.2.8 libQt4Pas.so.5.2
install -m 755 -p "libQt4Pas.so.5.2.8" "/usr/lib/aarch64-linux-gnu/libQt4Pas.so.5.2.8"
strip --strip-unneeded "/usr/lib/aarch64-linux-gnu/libQt4Pas.so.5.2.8"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/aarch64-linux-gnu/libQt4Pas.so"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/aarch64-linux-gnu/libQt4Pas.so.5"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/aarch64-linux-gnu/libQt4Pas.so.5.2"
   
---------------------------------------
[INFO]: QT4pas Libraries finish Build OK for aarch64-linux
   
   
---------------------------------------------------------
    Make QT4Pas Libraries Links
---------------------------------------------------------
   
[INFO] Make QT4pas links to /usr/lib/aarch64-linux-gnu/ for aarch64-linux finish OK

CodeTyphon 설치 스크립트 실행

0번 선택 ( 0) Install System Libraries )

orangepi@orangepi4:~/Downloads$ cd CodeTyphonIns/
orangepi@orangepi4:~/Downloads/CodeTyphonIns$ ./install.sh
 
====================================================
             CodeTyphon Studio 
            Version 7.20 (GEN 7)
  Installation for Linux-Solaris-Openindiana-MacOS
          FreeBSD-NetBSD-OpenBSD-DragonFly
====================================================
 
   0) Install CodeTyphon Studio
 
   9) Exit
 
>>> Select an action (press 0..9 key): 0

11번 선택

====================================================
  CodeTyphon Studio 7.20 Setup for Linux64
   Settings: Platform=gtk2  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 11

2번 QT4 선택

====================================================
     CodeTyphon Studio Unix Platform (widget) Setup
        Current Platform: gtk2
====================================================
   
Warning: Install System Libraries after every Platform change
   
   1) GTK2           (Default)
   2) QT4
   3) QT5
   4) GTK3           (Experimental)
   5) FpGUI          (Experimental)
   6) CustomDrawn    (Experimental)
   
   9) Back to Main Setup
   
>>> Select a platform (press 0..9 key): 2

12번 선택

====================================================
  CodeTyphon Studio 7.20 Setup for Linux64
   Settings: Platform=qt4  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 12

1번 선택

====================================================
    CodeTyphon Studio Multi-Architecture Setup
      Current Multiarch Mode: 0
====================================================
   
   0) NO  Multi-Architecture Mode (Multiarch=0)
   
   1) Use Multi-Architecture Mode (Multiarch=1)
   
   
   9) Back to Main Setup
   
>>> Select Mode (press 0..9 key): 1

8번 선택 ( 8) Remove and Build ALL )

====================================================
  CodeTyphon Studio 7.20 Setup for Linux64
   Settings: Platform=qt4  Multiarch Mode=1
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 8

9번 선택 ( 9) EXIT )

====================================================
  CodeTyphon Studio 6.70 Setup for Linux64
   Settings: Platform=gtk2  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 9

실행

런타임라이브러리 설치 (개발환경이 없는 곳에서 실행)

qt4pas_aarch64-linux.tar.gz

project1.tar.gz

pi@NanoPi-M4v2:~/Downloads$ ./project1 
./project1: error while loading shared libraries: libQt4Pas.so.5: cannot open shared object file: No such file or directory
pi@NanoPi-M4v2:~/Downloads$ sudo install -m 755 -p "libQt4Pas.so" "/usr/lib/aarch64-linux-gnu/libQt4Pas.so.5"
pi@NanoPi-M4v2:~/Downloads$ ./project1 
./project1: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
pi@NanoPi-M4v2:~$ sudo apt install libqtwebkit4

댓글을 달아 주세요

Orange Pi 4B : 카메라(ov13850) 사용하기

OS/Orange PI 2020. 12. 22. 23:31 Posted by 파란크리스마스

출처

카메라(ov13850) 모듈 확인

orangepi@orangepi4:~$ dmesg | grep ov13850
[    1.357126] ov13850 1-0010: driver version: 00.01.01
[    1.357684] ov13850 1-0010: GPIO lookup for consumer pwr
[    1.357705] ov13850 1-0010: using device tree for GPIO lookup
[    1.357768] of_get_named_gpiod_flags: parsed 'pwr-gpios' property of node '/i2c@ff110000/ov13850@10[0]' - status (0)
[    1.357831] ov13850 1-0010: GPIO lookup for consumer reset
[    1.357849] ov13850 1-0010: using device tree for GPIO lookup
[    1.357907] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/i2c@ff110000/ov13850@10[0]' - status (0)
[    1.357957] ov13850 1-0010: GPIO lookup for consumer pwdn
[    1.357974] ov13850 1-0010: using device tree for GPIO lookup
[    1.358055] of_get_named_gpiod_flags: parsed 'pwdn-gpios' property of node '/i2c@ff110000/ov13850@10[0]' - status (0)
[    1.358110] ov13850 1-0010: Looking up avdd-supply from device tree
[    1.358133] ov13850 1-0010: Looking up avdd-supply property in node /i2c@ff110000/ov13850@10 failed
[    1.358820] ov13850 1-0010: Looking up dovdd-supply from device tree
[    1.358843] ov13850 1-0010: Looking up dovdd-supply property in node /i2c@ff110000/ov13850@10 failed
[    1.359558] ov13850 1-0010: Looking up dvdd-supply from device tree
[    1.359581] ov13850 1-0010: Looking up dvdd-supply property in node /i2c@ff110000/ov13850@10 failed
[    1.360380] ov13850 1-0010: could not get sleep pinstate
[    1.364580] ov13850 1-0010: Unexpected sensor id(000000), ret(-5)
[    1.365863] ov13850 2-0010: driver version: 00.01.01
[    1.366502] ov13850 2-0010: GPIO lookup for consumer pwr
[    1.366524] ov13850 2-0010: using device tree for GPIO lookup
[    1.366589] of_get_named_gpiod_flags: parsed 'pwr-gpios' property of node '/i2c@ff120000/ov13850@10[0]' - status (0)
[    1.366651] ov13850 2-0010: GPIO lookup for consumer reset
[    1.366671] ov13850 2-0010: using device tree for GPIO lookup
[    1.366729] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/i2c@ff120000/ov13850@10[0]' - status (0)
[    1.366779] ov13850 2-0010: GPIO lookup for consumer pwdn
[    1.366796] ov13850 2-0010: using device tree for GPIO lookup
[    1.366853] of_get_named_gpiod_flags: parsed 'pwdn-gpios' property of node '/i2c@ff120000/ov13850@10[0]' - status (0)
[    1.366904] ov13850 2-0010: Looking up avdd-supply from device tree
[    1.366928] ov13850 2-0010: Looking up avdd-supply property in node /i2c@ff120000/ov13850@10 failed
[    1.367651] ov13850 2-0010: Looking up dovdd-supply from device tree
[    1.367675] ov13850 2-0010: Looking up dovdd-supply property in node /i2c@ff120000/ov13850@10 failed
[    1.368364] ov13850 2-0010: Looking up dvdd-supply from device tree
[    1.368387] ov13850 2-0010: Looking up dvdd-supply property in node /i2c@ff120000/ov13850@10 failed
[    1.369210] ov13850 2-0010: could not get sleep pinstate
[    1.374218] ov13850 2-0010: Detected OV00d850 sensor, REVISION 0xb2

카메라(ov13850) 연결 확인

orangepi@orangepi4:~$ dmesg | grep Async
[    1.376840] rkisp1: Async subdev notifier completed

카메라(ov13850) 열기 - 화면에 카메라 영상이 출력

$ test_camera-gst.sh
Setting pipeline to PAUSED ...
media get entity by name: lens is null
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
[XCORE]:XCAM ERROR rkisp_device.cpp:72: atomisp device(/dev/video0) try subdev format failed

카메라(ov13850) 캡쳐

$ test_camera-capture.sh
Setting pipeline to PAUSED ...
media get entity by name: lens is null
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
[XCORE]:XCAM ERROR rkisp_device.cpp:72: atomisp device(/dev/video0) try subdev format failed
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:01.226523487
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

댓글을 달아 주세요

Orange Pi 4B : 한글 입력기 설치 (fcitx)

OS/Orange PI 2020. 12. 22. 23:25 Posted by 파란크리스마스

출처

fcitx-hangul 설치

$ sudo apt-get install fcitx-hangul im-config

한글 입력기 부팅시 시작하기

$ im-config -n fcitx

한글 입력기 설정 확인

orangepi@orangepi4:~$ cat ~/.xinputrc
## im-config(8) generated on Tue, 22 Dec 2020 15:10:32 +0000
run_im fcitx
## im-config signature: ee1963917a48bd5abd39f599678fd5ff  -

한글폰트 설치

pi@orangepi4:~$ sudo apt install fonts-nanum fonts-nanum-extra

한글 ????? 출력 해결

로케일 관련 패키지가 설치

orangepi@orangepi4:~$ sudo apt install locales

로케일 설정

orangepi@orangepi4:~$ sudo dpkg-reconfigure locales

Package configuration

 +-----------------------+ Configuring locales +-----------------------+
 | Locales are a framework to switch between multiple languages and    |
 | allow users to use their language, country, characters, collation   |
 | order, etc.                                                         |
 |                                                                     |
 | Please choose which locales to generate. UTF-8 locales should be    |
 | chosen by default, particularly for new installations. Other        |
 | character sets may be useful for backwards compatibility with       |
 | older systems and software.                                         |
 |                                                                     |
 | Locales to be generated:                                            |
 |                                                                     |
 |    [ ] en_NG UTF-8                                                  |
 |    [ ] en_NZ ISO-8859-1                                         a   |
 |    [ ] en_NZ.UTF-8 UTF-8                                        a   |
 |    [ ] en_ZA ISO-8859-1                                         a   |
 |    [*] en_US.UTF-8 UTF-8                                        a   |
 |    [*] ko_KR.UTF-8 UTF-8                                        a   |
 |                                                                     |
 |                                                                     |
 |                  <ok>                      <cancel>                 |
 |                                                                     |
 +---------------------------------------------------------------------+
 +-----------------------+ Configuring locales +-----------------------+
 | Many packages in Debian use locales to display text in the correct  |
 | language for the user. You can choose a default locale for the      |
 | system from the generated locales.                                  |
 |                                                                     |
 | This will select the default language for the entire system. If     |
 | this system is a multi-user system where not all users are able to  |
 | speak the default language, they will experience difficulties.      |
 |                                                                     |
 | Default locale for the system environment:                          |
 |                                                                     |
 |                             None                                    |
 |                           [ C.UTF-8     ]                           |
 |                             en_ZA.UTF-8                             |
 |                             ko_KR.UTF-8                             |
 |                                                                     |
 |                                                                     |
 |                  <ok>                      <cancel>                 |
 |                                                                     |
 +---------------------------------------------------------------------+	

한글 입력기 추가

댓글을 달아 주세요

Orange Pi 4B

OS/Orange PI 2020. 11. 25. 01:53 Posted by 파란크리스마스

출처

Linux 정보 확인

orangepi@orangepi4:~$ cat /etc/issue
Debian GNU/Linux 9 \n \l

emmc에 linux 설치

완료 후 SD메모리를 제거하고 재부팅

orangepi@orangepi4:~$ sudo install_to_emmc
 
Mon Dec 14 16:05:52 UTC 2020
===============================
Installing Linux system to emmc
===============================
 
 
WARNING: EMMC WILL BE ERASED !, Continue (y/N)?  y
Formating partition, please wait ...
GPT fdisk (gdisk) version 1.0.1
 
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present
 
Found valid GPT with protective MBR; using GPT.
 
Command (? for help): 
Expert command (? for help): Partition number (1-4): Enter the partition's new unique GUID ('R' to randomize): New GUID is 615E0000-0000-4B53-8000-1D28000054A9
 
Expert command (? for help): 
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
 
Do you want to proceed? (Y/N): OK; writing new GUID partition table (GPT) to /dev/mmcblk1.
The operation has completed successfully.
  linux partition formated.
Instaling u-boot to EMMC ...
Instaling boot.img to EMMC ...
 
Mounting EMMC partitions...
 
Copying file system to EMMC ...
 
 
*******************************
Linux system installed to EMMC.
*******************************

IP 확인

orangepi@orangepi4:~$ ip addr show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:fa:df:50:80:7d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 6567sec preferred_lft 6567sec
    inet6 fe80::2aac:17b:6b35:953a/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0:  mtu 1500 qdisc pfifo_fast state DORMANT group default qlen 1000
    link/ether d4:12:43:26:11:e0 brd ff:ff:ff:ff:ff:ff

한글폰트 설치

pi@orangepi4:~$ sudo apt install fonts-nanum font-nanum-coding fonts-nanum-extra

원격 데스크톱 설치

일반적으로 Linux 서버에는 기본적으로 데스크톱 환경이 설치되어 있지 않습니다. 첫 번째 단계는 X11과 Xrdp의 백엔드 역할을 할 데스크톱 환경을 설치하는 것입니다.

데비안 저장소에서 사용할 수있는 여러 데스크톱 환경 (DE)이 있습니다. 여기에서는 Xfce를 설치할 것입니다. 빠르고 안정적이며 가벼운 데스크톱 환경으로 원격 서버에서 사용하기에 이상적입니다. Gnome과 같은 다른 데스크탑 환경을 선호하는 경우 Xfce 대신 설치할 수 있습니다.

orangepi@orangepi4:~$ sudo apt update
orangepi@orangepi4:~$ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

Xrdp 설치

orangepi@orangepi4:~$ sudo apt install xrdp

xrdp 서비스 상태 확인

orangepi@orangepi4:~$ sudo systemctl status xrdp
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-12-22 14:37:39 UTC; 50s ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
 Main PID: 29490 (xrdp)
   CGroup: /system.slice/xrdp.service
           └─29490 /usr/sbin/xrdp

Dec 22 14:37:38 orangepi4 systemd[1]: Starting xrdp daemon...
Dec 22 14:37:38 orangepi4 systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or 
Dec 22 14:37:39 orangepi4 systemd[1]: Started xrdp daemon.
Dec 22 14:37:40 orangepi4 xrdp[29490]: (29490)(548437458944)[INFO ] starting xrdp with pid 29490
Dec 22 14:37:40 orangepi4 xrdp[29490]: (29490)(548437458944)[INFO ] listening to port 3389 on 0.0.0.0

~/.xsession 확인

orangepi@orangepi4:~$ cat ~/.xsession
xfce4-session

KDE 설치

KDE 데스크탑 설치

orangepi@orangepi4:~$ sudo apt -y install task-kde-desktop

Plasma 설정

KDE로 원격 데스크탑 실행시 설정

orangepi@orangepi4:~$ sudo echo "startkde" > ~/.xsession

댓글을 달아 주세요

Orange Pi Pc Plus : TensorFlow 2.2.0 (armv7l) 설치 (Python 3.7)

OS/Orange PI 2020. 5. 24. 15:49 Posted by 파란크리스마스

출처

리눅스 정보 확인

CPU 정보 확인

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 22.85
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5
 
 ... 생략 ...
 
Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c000812exxxxxx

instruction set architecture (ISA)

$ uname -m
armv7l

커널에 대한 정보

$ uname -a
Linux orangepipcplus 5.4.35-sunxi #trunk SMP Thu Apr 23 18:06:21 CEST 2020 armv7l GNU/Linux

OS버전에 대한 정보

$ cat /etc/issue
Armbian 20.02.1 Buster \l 

논리 코어 수 확인

$ grep -c processor /proc/cpuinfo
4

메모리, swap 사이즈 확인

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          966Mi       244Mi        97Mi        10Mi       625Mi       689Mi
Swap:         483Mi       0.0Ki       482Mi

swap 사이즈 설정

현재 swap 사이즈 확인

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          966Mi       244Mi       101Mi        10Mi       621Mi       690Mi
Swap:         483Mi       0.0Ki       482Mi
$ sudo swapon -s
Filename                                Type            Size    Used    Priority
/dev/zram1                              partition       494972  512     5
$ sudo swapoff /dev/zram1
$ sudo zramctl --reset /dev/zram1
$ sudo zramctl --find --size 2048M
$ sudo mkswap /dev/zram1
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=88aaa3f7-bfe3-44ce-a71d-e29f777e52a7
$ sudo swapon /dev/zram1
$ free -h
              total        used        free      shared  buff/cache   available
Mem:          966Mi       248Mi       100Mi        10Mi       617Mi       685Mi
Swap:         2.0Gi          0B       2.0Gi
$ sudo swapon -s
Filename                                Type            Size    Used    Priority
/dev/zram1                              partition       2097148 0       -2

관련 라이브러리 설치, pip3 설치 확인

$ sudo apt update
$ sudo apt install gfortran libopenblas-dev liblapack-dev libhdf5-dev pkg-config
$ sudo apt install python3-pip python3-dev python3-wheel
$ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

libhdf5.so 라이브러리 LD_LIBRARY_PATH 환경변수에 추가

TensorFlow 설치 도중 libhdf5.so 라이브러리을 찾을 수 없는 오류가 발생하므로 LD_LIBRARY_PATH에 경로 추가

$ sudo find / -name libhdf5.so -print
find: ‘/proc/sys/fs/binfmt_misc’: No such device
/usr/lib/arm-linux-gnueabihf/hdf5/serial/libhdf5.so
find: ‘/run/user/1000/gvfs’: Permission denied
$ echo 'export LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/hdf5/serial:$LD_LIBRARY_PATH' >> ~/.bashrc
$ source ~/.bashrc

TensorFlow 2.2.0 패키지 설치

TensorFlow 2.2.0 패키지 다운로드

$ wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.2.0/tensorflow-2.2.0-cp37-none-linux_armv7l.whl

tensorflow 2.2.0 파이썬 페키지 설치

$ export TMPDIR=/var/tmp
$ pip3 install tensorflow-2.2.0-cp37-none-linux_armv7l.whl

버전 확인

$ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'2.2.0'

댓글을 달아 주세요

출처

리눅스 정보 확인

CPU 정보 확인

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 22.85
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5
 
 ... 생략 ...
 
Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c000812exxxxxx

instruction set architecture (ISA)

$ uname -m
armv7l

커널에 대한 정보

$ uname -a
Linux orangepipcplus 5.4.35-sunxi #trunk SMP Thu Apr 23 18:06:21 CEST 2020 armv7l GNU/Linux

OS버전에 대한 정보

$ cat /etc/issue
Armbian 20.02.1 Buster \l 

논리 코어 수 확인

$ grep -c processor /proc/cpuinfo
4

TensorFlow C, C++ 라이브러리 설치

TensorFlow 라이브러리 다운로드

$ wget http://1.229.109.140:3562/tensorflow/tensorflow-2.2.0.armv7l/libtensorflow.tar.gz

TensorFlow 라이브러리 설치

$ sudo tar -C /usr/local -xzf libtensorflow.tar.gz

Linker 설정

$ sudo ldconfig

예제 hello.c

#include <stdio.h>
#include <tensorflow/c/c_api.h>

int main() {
  printf("TensorFlow C library version %s\n", TF_Version());
  return 0;
}

예제 컴파일

$ gcc hello.c -ltensorflow -o hello

예제 실행

$ ./hello
TensorFlow C library version 2.2.0

댓글을 달아 주세요

Orange Pi Pc Plus

OS/Orange PI 2020. 5. 24. 00:53 Posted by 파란크리스마스

출처

eMMC에 OS 설치

이미지 복원이 완료되면 SD 메모리를 제거하고 재부팅

$ sudo nand-sata-install

Python 버전 확인

$ python3 --version
Python 3.7.3

댓글을 달아 주세요

Orange Pi Plus 2E: TensorFlow 2.2.0 (armv7l) 설치 (Python 3.7)

OS/Orange PI 2020. 5. 21. 01:29 Posted by 파란크리스마스

출처

리눅스 정보 확인

CPU 정보 확인

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 22.85
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5
 
 ... 생략 ...
 
Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c00081edxxxxxx

instruction set architecture (ISA)

$ uname -m
armv7l

커널에 대한 정보

$ uname -a
Linux orangepiplus2e 5.4.8-sunxi #19.11.6 SMP Sun Jan 5 01:33:12 CET 2020 armv7l GNU/Linux

OS버전에 대한 정보

$ cat /etc/issue
Armbian 19.11.6 Buster \l 

논리 코어 수 확인

$ grep -c processor /proc/cpuinfo
4

메모리, swap 사이즈 확인

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       226Mi       127Mi       8.0Mi       1.6Gi       1.6Gi
Swap:         990Mi          0B       990Mi

관련 라이브러리 설치, pip3 설치 확인

$ sudo apt update
$ sudo apt install gfortran libopenblas-dev liblapack-dev libhdf5-dev pkg-config
$ sudo apt install python3-pip python3-dev
$ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

libhdf5.so 라이브러리 LD_LIBRARY_PATH 환경변수에 추가

TensorFlow 설치 도중 libhdf5.so 라이브러리을 찾을 수 없는 오류가 발생하므로 LD_LIBRARY_PATH에 경로 추가

$ sudo find / -name libhdf5.so -print
find: ‘/proc/sys/fs/binfmt_misc’: No such device
/usr/lib/arm-linux-gnueabihf/hdf5/serial/libhdf5.so
find: ‘/run/user/1000/gvfs’: Permission denied
$ echo 'export LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/hdf5/serial:$LD_LIBRARY_PATH' >> ~/.bashrc
$ source ~/.bashrc

TensorFlow 2.2.0 패키지 설치

TensorFlow 2.2.0 패키지 다운로드

$ wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.2.0/tensorflow-2.2.0-cp37-none-linux_armv7l.whl

tensorflow 2.2.0 파이썬 페키지 설치

$ export TMPDIR=/var/tmp
$ pip3 install tensorflow-2.2.0-cp37-none-linux_armv7l.whl

버전 확인

$ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'2.2.0'

댓글을 달아 주세요

출처

리눅스 정보 확인

CPU 정보 확인

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 22.85
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5
 
 ... 생략 ...
 
Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c00081edxxxxxx

instruction set architecture (ISA)

$ uname -m
armv7l

커널에 대한 정보

$ uname -a
Linux orangepiplus2e 5.4.8-sunxi #19.11.6 SMP Sun Jan 5 01:33:12 CET 2020 armv7l GNU/Linux

OS버전에 대한 정보

$ cat /etc/issue
Armbian 19.11.6 Buster \l 

논리 코어 수 확인

$ grep -c processor /proc/cpuinfo
4

TensorFlow C, C++ 라이브러리 설치

TensorFlow 라이브러리 다운로드

$ wget http://1.229.109.140:3562/tensorflow/tensorflow-2.2.0.armv7l/libtensorflow.tar.gz

TensorFlow 라이브러리 설치

$ sudo tar -C /usr/local -xzf libtensorflow.tar.gz

Linker 설정

$ sudo ldconfig

예제 hello.c

#include <stdio.h>
#include <tensorflow/c/c_api.h>

int main() {
  printf("TensorFlow C library version %s\n", TF_Version());
  return 0;
}

예제 컴파일

$ gcc hello.c -ltensorflow -o hello

예제 실행

$ ./hello
TensorFlow C library version 2.2.0

댓글을 달아 주세요

Orange Pi Plus 2E

OS/Orange PI 2020. 5. 19. 23:25 Posted by 파란크리스마스

출처

eMMC에 OS 설치

이미지 복원이 완료되면 SD 메모리를 제거하고 재부팅

$ sudo nand-sata-install


SD 확장 (OrangePi_plus2e_ubuntu_xenial_desktop_linux5.3.5_v1.0.img 이미지 사용시)

SD 확장전 용량확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            923M     0  923M   0% /dev
tmpfs           199M  8.0M  191M   5% /run
/dev/mmcblk0p2  2.7G  2.5G   66M  98% /
tmpfs           991M  104K  990M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           991M     0  991M   0% /sys/fs/cgroup
/dev/mmcblk0p1   50M   17M   33M  35% /boot
tmpfs           199M   20K  198M   1% /run/user/110
tmpfs           199M     0  199M   0% /run/user/1000

SD FDisk

orangepi@OrangePi:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 14.9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3c2615d3

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1       40960  143359  102400   50M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      143360 5976063 5832704  2.8G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-31116287, default 2048): 143360
Last sector, +sectors or +size{K,M,G,T,P} (143360-31116287, default 31116287): [Enter]

Created a new partition 2 of type 'Linux' and of size 14.8 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

orangepi@OrangePi:~$ sudo shutdown -r now

SD 확장

$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk0p2 is now 3871616 (4k) blocks long.

SD 확장 확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            923M     0  923M   0% /dev
tmpfs           199M  8.0M  191M   5% /run
/dev/mmcblk0p2   15G  2.5G   12G  18% /
tmpfs           991M  104K  990M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           991M     0  991M   0% /sys/fs/cgroup
/dev/mmcblk0p1   50M   17M   33M  35% /boot
tmpfs           199M   16K  198M   1% /run/user/110
tmpfs           199M     0  199M   0% /run/user/1000

댓글을 달아 주세요

출처

omv-extras 설치 (root 계정으로 설치)

$ su - root
# wget -O - http://omv-extras.org/install | bash

OMV-Extras 추가 확인

[플러그인] 목록에서 openmediavault-transmissionbt 선택하고 [설치] 버튼 선택

공유 폴더 추가

공유 폴더는 omv 설치시 생성된 debian-transmission 계정으로 생성된 폴더를 지정

[서비스] > [BitTorrent] > [설정] 화면에서 활성화하고 [저장] 버튼 선택하여 저장

[RPC] 화면에서 활성화하고 [저장] 버튼 선택하여 저장하고, [Show] 버튼을 선택하려 클라이언트 화면 보기 

토렌토 클라이언트 Web 화면

댓글을 달아 주세요