開発環境のインストール

SheevaPlug

赤外線リモコンの学習、再生ソフトをコンパイルするために、 開発環境をインストールする。
LinkStation からバイナリを持ってくるのが楽だけど、 それでは LinkStation が必須になるので、 セルフで何とかする。

ところで、Flash に開発環境収まるんだろうか???

パッケージリストの更新

root@debian:~# apt-get update
Hit http://ports.ubuntu.com jaunty Release.gpg
Hit http://ports.ubuntu.com jaunty Release
Hit http://ports.ubuntu.com jaunty/main Packages
Hit http://ports.ubuntu.com jaunty/restricted Packages
Hit http://ports.ubuntu.com jaunty/universe Packages
Hit http://ports.ubuntu.com jaunty/multiverse Packages
Reading package lists... Done
root@debian:~#

開発環境のインストール

とりあえず、LinkStation の Debian と同じように、 make, gcc, libc6-dev をインストールする。
root@debian:~# apt-get install make gcc libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libx11-data libxcb1 libxau6 libxdmcp6 libxcb-xlib0 libx11-6
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  binutils cpp cpp-4.3 gcc-4.3 libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
Suggested packages:
  binutils-doc cpp-doc gcc-4.3-locales gcc-multilib manpages-dev autoconf
  automake1.9 libtool flex bison gdb gcc-doc libmudflap0-4.3-dev gcc-4.3-doc
  libgcc1-dbg libgomp1-dbg libmudflap0-dbg glibc-doc make-doc
The following NEW packages will be installed:
  binutils cpp cpp-4.3 gcc gcc-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl
  linux-libc-dev make
0 upgraded, 11 newly installed, 0 to remove and 9 not upgraded.
Need to get 9153kB of archives.
After this operation, 32.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ports.ubuntu.com jaunty/main libgmp3c2 2:4.2.4+dfsg-2ubuntu1 [184kB]
Get:2 http://ports.ubuntu.com jaunty/main libmpfr1ldbl 2.4.0-1ubuntu3 [405kB]
Get:3 http://ports.ubuntu.com jaunty/main cpp-4.3 4.3.3-5ubuntu4 [3045kB]
Get:4 http://ports.ubuntu.com jaunty/main cpp 4:4.3.3-1ubuntu1 [35.6kB]
Get:5 http://ports.ubuntu.com jaunty/main binutils 2.19.1-0ubuntu3 [1410kB]
Get:6 http://ports.ubuntu.com jaunty/main libgomp1 4.3.3-5ubuntu4 [15.1kB]
Get:7 http://ports.ubuntu.com jaunty/main gcc-4.3 4.3.3-5ubuntu4 [659kB]
Get:8 http://ports.ubuntu.com jaunty/main gcc 4:4.3.3-1ubuntu1 [5126B]
Get:9 http://ports.ubuntu.com jaunty/main linux-libc-dev 2.6.28-11.42 [753kB]
Get:10 http://ports.ubuntu.com jaunty/main libc6-dev 2.9-4ubuntu6 [2484kB]
Get:11 http://ports.ubuntu.com jaunty/main make 3.81-5 [156kB]
Fetched 9153kB in 7s (1203kB/s)
Selecting previously deselected package libgmp3c2.
(Reading database ... 10323 files and directories currently installed.)
Unpacking libgmp3c2 (from .../libgmp3c2_2%3a4.2.4+dfsg-2ubuntu1_armel.deb) ...
Selecting previously deselected package libmpfr1ldbl.
Unpacking libmpfr1ldbl (from .../libmpfr1ldbl_2.4.0-1ubuntu3_armel.deb) ...
Selecting previously deselected package cpp-4.3.
Unpacking cpp-4.3 (from .../cpp-4.3_4.3.3-5ubuntu4_armel.deb) ...
Selecting previously deselected package cpp.
Unpacking cpp (from .../cpp_4%3a4.3.3-1ubuntu1_armel.deb) ...
Selecting previously deselected package binutils.
Unpacking binutils (from .../binutils_2.19.1-0ubuntu3_armel.deb) ...
Selecting previously deselected package libgomp1.
Unpacking libgomp1 (from .../libgomp1_4.3.3-5ubuntu4_armel.deb) ...
Selecting previously deselected package gcc-4.3.
Unpacking gcc-4.3 (from .../gcc-4.3_4.3.3-5ubuntu4_armel.deb) ...
Selecting previously deselected package gcc.
Unpacking gcc (from .../gcc_4%3a4.3.3-1ubuntu1_armel.deb) ...
Selecting previously deselected package linux-libc-dev.
Unpacking linux-libc-dev (from .../linux-libc-dev_2.6.28-11.42_armel.deb) ...
Selecting previously deselected package libc6-dev.
Unpacking libc6-dev (from .../libc6-dev_2.9-4ubuntu6_armel.deb) ...
Selecting previously deselected package make.
Unpacking make (from .../archives/make_3.81-5_armel.deb) ...
Setting up libgmp3c2 (2:4.2.4+dfsg-2ubuntu1) ...

Setting up libmpfr1ldbl (2.4.0-1ubuntu3) ...

Setting up cpp-4.3 (4.3.3-5ubuntu4) ...
Setting up cpp (4:4.3.3-1ubuntu1) ...

Setting up binutils (2.19.1-0ubuntu3) ...

Setting up libgomp1 (4.3.3-5ubuntu4) ...

Setting up gcc-4.3 (4.3.3-5ubuntu4) ...
Setting up gcc (4:4.3.3-1ubuntu1) ...

Setting up linux-libc-dev (2.6.28-11.42) ...
Setting up libc6-dev (2.9-4ubuntu6) ...
Setting up make (3.81-5) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@debian:~#

確認

てきとーなサンプルをコンパイルして確認する。
root@debian:/tmp# echo 'main() { printf("Why DO NOT you hack SheevaPlug?\n");}'>a.c
root@debian:/tmp# cc a.c
a.c: In function 'main':
a.c:1: warning: incompatible implicit declaration of built-in function 'printf'
root@debian:/tmp# ./a.out
Why DO NOT you hack SheevaPlug?
root@debian:/tmp#
done!


←(前のページ)
/etc/rc.local の修正
当月のハックの記録
SheevaPlug/玄柴(KURO-SHEEVA)をハックしよう トップ
(次のページ)→
ftp のインストール

Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市