linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Linux 2_4_devel kernel hangs after control transferred from u-boot
@ 2003-10-02 13:29 Stuart Vivian
  2003-10-02 13:43 ` Wolfgang Denk
  2003-10-02 15:12 ` Matt Porter
  0 siblings, 2 replies; 6+ messages in thread
From: Stuart Vivian @ 2003-10-02 13:29 UTC (permalink / raw)
  To: linuxppc-embedded


Hi all,

I am trying to get a linux kernel to build and run on a Cogent CSB272
(IBM PPC 405GP processor) running a U-boot 0.4.0 bootloader. I can tftp
a uImage into ram and it passes check, but when I run bootm it
uncompresses the kernel and hangs after it starts executing the kernel
at address 0x00000000.

I was given a hardhat vmlinux elf file that I can package to a uImage
and run (although it stops at the Calibrating Delay loop... Stage, but
that's another issue). I need to be able to recompile a kernel for the
board and downloaded linuxppc_2_4_devel from mvista. This compiles fine
and produces a new vmlinux. I've started off by using the walnut 405
config file to build the kernel, since they're pretty similar.

Any ideas where to start debugging this? I'm relatively new in embedded
stuff and linux in general, so it might be something simple, but don't
know where to start. Have a BDI2000 but no gdb driver yet, so can't put
in breakpoints etc.

The output I get from u-boot before it hangs up is shown below. There's
no ram disk image built in at the moment or initrd, but I just wan't to
get it off the ground and printing to the console to start.

Many thanks

Stuart

--------------------------------------------
U-Boot 0.4.0 (Oct  2 2003 - 09:46:35)

CPU:   IBM PowerPC 405GP Rev. E at 199.980 MHz (PLB=66, OPB=16, EBC=33
MHz)
           PCI sync clock at 33 MHz, internal PCI arbiter enabled
           16 kB I-Cache 8 kB D-Cache
Board: ### No HW ID - assuming CSB272
I2C:   ready
DRAM:  64 MB
Top of RAM usable for U-Boot at: 04000000
Reserving 221k for U-Boot at: 03fc8000
Reserving 384k for malloc() at: 03f68000
Reserving 112 Bytes for Board Info at: 03f67f90
Reserving 44 Bytes for Global Data at: 03f67f64
Stack Pointer at: 03f67f48
New Stack Pointer is: 03f67f48
Now running in RAM - U-Boot at: 03fc8000
FLASH: 32 MB
PCI Scan: Found Bus 0, Device 0, Function 0
In:    serial
Out:   serial
Err:   serial
setting up fs6377!
Reset Ethernet PHY
KGDB:  kgdb ready
ready
U-Boot relocated to 03fc8000
Net:   ppc_4xx_eth0
BEDBUG:ready
=> tftp 1000000 uImage
Trying ppc_4xx_eth0
using 100bT
using full duplex
ENET Speed is 100 Mbps - FULL duplex connection
TFTP from server 192.168.2.2; our IP address is 192.168.2.117
Filename 'uImage'.
Load address: 0x1000000
Loading:
#################################################################
         ###################################################
done
Bytes transferred = 591772 (9079c hex)
=> imi 1000000

## Checking Image at 01000000 ...
   Image Name:   Linux Kernel Image
   Created:      2003-10-02  12:57:10 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    591708 Bytes = 577.8 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
=> printenv
bootargs=root=/dev/ram console=ttyS0,9600 console=tty0
baudrate=9600
loads_echo=1
ethaddr=2A:EE:71:4C:11:9D
autoload=n
stdin=serial
stdout=serial
stderr=serial
filesize=9079c
gatewayip=192.168.2.1
netmask=255.255.255.0
ipaddr=192.168.2.117
serverip=192.168.2.2

Environment size: 261/262140 bytes
=> bootm 1000000
## Booting image at 01000000 ...
   Image Name:   Linux Kernel Image
   Created:      2003-10-02  12:57:10 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    591708 Bytes = 577.8 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Current stack ends at 0x03F675E0 => set upper limit to 0x00800000
## cmdline at 0x007FFC00 ... 0x007FFC2D
bd address  = 0x03F67F90
memstart    = 0x00000000
memsize     = 0x04000000
flashstart  = 0xFE000000
flashsize   = 0x02000000
flashoffset = 0x00000000
sramstart   = 0x00000000
sramsize    = 0x00000000
bootflags   = 0xFFFFFFFF
procfreq    = 199.980 MHz
plb_busfreq = 66.660 MHz
pci_busfreq = 33.330 MHz
ethaddr     = 2A:EE:71:4C:11:9D
IP addr     = 192.168.2.117
baudrate    =   9600 bps
No initrd
## Transferring control to Linux (at address 00000000) ...
--------------------------------------------------------------

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux 2_4_devel kernel hangs after control transferred from u-boot
  2003-10-02 13:29 Linux 2_4_devel kernel hangs after control transferred from u-boot Stuart Vivian
@ 2003-10-02 13:43 ` Wolfgang Denk
  2003-10-02 15:12 ` Matt Porter
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2003-10-02 13:43 UTC (permalink / raw)
  To: Stuart Vivian; +Cc: linuxppc-embedded


In message <A4EB77D93A60F347A518AC05291647D9032E5E@domosvr1.domo.local> you wrote:
>
> I am trying to get a linux kernel to build and run on a Cogent CSB272
> (IBM PPC 405GP processor) running a U-boot 0.4.0 bootloader. I can tftp
> a uImage into ram and it passes check, but when I run bootm it
> uncompresses the kernel and hangs after it starts executing the kernel
> at address 0x00000000.

This is a FAQ. See
http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel

> I was given a hardhat vmlinux elf file that I can package to a uImage
> and run (although it stops at the Calibrating Delay loop... Stage, but

Probably the same problem - bad parameters (clock frequencies) passed
to the kernel.

> that's another issue). I need to be able to recompile a kernel for the
> board and downloaded linuxppc_2_4_devel from mvista. This compiles fine
> and produces a new vmlinux. I've started off by using the walnut 405
> config file to build the kernel, since they're pretty similar.

Ummm... you better make sure it really matches your board. Similar is
not enough.

> Any ideas where to start debugging this? I'm relatively new in embedded
> stuff and linux in general, so it might be something simple, but don't
> know where to start. Have a BDI2000 but no gdb driver yet, so can't put
> in breakpoints etc.

??? Can't parse that.

You can use the BDI's telnet interface to set breakpoints,  too.  And
you  don;t know any special "gdb driver", as any plain GDB will allow
you to connect to the BDI which "speaks" GDB remote protocol over the
network.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
"Why should we subsidize intellectual curiosity?" - Ronald Reagan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux 2_4_devel kernel hangs after control transferred from u-boot
  2003-10-02 13:29 Linux 2_4_devel kernel hangs after control transferred from u-boot Stuart Vivian
  2003-10-02 13:43 ` Wolfgang Denk
@ 2003-10-02 15:12 ` Matt Porter
  2003-10-02 17:00   ` Dan Malek
  1 sibling, 1 reply; 6+ messages in thread
From: Matt Porter @ 2003-10-02 15:12 UTC (permalink / raw)
  To: Stuart Vivian; +Cc: linuxppc-embedded


On Thu, Oct 02, 2003 at 02:29:18PM +0100, Stuart Vivian wrote:
>
> Hi all,
>
> I am trying to get a linux kernel to build and run on a Cogent CSB272
> (IBM PPC 405GP processor) running a U-boot 0.4.0 bootloader. I can tftp
> a uImage into ram and it passes check, but when I run bootm it
> uncompresses the kernel and hangs after it starts executing the kernel
> at address 0x00000000.
>
> I was given a hardhat vmlinux elf file that I can package to a uImage
> and run (although it stops at the Calibrating Delay loop... Stage, but
> that's another issue). I need to be able to recompile a kernel for the
> board and downloaded linuxppc_2_4_devel from mvista. This compiles fine
> and produces a new vmlinux. I've started off by using the walnut 405
> config file to build the kernel, since they're pretty similar.

Hrm, it used to be that everybody said their board was "just like
a Sandpoint".  I guess walnut is like that in the 4xx world. :)

At any rate, you need to "port" the kernel to your specific board.
There are many board-specific parameters/devices that have to be
accounted for.  The first thing that you are running into is that
a Walnut kernel has code to set clocking to use the external clock,
in addition it expects to get it's timer frequencies passed into the
kernel in the board info pointer...are you providing the correct
info?  See arch/ppc/kernel/ppc4xx_setup.c and
arch/ppc/platforms/walnut.c...then go from there.

> Any ideas where to start debugging this? I'm relatively new in embedded
> stuff and linux in general, so it might be something simple, but don't
> know where to start. Have a BDI2000 but no gdb driver yet, so can't put
> in breakpoints etc.

For early bringup, it's far easier to just use the telnet interface
and keep a window or two handy to look at the vmlinux disassembly
and grep for important symbol addresses like log_buf.  Every developer
I work with does new board bringup and they never use gdb on top of
the BDI.

-Matt

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux 2_4_devel kernel hangs after control transferred from u-boot
  2003-10-02 15:12 ` Matt Porter
@ 2003-10-02 17:00   ` Dan Malek
  2003-10-02 19:33     ` Matt Porter
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Malek @ 2003-10-02 17:00 UTC (permalink / raw)
  To: Matt Porter; +Cc: Stuart Vivian, linuxppc-embedded


Matt Porter wrote:

> Hrm, it used to be that everybody said their board was "just like
> a Sandpoint".  I guess walnut is like that in the 4xx world. :)

I did the port for this board over a year ago and gave it to a
few people that were going to "finish it and check it in"....I
guess that didn't happen.  Lemme see what I can do about getting
ftp running on my server again and I'll point you to the tarball....

The only thing similar to a Walnut is it uses a 405GP, there is
nothing else similar to a Walnut......

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux 2_4_devel kernel hangs after control transferred from u-boot
  2003-10-02 17:00   ` Dan Malek
@ 2003-10-02 19:33     ` Matt Porter
  2003-10-02 19:54       ` Dan Malek
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Porter @ 2003-10-02 19:33 UTC (permalink / raw)
  To: Dan Malek; +Cc: Matt Porter, Stuart Vivian, linuxppc-embedded


On Thu, Oct 02, 2003 at 01:00:26PM -0400, Dan Malek wrote:
>
> Matt Porter wrote:
>
> > Hrm, it used to be that everybody said their board was "just like
> > a Sandpoint".  I guess walnut is like that in the 4xx world. :)
>
> I did the port for this board over a year ago and gave it to a
> few people that were going to "finish it and check it in"....I
> guess that didn't happen.  Lemme see what I can do about getting
> ftp running on my server again and I'll point you to the tarball....

That should save him some time. Any other ports to standard boards
you have laying around? :)

> The only thing similar to a Walnut is it uses a 405GP, there is
> nothing else similar to a Walnut......

Yup, that makes it just like a Walnut similar to the way that every
MPC750/MPC107 board is just like a Sandpoint.

-Matt

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux 2_4_devel kernel hangs after control transferred from u-boot
  2003-10-02 19:33     ` Matt Porter
@ 2003-10-02 19:54       ` Dan Malek
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Malek @ 2003-10-02 19:54 UTC (permalink / raw)
  To: Matt Porter; +Cc: Stuart Vivian, linuxppc-embedded


Matt Porter wrote:

> That should save him some time. Any other ports to standard boards
> you have laying around? :)

I'll take a look.  My Dad is visiting so I had to clean up the house.
I'll never find anything again :-)

I have one for the Cogent 8245 board, too......but, that's just
like a Sandpoint :-)


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-02 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02 13:29 Linux 2_4_devel kernel hangs after control transferred from u-boot Stuart Vivian
2003-10-02 13:43 ` Wolfgang Denk
2003-10-02 15:12 ` Matt Porter
2003-10-02 17:00   ` Dan Malek
2003-10-02 19:33     ` Matt Porter
2003-10-02 19:54       ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).