[U-Boot-Users] Help about "Bad Magic Number" (XIP kernel is not booting)

ravi.aloor at wipro.com ravi.aloor at wipro.com
Mon Sep 19 10:26:41 CEST 2005


Hello, I am working on ARMVersatile 926EJS application board. I am using
NOR Flash with boot monitor. I am trying to boot kernel from the flash,
as it is an XIP kernel. I have 3 doubts as explained below.

Switch Settings: S1-1 to S1-8 Off
                S4-1 On and S4-2 to S4-4 Off

After kernel configuration, .config file contains the following two
CONFIG_ entries:
CONFIG_XIP_KERNEL=y
CONFIG_XIP_PHYS_ADDR=0x34060000

Doubt #1
--------
"The DENX U-Boot and Linux Guide (DULG) for TQM8xxL" document suggests
to use CONFIG_XIP_VIRT_ADDR. But I didn't use  CONFIG_XIP_VIRT_ADDR.
Because I was asked to work with above two CONFIG_ entries only.
CONFIG_XIP_VIRT_ADDR is really necessary?

The areas and images available are as shown below on NOR flash:

Flash> list areas

Base      Area Size Blocks Block Size
----      --------- ------ ----------
0x34000000      64M    512      128K

Flash> list images
Flash Area Base 0x34000000

Address    Name
-------    ----
0x34000000  boot_monitor.axf
0x34040000  u-boot
0x34060000  linux
0x341E0000  selftest.axf
0x34260000  cramfs
0x349E0000  symbian
0x356E0000  mmc2flash.axf
Flash> 

Used mkimage utility and created kernel image as XiPImage.pcd. Details
about XiPImage.pcd are as shown below. I also copied it to /tftpboot/
directory. I want to put XiPImage.pcd in the address range 0x34060000
and 0x341DFFFF.

bash-3.00$ ../../../../../build/bin/mkimage -A arm -O Linux -T kernel -C
none -a 0x34060000 -e 0x34060040 -n xipImage-2.6.10-pcd -d xipImage
XiPImage.pcd
Image Name:   xipImage-2.6.10-pcd
Created:      Mon Sep 19 13:11:40 2005
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2175788 Bytes = 2124.79 kB = 2.07 MB
Load Address: 0x34060000
Entry Point:  0x34060040
bash-3.00$
bash-3.00$ ../../../../../build/bin/mkimage -l XiPImage.pcd
Image Name:   xipImage-2.6.10-pcd
Created:      Sun Sep 18 19:20:09 2005
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2175788 Bytes = 2124.79 kB = 2.07 MB
Load Address: 0x34060000
Entry Point:  0x34060040
bash-3.00$ cp XiPImage.pcd /tftpboot/
bash-3.00$ 

I erased linux range from 0x34060000 to 0x341DFFFF.

Flash> erase range 0x34060000 0x341DFFFF
Flash> run u-boot
Versatile # setenv serverip 10.200.136.7
Versatile # setenv ipaddr 10.200.136.28
Versatile # setenv bootfile XiPImage.pcd
Versatile # tftpboot
Using MAC Address 00:02:F7:00:10:77
TFTP from server 10.200.136.7; our IP address is 10.200.136.28
Filename 'XiPImage.pcd'.
Load address: 0x7fc0
Loading:
#################################################################
 
#################################################################
 
#################################################################
 
#################################################################
 
#################################################################
 
#################################################################
        ###################################
done
Bytes transferred = 2175852 (21336c hex)
Versatile #
Versatile # iminfo

## Checking Image at 00007fc0 ...
  Image Name:  xipImage-2.6.10-pcd
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:    2175788 Bytes =  2.1 MB
  Load Address: 34060000
  Entry Point:  34060040
  Verifying Checksum ... OK
Versatile #

I checked whether any image is already there at flash address 0x34060000
even after erasing.

Versatile # iminfo 0x34060000

## Checking Image at 34060000 ...
  Bad Magic Number
Versatile #

Doubt #2
--------
I got "Bad Magic Number". Means, nothing useful information is there. Am
I right?

I copied XIP kernel from SDRAM to flash address 0x34060000

Versatile # cp.b 0x7fc0 0x34060000 0x21336c
Versatile # iminfo 0x34060000
## Checking Image at 34060000 ...
  Bad Magic Number
Versatile #

Kernel uses NFS mounted root file system.

Versatile # setenv bootargs root=/dev/nfs rw
nfsroot=10.200.136.7:/wrlinux/testscheduler/stage/boards/arm-versatile2/
rootfs console=ttyAMA0 mem=128M
ip=10.200.136.28:10.200.136.7::255.255.255.0:arm-versatile:eth0:off
Versatile # bootm 0x34060000
## Booting image at 34060000 ...
Bad Magic Number
Versatile # 

Doubt #3
--------
Kernel is not booting. Because of "Bad Magic Number". Suggestion please,
what could be wrong?

Thank you,
Ravi




More information about the U-Boot mailing list