うまくいったらしいじゃん。
計画着々と準備中(実はほとんど何もしてないけど)。実家にいって物置から山靴とってくるのは富士山より遠いし(カビはえてそうだし)山靴は新調しました。なんだかアイテム見てたら欲しくなって出費してしまった。
あとは天候次第・・・雨だったら延期だな。
起動時 [enterのみ] linux-2.2.20 (へぇそうなんだ。って感じ) bf24 linux-2.4.18 bf24[enter]とする
vaiot:/mnt/hde1/dev# lilo -r /mnt/hde1 -C /etc/lilo.conf-cross Warning: '/proc/partitions' does not match '/dev' directory structure. Name change: '/dev/hde1' -> '/dev/hde1' part_nowrite check:: No such file or directory何のファイルがないのか、さっぱり分からんかった。いろいろ試して原因判明。ホストで認識しているディスクドライブ。この場合は
/dev/hda /dev/hda1 /dev/hda3 /dev/hda5が /mnt/dev に必要らしい。
東京出張。明日まで組み込みLinuxセミナー講師。
VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 260k freed auto: auto: No such file or directory Kernel panic: Attempted to kill init!というエラーが出る。autoってファイルを探しているようだ。
$ man init -a, auto LILO ブートローダは、 デフォルトのコマンドラインで (ユーザの介入なしに) カーネルを起動すると、 コマンドラインに単語 "auto" を追加する。 init はこの単語を見つけると、"AUTOBOOT" 環境変数を "yes" に設定する。 ただしこの機能をセキュリティの判断には使えない。 あたりまえだが、 ユーザーは "auto" や -a を手動でコマンドラインに追加することもできる。なるほど、liloがkernelコマンドラインにautoを付け、カーネルが /init/sbin に auto を付けるのか。結果、 bash が auto をシェルスクリプトとして起動しようとしてるらしい。んで、当然そんなものない。
linux-2.4.31/init/main.c if (!strncmp(line,"init=",5)) { line += 5; execute_command = line; /* In case LILO is going to boot us with default command line, * it prepends "auto" before the whole cmdline which makes * the shell think it should execute a script with such name. * So we ignore all arguments entered _before_ init=... [MJ] */ args = 0; continue; }init=を付ければautoを無視するようなコードを発見。まぁ原因が分かって良かった。
それにしても、KさんとKさん、一日いろいろなところに連れて行っていただき、本当にありがとうございました。
といった具合ですが、台風に押されて他は霞んでしまいました。
出発前から体調最悪だったのだけど、やはり台湾にいる最中に熱がでてきて、昨日も今日も体調最悪です。。。雑誌原稿締め切り間近なのに飛び込みの仕事の依頼が・・・。もちろん喜んで対応させていただきます。が、今月中とかいうのはカンベンしてくださいね。:-)
root@landy:~# distcc --help distcc 2.18.3 sh4-unknown-linux-gnu (protocols 1 and 2) (default port 3632) built Apr 13 2005 04:50:26 Copyright (C) 2002, 2003, 2004 by Martin Pool. Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer. distcc comes with ABSOLUTELY NO WARRANTY. distcc is free software, and you may use, modify and redistribute it under the terms of the GNU General Public License version 2 or later. Usage: distcc [COMPILER] [compile options] -o OBJECT -c SOURCE distcc --help Options: COMPILER defaults to "cc" --help explain usage and exit --version show version and exit Environment variables: See the manual page for a complete list. DISTCC_VERBOSE=1 give debug messages DISTCC_LOG send messages to file, not stderr DISTCC_SSH command to run to open SSH connections DISTCC_DIR directory for host list and locks Server specification: A list of servers is taken from the environment variable $DISTCC_HOSTS, or $DISTCC_DIR/hosts, or ~/.distcc/hosts, or /etc/distcc/hosts. Each host can be given in any of these forms, see the manual for details: localhost run in place HOST TCP connection, port 3632 HOST:PORT TCP connection, specified port @HOST SSH connection USER@HOST SSH connection to specified host distcc distributes compilation jobs across volunteer machines running distccd. Jobs that cannot be distributed, such as linking or preprocessing are run locally. distcc should be used with make's -jN option to execute in parallel on several machines.
金曜日にレントゲン撮ったら肺炎と言われた。どーりで熱が下がらないわけだ。頭いたいし。もう10日目。
gcc-3.4-3.4.3/debian/README.crossより抜粋 1.1. dpkg-cross package Dpkg-cross package contains several tools to manage cross-compile environment. It can convert native debian library and lib-dev packages for the target architecture to binary-all packages that keep libraries and headers under /usr/$(TARGET)/. Also it contains helper tools for cross-compiling debian packages. Some of these tools are used while building libgcc1 and libstdc++ library packages. The resulting library packages follow the same convensions as library packages converted by dpkg-cross. Currently, at least version 1.18 of dpkg-cross is needed for cross-gcc package build. 2. Building cross-compiler packages Get gcc-3.4 source package. Unpack it using dpkg-source -x, and cd to the package directory. Set GCC_TARGET environment variable to the target architectire name. Note that currently you should use debian architecture name (i.e 'powerpc' or 'arm'), not GNU system type (i.e. 'powerpc-linux' or 'arm-linux'). Setting GCC_TARGET to GNU system type will cause cross-compiler build to fail. Instead of setting GCC_TARGET, target architecture name may be put into debian/target file. If both GCC_TARGET is defined and debian/target file exists, GCC_TARGET is used. Run debian/rules control. This will change debian/control file, adjusting build-depends. Build the package using dpkg-buildpackage.ということなので
# apt-get install dpkg-cross # dpkg-source -x gcc-3.4_3.4.3-12.dsc # cd gcc-3.4-3.4.3 # export GCC_TARGET=sh4 (ここが肝心だがsh4-linuxではNGだった...!?) # ./debian/rules control # time dpkg-buildpackage -us -uc : :ずっと略 : /root/build/gcc-3.4-3.4.3/build/gcc/xgcc -B/root/build/gcc-3.4-3.4.3/build/gcc/ -B/usr/sh4-linux/bin/ -B/usr/ sh4-linux/lib/ -isystem /usr/sh4-linux/include -isystem /usr/sh4-linux/sys-include -O2 -DIN_GCC -DCROSS_COMP ILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./in clude -fpic -DNO_FPSCR_VALUES -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I . -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -fexceptions -c ../../src/gcc/unwind-dw2. c -o libgcc/./unwind-dw2.o ../../src/gcc/unwind-dw2.c: In function `uw_frame_state_for': ../../src/gcc/unwind-dw2.c:1017: warning: implicit declaration of function `memset' ../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpregs' ../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_xfpregs' ../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpul' ../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpscr' ../../src/gcc/unwind-dw2.c: In function `uw_install_context_1': ../../src/gcc/unwind-dw2.c:1345: warning: implicit declaration of function `memcpy' make[4]: *** [libgcc/./unwind-dw2.o] Error 1 make[4]: Leaving directory `/root/build/gcc-3.4-3.4.3/build/gcc' make[3]: *** [stmp-multilib] Error 2 make[3]: Leaving directory `/root/build/gcc-3.4-3.4.3/build/gcc' make[2]: *** [all-gcc] Error 2 make[2]: Leaving directory `/root/build/gcc-3.4-3.4.3/build' s=`cat status`; rm -f status; test $s -eq 0 make[1]: *** [stamps/05-build-stamp] Error 1 make[1]: Leaving directory `/root/build/gcc-3.4-3.4.3' make: *** [stamps/05-build-stamp] Error 2む。あえなく撃沈。エラーのある行
1031 MD_FALLBACK_FRAME_STATE_FOR (context, fs, success);とりあえずgrep
$ cd src/gcc/config $ grep MD_FALLBACK_FRAME_STATE_FOR * -r alpha/gnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR alpha/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ alpha/vms.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ i386/gnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR i386/kfreebsdgnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR i386/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ i386/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ i386/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ ia64/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ ia64/unwind-ia64.c:#ifdef MD_FALLBACK_FRAME_STATE_FOR ia64/unwind-ia64.c: MD_FALLBACK_FRAME_STATE_FOR (context, fs, success); mips/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ pa/pa32-linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ rs6000/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ rs6000/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ rs6000/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ s390/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ sh/linux.h:/* MD_FALLBACK_FRAME_STATE_FOR is not yet defined for SHMEDIA. */ ← あ・や・し・い sh/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ sh/linux.h: in MD_FALLBACK_FRAME_STATE_FOR and its content will be read with sparc/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ sparc/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ sparc/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \sh/ 向けに MD_FALLBACK_FRAME_STATE_FOR の define が弱いよーな予感。
台風通過で夕方にはきれいな夕日が。会議室に閉じ込められていたけど、西日がきつくなってきて、東側はまだ曇ってるだろう状況から推測するに、虹が出ているんじゃないかと思ってた。外に出て空を見あげたら、案の定 空一面にでっかい虹がかかっていた。おお。これはどこかであったシチュエーション、この前の台湾と同じ状況だ。あいにく客先の工場敷地内にいたため写真撮影はできませんでした。
だいぶ復活。頓服が効いてるあいだはかなり楽。
昨日kojima先生からコメントをいただいたので:-) 試してみたかったけど今日は客先から帰還したら9時すぎ。宿題を片付けたら24時すぎてしまったので進捗なしです。
あ。ghc6をコンパイルするにはghcでブートストラップしなきゃいけないことがわかった。クロスで仮のghcを作るか、ブートストラップ部分を他のホストでやる。という手があるらしい。うーむハマりそうだ。どなかたSH-Linux用のghcバイナリを持っているなら分けてください。
熱は下がった。と思われる。慣れたのかも?おとといくらいから普通に生活できるようになった。
struct sigcontext { unsigned long oldmask; /* CPU registers */ unsigned long sc_regs[16]; unsigned long sc_pc; unsigned long sc_pr; unsigned long sc_sr; unsigned long sc_gbr; unsigned long sc_mach; unsigned long sc_macl; #if defined(CONFIG_CPU_SH4) /* FPU registers */ unsigned long sc_fpregs[16]; unsigned long sc_xfpregs[16]; unsigned int sc_fpscr; unsigned int sc_fpul; unsigned int sc_ownedfp; #endif };あー。そういうことか。カーネルヘッダを使うときはCONFIG_が絡んでくるか。
#ifdef __SH4__ #define CONFIG_CPU_SH4 #endifの追加でも大丈夫と思うけど、安易に #if と #endif をコメントアウト。再度挑戦。
# dpkg-source -x gcc-3.4_3.4.3-12.dsc # cd gcc-3.4-3.4.3 # export GCC_TARGET=sh4 # ./debian/rules control # time dpkg-buildpackage -us -uc :中略 ちなみに Celeron 2.60GHz なマシンです。 real 20m12.421s user 16m24.506s sys 1m49.911s # ls ../*.deb ../cpp-3.4-sh4-linux_3.4.3-13_i386.deb ../libstdc++6-dbg-sh4-cross_3.4.3-13_all.deb ../g++-3.4-sh4-linux_3.4.3-13_i386.deb ../libstdc++6-dev-sh4-cross_3.4.3-13_all.deb ../gcc-3.4-sh4-linux_3.4.3-13_i386.deb ../libstdc++6-pic-sh4-cross_3.4.3-13_all.deb ../libgcc1-sh4-cross_3.4.3-13_all.deb ../libstdc++6-sh4-cross_3.4.3-13_all.debおーっ。すっばらしい!! kojima先生とkogiidenaさんに感謝!!