Hi All,
I run Linux 2.6.21 (by Grant) on my Avnet Virtex-4 evaluation board
(ML403 like). When I load zIinux.elf
via jtag to the board it runs properly:
loaded at: 00400000 004F9138
board data at: 004F7120 004F7138
relocated to: 004040B4 004040CC
zimage at: 00404E59 004F6EE6
avail ram: 004FA000 01FFFFFF
Linux/PPC load: console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Uncompressing Linux...done.
Now booting the kernel
[0.000000] Linux version 2.6.21-rc6 (root@pc5215) (gcc version 4.0.2) #11
Tue Aug 7 13:46:19 EST 2007
[0.000000] Xilinx ML403 Reference System (Virtex-4 FX)
.
.
.
.
It goes to the successful end.
I have build u-boot 1.2.0 with uart lite and temac support.
When I am trying to run uImage (build out of zImage) it does not run.
The steps I do are as following:
1. I build uImage withing the kernel tree (make uImage)
2. I load via jtag the u-boot 1.2.0
XMD% dow u-boot.elf
section, .text: 0x00800000-0x0081513c
section, .resetvec: 0x0081513c-0x00815140
section, .rodata: 0x00815140-0x00817ce0
section, .reloc: 0x00817d00-0x00818674
section, .data: 0x00818674-0x00818b08
section, .data.rel: 0x00818b08-0x00818b34
section, .data.rel.local: 0x00818b34-0x00818f6c
section, .u_boot_cmd: 0x00818f6c-0x008191dc
section, .bss: 0x00819200-0x0081dd04
3. I transfer uImage to the RAM memory of my Avnet board:
TFTP from server 129.129.144.113; our IP address is 129.129.144.157
Filename 'uImage'.
Load address: 0x1000000
Loading: #################################################################
#################################################################
################################################################
done
Bytes transferred = 991438 (f20ce hex)
4. I am trying to start the kernel
=> bootm 0x1000000
## Booting image at 01000000 ...
Image Name: Linux-2.6.21-rc6
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 991375 Bytes = 968.1 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
After all system hangs
I have tried to change the Load Address and Entry Point to 0x400000 (mkimage
-a 0x400000 -e 0x400000)
but the system hangs like in the first case.
my bootargs are:
console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Those bootargs where tested with zImage.elf and seem to be fine.
Does somebody has some suggestion?
Thank you in advance for any hint on that.
Mirek
--
View this message in context: http://www.nabble.com/Linux-doesn-not-boot-from-u-boot-on-ML403-tf4335322.html#a12347049
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
From: Grant Likely <hidden> Date: 2007-08-27 14:24:41
On 8/27/07, Mirek23 [off-list ref] wrote:
4. I am trying to start the kernel
=> bootm 0x1000000
## Booting image at 01000000 ...
Image Name: Linux-2.6.21-rc6
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 991375 Bytes = 968.1 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Have you looked in __log_buf for kernel messages?
What does your u-boot env look like?
Do you have 'console=ttyUL0' or 'console=ttyS0' in the kernel command line?
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
Hi Grant,
Thank you for your response.
My u-boot bootargs is set to:
console=ttyUL0,9600 root=/dev/nfs rw nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp ip=::::virtex4-mirek:eth0:dhcp panic=1
where I can find __log_buf for kernel messages?
Best Regards
Mirek
On Mon, 27 Aug 2007, Grant Likely wrote:
On 8/27/07, Mirek23 [off-list ref] wrote:
quoted
4. I am trying to start the kernel
=> bootm 0x1000000
## Booting image at 01000000 ...
Image Name: Linux-2.6.21-rc6
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 991375 Bytes = 968.1 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Have you looked in __log_buf for kernel messages?
What does your u-boot env look like?
Do you have 'console=ttyUL0' or 'console=ttyS0' in the kernel command line?
Cheers,
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-27 14:53:30
On 8/27/07, Miroslaw Dach [off-list ref] wrote:
Hi Grant,
Thank you for your response.
My u-boot bootargs is set to:
console=ttyUL0,9600 root=/dev/nfs rw nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp ip=::::virtex4-mirek:eth0:dhcp panic=1
Drop the ',9600'. It's irrelevant for uartlite.
where I can find __log_buf for kernel messages?
Search for __log_buf in System.map (in the kernel source tree). Use a
debugger to look at the memory.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
I have done additional test with my u-boot and linux kernel.
I have downloaded u-boot(.elf) and zImage.elf via jtag to SDRAM:
The SDRAM has 32 MB:
Address Map for Processor ppc405_0
(0x00000000-0x01ffffff) DDR_SDRAM_1 plb
The steps I have doe are as following:
1. XMD% dow -data zImage.elf 0xe00000
2. XMD% dow u-boot.elf
section, .text: 0x00800000-0x0081513c
section, .resetvec: 0x0081513c-0x00815140
section, .rodata: 0x00815140-0x00817ce0
section, .reloc: 0x00817d00-0x00818674
section, .data: 0x00818674-0x00818b08
section, .data.rel: 0x00818b08-0x00818b34
section, .data.rel.local: 0x00818b34-0x00818f6c
section, .u_boot_cmd: 0x00818f6c-0x008191dc
section, .bss: 0x00819200-0x0081dd04
Downloaded Program u-boot.elf
Setting PC with program start addr = 0x00800100
PC reset to 0x00800100, Clearing MSR Register
3. XMD% run
------------------------------------------------------------------
output on the serial port
------------------------------------------------------------------
U-Boot 1.2.0 (Aug 28 2007 - 11:56:19)
U-Boot: checkboard
DRAM: U-Boot: initdram
32 MB
Using default environment
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
=>
U-Boot 1.2.0 (Aug 27 2007 - 14:23:15)
U-Boot: checkboard
DRAM: U-Boot: initdram
32 MB
Using default environment
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
=> bootelf 0xe00000
Loading .text @ 0x00400000 (14028 bytes)
Loading .data @ 0x00404000 (995328 bytes)
Clearing .bss @ 0x004f7000 (8504 bytes)
## Starting application at 0x00400000 ...
loaded at: 00400000 004F9138
board data at: 004F7120 004F7138
relocated to: 004040B4 004040CC
zimage at: 00404E59 004F6EE8
avail ram: 004FA000 01FFFFFF
Linux/PPC load: console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Uncompressing Linux...
After that system just hangs.
I do not understand why it is possible to run zImage.elf straight from jtag
but it hangs when started from u-boot.
Is it any fundamental problem with running Linux from u-boot on ML403
(Virtex-4) boards?
Best Regards
Mirek
From: Grant Likely <hidden> Date: 2007-08-28 13:02:47
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
Linux/PPC load: console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Uncompressing Linux...
After that system just hangs.
I do not understand why it is possible to run zImage.elf straight from jtag
but it hangs when started from u-boot.
Is it any fundamental problem with running Linux from u-boot on ML403
(Virtex-4) boards?
No there isn't. It should work. Most likely the kernel did not hang
immediately, but rather the console is not setup correctly. You need
to halt the processor after the hang and look at __log_buf in memory
(Find the address in System.map).
Cheers,
g.
Hi Grant,
Thanks for your answer.
I have found in the System.map :
c020f0c4 b __log_buf
Is the address c020f0c4 relative to the .data segment?
I understand that when the system hangs I should type in the XMD window
stop.
Is there anyway to examine the memory from the XMD window? or should I
reload the u-boot and examine the memory from u-boot?
Best Regards
Mirek
On Tue, 28 Aug 2007, Grant Likely wrote:
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
quoted
Linux/PPC load: console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Uncompressing Linux...
After that system just hangs.
I do not understand why it is possible to run zImage.elf straight from jtag
but it hangs when started from u-boot.
Is it any fundamental problem with running Linux from u-boot on ML403
(Virtex-4) boards?
No there isn't. It should work. Most likely the kernel did not hang
immediately, but rather the console is not setup correctly. You need
to halt the processor after the hang and look at __log_buf in memory
(Find the address in System.map).
Cheers,
g.
quoted
Best Regards
Mirek
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-28 13:50:57
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
Hi Grant,
Thanks for your answer.
I have found in the System.map :
c020f0c4 b __log_buf
Is the address c020f0c4 relative to the .data segment?
0xc0000000 are virtual kernel addresses; not physical addresses. If
the MMU is still on, then you need to use the virtual address to
examine memory. If the MMU is off (such as after reloading u-boot),
then you need to change 0xCxxxxxxx to 0x0xxxxxxxx.
I understand that when the system hangs I should type in the XMD window
stop.
Is there anyway to examine the memory from the XMD window? or should I
reload the u-boot and examine the memory from u-boot?
I don't know; I've never used XMD. Read the XMD documentation. You
can do it from u-boot too.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
Hi Grant,
I have did as you suggested:
1. I have started u-boot
2. I have loaded zImage.elf to the memory 0xf00000
3. I have typed: bootelf 0xf00000
Linux has hanged during uncompressing
4. I have stopped the system and reloaded u-boot to examine __log_buf
( address 0x20f0c4)
Unfortunately all the bytes were set just to zero.
5. I have stopped the system
6. I have downloaded via jtag the zImage.elf and started it
the system has started properly
7. I have stopped the system and reloaded u-boot to examine the memory
8. I have typed: md 0x20f0c4 100 and it showed me the buffer:
0020f0c4: 3c353e5b 20202020 302e3030 30303030 <5>[ 0.000000
0020f0d4: 5d204c69 6e757820 76657273 696f6e20 ] Linux version
0020f0e4: 322e362e 32312d72 63362028 726f6f74 2.6.21-rc6 (root
0020f0f4: 40706335 32313529 20286763 63207665 @pc5215) (gcc ve
0020f104: 7273696f 6e20342e 302e3229 20233136 rsion 4.0.2) #16
0020f114: 204d6f6e 20417567 20323720 31323a33 Mon Aug 27 12:3
0020f124: 373a3038 20434553 54203230 30370a3c 7:08 CEST 2007.<
0020f134: 363e5b20 20202030 2e303030 3030305d 6>[ 0.000000]
0020f144: 2058696c 696e7820 4d4c3430 33205265 Xilinx ML403 Re
0020f154: 66657265 6e636520 53797374 656d2028 ference System (
0020f164: 56697274 65782d34 20465829 0a3c373e Virtex-4 FX).<7>
0020f174: 5b202020 20302e30 30303030 305d2045 [ 0.000000] E
0020f184: 6e746572 696e6720 6164645f 61637469 ntering add_acti
0020f194: 76655f72 616e6765 28302c20 302c2038 ve_range(0, 0, 8
0020f1a4: 31393129 20302065 6e747269 6573206f 191) 0 entries o
0020f1b4: 66203235 36207573 65640a3c 343e5b20 f 256 used.<4>[
0020f1c4: 20202030 2e303030 3030305d 205a6f6e 0.000000] Zon
0020f1d4: 65205046 4e207261 6e676573 3a0a3c34 e PFN ranges:.<4
So it seams to be that the address points to the __log_buf (I hope).
Does it mean that when I try to start zImage kernel from u-boot
it hangs during uncompressing the image and it does even start booting?
Best Regards
Mirek
On Tue, 28 Aug 2007, Grant Likely wrote:
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
quoted
Hi Grant,
Thanks for your answer.
I have found in the System.map :
c020f0c4 b __log_buf
Is the address c020f0c4 relative to the .data segment?
0xc0000000 are virtual kernel addresses; not physical addresses. If
the MMU is still on, then you need to use the virtual address to
examine memory. If the MMU is off (such as after reloading u-boot),
then you need to change 0xCxxxxxxx to 0x0xxxxxxxx.
quoted
I understand that when the system hangs I should type in the XMD window
stop.
Is there anyway to examine the memory from the XMD window? or should I
reload the u-boot and examine the memory from u-boot?
I don't know; I've never used XMD. Read the XMD documentation. You
can do it from u-boot too.
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-28 15:10:01
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
8. I have typed: md 0x20f0c4 100 and it showed me the buffer:
0020f0c4: 3c353e5b 20202020 302e3030 30303030 <5>[ 0.000000
0020f0d4: 5d204c69 6e757820 76657273 696f6e20 ] Linux version
0020f0e4: 322e362e 32312d72 63362028 726f6f74 2.6.21-rc6 (root
0020f0f4: 40706335 32313529 20286763 63207665 @pc5215) (gcc ve
0020f104: 7273696f 6e20342e 302e3229 20233136 rsion 4.0.2) #16
0020f114: 204d6f6e 20417567 20323720 31323a33 Mon Aug 27 12:3
0020f124: 373a3038 20434553 54203230 30370a3c 7:08 CEST 2007.<
0020f134: 363e5b20 20202030 2e303030 3030305d 6>[ 0.000000]
0020f144: 2058696c 696e7820 4d4c3430 33205265 Xilinx ML403 Re
0020f154: 66657265 6e636520 53797374 656d2028 ference System (
0020f164: 56697274 65782d34 20465829 0a3c373e Virtex-4 FX).<7>
0020f174: 5b202020 20302e30 30303030 305d2045 [ 0.000000] E
0020f184: 6e746572 696e6720 6164645f 61637469 ntering add_acti
0020f194: 76655f72 616e6765 28302c20 302c2038 ve_range(0, 0, 8
0020f1a4: 31393129 20302065 6e747269 6573206f 191) 0 entries o
0020f1b4: 66203235 36207573 65640a3c 343e5b20 f 256 used.<4>[
0020f1c4: 20202030 2e303030 3030305d 205a6f6e 0.000000] Zon
0020f1d4: 65205046 4e207261 6e676573 3a0a3c34 e PFN ranges:.<4
So it seams to be that the address points to the __log_buf (I hope).
Does it mean that when I try to start zImage kernel from u-boot
it hangs during uncompressing the image and it does even start booting?
Think about what you're looking at. That buffer is ASCII text. Does
it look like the entire buffer is displayed, or does it look like
there is more?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
8. I have typed: md 0x20f0c4 100 and it showed me the buffer:
0020f0c4: 3c353e5b 20202020 302e3030 30303030 <5>[ 0.000000
0020f0d4: 5d204c69 6e757820 76657273 696f6e20 ] Linux version
0020f0e4: 322e362e 32312d72 63362028 726f6f74 2.6.21-rc6 (root
0020f0f4: 40706335 32313529 20286763 63207665 @pc5215) (gcc ve
0020f104: 7273696f 6e20342e 302e3229 20233136 rsion 4.0.2) #16
0020f114: 204d6f6e 20417567 20323720 31323a33 Mon Aug 27 12:3
0020f124: 373a3038 20434553 54203230 30370a3c 7:08 CEST 2007.<
0020f134: 363e5b20 20202030 2e303030 3030305d 6>[ 0.000000]
0020f144: 2058696c 696e7820 4d4c3430 33205265 Xilinx ML403 Re
0020f154: 66657265 6e636520 53797374 656d2028 ference System (
0020f164: 56697274 65782d34 20465829 0a3c373e Virtex-4 FX).<7>
0020f174: 5b202020 20302e30 30303030 305d2045 [ 0.000000] E
0020f184: 6e746572 696e6720 6164645f 61637469 ntering add_acti
0020f194: 76655f72 616e6765 28302c20 302c2038 ve_range(0, 0, 8
0020f1a4: 31393129 20302065 6e747269 6573206f 191) 0 entries o
0020f1b4: 66203235 36207573 65640a3c 343e5b20 f 256 used.<4>[
0020f1c4: 20202030 2e303030 3030305d 205a6f6e 0.000000] Zon
0020f1d4: 65205046 4e207261 6e676573 3a0a3c34 e PFN ranges:.<4
So it seams to be that the address points to the __log_buf (I hope).
Does it mean that when I try to start zImage kernel from u-boot
it hangs during uncompressing the image and it does even start booting?
Think about what you're looking at. That buffer is ASCII text. Does
it look like the entire buffer is displayed, or does it look like
there is more?
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-28 15:28:03
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
This buffer refers to the kernel which I boot straight from jtag but not
u-boot.
/me remembers something....
How big is your kernel image? Seems to me I've had problems with
kernel images that were too large not being uncompressed properly.
Can you hook up GDB and debug u-boot? Find out where it is hanging?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
Hi Grant,
My zImage.elf has 1.1 MB and uImage 968 KB.
Could you tell me please how to hook up GDB to debug u-boot?
I have examined the file in u-boot which does the bootelf:
cat common/cmd_elf.c:
int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
:
:
:
:
addr = load_elf_image (addr);
printf ("## Starting application at 0x%08lx ...\n", addr);
/*
* QNX images require the data cache is disabled.
* Data cache is already flushed, so just turn it off.
*/
if (dcache_status ())
dcache_disable ();
/*
* pass address parameter as argv[0] (aka command name),
* and all remaining args
*/
rc = ((ulong (*)(int, char *[])) addr) (--argc, &argv[1]);
:
:
}
and I have determined that the system hangs just after the command:
rc = ((ulong (*)(int, char *[])) addr) (--argc, &argv[1]);
This command starts executing the linux image from the location:
0x00400000
On the console it is printed the following stuff:
loaded at: 00400000 004F3138
board data at: 004F1120 004F1138
relocated to: 004040B4 004040CC
zimage at: 00404E59 004F003D
avail ram: 004F4000 01FFFFFF
Linux/PPC load: console=ttyUL0,9600 root=/dev/nfs rw
nfsroot=129.117.144.113:/opt/eldk41/ppc_4xx,tcp
ip=::::virtex4-mirek:eth0:dhcp panic=1
Uncompressing Linux...
It seems to be that it is the Linux kernel which does the uncompression
and it hangs. The question remain why?
Maybe it is not enough space in RAM or the address in RAM where the
uncompression is done is wrong.
When I load the u-boot to ram via jtag it is placed under the address:
0x800000 as follows:
section, .text: 0x00800000-0x0081513c
section, .resetvec: 0x0081513c-0x00815140
section, .rodata: 0x00815140-0x00817ce0
section, .reloc: 0x00817d00-0x00818674
section, .data: 0x00818674-0x00818b08
section, .data.rel: 0x00818b08-0x00818b34
section, .data.rel.local: 0x00818b34-0x00818f6c
section, .u_boot_cmd: 0x00818f6c-0x008191dc
section, .bss: 0x00819200-0x0081dd04
Than I load the zImage.elf via tftp to the memory location
0xf00000.
When I issue the command bootelf 0xf00000 the zImage.elf is placed in the
memory:
0x400000 as follows:
section, .text: 0x00400000-0x004036cc
section, .data: 0x00404000-0x004f7000
section, .bss: 0x004f7000-0x004f9138
After that uncompression of zImage.elf starts. I am just wandering which
memory location is involved for that?
My evaluation board has 32 MB of SDRAM address range:
(0x00000000-0x01ffffff) DDR_SDRAM_1 plb
Any Idea?
Best Regards
Mirek
On Tue, 28 Aug 2007, Grant Likely wrote:
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
quoted
This buffer refers to the kernel which I boot straight from jtag but not
u-boot.
/me remembers something....
How big is your kernel image? Seems to me I've had problems with
kernel images that were too large not being uncompressed properly.
Can you hook up GDB and debug u-boot? Find out where it is hanging?
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-29 15:17:43
On 8/29/07, Miroslaw Dach [off-list ref] wrote:
Hi Grant,
My zImage.elf has 1.1 MB and uImage 968 KB.
Could you tell me please how to hook up GDB to debug u-boot?
Ah-HA! You're using the wrong type of kernel image. When booting
from u-boot, you should be using a 'uImage', not a 'zImage.elf'.
(generated with 'make uImage' in the kernel tree). An you should use
the 'bootm' command to boot the kernel.
With bootm, u-boot can pass parameters to the kernel and it is u-boot
that does the uncompression (instead of the zImage wrapper).
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
Hi Grant,
Yes you are right that I should use uImage instead of zImage.elf
I have tried first bootm and uImage but it also hanged during
uncompression so next I have tried bootelf zImage.elf to see how this
works because I was able to run zImage.elf straight from EDK via jtag.
Cheers
Mirek
On Wed, 29 Aug 2007, Grant Likely wrote:
On 8/29/07, Miroslaw Dach [off-list ref] wrote:
quoted
Hi Grant,
My zImage.elf has 1.1 MB and uImage 968 KB.
Could you tell me please how to hook up GDB to debug u-boot?
Ah-HA! You're using the wrong type of kernel image. When booting
from u-boot, you should be using a 'uImage', not a 'zImage.elf'.
(generated with 'make uImage' in the kernel tree). An you should use
the 'bootm' command to boot the kernel.
With bootm, u-boot can pass parameters to the kernel and it is u-boot
that does the uncompression (instead of the zImage wrapper).
Cheers,
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
I have done further investigation with bootelf and zImage.elf (from
u-boot) and it seems to be that the system fails during image
uncompression: The last command executed is: r = zlib_inflate(&s,
Z_FINISH); /* file: ./arch/ppc/boot/common/misc-common.c */
zlib_inflate function code is in ./lib/zlib_inflate/inflate.c
Mirek
On Tue, 28 Aug 2007, Grant Likely wrote:
On 8/28/07, Miroslaw Dach [off-list ref] wrote:
quoted
This buffer refers to the kernel which I boot straight from jtag but not
u-boot.
/me remembers something....
How big is your kernel image? Seems to me I've had problems with
kernel images that were too large not being uncompressed properly.
Can you hook up GDB and debug u-boot? Find out where it is hanging?
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
Hi All,
I have modified the linux kernel to have it smaller than I have
tried once again with bootm and uImage. The result is as shown below:
1. First I have downloaded u-boot via jtag:
XMD% dow u-boot.elf
section, .text: 0x01300000-0x0131513c
section, .resetvec: 0x0131513c-0x01315140
section, .rodata: 0x01315140-0x01317d10
section, .reloc: 0x01317e00-0x0131877c
section, .data: 0x0131877c-0x01318c40
section, .data.rel: 0x01318c40-0x01318c6c
section, .data.rel.local: 0x01318c6c-0x013190a4
section, .u_boot_cmd: 0x013190a4-0x01319314
section, .bss: 0x01319400-0x0131df04
Downloaded Program u-boot13Debug.elf
Setting PC with program start addr = 0x01300100
PC reset to 0x01300100, Clearing MSR Register
XMD% run
2. The u-boot has started properly
3. Than I have loaded via tftp the uImage
=> tftp 0xf00000 uImage
TFTP from server 129.117.144.113; our IP address is 129.117.144.157
Filename 'uImage'.
Load address: 0xf00000
Loading: #################################################################
#################################################################
##############################################################
done
Bytes transferred = 981900 (efb8c hex)
=> bootm 0xf00000
## Booting image at 00f00000 ...
Image Name: Linux-2.6.21-rc6
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 981836 Bytes = 958.8 kB
Load Address: 00400000
Entry Point: 00400000
Uncompressing Kernel Image ... OK
Bad trap at PC: c0002218, SR: 21030, vector=1100
NIP: C0002218 XER: 00000000 LR: 00400018 REGS: 01fc0578 TRAP: 1100 DAR: 01FF71AC
MSR: 00021030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
GPR00: C0002218 01FC0668 B022C01B C00003C0 C0000000 00000000 007FFF00 007FFF7C
GPR08: C1FD9AC0 01FC0C0C 0000AE58 01FFEEC4 01FBFCA0 FFFFFFFF 02000E00 00000001
GPR16: 007FFF7C 00400000 00800000 FFFFFFFF 007FFF00 01FFA104 00000000 01FC0760
GPR24: 00000002 007FFE80 00000001 007FFF7C 007FFF00 00000000 00000000 007FFE80
Call backtrace:
Exception in kernel pc c0002218 signal 0
4. I have stopped the system and I have reloaded u-boot to see what is in
the RAM memory:
My __log_buf (of uImage) is under the address :
c02070c4 b __log_buf
So I have dumped the data from this memory location:
=> md 0x2070c4 100
002070c4: 20257320 69732043 6f727235 70746564 %s is Corr5pted
002070d4: 20615400 25720000 7265646d 72654154 aT.%r..redmreAT
002070e4: 00000000 6b65322a 656c0004 67617465 ....ke2*el..gate
002070f4: 64000000 72614000 6d727400 6a652232 d...ra@.mrt.je"2
00207104: 61000000 62697264 00000000 2f655463 a...bird..../eTc
00207114: 2f497060 6b652465 322f7256 5f7052c5 /Ip`ke$e2/rV_pR.
00207124: 746f7100 676c2a62 616c0000 6e6f7748 toq.gl*bal..nowH
00207134: 65726500 73693465 00000200 27657462 ere.si4e....'etb
00207144: 2f697070 6f752065 322eaa50 5f73436f /ippou e2..P_sCo
00207154: 70655100 2f657022 2f697062 6f757441 peQ./ep"/ipboutA
00207164: 32277274 5b722121 6c6d7380 2f657413 2'rt[r!!lms./et.
00207174: 2f697872 6f357060 322f3264 5f647364 /ixro5p`2/2d_dsd
00207184: 69656c64 00000000 30782520 32780000 ield....0x% 2x..
00207194: 64656640 756c2400 2f653422 2f697070 def@ul$./e4"/ipp
002071a4: 6f757445 322f7274 5f746162 6c654300 outE2/rt_tableC.
002071b4: 10099124 100ae0d4 100aa0e8 100b1838 ...$...........8
002071c4: 100aa3e4 00000000 00000000 00000000 ................
002071d4: 100a6070 100ae0f8 100aa0ec 100ae100 ..`p............
I do not understand what is going on with my kernel image.
When I try to start zImage.elf with bootelf command the system hangs during
uncompressing.
When I try to start uImage with bootm command the image is uncompressed
but it does not start properly.
Any idea
Best Regards
Mirek
On Wed, 29 Aug 2007, Grant Likely wrote:
On 8/29/07, Miroslaw Dach [off-list ref] wrote:
quoted
Hi Grant,
My zImage.elf has 1.1 MB and uImage 968 KB.
Could you tell me please how to hook up GDB to debug u-boot?
Ah-HA! You're using the wrong type of kernel image. When booting
from u-boot, you should be using a 'uImage', not a 'zImage.elf'.
(generated with 'make uImage' in the kernel tree). An you should use
the 'bootm' command to boot the kernel.
With bootm, u-boot can pass parameters to the kernel and it is u-boot
that does the uncompression (instead of the zImage wrapper).
Cheers,
g.
--
=============================================================================
Miroslaw Dach (Miroslaw.Dach@psi.ch) - SLS/Controls Group
PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================
From: Grant Likely <hidden> Date: 2007-08-30 13:21:31
On 8/30/07, Miroslaw Dach [off-list ref] wrote:
When I try to start zImage.elf with bootelf command the system hangs during
uncompressing.
When I try to start uImage with bootm command the image is uncompressed
but it does not start properly.
Ugh, I'm stumped. Sorry. I'd spend some more quality time with your
debugger to trace the exact boot path.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195