linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ?Loading and debugging a linux kernel on a walnut board with a BDI2000
       [not found] <B25E2E5A003CD311B61E00902778AF2A02637685@SERVER1>
@ 2001-07-02 16:18 ` ibm405gp
  2001-07-02 16:23   ` Scott Anderson
  0 siblings, 1 reply; 6+ messages in thread
From: ibm405gp @ 2001-07-02 16:18 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'


\x7f\x7f

Does anyone try to load an debug a linuk kernel with a BDI2000 on a
Walnut board (IBM 405GP).
My "vmlinuz-walnut" file generated with "make zImage" (with mvista
toolschain) seems invalid for
the bdi2000 but it works fine with 1.15 ROM Monitor

BDI>load
Loading vmlinuz-walnut , please wait ....
# Invalid program file format

Thanks for your help.

Phil

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

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

* Re: ?Loading and debugging a linux kernel on a walnut board with a BDI2000
  2001-07-02 16:18 ` ?Loading and debugging a linux kernel on a walnut board with a BDI2000 ibm405gp
@ 2001-07-02 16:23   ` Scott Anderson
  2001-07-02 16:37     ` Mark Powell
  2001-07-03 16:25     ` ibm405gp
  0 siblings, 2 replies; 6+ messages in thread
From: Scott Anderson @ 2001-07-02 16:23 UTC (permalink / raw)
  To: ibm405gp; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


ibm405gp wrote:
> My "vmlinuz-walnut" file generated with "make zImage" (with mvista
> toolschain) seems invalid for
> the bdi2000 but it works fine with 1.15 ROM Monitor

It's been a while since I played with it, but as I recall the makefile
tacks on a header to create an IBM Evaluation Board image.  To figure
out what it is doing, you might want to look in
arch/ppc/boot/tree/Makefile for something called mkevimg.

    Scott Anderson
    scott_anderson@mvista.com   MontaVista Software Inc.
    (408)328-9214               1237 East Arques Ave.
    http://www.mvista.com       Sunnyvale, CA  94085

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

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

* Re: ?Loading and debugging a linux kernel on a walnut board with a  BDI2000
  2001-07-02 16:23   ` Scott Anderson
@ 2001-07-02 16:37     ` Mark Powell
  2001-07-03 16:25     ` ibm405gp
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Powell @ 2001-07-02 16:37 UTC (permalink / raw)
  To: ibm405gp; +Cc: linuxppc-embedded


Ah yes, that's right - Scott reminded me. The vmlinuz-walnut file is in the
image format for the IBM Treeboot mechanism.

When I moved to PPCBoot for the boot ROM (http://ppcboot.sourceforge.net) I
had make a PPCboot image from the plain kernel image, which is in
    arch/ppc/boot/images/vmlinux.gz

You might tree using this file with the BDI2000.

--
Mark Powell, Senior Software Engineer, Primagraphics Limited
New Cambridge House, Litlington, nr.Royston, Herts, SG8 0SS, UK
Tel. +44 1763 852222, Fax. 853324, http://www.primagraphics.co.uk


----- Original Message -----
From: "Scott Anderson" <scott_anderson@mvista.com>
To: "ibm405gp" <ibm405.linux@laposte.net>
Cc: <linuxppc-embedded@lists.linuxppc.org>
Sent: Monday, July 02, 2001 5:23 PM
Subject: Re: ?Loading and debugging a linux kernel on a walnut board with a
BDI2000



ibm405gp wrote:
> My "vmlinuz-walnut" file generated with "make zImage" (with mvista
> toolschain) seems invalid for
> the bdi2000 but it works fine with 1.15 ROM Monitor

It's been a while since I played with it, but as I recall the makefile
tacks on a header to create an IBM Evaluation Board image.  To figure
out what it is doing, you might want to look in
arch/ppc/boot/tree/Makefile for something called mkevimg.

    Scott Anderson
    scott_anderson@mvista.com   MontaVista Software Inc.
    (408)328-9214               1237 East Arques Ave.
    http://www.mvista.com       Sunnyvale, CA  94085


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

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

* Re: ?Loading and debugging a linux kernel on a walnut board with a BDI2000
  2001-07-03 16:25     ` ibm405gp
@ 2001-07-03 14:27       ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2001-07-03 14:27 UTC (permalink / raw)
  To: ibm405gp; +Cc: Scott Anderson, 'linuxppc-embedded@lists.linuxppc.org'


In message <3B41F1F8.C88E0460@laposte.net> you wrote:
>
> but the boot sequence fails, the zImage is not extracted
> In arch/ppc/boot/tree/main.c, i put some debug printf, and i have
> "Memcopy Done " instead of "gunzip done"
> What means the condition "if (im[0] == 0x1f && im[1] == 0x8b) " ?

Seems it checks for the magic number which  gzip  inserts  into  it's
compressed files.


Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
If you hear an onion ring, answer it.

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

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

* Re: ?Loading and debugging a linux kernel on a walnut board with a BDI2000
  2001-07-02 16:23   ` Scott Anderson
  2001-07-02 16:37     ` Mark Powell
@ 2001-07-03 16:25     ` ibm405gp
  2001-07-03 14:27       ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: ibm405gp @ 2001-07-03 16:25 UTC (permalink / raw)
  To: Scott Anderson; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


You're right,the "mkevimg" perl script suppressed the ELF header and
replace it by a
specific header for the IBM rom monitor.
I use the temporary file "zImage.tree.out" generated in the Makefile and
the format is now OK
but the boot sequence fails, the zImage is not extracted
In arch/ppc/boot/tree/main.c, i put some debug printf, and i have
"Memcopy Done " instead of "gunzip done"
What means the condition "if (im[0] == 0x1f && im[1] == 0x8b) " ?
It seems the "imageSect_start" is not set but this global variable is
assign by the "mkirimg" perl script in the Makefile :

// Makefile :

../utils/mkirimg -v treeboot.image treeboot.image.out irSectStart.txt
String table section header offset: 0xbf874
Section name strings start at: 0xbf6ea, 74 bytes.
Data section   - Address: 0x00406000, Size: 0x00000404, File Offset
0x00016000
Bss  section   - Address: 0x00406404, Size: 0x000012f4, File Offset
0x00016404
Image section  - Address: 0x00000000, Size: 0x000a6bf9
Initrd section not found in file: treeboot.image
irSectStartOffset Address: 0x004063d4
Updated symbol "imageSect_start" to 0x004076f8
Updated symbol "imageSect_size" to 0x000a6bf9


// arch/ppc/boot/tree/main.c

    /* Linux kernel image section */

    kick_watchdog();

    im = (unsigned char *)(imageSect_start);
    len = imageSect_size;
    dst = (void *)PROG_START;

    /* Check for the gzip archive magic numbers */

    if (im[0] == 0x1f && im[1] == 0x8b) {

        /* The gunzip routine needs everything nice and aligned */

	void *cp = (void *)ALIGN_UP(RAM_FREE, 8);
	avail_ram = (void *)(cp + ALIGN_UP(len, 8));	/* used by zalloc() */
	memcpy(cp, im, len);

	/* I'm not sure what the 0x200000 parameter is for, but it works. */
	/* It tells gzip the size of the area you wish to copy into.
	** The boot image is loaded beyond this point - if you increase this
	** number, then be sure to increase the load address of treeboot.
	*/

	gunzip(dst, 0x400000, cp, (int *)&len);
	printf("\n-----  Gunzip Done     --------\n\n");
    } else {
	memcpy(dst, im, len);
	printf("\n-----  MemCopy Done     --------\n\n");
    }




Scott Anderson a écrit :
>
> ibm405gp wrote:
> > My "vmlinuz-walnut" file generated with "make zImage" (with mvista
> > toolschain) seems invalid for
> > the bdi2000 but it works fine with 1.15 ROM Monitor
>
> It's been a while since I played with it, but as I recall the makefile
> tacks on a header to create an IBM Evaluation Board image.  To figure
> out what it is doing, you might want to look in
> arch/ppc/boot/tree/Makefile for something called mkevimg.
>
>     Scott Anderson
>     scott_anderson@mvista.com   MontaVista Software Inc.
>     (408)328-9214               1237 East Arques Ave.
>     http://www.mvista.com       Sunnyvale, CA  94085

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

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

* RE: ?Loading and debugging a linux kernel on a walnut board with a BDI2000
@ 2001-07-03 17:14 Wright, David
  0 siblings, 0 replies; 6+ messages in thread
From: Wright, David @ 2001-07-03 17:14 UTC (permalink / raw)
  To: Wolfgang Denk, ibm405gp; +Cc: linuxppc-embedded


It's not difficult to use a BDI2000 with a treeboot image on
a Walnut, if that's what you want to do.  Here are the steps:

1)  Build the image.
2)  Reset the Walnut using the BDI2000.
3)  Type "go" at the BDI2000 prompt.
4)  Type "halt" at the BDI2000 prompt.  (I'm not sure what happens
    with the code from the ROM, but you need to run it before you
    boot your image.)
5)  Load the image (BDI "LOAD" command).
6)  Type "go" at the BDI2000 prompt.

The trick is to set up your BDI2000 configuration file properly.
(Some of this I got from Abatron customer service, some of it I
worked out.)  The treeboot image file is simply the runnable image
with a 32-byte header stuck onto the front of it.  The runnable
image is loaded at 0x400000.  So you need these lines in the config
file:

FORMAT      BIN 0x3FFFE0
START       0x400000

in addition to the "FILE" line that specifies the image.  I think you
must reboot the BDI to get it to reread its config file.

If you want to stop the kernel right after it's gone into virtual
mode, you can set a hardware breakpoint at start_kernel.

  -- David Wright



> -----Original Message-----
> From: Wolfgang Denk [mailto:wd@denx.de]
> Sent: Tuesday, July 03, 2001 10:28 AM
> To: ibm405gp
> Cc: Scott Anderson; 'linuxppc-embedded@lists.linuxppc.org'
> Subject: Re: ?Loading and debugging a linux kernel on a walnut board
> with a BDI2000
>
>
>
> In message <3B41F1F8.C88E0460@laposte.net> you wrote:
> >
> > but the boot sequence fails, the zImage is not extracted
> > In arch/ppc/boot/tree/main.c, i put some debug printf, and i have
> > "Memcopy Done " instead of "gunzip done"
> > What means the condition "if (im[0] == 0x1f && im[1] == 0x8b) " ?
>
> Seems it checks for the magic number which  gzip  inserts  into  it's
> compressed files.
>
>
> Wolfgang Denk
>
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
> If you hear an onion ring, answer it.
>
>
>

** 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:[~2001-07-03 17:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <B25E2E5A003CD311B61E00902778AF2A02637685@SERVER1>
2001-07-02 16:18 ` ?Loading and debugging a linux kernel on a walnut board with a BDI2000 ibm405gp
2001-07-02 16:23   ` Scott Anderson
2001-07-02 16:37     ` Mark Powell
2001-07-03 16:25     ` ibm405gp
2001-07-03 14:27       ` Wolfgang Denk
2001-07-03 17:14 Wright, David

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).