init/main.o: In function `write_flash': init/main.o(.text+0x31c): undefined reference to `flash_st_compt_erase' init/main.o(.text+0x31c): relocation truncated to fit: R_PPC_REL24 flash_st_compt_erase init/main.o(.text+0x360): undefined reference to `flash_toshiba_write' init/main.o(.text+0x360): relocation truncated to fit: R_PPC_REL24 flash_toshiba_writeを解決するところから。
bool 'MELCO Flash ROM disk support' CONFIG_BLK_DEV_FLASHDを見つけた。これに違いない。
[yasunari@ls linux-2.4.17_kuro-box]$ cd drivers/ [yasunari@ls drivers]$ grep MELCO */Config.in block/Config.in:bool 'MELCO Flash ROM disk support' CONFIG_BLK_DEV_FLASHD char/Config.in:bool 'MELCO RTC Device' CONFIG_CHAR_DEV_MELCO_RTCとの事。
[yasunari@ls linux-2.4.17_kuro-box]$ make config : : * * Block devices * Normal PC floppy disk support (CONFIG_BLK_DEV_FD) [N/y/m/?] Compaq SMART2 support (CONFIG_BLK_CPQ_DA) [N/y/m/?] Compaq Smart Array 5xxx support (CONFIG_BLK_CPQ_CISS_DA) [N/y/m/?] Mylex DAC960/DAC1100 PCI RAID Controller support (CONFIG_BLK_DEV_DAC960) [N/y/m/?] Loopback device support (CONFIG_BLK_DEV_LOOP) [Y/m/n/?] Network block device support (CONFIG_BLK_DEV_NBD) [N/y/m/?] RAM disk support (CONFIG_BLK_DEV_RAM) [Y/m/n/?] Default RAM disk size (CONFIG_BLK_DEV_RAM_SIZE) [4096] Initial RAM disk (initrd) support (CONFIG_BLK_DEV_INITRD) [Y/n/?] MELCO Flash ROM disk support (CONFIG_BLK_DEV_FLASHD) [N/y/?] y (ちゃんと Melco って書いたるやん) : : * * Ftape, the floppy tape device driver * Ftape (QIC-80/Travan) support (CONFIG_FTAPE) [N/y/m/?] /dev/agpgart (AGP Support) (CONFIG_AGP) [N/y/m/?] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) (CONFIG_DRM) [N/y/?] MELCO RTC Device (CONFIG_CHAR_DEV_MELCO_RTC) [N/y/?] y : :
[yasunari@ls linux-2.4.17_kuro-box]$ make clean : : [yasunari@ls linux-2.4.17_kuro-box]$ make dep ; make zImage約30分後、今度は、
ld -T /mnt/home/HD-H120LAN/buffalo/kurobako/linux-2.4.17_kuro-box/arch/ppc/vmlinux.lds -Ttext 0x00800000 -Tbss 0x00900000 -o bootcode.tmp boot_head.o ../common/misc-common.o ../common/boot_misc-simple.o ../common/ns16550.o ../common/string.o ../../ kernel/melco_hwctl.o ../lib/zlib.a objcopy -O elf32-powerpc -R .comment \ bootcode.tmp bootcode objcopy -I elf32-powerpc -O binary bootcode bootcode.bin rm -f bootcode.tmp ../utils/setsum/setsum ../../../../firminfo.txt ../images/vmlinux.gz -o ../images/kernimg.bin ../utils/setsum/setsum: ../utils/setsum/setsum: cannot execute binary file make[2]: *** [zImage] エラー 126 make[2]: 出ます ディレクトリ `/mnt/home/HD-H120LAN/buffalo/kurobako/linux-2.4.17_kuro-box/arch/ppc/boot/sandpoint' make[1]: *** [zImage] エラー 2 make[1]: 出ます ディレクトリ `/mnt/home/HD-H120LAN/buffalo/kurobako/linux-2.4.17_kuro-box/arch/ppc/boot' make: *** [zImage] エラー 2やれやれ。一筋縄ではいかんわ。
[yasunari@ls linux-2.4.17_kuro-box]$ file arch/ppc/boot/utils/setsum/setsum arch/ppc/boot/utils/setsum/setsum: ELF 32-bit LSB executable, Intel 80386, version 1, for GNU/Linux 2.2.5, dynamically linke d (uses shared libs), strippedとのこと。そりゃ x86 のバイナリは動かんわな。