自力で何とかするためには、
ドライバ(カーネル)をコンパイルする環境が必要。
思いついたのが玄箱/Pro の製品仕様書。
確か、クロスコンパイルの環境の構築方法が書いてあったはず。
玄箱/Pro の製品仕様書 Appendix C:カーネルのコンパイル方法 に 従ってクロスコンパイル環境をつくってみる。
もっと新しいのも置かれているようだが、 製品仕様書通りのものをいただいてきた方が、 何らかの実積はあるだろうから。
[root@junk tmp]# mkdir /opt/arm-2005q3-2 [root@junk tmp]# tar jxvf arm-2007q1-21-arm-none-eabi-i686-pc-linux-gnu.tar.tar -C /opt/arm-2005q3-2 : :
[root@junk tmp]# ls /opt/arm-2005q3-2/arn-none-linux-gnueabi/bin /bin/ls: /opt/arm-2005q3-2/arn-none-linux-gnueabi/bin: No such file or directory [root@junk tmp]# ls /opt/arm-2005q3-2/arm-none-linux-gnueabi/bin/ ar* as* c++* g++* gcc* ld* nm* objdump* ranlib* strip* [root@junk tmp]# which ar /usr/bin/ar [root@junk tmp]# PATH=/opt/arm-2005q3-2/arm-none-linux-gnueabi/bin/:$PATH [root@junk tmp]# export PATH [root@junk tmp]#
[root@junk kurobox]# tar ztvf linux-2.6.12_lsp.1.10.3.src.tar.gz : :
[root@junk kurobox]# cd linux-2.6.12_lsp.1.10.3 [root@junk linux-2.6.12_lsp.1.10.3]# make Makefile:486: .config: No such file or directory make: arm-none-linux-gnueabi-gcc: Command not found CHK include/linux/version.h UPD include/linux/version.h SYMLINK include/asm -> include/asm-arm HOSTCC scripts/basic/fixdep製品仕様書通りにはいかない。tried to exec cc1 but failed (No such file or directory) make[2]: *** [scripts/basic/fixdep] Error 1 make[1]: *** [scripts_basic] Error 2 make: *** [include/linux/autoconf.h] Error 2 [root@junk linux-2.6.12_lsp.1.10.3]#
エラーは、、、、
[root@junk linux-2.6.12_lsp.1.10.3]# ls /opt/arm-2005q3-2/bin/arm-none-linux-gnueabi-gcc /opt/arm-2005q3-2/bin/arm-none-linux-gnueabi-gcc*
[root@junk linux-2.6.12_lsp.1.10.3]# ls /opt/arm-2005q3-2/libexec/gcc/arm-none-linux-gnueabi/3.4.4/ cc1* cc1plus* collect2* install-tools/ [root@junk linux-2.6.12_lsp.1.10.3]#ここに PATH を通せばいいだけ?
[root@junk linux-2.6.12_lsp.1.10.3]# cp buffalo/config_kurobox.conf .config [root@junk linux-2.6.12_lsp.1.10.3]#
[root@junk linux-2.6.12_lsp.1.10.3]# exit logout [yasunari@junk yasunari]$ su - root Password: [root@junk root]# [root@junk root]# PATH=$PATH:/opt/arm-2005q3-2/bin:/opt/arm-2005q3-2/libexec/gcc/arm-none-linux-gnueabi/ [root@junk root]# export PATH [root@junk root]#
[root@junk kurobox]# cd linux-2.6.12_lsp.1.10.3 [root@junk linux-2.6.12_lsp.1.10.3]# [root@junk linux-2.6.12_lsp.1.10.3]# make CHK include/linux/version.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc SHIPPED scripts/kconfig/zconf.tab.h HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/mconf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/lex.zconf.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf -s arch/arm/Kconfig # # using defaults found in .config # .config:92: trying to assign nonexistent symbol BUFFALO_PLATFORM .config:97: trying to assign nonexistent symbol BUFFALO_KUROBOX .config:98: trying to assign nonexistent symbol BUFFALO_SOFT_BOARDID .config:99: trying to assign nonexistent symbol BUFFALO_KUROBOX_SOFT_BOARDID .config:101: trying to assign nonexistent symbol BUFFALO_USE_MICON * * Restart config... * * * KUROBOX Feature * KUROBOX_PLATFORM (KUROBOX_PLATFORM) [N/y/?] (NEW) y USE SOFT BOARDID (KUROBOX_SOFT_BOARDID) [N/y] (NEW) y KUROBOX Board Id > 1. SOFT_BOARDID 0x16 (KUROBOX) (KUROBOX_KUROBOX_SOFT_BOARDID) (NEW) choice[1]: 1 USE RTC chip RS5C372 (USE_RS5C372) [N/y/?] (NEW) y USE MICON control (KUROBOX_USE_MICON) [N/y/?] (NEW) y enable egiga debug (EGIGA_DEBUG) [N/y/?] (NEW) n SPLIT include/linux/autoconf.h -> include/config/* CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o : : LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready AS arch/arm/boot/compressed/head.o GZIP arch/arm/boot/compressed/piggy.gz AS arch/arm/boot/compressed/piggy.o CC arch/arm/boot/compressed/misc.o LD arch/arm/boot/compressed/vmlinux OBJCOPY arch/arm/boot/zImage Kernel: arch/arm/boot/zImage is ready Building modules, stage 2. MODPOST [root@junk linux-2.6.12_lsp.1.10.3]#環境は作れたかな。
|
|
← KURO-RS 買ってきた |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ KURO-RS ドライバ(2)ドライバのコンパイル |