728x90

출처

리눅스 확인

orangepi@orangepi5:~$ uname -a
Linux orangepi5 5.10.110-rockchip-rk3588 #1.1.0 SMP Fri Jan 6 14:00:53 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
orangepi@orangepi5:~$ cat /proc/version
Linux version 5.10.110-rockchip-rk3588 (root@test) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1.1.0 SMP Fri Jan 6 14:00:53 CST 2023
orangepi@orangepi5:~$ uname -r
5.10.110-rockchip-rk3588
orangepi@orangepi5:~$ uname -m 
aarch64
orangepi@orangepi5:~$ cat /etc/issue
Orange Pi 1.1.0 Jammy \l 
 
orangepi@orangepi5:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
## PLEASE DO NOT EDIT THIS FILE
BOARD=orangepi5
BOARD_NAME="Orange Pi 5"
BOARDFAMILY=rockchip-rk3588
BUILD_REPOSITORY_URL=https://github.com/orangepi-xunlong/orangepi-build
BUILD_REPOSITORY_COMMIT=1e88c5d82-dirty
DISTRIBUTION_CODENAME=jammy
DISTRIBUTION_STATUS=supported
VERSION=1.1.0
LINUXFAMILY=rockchip-rk3588
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
IMAGE_UUID=7307ac30-03ec-42b9-ac3a-10244aa27a85
## PLEASE DO NOT EDIT THIS FILE
BOARD=orangepi5
BOARD_NAME="Orange Pi 5"
BOARDFAMILY=rockchip-rk3588
BUILD_REPOSITORY_URL=https://github.com/orangepi-xunlong/orangepi-build
BUILD_REPOSITORY_COMMIT=1e88c5d82-dirty
DISTRIBUTION_CODENAME=jammy
DISTRIBUTION_STATUS=supported
VERSION=1.1.0
LINUXFAMILY=rockchip-rk3588
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
BRANCH=legacy
PRETTY_NAME="Orange Pi 1.1.0 Jammy"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

도커 버전 확인

orangepi@orangepi5:~$ docker version
Client: Docker Engine - Community
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:33:18 2023
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true
 
Server: Docker Engine - Community
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.10
  Git commit:       6051f14
  Built:            Thu Jan 19 17:31:30 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.15
  GitCommit:        5b842e528e99d4d4c1686467debf2bd4b88ecd86
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

mysql 이미지 받아오기 (pull)

orangepi@orangepi3b:~$ docker pull mysql/mysql-server:5.7
5.7: Pulling from mysql/mysql-server
d70f3c0cccba: Pull complete 
e7dc89aa39f7: Pull complete 
76cc4215b650: Pull complete 
25b0bb53e492: Pull complete 
349b52643cc3: Pull complete 
62ddcf4a4134: Pull complete 
c91c597e717d: Pull complete 
c7e93886e496: Pull complete 
Digest: sha256:1178cdd375f758968cd834ac4057bae41307e64b7c69a9e145896e7b11f48064
Status: Downloaded newer image for mysql/mysql-server:5.7
docker.io/mysql/mysql-server:5.7

mysql 도커 이미지 실행 (브릿지모드)

orangepi@orangepi5:~$ docker run -d \
  -p 3306:3306 \
  -e MYSQL_ROOT_PASSWORD=password \
  --name mysql-server \
  -v /exthdd/dockerData/mysql:/var/lib/mysql mysql/mysql-server:latest \
  --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
b51f212af1a497b5ac6de8c5cdccd7ba4f0e40390eb7e036806a9464c27553f9

mysql 실행 확인

orangepi@orangepi5:~$ docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED              STATUS                        PORTS                                                        NAMES
b51f212af1a4   mysql/mysql-server:latest   "/entrypoint.sh --ch…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060-33061/tcp   mysql-server

MySQL 접속, root 외부 접속 계정 생성

Docker로 mysql-server 컨테이너 접속

orangepi@orangepi5:~$ docker exec -it mysql-server /bin/bash
bash-4.4# whoami
root

MySQL 접속

bash-4.4# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 8.0.32 MySQL Community Server - GPL
 
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql>

mysql 데이터베이스로 이동

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

현재 계정 확인

mysql> select host, user, authentication_string from user;
+-----------+------------------+------------------------------------------------------------------------+
| host      | user             | authentication_string                                                  |
+-----------+------------------+------------------------------------------------------------------------+
| localhost | healthchecker    | $A$005$+o%8u   V&V5A01J/aCWOrIjMG.NNcTxQAqUkzIu9vZanJ07NooGg1O45EbB |
| localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.session    | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.sys        | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | root             | $A$005$6wQait7{        _\4vz,0OhQhCJkeGInRJt8/bv2BUvcnAj/izDj.00Zuob8458 |
+-----------+------------------+------------------------------------------------------------------------+
5 rows in set (0.00 sec)

외부 접속이 가능한 root 계정 생성

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.06 sec)
 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.04 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

생성된 root 계정 확인

mysql> select host, user, authentication_string from user;
+-----------+------------------+------------------------------------------------------------------------+
| host      | user             | authentication_string                                                  |
+-----------+------------------+------------------------------------------------------------------------+
| %         | root             | $A$005$s%:wO_,UA0W%f+BtL6iODgWvpDzbLfAxYRM169ckvJPVwgjc79mxY7LKK4 |
| localhost | healthchecker    | $A$005$+o%8u   V&V5A01J/aCWOrIjMG.NNcTxQAqUkzIu9vZanJ07NooGg1O45EbB |
| localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.session    | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.sys        | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | root             | $A$005$6wQait7{        _\4vz,0OhQhCJkeGInRJt8/bv2BUvcnAj/izDj.00Zuob8458 |
+-----------+------------------+------------------------------------------------------------------------+
6 rows in set (0.00 sec)

MySQL 포트 확인

orangepi@orangepi5:~$ netstat -nao | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 :::3306                 :::*                    LISTEN      off (0.00/0/0)
unix  3      [ ]         STREAM     CONNECTED     33067    /run/user/1000/bus
unix  3      [ ]         STREAM     CONNECTED     33065    /run/user/1000/bus
728x90
728x90

출처

JELOS 다운로드

https://github.com/JustEnoughLinuxOS/distribution/releases 화면에서 RK3588 이미지 다운로드

이미지 복원

메뉴 

메뉴 들어가기 : [Enter] 선택

와이파이 설정

[NETWORK SETTINGS] 메뉴를 선택하고 [X]키를 선택  

와이파이 활성화

[ENABLE WIFI]메뉴에서 선택하고 [X]키를 선택해서 와이파이 활성화 시킴

SSID 설정

[WIFI SSID]메뉴를 선택하고 [X]키 선택

SSID 목록 선택

WIFI 암호 설정

SSID와 암호 설정후 [Z]키를 선택해서, [SYSTEM SETTINGS] 화면은 빠져 나가면서 WIFI 설정값 저장

상단 오른쪽에 와이파이 연결 표시가 있으면 다시 NETWORK SETTINGS 화면에 들어가서 IP 확인

SSH 활성화

삼바 활성화

ROOT 암호 확인

[SYSTEM SETTINGS] 메뉴 선택

SSH 접속

728x90
728x90

출처

Orange Pi Zero Plus2 H5 (512MB)

Armbian Linux 초기화

U-Boot SPL 2020.10-armbian (Aug 08 2021 - 16:23:24 +0200)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.5(debug):87311b4-dirty
NOTICE:  BL31: Built : 16:23:20, Aug  8 2021
NOTICE:  BL31: Detected Allwinner H5 SoC (1718)
NOTICE:  BL31: Found U-Boot DTB at 0x2090080, model: OrangePi Zero Plus2
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
NOTICE:  PMIC: Assuming H5 reference regulator design
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for 1530924 was applied
INFO:    PSCI: Suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9
alloc space exhausted
 
 
U-Boot 2020.10-armbian (Aug 08 2021 - 16:23:24 +0200) Allwinner Technolog
 
CPU:   Allwinner H5 (SUN50I)
Model: OrangePi Zero Plus2
DRAM:  512 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... Unable to use mmc 1:1... In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
** Reading file would overwrite reserved memory **
Failed to load '/boot/boot.bmp'
There is no valid bmp file at the given address
starting USB...
No working controllers found
Autoboot in 1 seconds
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 3 ms (1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
201 bytes read in 2 ms (97.7 KiB/s)
31077 bytes read in 6 ms (4.9 MiB/s)
1020 bytes read in 4 ms (249 KiB/s)
Applying kernel provided DT overlay sun50i-h5-gpio-regulator-1.3v.dtbo
504 bytes read in 4 ms (123 KiB/s)
Applying kernel provided DT overlay sun50i-h5-usbhost2.dtbo
504 bytes read in 3 ms (164.1 KiB/s)
Applying kernel provided DT overlay sun50i-h5-usbhost3.dtbo
4191 bytes read in 4 ms (1022.5 KiB/s)
Applying kernel provided DT fixup script (sun50i-h5-fixup.scr)
## Executing script at 45000000
10048105 bytes read in 481 ms (19.9 MiB/s)
21860360 bytes read in 1043 ms (20 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41740000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    10048041 Bytes = 9.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 4966a000, end 49fff229 ... OK
   Loading Device Tree to 00000000495fa000, end 0000000049669fff ... OK
 
Starting kernel ...
 
 
orangepizeroplus2-h5 login: root (automatic login)
 
  ___  ____  _   _____                ____  _             ____
 / _ \|  _ \(_) |__  /___ _ __ ___   |  _ \| |_   _ ___  |___ \
| | | | |_) | |   / // _ \ '__/ _ \  | |_) | | | | / __|   __) |
| |_| |  __/| |  / /|  __/ | | (_) | |  __/| | |_| \__ \  / __/
 \___/|_|   |_| /____\___|_|  \___/  |_|   |_|\__,_|___/ |_____|
 
Welcome to Armbian 21.08.1 Bullseye with Linux 5.10.60-sunxi64
 
System load:   129%             Up time:       2 min
Memory usage:  24% of 474M      IP:
CPU temp:      30°C             Usage of /:    11% of 15G
 
[ General system configuration (beta): armbian-config ]
 
Last login: Thu Aug 26 10:50:02 UTC 2021 on ttyGS0
 
Waiting for system to finish booting ...
 
New to Armbian? Documentation: https://docs.armbian.com Support: https://forum.armbian.com
 
New root password: pass1234
Repeat password: pass1234

Choose default system command shell:

1) bash
2) zsh

Shell: BASH

Creating a new user account. Press  to abort

Please provide a username (eg. your forename): pi
Create password: pass1234
Repeat password: pass1234
 
Please provide your real name: Pi
 
Dear Pi, your account pi has been created and is sudo enabled.
Please use this account for your daily work from now on.
 
root@orangepizeroplus2-h5:~#

도메인 추가

/etc/resolv.conf 수정

pi@orangepizeroplus2-h5:~$ sudo vi /etc/resolv.conf

8.8.8.8 도메인 서버 추가

nameserver 8.8.8.8

네트워크 서비스 재시작

pi@orangepizeroplus2-h5:~$ sudo systemctl restart networking.service

OS 업데이트 오류 수정

pi@orangepizeroplus2-h5:~$ sudo apt -o Acquire::ForceIPv4=true -o Acquire::CompressionTypes::Order::=gz -o Acquire::http::No-Cache=true -o Acquire::BrokenProxy=true -o Acquire::http::Pipeline-Depth=0 updateh=0 update

Klipper 설치프로그램(KIAUH)

Klipper 설치프로그램(KIAUH) 다운로드

pi@orangepizeroplus2-h5:~$ git clone https://github.com/th33xitus/kiauh

Klipper 설치프로그램(KIAUH) 실행

pi@orangepizeroplus2-h5:~$ cd kiauh/
pi@orangepizeroplus2-h5:~/kiauh$ ./kiauh.sh

Klipper 설치

[1] 메뉴를 선택에서 Klipper 설치 메뉴로 이동
[1] 메뉴를 선택에서 Klipper 설치

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/
 
###### Initializing Klipper installation ...
 
/=======================================================\
|                    !!! WARNING !!!                    |
|        No Klipper configuration directory set!        |
|-------------------------------------------------------|
|  Before we can continue, KIAUH needs to know where    |
|  you want your printer configuration to be.           |
|                                                       |
|  Please specify a folder where your Klipper configu-  |
|  ration is stored or, if you don't have one yet, in   |
|  which it should be saved after the installation.     |
\=======================================================/
/=======================================================\
|  IMPORTANT:                                           |
|  Please enter the new path in the following format:   |
|  /home/pi/your_config_folder                          |
|                                                       |
|  By default 'klipper_config' is recommended!          |
\=======================================================/
 
###### Please set the Klipper config directory:
/home/pi/klipper_config
 
###### Set config directory to '/home/pi/klipper_config' ? (Y/n): Y
###### > Yes
 
###### Create KIAUH backup directory ...
>>>>>> Directory created!
>>>>>> No config directory found! Skipping backup ...
 
 
###### Directory set to '/home/pi/klipper_config'!

>>>>>> Config directory changed!
/=======================================================\
| Please select the number of Klipper instances to set  |
| up. The number of Klipper instances will determine    |
| the amount of printers you can run from this machine. |
|                                                       |
| WARNING: There is no limit on the number of instances |
| you can set up with this script.                      |
\=======================================================/
###### Number of Klipper instances to set up: 1
 
###### Install 1 instance(s)? (Y/n): Y
###### > Yes
 
###### Installing 1 Klipper instance(s) ...
 
###### Checking for the following dependencies:
● git
>>>>>> Dependencies already met! Continue...
 
###### Downloading Klipper ...
Cloning into 'klipper'...
remote: Enumerating objects: 28750, done.
 
###### Running apt-get update...
 
###### Installing packages...
 
###### Installing python virtual environment...
 
###### Creating Klipper Service  ...
Created symlink /etc/systemd/system/multi-user.target.wants/klipper.service → /etc/systemd/system/klipper.service.
>>>>>> Single Klipper instance created!
 
###### Launching Klipper instance ...
 
#########################################################
 Klipper has been set up!
#########################################################

Moonraker 설치

[4] 메뉴를 선택에서 Moonraker 설치

/=======================================================\
|     ~~~~~~~~~~~~~~~~~ [ KIAUH ] ~~~~~~~~~~~~~~~~~     |
|        Klipper Installation And Update Helper         |
|     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     |
\=======================================================/
 
###### Initializing Moonraker installation ...
 
###### Your Python 3 version is: Python 3.9.2
/=======================================================\
| 1 Klipper instance was found!                         |
| Usually you need one Moonraker instance per Klipper   |
| instance. Though you can install as many as you wish. |
\=======================================================/
 
###### Number of Moonraker instances to set up: 1
 
###### Install 1 instance(s)? (Y/n):
###### > Yes
 
###### Installing Moonraker ...
 
###### Downloading Moonraker ...
  
###### Creating moonraker.conf in /home/pi/klipper_config ...
>>>>>> moonraker.conf created!
 
###### Creating Moonraker Service  ...
 
###### Enabling moonraker.service ...
Created symlink /etc/systemd/system/multi-user.target.wants/moonraker.service → /etc/systemd/system/moonraker.service.
>>>>>> moonraker.service enabled!
>>>>>> Single Moonraker instance created!
 
###### Starting moonraker.service ...
>>>>>> moonraker.service started!
 
 
###### PolicyKit Version 0.105 Detected
 
 
###### Installing Moonraker PolicyKit Rules (Legacy) to /etc/polkit-1/localauthority/50-local.d/10-moonraker.pkla...
 
###### Restarting Moonraker...
 
#########################################################
 Moonraker has been set up!
#########################################################
 
       ● Instance 1: 192.168.1.103:7125

Fluidd 설치

[4] 메뉴를 선택에서 Fluidd 설치

 
###### Downloading MJPG-Streamer ...
 
###### Compiling MJPG-Streamer ...
 
###### Installing MJPG-Streamer ...
 
###### Creating webcam.txt config file ...
 
2022-03-15 04:28:42 (7.30 MB/s) - ‘/home/pi/klipper_config/webcam.txt’ saved [2593/2593]
 
>>>>>> Done!
 
###### Creating MJPG-Streamer service ...
>>>>>> MJPG-Streamer service created!
 
###### Starting MJPG-Streamer service ...
Created symlink /etc/systemd/system/multi-user.target.wants/webcamd.service → /etc/systemd/system/webcamd.service.
>>>>>> MJPG-Streamer service started!
 
###### Create logrotate rule ...
>>>>>> Done!
>>>>>> User pi already in group 'video'!
 
#########################################################
 MJPG-Streamer has been set up!
#########################################################
 
 ● Webcam URL: http://192.168.1.103:8080/?action=stream
 ● Webcam URL: http://192.168.1.103/webcam/?action=stream
 
 
#########################################################
 Fluidd has been set up!
#########################################################

Klipper 설치프로그램(KIAUH) 종료

[B] 메뉴를 선택해서 메인 메뉴로 이동
[Q] 메뉴를 선택해서 Klipper 설치프로그램 종료

 

728x90
728x90

출처

MJPG streamer 컴파일 관련 라이브러리 설치

pi@orangepiplus2e:~$ sudo apt update
pi@orangepiplus2e:~$ sudo apt upgrade 
pi@orangepiplus2e:~$ sudo apt-get install cmake libjpeg62-turbo-dev imagemagick libv4l-dev libgphoto2-dev

MJPG streamer 소스 다운로드, 컴파일, 설치

pi@orangepiplus2e:~$ git clone https://github.com/jacksonliam/mjpg-streamer.git
pi@orangepiplus2e:~$ cd mjpg-streamer/mjpg-streamer-experimental/
pi@orangepiplus2e:~/mjpg-streamer/mjpg-streamer-experimental$ make
pi@orangepiplus2e:~/mjpg-streamer/mjpg-streamer-experimental$ sudo make install

LD_LIBRARY_PATH 경로 추가

pi@orangepiplus2e:~/mjpg-streamer/mjpg-streamer-experimental$ echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib/mjpg-streamer" | sudo tee -a /etc/profile

MJPG Streamer 수동 실행

출처 : MJPG Streamer configuration

pi@orangepiplus2e:~/mjpg-streamer/mjpg-streamer-experimental$ mjpg_streamer -i "input_uvc.so -d /dev/video1 -n -f 25 -r 1280x720" --output "output_http.so -w /usr/local/share/mjpg-streamer/www --port 4998"
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
 i: Using V4L2 device.: /dev/video1
 i: Desired Resolution: 1280 x 720
 i: Frames Per Second.: 25
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: The specified resolution is unavailable, using: width 640 height 480 instead 
 o: www-folder-path......: /usr/local/share/mjpg-streamer/www/
 o: HTTP TCP port........: 4998
 o: HTTP Listen Address..: (null)
 o: username:password....: disabled
 o: commands.............: enabled

mjpg_streamer 실행스크립트

run-mjpg-streamer.sh 생성

pi@orangepiplus2e:~$ sudo vi /usr/local/bin/run-mjpg-streamer.sh

run-mjpg-streamer.sh

#!/bin/sh
#
# Script for docker
#
# created by : meinside@gmail.com
# last update: 2019.04.24.
#

################
# customize these:

# mjpg_streamer excutable's location
MJPG_STREAMER_BIN="mjpg_streamer"

# mjpg_streamer plugins' location
MJPG_STREAMER_PLUGINS_DIR="/usr/local/lib/mjpg-streamer"

# streaming port
MJPG_STREAMER_PORT=4998

# htmls and related files' location
MJPG_STREAMER_WWW="/usr/local/share/mjpg-streamer/www"

# video device
DEVICE_IN="/dev/video1"

# video settings
RESOLUTION=1920x1080
FPS=10

# authentication
USERNAME=""
PASSWORD=""
if [ ! -z $USERNAME ] && [ ! -z $PASSWORD ]; then
  AUTH="-c $USERNAME:$PASSWORD"
else
  AUTH=""
fi

# LED blink
LED="off"       # on/off/blink/auto (may not work on rpi camera modules)

# plugins
PLUGIN_IN="$MJPG_STREAMER_PLUGINS_DIR/input_uvc.so -d $DEVICE_IN -r $RESOLUTION -f $FPS -l $LED"
PLUGIN_OUT="$MJPG_STREAMER_PLUGINS_DIR/output_http.so -p $MJPG_STREAMER_PORT -w $MJPG_STREAMER_WWW $AUTH"



################
# run mjpg_streamer
$MJPG_STREAMER_BIN -i "$PLUGIN_IN" -o "$PLUGIN_OUT"
################

mjpg_streamer 실행스크립트 모드 변경

pi@orangepiplus2e:~$ sudo chmod u+x /usr/local/bin/run-mjpg-streamer.sh

서비스등록

mjpg-streamer.service 생성

pi@orangepiplus2e:~$ sudo vi /lib/systemd/system/mjpg-streamer.service

mjpg-streamer.service

[Unit]
Description=Streams video with Raspberry Pi Camera
After=syslog.target
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/bin/run-mjpg-streamer.sh
Restart=always
RestartSec=5
Environment=

[Install]
WantedBy=multi-user.target

등록

pi@orangepiplus2e:~$ sudo chmod u+x /lib/systemd/system/mjpg-streamer.service
pi@orangepiplus2e:~$ sudo systemctl enable mjpg-streamer.service
Created symlink /etc/systemd/system/multi-user.target.wants/mjpg-streamer.service → /lib/systemd/system/mjpg-streamer.service.

서비스 실행 및 실행 확인

pi@orangepiplus2e:~$ sudo systemctl start mjpg-streamer.service
pi@orangepiplus2e:~$ sudo systemctl status mjpg-streamer.service
● mjpg-streamer.service - Streams video with Raspberry Pi Camera
     Loaded: loaded (/lib/systemd/system/mjpg-streamer.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-03-12 11:22:57 KST; 22s ago
   Main PID: 5653 (run-mjpg-stream)
      Tasks: 4 (limit: 4501)
     Memory: 568.0K
        CPU: 91ms
     CGroup: /system.slice/mjpg-streamer.service
             ├─5653 /bin/sh /usr/local/bin/run-mjpg-streamer.sh
             └─5654 mjpg_streamer -i /usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video1 -r 1920x1080 -f 10 -l off -o /usr/local/lib/mjpg-streamer/>
 
 3월 12 11:23:03 orangepiplus2e run-mjpg-streamer.sh[5654]:  o: HTTP Listen Address..: (null)
 3월 12 11:23:03 orangepiplus2e run-mjpg-streamer.sh[5654]:  o: username:password....: disabled
 3월 12 11:23:03 orangepiplus2e run-mjpg-streamer.sh[5654]:  o: commands.............: enabled
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: www-folder-path......: /usr/local/share/mjpg-streamer/www/
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: HTTP TCP port........: 4998
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: HTTP Listen Address..: (null)
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: username:password....: disabled
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: commands.............: enabled
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: starting input plugin /usr/local/lib/mjpg-streamer/input_uvc.so
 3월 12 11:23:03 orangepiplus2e mjpg_streamer[5654]: MJPG-streamer [5654]: starting output plugin: /usr/local/lib/mjpg-streamer/output_http.so (ID: 00)
728x90
728x90

출처

Armbian Linux 이미지 다운로드

다운로드 : Orange Pi +2E – Armbian

Armbian Linux 이미지 복원

[Flash from file] 메뉴 선택
OS 이미지 파일 선택
[Select target] 메뉴 선택
SD 메모리 선택
[Flash!] 메뉴 선택

Armbian Linux 최기화 설정

초기 계정 / 암호 : root / 1234

Welcome to ARMBIAN! 
 
Documentation: https://docs.armbian.com | Community: https://forum.armbian.com
 
Create root password: pass1234
Repeat root password: pass1234
 
Support status: no support (unsupported userspace)

Choose default system command shell:

1) bash
2) zsh

Shell: BASH
 
Creating a new user account. Press  to abort
 
Please provide a username (eg. your first name): pi
Create user (pi) password: pass1234
Repeat user (pi) password: pass1234
 
Please provide your real name: Pi
 
Dear Pi, your account pi has been created and is sudo enabled.
Please use this account for your daily work from now on.
 
Detected timezone: Asia/Seoul
 
Set user language based on your location? [Y/n] Y
 
At your location, more locales are possible:
 
1) ko_KR.UTF-8
2) ko_KR.UTF-8
3) Skip generating locales
Please enter your choice:1
 
Generating locales: ko_KR.UTF-8
root@orangepiplus2e:~# 

WiFi 설정

WiFi 설정하기 위해서 armbian-config 실행

pi@orangepiplus2e:~$ sudo armbian-config

WiFi 설정

Network 메뉴 선택
WiFi 메뉴 선택
WiFi 목록에서 접속하려고 하는 SSID 선택
WiFi 비밀번호 입력

728x90
728x90

출처

Orange Pi Zero2

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

728x90
728x90

출처

"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
728x90
728x90

출처

카메라(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 ...
728x90

+ Recent posts