[U-Boot-Users] u-boot error message

Hi:
I used u-boot-1.0.2 to boot linux.My target board is ALTERA DK1C20 and cpu is nios.I used tools/mkimage to encapsulate a linux kernel image with header information.But it display some error messages,it like that:
[root@a901 u-boot-20040316cvs]# tools/mkimage -n 'linux kernel' \
-A nios -O linux -T kernel -C none -a 1010000 -e 1010000 \
-d /opt/cdk4nios/src/u-boot-20040316cvs/linux.bin uimage
Invalid CPU Type - valid names are: alpha, arm, x86, ia64, mips, mips64, ppc, s3 90, sh, sparc, sparc64, m68k
Because my cpu is nios,so my linux kernel can't boot.
I try follow patch.
diff -Naurbx CVS u-boot-2004-10-20/common/cmd_bootm.c
u-boot-work/common/cmd_bootm.c
--- u-boot-2004-10-20/common/cmd_bootm.c 2004-10-10 17:27:32.000000000
-0400
+++ u-boot-work/common/cmd_bootm.c 2004-11-01 19:14:59.000000000 -0500
@@ -1189,7 +1189,9 @@
case IH_CPU_SPARC: arch = "SPARC"; break;
case IH_CPU_SPARC64: arch = "SPARC 64 Bit"; break;
case IH_CPU_M68K: arch = "M68K"; break;
+ case IH_CPU_NIOS: arch = "Nios"; break;
case IH_CPU_MICROBLAZE: arch = "Microblaze"; break;
+ case IH_CPU_NIOS2: arch = "Nios-II"; break;
default: arch = "Unknown Architecture"; break;
}
diff -Naurbx CVS u-boot-2004-10-20/tools/mkimage.c
u-boot-work/tools/mkimage.c
--- u-boot-2004-10-20/tools/mkimage.c 2004-07-10 18:36:01.000000000
-0400
+++ u-boot-work/tools/mkimage.c 2004-11-01 19:18:06.000000000 -0500
@@ -86,6 +86,8 @@
{ IH_CPU_MICROBLAZE, "microblaze", "MicroBlaze", },
{ IH_CPU_MIPS, "mips", "MIPS", },
{ IH_CPU_MIPS64, "mips64", "MIPS 64 Bit", },
+ { IH_CPU_NIOS, "nios", "Nios", },
+ { IH_CPU_NIOS2, "nios2", "Nios-II", },
{ IH_CPU_PPC, "ppc", "PowerPC", },
{ IH_CPU_S390, "s390", "IBM S390", },
{ IH_CPU_SH, "sh", "SuperH", },
When I boot linux image to my target board, it have error messages.
Like that:
DK1C20 > tftp 1010000 image.bin
Using MAC Address 08:00:3E:26:0A:5B
TFTP from server 192.168.2.16; our IP address is 192.168.2.21
Filename 'image.bin'.
Load address: 0x1010000
Loading: T invalid RARP header
#################################################################
#################################################################
#################################################################
####
done
Bytes transferred = 1015616 (f7f40 hex)
DK1C20 > cp.b 1010000 600000 f7f40
DK1C20 > imi 600000
## Checking Image at 00600000 ...
Image Name: linux kernel
Image Type: Nios Linux Kernel Image (uncompressed)
Data Size: 1015552 Bytes = 991.8 kB
Load Address: 01010000
Entry Point: 01010000
Verifying Checksum ... OK
DK1C20 > bootm 600000
## Booting image at 00600000 ...
Image Name: linux kernel
Image Type: Nios Linux Kernel Image (uncompressed)
Data Size: 1015552 Bytes = 991.8 kB
Load Address: 01010000
Entry Point: 01010000
Verifying Checksum ... OK
Unimplemented compression type 39
DK1C20 >
Have anyone can tell me how to do
Ps:u-boot version:U-Boot 1.0.2(u-boot-20040316cvs)
my name is Bruce my e-mail: lan_chia_fan@yahoo.com.tw
--------------------------------- Yahoo!奇摩Messenger6.0 更即時有趣的即時通訊世界,立即下載最新版!馬上下載

Hi Bruce,
DK1C20 > bootm 600000
## Booting image at 00600000 ...
Image Name: linux kernel
Image Type: Nios Linux Kernel Image (uncompressed)
Data Size: 1015552 Bytes = 991.8 kB
Load Address: 01010000
Entry Point: 01010000
Verifying Checksum ... OK
Unimplemented compression type 39
DK1C20 >
I can only repeat myself - find out why there is a 39 in the compression type field. You can easily check an image on your linux host:
bash[0]$ dd if=/tftpboot/TQM860L/uImage bs=64 count=1 | hexdump -C 1+0 records in 1+0 records out 64 bytes transferred in 0.018821 seconds (3400 bytes/sec) 00000000 27 05 19 56 33 14 f1 b8 3f 93 f8 25 00 09 46 31 |'..V3...?..%..F1| 00000010 00 00 00 00 00 00 00 00 af 7d f4 d9 05 07 02 01 |.........}......| 00000020 4c 69 6e 75 78 2d 32 2e 34 2e 34 00 00 00 00 00 |Linux-2.4.4.....| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 bash[0]$
If you check include/image.h you will notice the byte at offset 30 is the type of image and at 31 the compression:
00000010 00 00 00 00 00 00 00 00 af 7d f4 d9 05 07 02 01 |.........}......| linux kernel ---^ gzip compression ------^
So find out where in the process this gets changed to 39 as indicated by the messages above.
Cheers Detlev
Ps:u-boot version:U-Boot 1.0.2(u-boot-20040316cvs)
PS: I still would like you to try _current_ CVS version of U-Boot as that is where we fix bugs in...
participants (2)
-
Detlev Zundel
-
藍佳凡