pi@raspberrypi:~$ git clone https://github.com/thaytan/gst-rpicamsrc.git
pi@raspberrypi:~$ cd gst-rpicamsrc
빌드
pi@raspberrypi:~/gst-rpicamsrc$ ./autogen.sh
pi@raspberrypi:~/gst-rpicamsrc$ make
설치
pi@raspberrypi:~/gst-rpicamsrc$ sudo make install
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
테스트
pi@raspberrypi:~$ gst-inspect-1.0 | grep rpicamsrc
rpicamsrc: rpicamsrcdeviceprovider (GstDeviceProviderFactory)
rpicamsrc: rpicamsrc: Raspberry Pi Camera Source
pi@raspberrypi:~/gst-rtsp-server$ sudo apt install meson
pi@raspberrypi:~/gst-rtsp-server$ meson buil
The Meson build system
Version: 0.52.1
Source dir: /home/pi/gst-rtsp-server
Build dir: /home/pi/gst-rtsp-server/buil
Build type: native build
Project name: gst-rtsp-server
Project version: 1.12.5
C compiler for the host machine: cc (gcc 8.3.0 "cc (Raspbian 8.3.0-6+rpi1) 8.3.0")
C linker for the host machine: GNU ld.bfd 2.31.1
Host machine cpu family: arm
Host machine cpu: armv7l
Configuring config.h using configuration
Found pkg-config: /usr/bin/pkg-config (0.29)
Run-time dependency glib-2.0 found: YES 2.58.3
Run-time dependency gstreamer-1.0 found: YES 1.14.4
Run-time dependency gstreamer-rtsp-1.0 found: YES 1.14.4
Run-time dependency gstreamer-rtp-1.0 found: YES 1.14.4
Run-time dependency gstreamer-sdp-1.0 found: YES 1.14.4
Run-time dependency gstreamer-app-1.0 found: YES 1.14.4
Run-time dependency gstreamer-net-1.0 found: YES 1.14.4
Program g-ir-scanner found: NO
Found CMake: /usr/bin/cmake (3.13.4)
Run-time dependency libcgroup found: NO (tried pkgconfig and cmake)
Configuring gstreamer-rtsp-server-1.0.pc using configuration
Configuring gstreamer-rtsp-server-1.0-uninstalled.pc using configuration
pkgconfig/meson.build:22: WARNING: The variable(s) 'srcdir' in the input file 'pkgconfig/gstreamer-rtsp-server-uninstalled.pc.in' are not present in the given configuration data.
Build targets in project: 18
Found ninja-1.8.2 at /usr/bin/ninja
설치
pi@raspberrypi:~/gst-rpicamsrc$ sudo make install
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
pi@raspberrypi:~/gst-rtsp-server$ ./autogen.sh
Configuration
Version : 1.12.5
Source code location : .
Prefix : /usr/local
Compiler : gcc
CGroups example : no
gst-rtsp-server configured. Type 'make' to build.
Now type 'make' to compile gst-rtsp-server.
pi@raspberrypi:~/gst-rtsp-server$ make
GStreamer RTSP Server 설치
pi@raspberrypi:~/gst-rtsp-server$ sudo make install
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib/gstreamer-1.0
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
-- Installing ./html/GstRTSPAddressPool.html
-- Installing ./html/GstRTSPAuth.html
-- Installing ./html/GstRTSPClient.html
-- Installing ./html/GstRTSPContext.html
-- Installing ./html/GstRTSPMedia.html
-- Installing ./html/GstRTSPMediaFactory.html
-- Installing ./html/GstRTSPMediaFactoryURI.html
-- Installing ./html/GstRTSPMountPoints.html
-- Installing ./html/GstRTSPPermissions.html
-- Installing ./html/GstRTSPServer.html
-- Installing ./html/GstRTSPSession.html
-- Installing ./html/GstRTSPSessionMedia.html
-- Installing ./html/GstRTSPSessionPool.html
-- Installing ./html/GstRTSPStream.html
-- Installing ./html/GstRTSPStreamTransport.html
-- Installing ./html/GstRTSPThreadPool.html
-- Installing ./html/GstRTSPToken.html
-- Installing ./html/annotation-glossary.html
-- Installing ./html/api-index-full.html
-- Installing ./html/ch01.html
-- Installing ./html/gst-rtsp-server-GstRTSPParams.html
-- Installing ./html/gst-rtsp-server-GstRTSPSdp.html
-- Installing ./html/index.html
-- Installing ./html/rtsp-server-hierarchy.html
-- Installing ./html/home.png
-- Installing ./html/left-insensitive.png
-- Installing ./html/left.png
-- Installing ./html/right-insensitive.png
-- Installing ./html/right.png
-- Installing ./html/up-insensitive.png
-- Installing ./html/up.png
-- Installing ./html/style.css
-- Installing ./html/gst-rtsp-server-1.0.devhelp2
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> |
| |
+---------------------------------------------------------------------+
pi@raspberrypi:~$ cd Downloads/
pi@raspberrypi:~/Downloads$ unzip CodeTyphonIns.zip
Qt 버전 확인
pi@raspberrypi:~$ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/arm-linux-gnueabihf/qt4/bin"
QTLIBDIR="/usr/lib/arm-linux-gnueabihf"
pi@raspberrypi:~$ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/arm-linux-gnueabihf
Qt4pas 라이브러리 설치 (Option : CodeTyphon 설치시 11) -- Platform (widget) Setup 에서 실행)
pi@raspberrypi:~/Downloads$ cd CodeTyphonIns/installbin/ScriptsLin
pi@raspberrypi:~/Downloads/CodeTyphonIns/installbin/ScriptsLin$ vi ln_Typhon1_QT4pas_Build.sh
i386-linux-gnu를 arm-linux-gnueabihf 수정
# ---- these settings are for Ubuntu Linux -------
if [ $vBits = 32 ] ;
then
# vQMake=/usr/lib/i386-linux-gnu/qt4/bin/qmake
vQMake=/usr/lib/arm-linux-gnueabihf/qt4/bin/qmake
else
vQMake=/usr/lib/x86_64-linux-gnu/qt4/bin/qmake
fi
qt4pas.7z 압축을 풀어서 i386-linux 폴더를 arm-linux 복사하고 다시 압축
수동 컴파일 및 설치
pi@raspberrypi:~/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/arm-linux-gnueabihf/libQt4Pas.so.5.2.8"
strip --strip-unneeded "/usr/lib/arm-linux-gnueabihf/libQt4Pas.so.5.2.8"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/arm-linux-gnueabihf/libQt4Pas.so"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/arm-linux-gnueabihf/libQt4Pas.so.5"
ln -f -s "libQt4Pas.so.5.2.8" "/usr/lib/arm-linux-gnueabihf/libQt4Pas.so.5.2"
---------------------------------------
[INFO]: QT4pas Libraries finish Build OK for arm-linux
---------------------------------------------------------
Make QT4Pas Libraries Links
---------------------------------------------------------
[INFO] Make QT4pas links to /usr/lib/arm-linux-gnueabihf/ for arm-linux finish OK
CodeTyphon 설치 스크립트 실행
pi@raspberrypi:~/Downloads$ cd CodeTyphonIns/
pi@raspberrypi:~/Downloads/CodeTyphonIns$ ./install.sh
0번 선택
====================================================
CodeTyphon Studio
Version 7.30 (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 Linux32
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): 11
2번 QT4 선택
====================================================
CodeTyphon Studio Unix Platform (widget) Setup
Current Platform: qt4
====================================================
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 Linux32
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
0번 선택 ( 0) Install System Libraries )
====================================================
CodeTyphon Studio 7.20 Setup for Linux32
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): 0
8번 선택 ( 8) Remove and Build ALL )
====================================================
CodeTyphon Studio 7.20 Setup for Linux32
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): 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
$ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2835
Revision : 9000c1
Serial : 00000000xxxxxxxx
Model : Raspberry Pi Zero W Rev 1.1
instruction set architecture (ISA)
$ uname -m
armv6l
커널에 대한 정보
$ uname -a
Linux raspberrypi 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU/Linux
OS버전에 대한 정보
$ cat /etc/issue
Raspbian GNU/Linux 10 \n \l
논리 코어 수 확인
$ grep -c processor /proc/cpuinfo
2
swap 사이즈 설정
tensorflow 설치시 2G 정도의 메모리가 필요 하므로, swap 사이즈을 늘려주고, 설치가 끝나면 원복 필요
현재 swap 사이즈 확인
$ free -h
total used free shared buff/cache available
Mem: 432Mi 143Mi 48Mi 14Mi 241Mi 224Mi
Swap: 99Mi 99Mi 0.0Ki
$ 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'