BCM 라이브러리 다운로드 및 설치 명령어
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
C
복사
로그기록
pi@raspberrypi:~ $ wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
--2021-01-18 22:22:02-- http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
Resolving www.airspayce.com (www.airspayce.com)... 192.185.48.187
Connecting to www.airspayce.com (www.airspayce.com)|192.185.48.187|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 258007 (252K) [application/x-gzip]
Saving to: ‘bcm2835-1.52.tar.gz’
bcm2835-1.52.tar.gz 100%[============================================>] 251.96K 271KB/s in 0.9s
2021-01-18 22:22:03 (271 KB/s) - ‘bcm2835-1.52.tar.gz’ saved [258007/258007]
pi@raspberrypi:~ $
C
복사
알집 파일 풀기 명령어
tar zxvf bcm2835-1.52.tar.gz
C
복사
로그기록
pi@raspberrypi:~ $ tar zxvf bcm2835-1.52.tar.gz
bcm2835-1.52/
bcm2835-1.52/configure.ac
bcm2835-1.52/COPYING
bcm2835-1.52/examples/
bcm2835-1.52/examples/spi/
bcm2835-1.52/examples/spi/spi.c
bcm2835-1.52/examples/input/
bcm2835-1.52/examples/input/input.c
bcm2835-1.52/examples/event/
bcm2835-1.52/examples/event/event.c
bcm2835-1.52/examples/pwm/
bcm2835-1.52/examples/pwm/pwm.c
bcm2835-1.52/examples/gpio/
bcm2835-1.52/examples/gpio/gpio.c
bcm2835-1.52/examples/blink/
bcm2835-1.52/examples/blink/blink.c
bcm2835-1.52/examples/spin/
bcm2835-1.52/examples/spin/spin.c
bcm2835-1.52/examples/i2c/
bcm2835-1.52/examples/i2c/i2c.c
bcm2835-1.52/config.guess
bcm2835-1.52/NEWS
bcm2835-1.52/depcomp
bcm2835-1.52/configure
bcm2835-1.52/aclocal.m4
bcm2835-1.52/compile
bcm2835-1.52/INSTALL
bcm2835-1.52/Makefile.in
bcm2835-1.52/missing
bcm2835-1.52/config.sub
bcm2835-1.52/Makefile.am
bcm2835-1.52/ChangeLog
bcm2835-1.52/README
bcm2835-1.52/install-sh
bcm2835-1.52/config.h.in
bcm2835-1.52/src/
bcm2835-1.52/src/test.c
bcm2835-1.52/src/bcm2835.h
bcm2835-1.52/src/bcm2835.c
bcm2835-1.52/src/Makefile.in
bcm2835-1.52/src/Makefile.am
bcm2835-1.52/ltmain.sh
bcm2835-1.52/AUTHORS
bcm2835-1.52/doc/
bcm2835-1.52/doc/Doxyfile.in
bcm2835-1.52/doc/Makefile.in
bcm2835-1.52/doc/Makefile.am
bcm2835-1.52/test-driver
C
복사
폴더에 들어가는 명령어
cd bcm2835-1.52/
C
복사
설치를 위한 명령어 순서들
./configure
make
sudo make check
sudo make install
C
복사
로그기록
pi@raspberrypi:~ $ cd bcm2835-1.52/
pi@raspberrypi:~/bcm2835-1.52 $ ./config
bash: ./config: No such file or directory
pi@raspberrypi:~/bcm2835-1.52 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
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 whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for clock_gettime in -lrt... yes
checking for doxygen... no
configure: WARNING: Doxygen not found - continuing without Doxygen support
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
pi@raspberrypi:~/bcm2835-1.52 $ make
make all-recursive
make[1]: Entering directory '/home/pi/bcm2835-1.52'
Making all in src
make[2]: Entering directory '/home/pi/bcm2835-1.52/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bcm2835.o -MD -MP -MF .deps/bcm2835.Tpo -c -o bcm2835.o bcm2835.c
mv -f .deps/bcm2835.Tpo .deps/bcm2835.Po
rm -f libbcm2835.a
ar cru libbcm2835.a bcm2835.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libbcm2835.a
make[2]: Leaving directory '/home/pi/bcm2835-1.52/src'
Making all in doc
make[2]: Entering directory '/home/pi/bcm2835-1.52/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/pi/bcm2835-1.52/doc'
make[2]: Entering directory '/home/pi/bcm2835-1.52'
make[2]: Leaving directory '/home/pi/bcm2835-1.52'
make[1]: Leaving directory '/home/pi/bcm2835-1.52'
pi@raspberrypi:~/bcm2835-1.52 $ sudo make check
Making check in src
make[1]: Entering directory '/home/pi/bcm2835-1.52/src'
make test
make[2]: Entering directory '/home/pi/bcm2835-1.52/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o test.c
test.c: In function ‘main’:
test.c:16:9: warning: implicit declaration of function ‘geteuid’; did you mean ‘getenv’? [-Wimplicit-function-declaration]
if (geteuid() == 0 && !getenv("FAKEROOTKEY"))
^~~~~~~
getenv
mv -f .deps/test.Tpo .deps/test.Po
gcc -g -O2 -o test test.o ./libbcm2835.a -lrt
make[2]: Leaving directory '/home/pi/bcm2835-1.52/src'
make check-TESTS
make[2]: Entering directory '/home/pi/bcm2835-1.52/src'
make[3]: Entering directory '/home/pi/bcm2835-1.52/src'
PASS: test
============================================================================
Testsuite summary for bcm2835 1.52
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/pi/bcm2835-1.52/src'
make[2]: Leaving directory '/home/pi/bcm2835-1.52/src'
make[1]: Leaving directory '/home/pi/bcm2835-1.52/src'
Making check in doc
make[1]: Entering directory '/home/pi/bcm2835-1.52/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/pi/bcm2835-1.52/doc'
make[1]: Entering directory '/home/pi/bcm2835-1.52'
make[1]: Leaving directory '/home/pi/bcm2835-1.52'
pi@raspberrypi:~/bcm2835-1.52 $ sudo make install
Making install in src
make[1]: Entering directory '/home/pi/bcm2835-1.52/src'
make[2]: Entering directory '/home/pi/bcm2835-1.52/src'
/usr/bin/mkdir -p '/usr/local/lib'
/usr/bin/install -c -m 644 libbcm2835.a '/usr/local/lib'
( cd '/usr/local/lib' && ranlib libbcm2835.a )
/usr/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 bcm2835.h '/usr/local/include'
make[2]: Leaving directory '/home/pi/bcm2835-1.52/src'
make[1]: Leaving directory '/home/pi/bcm2835-1.52/src'
Making install in doc
make[1]: Entering directory '/home/pi/bcm2835-1.52/doc'
make[2]: Entering directory '/home/pi/bcm2835-1.52/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/pi/bcm2835-1.52/doc'
make[1]: Leaving directory '/home/pi/bcm2835-1.52/doc'
make[1]: Entering directory '/home/pi/bcm2835-1.52'
make[2]: Entering directory '/home/pi/bcm2835-1.52'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/pi/bcm2835-1.52'
make[1]: Leaving directory '/home/pi/bcm2835-1.52'
pi@raspberrypi:~/bcm2835-1.52 $
C
복사
안녕하세요
•
한국전자기술연구원 김영광입니다.
•
관련 기술 문의와 R&D 공동 연구 사업 관련 문의는 “glory@keti.re.kr”로 연락 부탁드립니다.
Hello 
•
I'm Yeonggwang Kim from the Korea Electronics Research Institute.
•
For technical and business inquiries, please contact me at “glory@keti.re.kr”