作成したBeagleBone Black実行環境にデバッグツールをインストール

前回までに作成したKernel 3.8.13ベースのBBB起動環境にデバッグツールをインストールすることとする。
現時点、Kernelドライバの開発までは考えていないので、ユーザーランドデバッグ用途のみ。
具体的にはgdb, strace, valgrind, tcpdumpが欲しい。
つい最近知ったのだが、valgrindはarmやmipsをサポートしている。
のみならず、arm/androidまでサポートしているとのこと。
see http://valgrind.org/info/platforms.html

先ずはapt-get update。

debian@beaglebone:~$ sudo apt-get update
Get:1 http://ftp.us.debian.org wheezy Release.gpg [1,655 B]
Get:2 http://debian.beagleboard.org wheezy-bbb Release.gpg [490 B]
Get:3 http://debian.beagleboard.org wheezy-bbb Release [3,403 B]
Get:4 http://ftp.us.debian.org wheezy-updates Release.gpg [836 B]
Get:5 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:6 http://ftp.us.debian.org wheezy Release [168 kB]
Get:7 http://debian.beagleboard.org wheezy-bbb/main armhf Packages [18.8 kB]
Get:8 http://security.debian.org wheezy/updates Release [102 kB]
Get:9 http://ftp.us.debian.org wheezy-updates Release [124 kB]
Get:10 http://ftp.us.debian.org wheezy/main armel Packages [7,465 kB]
Get:11 http://security.debian.org wheezy/updates/main armel Packages [262 kB]
Ign http://debian.beagleboard.org wheezy-bbb/main Translation-en_US
Ign http://debian.beagleboard.org wheezy-bbb/main Translation-en
Get:12 http://security.debian.org wheezy/updates/contrib armel Packages [20 B]
Get:13 http://security.debian.org wheezy/updates/non-free armel Packages [20 B]
Get:14 http://security.debian.org wheezy/updates/main armhf Packages [260 kB]
Get:15 http://security.debian.org wheezy/updates/contrib armhf Packages [20 B]
Get:16 http://security.debian.org wheezy/updates/non-free armhf Packages [20 B]
Get:17 http://security.debian.org wheezy/updates/contrib Translation-en [14 B]
Get:18 http://security.debian.org wheezy/updates/main Translation-en [123 kB]
Get:19 http://security.debian.org wheezy/updates/non-free Translation-en [14 B]
Get:20 http://ftp.us.debian.org wheezy/contrib armel Packages [40.2 kB]
Get:21 http://ftp.us.debian.org wheezy/non-free armel Packages [70.2 kB]
Get:22 http://ftp.us.debian.org wheezy/main armhf Packages [7,433 kB]
Get:23 http://ftp.us.debian.org wheezy/contrib armhf Packages [39.3 kB]
Get:24 http://ftp.us.debian.org wheezy/non-free armhf Packages [67.7 kB]
Get:25 http://ftp.us.debian.org wheezy/contrib Translation-en [34.8 kB]
Get:26 http://ftp.us.debian.org wheezy/main Translation-en [3,847 kB]
Get:27 http://ftp.us.debian.org wheezy/non-free Translation-en [66.1 kB]
Get:28 http://ftp.us.debian.org wheezy-updates/main armel Packages [6,054 B]
Get:29 http://ftp.us.debian.org wheezy-updates/contrib armel Packages [20 B]
Get:30 http://ftp.us.debian.org wheezy-updates/non-free armel Packages [20 B]
Get:31 http://ftp.us.debian.org wheezy-updates/main armhf Packages [6,007 B]
Get:32 http://ftp.us.debian.org wheezy-updates/contrib armhf Packages [20 B]
Get:33 http://ftp.us.debian.org wheezy-updates/non-free armhf Packages [20 B]
Get:34 http://ftp.us.debian.org wheezy-updates/contrib Translation-en [14 B]
Get:35 http://ftp.us.debian.org wheezy-updates/main Translation-en/DiffIndex [919 B]
Get:36 http://ftp.us.debian.org wheezy-updates/non-free Translation-en [14 B]
Get:37 http://ftp.us.debian.org wheezy-updates/main 2014-06-16-2054.31.pdiff [501 B]
Get:38 http://ftp.us.debian.org wheezy-updates/main 2014-06-16-2054.31.pdiff [501 B]
Fetched 20.1 MB in 1min 45s (191 kB/s)
Reading package lists... Done
debian@beaglebone:~$

次にapt-get upgrade。
ログは長いので省略する。

debian@beaglebone:~$ sudo apt-get upgrade

gdbはデフォルトでインストールされているようだ。

debian@beaglebone:~$ sudo apt-get install gdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
gdb is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
debian@beaglebone:~$

straceのインストール。

debian@beaglebone:~$ sudo apt-get install strace
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  strace
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 kB of archives.
After this operation, 268 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ wheezy/main strace armhf 4.5.20-2.3 [119 kB]
Fetched 119 kB in 1s (78.2 kB/s)
Selecting previously unselected package strace.
(Reading database ... 61321 files and directories currently installed.)
Unpacking strace (from .../strace_4.5.20-2.3_armhf.deb) ...
Processing triggers for man-db ...
Setting up strace (4.5.20-2.3) ...
debian@beaglebone:~$

引き続きvalgrindのインストールを行う。

debian@beaglebone:~$ sudo apt-get install libc6-dbg valgrind
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  valgrind-dbg
Suggested packages:
  valgrind-mpi kcachegrind alleyoop valkyrie
The following NEW packages will be installed:
  libc6-dbg valgrind valgrind-dbg
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.3 MB of archives.
After this operation, 127 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org/debian/ wheezy/main valgrind armhf 1:3.7.0-6 [15.4 MB]
Get:2 http://security.debian.org/ wheezy/updates/main libc6-dbg armhf 2.13-38+deb7u4 [2,779 kB]
Get:3 http://ftp.us.debian.org/debian/ wheezy/main valgrind-dbg armhf 1:3.7.0-6 [28.1 MB]
Fetched 46.3 MB in 55s (830 kB/s)
Selecting previously unselected package libc6-dbg:armhf.
(Reading database ... 61334 files and directories currently installed.)
Unpacking libc6-dbg:armhf (from .../libc6-dbg_2.13-38+deb7u4_armhf.deb) ...
Selecting previously unselected package valgrind.
Unpacking valgrind (from .../valgrind_1%3a3.7.0-6_armhf.deb) ...
Selecting previously unselected package valgrind-dbg.
Unpacking valgrind-dbg (from .../valgrind-dbg_1%3a3.7.0-6_armhf.deb) ...
Processing triggers for man-db ...
Setting up libc6-dbg:armhf (2.13-38+deb7u4) ...
Setting up valgrind (1:3.7.0-6) ...
Setting up valgrind-dbg (1:3.7.0-6) ...
debian@beaglebone:~$

最後にtcpdumpのインストールを行う。

debian@beaglebone:~$ sudo apt-get install tcpdump
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tcpdump
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 391 kB of archives.
After this operation, 751 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ wheezy/main tcpdump armhf 4.3.0-1 [391 kB]
Fetched 391 kB in 2s (138 kB/s)
Selecting previously unselected package tcpdump.
(Reading database ... 61877 files and directories currently installed.)
Unpacking tcpdump (from .../tcpdump_4.3.0-1_armhf.deb) ...
Processing triggers for man-db ...
Setting up tcpdump (4.3.0-1) ...
debian@beaglebone:~$

どれも簡単にインストールできた。
動作は追々見てゆく事とする。

タイトルとURLをコピーしました