[Armadillo:03416] Re: Armadillo-500 カーネルをeabiでコンパイルする方法について

Takenoshita Koyo email@hidden
2008年 9月 23日 (火) 18:03:11 JST


竹之下です。

まずは、どんなエラーが出ているのか調べてみました。

> 【make menuconfig設定内容】
> KernelFeatures--->
>  [*] Use the ARM EABI to compile the kernel
>  [*] Allow old ABI binaries to run with this kernel(EXPERIMENTAL)
> 
> 【config.archの修正内容】
>  過去のメーリングリストに、下記の対応が必要とありましたので
>   ・atmark-dist/config.arch
>    先頭に
>    CPUCFLAGS := -mabi=aapcs-linux
>    という行を追加。
>  を追加しました。
をおこなったあと、
$ cd atmark-dist
$ make user/openssh_only 2>&1 | tee make.log [*1]

make.logを見てみると、一番始めで下記のようなエラーになっています。
gccのための「-mabi=aapcs-linux」オプションが、makeに渡ってしまっているよ
うです。

[ ! -d "user/openssh" ] || make ARCH=arm CROSS_COMPILE=arm-linux- -C
user/openssh
make[1]: ディレクトリ `/home/takenoshita/atmark-dist/user/openssh' に入
ります
make -C openssh-4.3p2 LD=arm-linux-gcc -mabi=aapcs-linux
make: オプションが違います -- a
make: オプションが違います -- =
make: オプションが違います -- a
make: オプションが違います -- a
make: オプションが違います -- c


一応、対策として
user/openssh/Makefileで下記のように$(CC)を""で囲んであげたところ、
コンパイルは通りました。

diff --git a/user/openssh/Makefile b/user/openssh/Makefile
index 2c7b852..c6753f7 100644
--- a/user/openssh/Makefile
+++ b/user/openssh/Makefile
@@ -27,7 +27,7 @@ $(SRC_DIR)/Makefile:
                     $(CONF_OPT) $(CONF_OPT_MISC));\

 build: $(SRC_DIR)/Makefile
-       make -C $(SRC_DIR) LD=$(CC)
+       make -C $(SRC_DIR) LD="$(CC)"

 romfs: build
        [ "$(CONFIG_USER_OPENSSH_SSHD)" != "y" ] || \


ところで、メールタイトルは「カーネル」となっていますが、
エラーが出ているのはユーザランドの方ですね。

また、以前のメールで古賀さんが指摘されているように、
ツールチェーンもEABIのものを使う必要があるのでは無いかと思います。
http://lists.atmark-techno.com/pipermail/armadillo/2008-January/002640.html

[*1] make ***_onlyで、対象のディレクトリだけmakeすることができます。
     他には、make linuxでカーネルだけmakeとか。

2008-09-22 (月) の 21:41 +0900 に 橋本 佳己 さんは書きました:
> SFTの橋本です。
> 
> [make menuconfig]でEABIを有効にして
> makeを実行したところ下記のようなエラーが発生しました。
> 対処方法がわかりませんので、何方かご教示願います。
> 
> 【make menuconfig設定内容】
> KernelFeatures--->
>  [*] Use the ARM EABI to compile the kernel
>  [*] Allow old ABI binaries to run with this kernel(EXPERIMENTAL)
> 
> 【config.archの修正内容】
>  過去のメーリングリストに、下記の対応が必要とありましたので
>   ・atmark-dist/config.arch
>    先頭に
>    CPUCFLAGS := -mabi=aapcs-linux
>    という行を追加。
>  を追加しました。
> 
> 【エラー内容】
> # 変数セットのハッシュテーブルの状態:
> # Load=897/1024=88%, Rehash=0, Collisions=1242/907=137%
> 
> # Pattern-specific Variable Values
> 
> # パターン指定変数の値なし.
> 
> # ディレクトリ
> 
> 
> # 0 個のファイル, 0 個の適用不能ファイル名 (0 個のディレクトリ内).
> 
> # 暗黙ルール
> 
> # 暗黙ルールなし.
> 
> # ファイル
> 
> # ファイルハッシュテーブルの状態:
> # Load=0/1024=0%, Rehash=0, Collisions=0/0=0%
> # VPATH 探索パス
> 
> # `vpath' 探索パスはありません
> 
> # 一般の (`VPATH' 変数) 探索パスなし.
> 
> # # of strings in strcache: 0
> # # of strcache buffers: 0
> # strcache size: total = 0 / max = 0 / min = 4096 / avg = 0
> # strcache free: total = 0 / max = 0 / min = 4096 / avg = 0
> 
> # Make データベース終了 Mon Sep 22 21:23:52 2008
> 
> make[2]: *** [build] エラー 2
> make[2]: ディレクトリ `/home/atmark/Desktop/source/dist/atmark-dist-20080617/user/openssh' から出ます
> make[1]: *** [all] エラー 2
> make[1]: ディレクトリ `/home/atmark/Desktop/source/dist/atmark-dist-20080617/user' から出ます
> make: *** [subdirs] エラー 1
> 
> 以上、よろしくお願い致します。
> 
> 
> _______________________________________________
> armadillo mailing list
> email@hidden
> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo
-- 
Takenoshita Koyo




armadillo メーリングリストの案内