[yasunari@giga ppc]$ ls -al 合計 284 drwxr-xr-x 14 yasunari root 4096 Mar 29 18:31 ./ drwxr-xr-x 3 yasunari root 4096 Aug 26 2004 ../ drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 4xx_io/ drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 8260_io/ drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 8xx_io/ -rwxr-xr-x 1 yasunari root 3072 Oct 7 2004 Makefile* drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 amiga/ drwxr-xr-x 12 yasunari root 4096 May 6 17:19 boot/ -rw-r--r-- 1 yasunari root 164171 Mar 29 18:31 boot.tgz -rwxr-xr-x 1 yasunari root 26567 Oct 30 2004 config.in* drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 configs/ -rwxr-xr-x 1 yasunari root 23294 Sep 9 2004 defconfig* drwxr-xr-x 2 yasunari root 4096 May 6 17:19 kernel/ drwxr-xr-x 2 yasunari root 4096 May 6 17:19 lib/ drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 math-emu/ drwxr-xr-x 2 yasunari root 4096 May 6 17:19 mm/ drwxr-xr-x 4 yasunari root 4096 May 6 17:19 platforms/ -rwxr-xr-x 1 yasunari root 3333 Sep 13 2004 vmlinux.lds* drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 xmon/ [yasunari@giga ppc]$boot.tgz は ごみの消し忘れ?
[yasunari@giga boot]$ ls -al 合計 56 drwxr-xr-x 12 yasunari root 4096 May 6 17:19 ./ drwxr-xr-x 14 yasunari root 4096 Mar 29 18:31 ../ -rwxr-xr-x 1 yasunari root 2524 Sep 9 2004 Makefile* drwxr-xr-x 2 yasunari root 4096 May 6 17:19 chrp/ drwxr-xr-x 2 yasunari root 4096 Apr 8 18:18 common/ drwxr-xr-x 2 yasunari root 4096 Apr 8 18:18 images/ drwxr-xr-x 2 yasunari root 4096 Sep 9 2004 include/ -rwxr-xr-x 1 yasunari root 1919 Sep 9 2004 ld.script* drwxr-xr-x 2 yasunari root 4096 Apr 8 18:18 lib/ drwxr-xr-x 2 yasunari root 4096 May 6 17:19 linkstation/ drwxr-xr-x 2 yasunari root 4096 May 6 17:19 pmac/ drwxr-xr-x 2 yasunari root 4096 May 6 17:19 prep/ drwxr-xr-x 3 yasunari root 4096 Mar 22 16:13 simple/ drwxr-xr-x 3 yasunari root 4096 Sep 23 2004 utils/images には、
[yasunari@giga boot]$ ls -l images/ 合計 4876 -rwxr-xr-x 1 yasunari root 293 Sep 9 2004 Makefile* -rwxr-xr-x 1 yasunari root 28672 Apr 7 15:31 bootcode.bin* -rw-r--r-- 1 yasunari root 3002938 Apr 7 15:31 firmimg.bin -rw-r--r-- 1 yasunari root 1942783 Apr 7 15:26 ramdisk.image.gzファームウェアがそのまま入っている。
[yasunari@giga boot]$ ls -l linkstation 合計 28 -rwxr-xr-x 1 yasunari root 4988 Oct 30 2004 Makefile* -rwxr-xr-x 1 yasunari root 14496 Nov 5 2004 head.S* -rwxr-xr-x 1 yasunari root 1677 Sep 9 2004 ppc_asm.tmpl* [yasunari@giga boot]$ ls -l utils 合計 56 -rwxr-xr-x 1 yasunari root 479 Sep 9 2004 Makefile* -rwxr-xr-x 1 yasunari root 4135 Sep 9 2004 addnote.c* -rwxr-xr-x 1 yasunari root 1016 Sep 9 2004 elf.pl* -rwxr-xr-x 1 yasunari root 2357 Sep 9 2004 hack-coff.c* -rwxr-xr-x 1 yasunari root 4733 Sep 9 2004 mkbugboot.c* -rwxr-xr-x 1 yasunari root 876 Sep 9 2004 mknote.c* -rwxr-xr-x 1 yasunari root 7102 Sep 9 2004 mkprep.c* -rwxr-xr-x 1 yasunari root 3500 Sep 9 2004 mktree.c* -rwxr--r-- 1 yasunari root 96 Jan 12 2002 offset* drwxr-xr-x 2 yasunari root 4096 Sep 23 2004 setsum/ -rwxr--r-- 1 yasunari root 97 Jan 12 2002 size* [yasunari@giga boot]$ ls -l utils/setsum 合計 52 -rwxr--r-- 1 yasunari root 235 Feb 13 2002 makefile* -rwxr--r-- 1 yasunari root 7424 Feb 13 2002 setbootsum* -rwxr--r-- 1 yasunari root 9287 Feb 13 2002 setbootsum.c* -rwxr--r-- 1 yasunari root 9492 Feb 13 2002 setsum* -rwxr--r-- 1 yasunari root 13487 Jan 15 2002 setsum.c* [yasunari@giga boot]$setsum のソースも入っている
[yasunari@giga boot]$ file utils/setsum/setsum utils/setsum/setsum: ELF 32-bit LSB executable, Intel 80386, version 1, for GNU/Linux 2.2.5, dynamically linked (uses shared libs), strippedと x86 のバイナリ。
最初から .config や setsum のソースも提供してくれていれば、、、
[yasunari@giga linux-2.4.20_mvl31]$ rm .hhl_cross_compile [yasunari@giga linux-2.4.20_mvl31]$ cp hglan_140.config .config [yasunari@giga linux-2.4.20_mvl31]$ make oldconfig rm -f include/asm ( cd include ; ln -sf asm-ppc asm) /bin/sh scripts/Configure -d arch/ppc/config.in : : [yasunari@giga linux-2.4.20_mvl31]$ make dep gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc -o scrip ts/mkdep scripts/mkdep.c : :30分ほどして、
../utils/setsum/setsum ../../../../firminfo.txt ../images/vmlinux.gz -r ../images/ramdisk.image.gz -o ../images/firmimg.bin ../utils/setsum/setsum: ../utils/setsum/setsum: cannot execute binary file make[2]: *** [zImage.initrd] エラー 126 make[2]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot/linkstation' make[1]: *** [zImage.initrd] エラー 2 make[1]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot' make: *** [zImage.initrd] エラー 2 [yasunari@giga linux-2.4.20_mvl31]$あらら。
[yasunari@giga linux-2.4.20_mvl31]$ rm arch/ppc/boot/utils/setsum/setsum [yasunari@giga linux-2.4.20_mvl31]$ make zImage.initrd : : ../utils/setsum/setsum ../../../../firminfo.txt ../images/vmlinux.gz -r ../images/ramdisk.image.gz -o ../images/firmimg.bin make[2]: ../utils/setsum/setsum: コマンドが見つかりませんでした make[2]: *** [zImage.initrd] エラー 127 make[2]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot/linkstation' make[1]: *** [zImage.initrd] エラー 2 make[1]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot' make: *** [zImage.initrd] エラー 2 [yasunari@giga linux-2.4.20_mvl31]$ make utils make: *** ターゲット `utils' を make するルールがありません. 中止。しゃーないなぁ
[yasunari@giga linux-2.4.20_mvl31]$ cd arch/ppc/boot/utils/setsum [yasunari@giga setsum]$ make cc -O2 -c -o setsum.o setsum.c setsum.c:11: ../../../../../include/melco/firminfo.h: ?????????????????????? make: *** [setsum.o] エラー 1 [yasunari@giga setsum]$もー
[yasunari@giga setsum]$ mv setsum.c{,.orig} [yasunari@giga setsum]$ cp setsum.c.orig setsum.c [yasunari@giga setsum]$ vi setsum.c ・・・ [yasunari@giga setsum]$ diff setsum.c.orig setsum.c 11c11 < #include "../../../../../include/melco/firminfo.h" --- > #include "../../../../../include/buffalo/firminfo.h" [yasunari@giga setsum]$ make cc -O2 -c -o setsum.o setsum.c cc -s setsum.o -o setsum cc -O2 -c -o setbootsum.o setbootsum.c setbootsum.c:10: ../../../../../include/melco/bootinfo.h: ?????????????????????? make: *** [setbootsum.o] エラー 1 [yasunari@giga setsum]$ほっとこ。
[yasunari@giga setsum]$ cd ../../../../../ [yasunari@giga linux-2.4.20_mvl31]$ make zImage.initrd : ../utils/setsum/setsum ../../../../firminfo.txt ../images/vmlinux.gz -r ../images/ramdisk.image.gz -o ../images/firmimg.bin Firm information struct size = 108 2 read config file:../../../../firminfo.txt set date:2005/4/14 21:8:28 read Kernel file:../images/vmlinux.gz(854038 bytes) initrd file:../images/ramdisk.image.gz(1942783 bytes) Firmware ID :00000004 Name:HD-HGLAN(IEMITSU) ver 2.00 Date:2005/5/14 21:8:28 kernel_offset:0000006C (854038bytes) initrd_offset:000D0882 (1942783bytes) total size: 2796929bytes check sum = A80E4E30 4 Done.. mv zvmlinux.initrd ../images/zImage.initrd.sandpoint mv bootcode.bin ../images/bootcode.bin rm ../images/vmlinux.gz rm ./bootcode make[2]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot/linkstation' make[1]: 出ます ディレクトリ `/mnt/home/linkstation/kernel/linux-2.4.20_mvl31/arch/ppc/boot' [yasunari@giga linux-2.4.20_mvl31]$とりあえず、できた。さーて。
← linux-2.4.20_mvl31 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LinkStation QUBE |