= !BeagleBone Black(Debian8.7)にEPICSをインストール = 以前、!BeagleBone Black(以降、BBB)でcapeを作った時には、defaultOSがAngstromLinuxだったが、BBBがRev.CになってからはDebianがdefaultOSになっている。[[br]] しばらく、BBBを使う用事がなかったので放置していたが、簡易版の電圧測定をするためのEPICS IOCデバイスを作ることになったので、この際にBBB用のEPICS環境作成をしてみた。[[br]] == OS == 今回環境を作成するBBBのOSは、Debianの最新版 8.7(Jessie for !BeagleBone via microSD card)をmicroSDカード上に展開して使用した。[[br]] コンパイルはBBB上のセルフビルドで行った。[[br]] 環境は/opt/epicsに展開し、standaloneで実行できるようにする。 {{{ root@beaglebone:~# mkdir -p /opt/epics }}} == EPICS base R3.15.5 == 使用するEPICS baseは安定版の最新である[http://www.aps.anl.gov/epics/base/R3-15/5.php 3.15.5]。[[br]] 前回作成した時はR3.14.12.3で、その時からmake一発でコンパイルできたので今回も同じ。[[br]] {{{ root@beaglebone:~# cd /opt/epics root@beaglebone:/opt/epics# mkdir -p R315.5/src root@beaglebone:/opt/epics# cd R315.5/src root@beaglebone:/opt/epics/R315.5/src# wget https://www.aps.anl.gov/epics/download/base/base-3.15.5.tar.gz root@beaglebone:/opt/epics/R315.5/src# cd .. root@beaglebone:/opt/epics/R315.5# tar zxvf base-3.15.5.tar.gz root@beaglebone:/opt/epics/R315.5# mv base-3.15.5 base root@beaglebone:/opt/epics/R315.5# cd base root@beaglebone:/opt/epics/R315.5/base# make }}} == modules/soft == 次によく使うmodulesをインストール。 {{{ root@beaglebone:/opt/epics/R315.5# mkdir -p modules/soft }}} === sequencer === インストール前にパッケージをインストール。 {{{ root@beaglebone:/opt/epics/R315.5# apt-get install re2c }}} 展開してmake。 {{{ root@beaglebone:/opt/epics/R315.5# mkdir -p modules/soft/seq root@beaglebone:/opt/epics/R315.5# cd src root@beaglebone:/opt/epics/R315.5/src# wget http://www-csr.bessy.de/control/SoftDist/sequencer/releases/seq-2.2.4.tar.gz root@beaglebone:/opt/epics/R315.5/src# cd ../modules/soft/seq root@beaglebone:/opt/epics/R315.5/modules/soft/seq# tar zxvf /opt/epics/R315.5/src/seq-2.2.4.tar.gz root@beaglebone:/opt/epics/R315.5/modules/soft/seq# mv seq-2.2.4 2.2.4 root@beaglebone:/opt/epics/R315.5/modules/soft/seq# cd 2.2.4/ root@beaglebone:/opt/epics/R315.5/modules/soft/seq/2.2.4# emacs -nw configure/RELEASE EPICS_BASE=/opt/epics/R315.5/base root@beaglebone:/opt/epics/R315.5/modules/soft/seq/2.2.4# make }}} === asyn === asynも普通にmakeできる。 {{{ root@beaglebone:/opt/epics/R315.5# mkdir -p modules/soft/asyn root@beaglebone:/opt/epics/R315.5# cd src root@beaglebone:/opt/epics/R315.5/src# wget https://www.aps.anl.gov/epics/download/modules/asyn4-31.tar.gz root@beaglebone:/opt/epics/R315.5/src# cd ../modules/soft/asyn root@beaglebone:/opt/epics/R315.5/modules/soft/asyn# tar zxvf /opt/epics/R315.5/src/asyn4-31.tar.gz root@beaglebone:/opt/epics/R315.5/modules/soft/asyn# mv asyn4-31 4-31 root@beaglebone:/opt/epics/R315.5/modules/soft/asyn# cd 4-31/ root@beaglebone:/opt/epics/R315.5/modules/soft/asyn/4-31# emacs -nw configure/RELEASE #RELEASE Location of external products #SUPPORT=/corvette/home/epics/devel #-include $(TOP)/../configure/SUPPORT.$(EPICS_HOST_ARCH) # IPAC is only necessary if support for Greensprings IP488 is required # IPAC release V2-7 or later is required. #IPAC=$(SUPPORT)/ipac-2-14 # SEQ is required for testIPServer #SNCSEQ=$(SUPPORT)/seq-2-2-4 SNCSEQ=$(EPICS_BASE)/../modules/soft/seq/2.2.4/ # EPICS_BASE 3.14.6 or later is required #EPICS_BASE=/corvette/usr/local/epics-devel/base-3.15.5 EPICS_BASE=/opt/epics/R315.5/base -include $(TOP)/../configure/EPICS_BASE.$(EPICS_HOST_ARCH) root@beaglebone:/opt/epics/R315.5/modules/soft/asyn/4-31# make }}} === streamdevice === streamdeviceも同じ。 == modules/instruments == BBBのIOを使うために専用(?)のmoduleをmakeする。 === devgpio === === drvAsynI2C === == extensions == extensionsのconfig fileをダウンロードして展開。 {{{ root@beaglebone:/opt/epics/R315.5# cd src/ root@beaglebone:/opt/epics/R315.5/src# wget https://www.aps.anl.gov/epics/download/extensions/extensionsTop_20120904.tar.gz root@beaglebone:/opt/epics/R315.5/src# cd .. root@beaglebone:/opt/epics/R315.5# tar zxvf src/extensionsTop_20120904.tar.gz }}} === procServ === procServはなんか新しくなったみたい。githubに入っていたので、masterのzipを取得。 {{{ root@beaglebone:/opt/epics/R315.5/extensions# cd src/ root@beaglebone:/opt/epics/R315.5/extensions/src# wget https://github.com/ralphlange/procServ/archive/master.zip : 2017-06-21 00:16:04 (337 KB/s) - ‘master.zip’ saved [76417] root@beaglebone:/opt/epics/R315.5/extensions/src# mv master.zip procServ.zip root@beaglebone:/opt/epics/R315.5/extensions/src# unzip procServ.zip }}} 展開したソースをmake。 {{{ root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# make Cleaning autotools debris rm -f configure aclocal.m4 Makefile.in Makefile.Automake.in; autoreconf -si configure.ac:32: installing 'build-aux/compile' configure.ac:14: installing 'build-aux/config.guess' configure.ac:14: installing 'build-aux/config.sub' configure.ac:15: installing 'build-aux/install-sh' configure.ac:15: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# ls acceptFactory.cc build-aux connectionItem.cc libtelnet.c Makefile.in procServ.h aclocal.m4 ChangeLog COPYING libtelnet.h NEWS procServ.spec appveyor.yml clientFactory.cc debian makefile processClass.h procServ.txt AUTHORS configure forkpty.c Makefile.am processFactory.cc README.md autom4te.cache configure.ac INSTALL Makefile.Epics.in procServ.cc root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# ./configure : configure: error: Documentation not found. Use --disable-doc to skip installing it, or --enable-doc to generate it }}} configureでエラーになる。gitHubのREADMEに、asciidocとlibtelnetに依存関係があるというので、asciidocのパッケージをaptで検索。[[br]] {{{ root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# apt-cache search asciidoc asciidoc - Highly configurable text format for writing documentation asciidoctor - AsciiDoc to HTML rendering for Ruby asciidoctor-doc - AsciiDoc to HTML rendering for Ruby (documentation) root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# apt-get install asciidoc Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dblatex docbook-dsssl docbook-utils docbook-xml docbook-xsl fonts-lmodern fonts-texgyre jadetex libaudio2 libauthen-sasl-perl libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl libfile-homedir-perl libfile-listing-perl libfile-mimeinfo-perl libfile-which-perl libfont-afm-perl libfontenc1 libharfbuzz-icu0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libkpathsea6 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmng1 libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libopenjpeg5 libosp5 libostyle1c2 libpoppler-qt4-4 libpoppler46 libpotrace0 libptexenc1 libqt4-xml libqtcore4 libqtgui4 libruby2.1 libsgmls-perl libsp1c2 libsynctex1 libtcl8.6 libtie-ixhash-perl libtk8.6 liburi-perl libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl libxml2-utils libxslt1.1 libxss1 libyaml-0-2 libyaml-tiny-perl libzzip-0-13 lmodern lynx lynx-cur openjade prerex preview-latex-style prosper ps2eps python-apt python-apt-common qtcore4-l10n ruby ruby2.1 rubygems-integration sgml-base sgml-data sgmlspl sp tcl tcl8.6 tex-common tex-gyre texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-fonts-recommended-doc texlive-generic-recommended texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-math-extra texlive-pictures texlive-pictures-doc texlive-pstricks texlive-pstricks-doc tipa tk tk8.6 vprerex x11-utils xdg-utils xml-core xmlto xsltproc xterm zip Suggested packages: source-highlight vim-addon-manager docbook graphicsmagick-imagemagick-compat imagemagick latex-cjk-all opensp pdf-viewer texlive-lang-all texlive-lang-cyrillic texlive-xetex transfig docbook-dsssl-doc docbook-defguide dbtoepub docbook-xsl-doc-html docbook-xsl-doc-pdf docbook-xsl-doc-text docbook-xsl-doc docbook-xsl-saxon fop libsaxon-java libxalan2-java libxslthl-java xalan nas libdigest-hmac-perl libgssapi-perl libdata-dump-perl libcrypt-ssleay-perl qt4-qtconfig sgmls-doc libauthen-ntlm-perl libunicode-map8-perl libunicode-string-perl xml-twig-tools doc-base python-apt-dbg python-gtk2 python-vte python-apt-doc ri ruby-dev bundler sgml-base-doc perlsgml w3-recs tcl-tclreadline perl-tk latexdiff latexmk dvidvi fragmaster lacheck purifyeps xindy chktex dvipng psutils t1utils python-pygments libtcltk-ruby dot2tex gvfs-bin xmltex xfonts-cyrillic Recommended packages: wish The following NEW packages will be installed: asciidoc dblatex docbook-dsssl docbook-utils docbook-xml docbook-xsl fonts-lmodern fonts-texgyre jadetex libaudio2 libauthen-sasl-perl libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl libfile-homedir-perl libfile-listing-perl libfile-mimeinfo-perl libfile-which-perl libfont-afm-perl libfontenc1 libharfbuzz-icu0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libkpathsea6 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmng1 libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libopenjpeg5 libosp5 libostyle1c2 libpoppler-qt4-4 libpoppler46 libpotrace0 libptexenc1 libqt4-xml libqtcore4 libqtgui4 libruby2.1 libsgmls-perl libsp1c2 libsynctex1 libtcl8.6 libtie-ixhash-perl libtk8.6 liburi-perl libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl libxml2-utils libxslt1.1 libxss1 libyaml-0-2 libyaml-tiny-perl libzzip-0-13 lmodern lynx lynx-cur openjade prerex preview-latex-style prosper ps2eps python-apt python-apt-common qtcore4-l10n ruby ruby2.1 rubygems-integration sgml-base sgml-data sgmlspl sp tcl tcl8.6 tex-common tex-gyre texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-fonts-recommended-doc texlive-generic-recommended texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-math-extra texlive-pictures texlive-pictures-doc texlive-pstricks texlive-pstricks-doc tipa tk tk8.6 vprerex x11-utils xdg-utils xml-core xmlto xsltproc xterm zip 0 upgraded, 125 newly installed, 0 to remove and 0 not upgraded. Need to get 760 MB of archives. After this operation, 1,251 MB of additional disk space will be used. }}} ディスク容量を食いそうなのでパス。次にlibtelnet。 {{{ root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# apt-cache search libtelnet libtelnet-dev - Small library for parsing the TELNET protocol - development files libtelnet-utils - Small library for parsing the TELNET protocol - utilities libtelnet2 - Small library for parsing the TELNET protocol - shared library root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# apt-get install libtelnet-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libtelnet2 Suggested packages: libtelnet-utils telnet The following NEW packages will be installed: libtelnet-dev libtelnet2 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 44.0 kB of archives. After this operation, 145 kB of additional disk space will be used. Do you want to continue? [Y/n] : }}} libtelnetは問題ないのでインストールした。[[br]] 本体のコンパイル。[[br]] gitHubのREADMEに{{{Building with the EPICS Build System}}}とあるので、{{{--with-epics-top}}}オプションを設定する。[[br]] docは必要ないのでdisable。 {{{ root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# ./configure --with-epics-top=../.. --disable-doc root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# make : root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# make install : root@beaglebone:/opt/epics/R315.5/extensions/src/procServ-master# ls -la /opt/epics/R315.5/extensions/bin/linux-arm total 248 drwxr-xr-x 2 root root 4096 Jun 21 00:44 . drwxr-xr-x 3 root root 4096 Jun 21 00:44 .. -r-xr-xr-x 1 root root 243604 Jun 21 00:44 procServ }}}