xapt

SH4やARM(armel)等のクロス開発をするためにはクロス用のライブラリやヘッダー群を開発用PCにインストールする必要があります。

lenny以前まではapt-crossを便利に使っていましたがsqueeze以降ではobsoleteになったようで、代替としてxaptを使うようです。

squeeze環境にて試しました。

squeezeへの導入

squeezeではxaptは提供されていないのでパッケージをダウンロードしてインストールします。

# apt-get update
# apt-get install dpkg-cross
# wget http://ftp.debian.org/debian/pool/main/e/emdebian-crush/xapt_2.2.19_all.deb
# dpkg -i xapt_2.2.19_all.deb

注意:バージョン番号が変わっているなどしてファイルが見つからないならブラウザで

設定ファイル

  • /etc/xapt.d/debian.conf

SH4 little endian の場合
(#で始まる行はコメント行で、重要ではありません)

[debian]
# full name of the apt mirror, including http:// or ftp:// prefix
# mirror=http://cdn.debian.org/debian/
mirror=http://download.si-linux.co.jp/debian-sh/squeeze-sh4/
# space separated list, passed to apt in the sources.list
components=main contrib non-free
# suite can be specified as an override
# default, not defined.
suite=squeeze
# allow unauthenticated repositories
# noauth=true
noauth=true
# check if the cross package is already installed or newer
# checknewer=true
checknewer=

ARM little endian の場合

[debian]
# full name of the apt mirror, including http:// or ftp:// prefix
mirror=http://ftp.jp.debian.org/debian/
# space separated list, passed to apt in the sources.list
components=main contrib non-free
# suite can be specified as an override
# default, not defined.
suite=                  # squeeze とかバージョン名を書いておくとよいかも
# allow unauthenticated repositories
noauth=true             # true にするとサインインされていない野良ビルドでもインストールする。海老原が作ったSH4パッケージをインストールするときはtrue
#noauth=
# check if the cross package is already installed or newer
# checknewer=true
checknewer=true         # true にすると、インストール済みパッケージの上書きインストールをしない. true推奨

使い方

# xapt [-M http://〜] [-S suite] [-a ARCH] packages ...

例: ARMリトルエンディアンの場合
# xapt -a armel libjpeg-dev
# xapt -a armel libpng-dev
# xapt -a armel libsqlite-dev

例: SH4の場合は
# xapt -a sh4 libgphoto2-dev

関連

Last-modified: 2014-02-06 (木) 13:09:59 (3731d)