linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Linux on Motorola Sandpoint/PPMC7400
@ 2000-08-28 19:55 Alex Shnitman
  2000-08-28 20:03 ` Gabriel Paubert
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Alex Shnitman @ 2000-08-28 19:55 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I've seen that Hard Hat Linux supports the Sandpoint board with
MPC8240 and MPC755. We have a 7400 processor there though. Does anyone
have any experience with this configuration? Can Linux run on it?

Also, is there anything special I should know about booting Linux from
dink32? Here's what I did, and how it failed. I got the latest kernel
snapshot from fsmlabs (I tried the same with both the latest 2.2 and
2.3 trees). I set in the Makefile ARCH := ppc and CROSS_COMPILE :=
powerpc-linux- (the prefix for the tools that I have installed, on my
Debian box, from www.emdebian.org). "make menuconfig", there I made
sure I have support for serial console, there I also set the boot
command line (PReP command line it says) to "console=ttyS0,9600
console=ttyS0 root=/dev/ram" (I don't really have initrd yet, I want
to see the kernel booting first). Then make zImage, which compiles
fine, "file arch/ppc/boot/zvmlinux" tells me it's indeed a PowerPC ELF
image, then I zsrec it to an srec file (I tried all kinds of offsets
-- does it matter?), then I upload it to the PowerPC box, then I "go"
to that offset, and then it just hangs...

Any ideas what to try? I'm simply lost...

Thanks a lot in advance!


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

Make it idiot-proof and someone will make a better idiot.
	-- Mikko Hänninen

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 19:55 Linux on Motorola Sandpoint/PPMC7400 Alex Shnitman
@ 2000-08-28 20:03 ` Gabriel Paubert
  2000-08-28 20:35   ` Alex Shnitman
  2000-08-28 23:14 ` Mark A. Greer
  2000-08-29 14:04 ` Tom Roberts
  2 siblings, 1 reply; 19+ messages in thread
From: Gabriel Paubert @ 2000-08-28 20:03 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


On Mon, 28 Aug 2000, Alex Shnitman wrote:

	Hi,

> Also, is there anything special I should know about booting Linux from
> dink32? Here's what I did, and how it failed. I got the latest kernel
> snapshot from fsmlabs (I tried the same with both the latest 2.2 and
> 2.3 trees). I set in the Makefile ARCH := ppc and CROSS_COMPILE :=
> powerpc-linux- (the prefix for the tools that I have installed, on my
> Debian box, from www.emdebian.org). "make menuconfig", there I made
> sure I have support for serial console, there I also set the boot
> command line (PReP command line it says) to "console=ttyS0,9600
> console=ttyS0 root=/dev/ram" (I don't really have initrd yet, I want
> to see the kernel booting first). Then make zImage, which compiles
> fine, "file arch/ppc/boot/zvmlinux" tells me it's indeed a PowerPC ELF
> image, then I zsrec it to an srec file (I tried all kinds of offsets
> -- does it matter?), then I upload it to the PowerPC box, then I "go"
> to that offset, and then it just hangs...

You can't start an ELF image from jumping at it sload address. But I know
only PPCBUG and OF, not your firmware.

	Gabriel.


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 20:03 ` Gabriel Paubert
@ 2000-08-28 20:35   ` Alex Shnitman
  2000-08-28 21:01     ` Gabriel Paubert
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Shnitman @ 2000-08-28 20:35 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, Gabriel!

On Mon, Aug 28, 2000 at 10:03:26PM +0200, you wrote the following:

> > Also, is there anything special I should know about booting Linux from
> > dink32? Here's what I did, and how it failed. I got the latest kernel
> > snapshot from fsmlabs (I tried the same with both the latest 2.2 and
> > 2.3 trees). I set in the Makefile ARCH := ppc and CROSS_COMPILE :=
> > powerpc-linux- (the prefix for the tools that I have installed, on my
> > Debian box, from www.emdebian.org). "make menuconfig", there I made
> > sure I have support for serial console, there I also set the boot
> > command line (PReP command line it says) to "console=ttyS0,9600
> > console=ttyS0 root=/dev/ram" (I don't really have initrd yet, I want
> > to see the kernel booting first). Then make zImage, which compiles
> > fine, "file arch/ppc/boot/zvmlinux" tells me it's indeed a PowerPC ELF
> > image, then I zsrec it to an srec file (I tried all kinds of offsets
> > to that offset, and then it just hangs...
>
> You can't start an ELF image from jumping at it sload address. But I know
> only PPCBUG and OF, not your firmware.

But zsrec (the thing that creates the srecords from the binary file)
strips the 64k ELF header of the kernel image, so it should be fine?
Or shouldn't it? Or did I misunderstand you?

If there's something basic that I don't understand, I'll be very happy
with an RTFM link too! The thing is that I've read through the FMs
that I've found and so far it looks to me as if I'm doing it right.

Thanks!


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

"Xenix is the pinnacle of modern UNIX design, and will be used for
many years to come."
	-- Xenix OS API manual

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 20:35   ` Alex Shnitman
@ 2000-08-28 21:01     ` Gabriel Paubert
  2000-08-29 16:43       ` Alex Shnitman
  0 siblings, 1 reply; 19+ messages in thread
From: Gabriel Paubert @ 2000-08-28 21:01 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


	Hi Alex,


> > You can't start an ELF image from jumping at it sload address. But I know
> > only PPCBUG and OF, not your firmware.
>
> But zsrec (the thing that creates the srecords from the binary file)
> strips the 64k ELF header of the kernel image, so it should be fine?
> Or shouldn't it? Or did I misunderstand you?

Maybe. Ok, then what type of PCI bridge do you have ?
(My boards all have Motorola Raven/Falcon or Hawk and I have special
bootloader for them, but it needs residual data provided by PPCBUG).

Do you know the memory and I/O map as seen from the processor ?
Is it truly ooking like standard PreP ?

	Regards,
	Gabriel


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 19:55 Linux on Motorola Sandpoint/PPMC7400 Alex Shnitman
  2000-08-28 20:03 ` Gabriel Paubert
@ 2000-08-28 23:14 ` Mark A. Greer
  2000-08-29 17:13   ` Alex Shnitman
  2000-08-29 14:04 ` Tom Roberts
  2 siblings, 1 reply; 19+ messages in thread
From: Mark A. Greer @ 2000-08-28 23:14 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


Alex Shnitman wrote:

> Hi,
>
> I've seen that Hard Hat Linux supports the Sandpoint board with
> MPC8240 and MPC755. We have a 7400 processor there though. Does anyone
> have any experience with this configuration? Can Linux run on it?
>
> Also, is there anything special I should know about booting Linux from
> dink32? Here's what I did, and how it failed. I got the latest kernel
> snapshot from fsmlabs (I tried the same with both the latest 2.2 and
> 2.3 trees).

Alex,

If you want to use Hard Hat Linux on the Sandpoint, you need to get it from
Monta Vista's CDK 1.2.  The LSP (Linux Support Package) you're looking for is
sp8240 (for Sanpoint 8240--also works with a 755/107 combo).  You can find it
online at ftp://ftp.mvista.com/pub/CDK/1.2/cd/PowerPC/ppc_82xx/RPMS/

You will probably need most of the rpms and so it will take a while (its based
on 2.4.0-test2).

The code in that LSP has not trickled up to fsmlabs so I'm not surprised what
you downloaded from there didn't work.

Nothing special for DINK except that you need to let it run until it puts its
prompt out (the kernel expects DINK to do some early initialization).

I haven't tested with a 7400 but it should be fairly close if it doesn't work
right out of the box.  That is, work without altivec.  I don't know what's
involved to use the altivec support in Linux.

Mark


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 19:55 Linux on Motorola Sandpoint/PPMC7400 Alex Shnitman
  2000-08-28 20:03 ` Gabriel Paubert
  2000-08-28 23:14 ` Mark A. Greer
@ 2000-08-29 14:04 ` Tom Roberts
  2 siblings, 0 replies; 19+ messages in thread
From: Tom Roberts @ 2000-08-29 14:04 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


Alex Shnitman wrote:
> I've seen that Hard Hat Linux supports the Sandpoint board with
> MPC8240 and MPC755. We have a 7400 processor there though. Does anyone
> have any experience with this configuration? Can Linux run on it?

While I have no experience with this board, I have run Linux on our
own boards, with MPC750, MPC755, and MPC7400. Note these three can
all be obtained in APPROXIMATELY pin-compatible packages, and their
architecthres are compatible (the 7400 adds AltiVec; I'm ignoring
differences in clock speed, cache size, etc). The MPC8240 is I believe
a completely different beast (I've never used one).

I used Linux Kernel 2.2.15 from YellowDog, heavily customized to run
on our boards. I made no MPC7400-specific changes, however. Note I
made no effort at all to optimize it for the 7400 (other than adding
the proper l2cr parameter -- yes, your software has to be aware of
the hardware platform's details (:-().

	I have only 1 board with 7400s, and we are modifying it to
	try and evaluate SMP architecture....


Tom Roberts	tjroberts@lucent.com

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 21:01     ` Gabriel Paubert
@ 2000-08-29 16:43       ` Alex Shnitman
  0 siblings, 0 replies; 19+ messages in thread
From: Alex Shnitman @ 2000-08-29 16:43 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, Gabriel!

On Mon, Aug 28, 2000 at 11:01:07PM +0200, you wrote the following:

> > > You can't start an ELF image from jumping at it sload address. But I know
> > > only PPCBUG and OF, not your firmware.
> >
> > But zsrec (the thing that creates the srecords from the binary file)
> > strips the 64k ELF header of the kernel image, so it should be fine?
> > Or shouldn't it? Or did I misunderstand you?
>
> Maybe. Ok, then what type of PCI bridge do you have ?

It uses a Winbond chip for PCI/ISA bridge. (I can find the exact model
if it'd help.)

> Do you know the memory and I/O map as seen from the processor ?

Yes, it's in the brochure.. If I send it to you would it help?

> Is it truly ooking like standard PreP ?

How would I know? Frankly, I'm a newbie in this business...


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

/real/ kernel hackers
    dd if=/dev/urandom of=/vmlinuz
and influence the Universal Randomosity Field.
	-- Gaal Yahas

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-28 23:14 ` Mark A. Greer
@ 2000-08-29 17:13   ` Alex Shnitman
  2000-08-29 19:16     ` Mark A. Greer
  2000-08-29 21:27     ` Mark A. Greer
  0 siblings, 2 replies; 19+ messages in thread
From: Alex Shnitman @ 2000-08-29 17:13 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, Mark!

On Mon, Aug 28, 2000 at 04:14:32PM -0700, you wrote the following:

> > I've seen that Hard Hat Linux supports the Sandpoint board with
> > MPC8240 and MPC755. We have a 7400 processor there though. Does anyone
> > have any experience with this configuration? Can Linux run on it?
> >
> > Also, is there anything special I should know about booting Linux from
> > dink32? Here's what I did, and how it failed. I got the latest kernel
> > snapshot from fsmlabs (I tried the same with both the latest 2.2 and
> > 2.3 trees).
>
> If you want to use Hard Hat Linux on the Sandpoint, you need to get it from
> Monta Vista's CDK 1.2.  The LSP (Linux Support Package) you're looking for is
> sp8240 (for Sanpoint 8240--also works with a 755/107 combo).  You can find it
> online at ftp://ftp.mvista.com/pub/CDK/1.2/cd/PowerPC/ppc_82xx/RPMS/

I downloaded the kernel and tried it. It starts booting, but it hangs
right after initializing the the OpenPIC. :-( I'll download the source
code tonight and try to look at it, although I don't have much hopes
-- I've never done kernel hacking at that level. At some point you
gotta learn though.

Is there any book that you recommend to get me started? Any other
docs/tips?

> I haven't tested with a 7400 but it should be fairly close if it doesn't work
> right out of the box.  That is, work without altivec.  I don't know what's
> involved to use the altivec support in Linux.

In most kernels I've seen (fsmlabs', and I think yours too) there was
a CONFIG_ALTIVEC option. What does it do?


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

/real/ kernel hackers
    dd if=/dev/urandom of=/vmlinuz
and influence the Universal Randomosity Field.
	-- Gaal Yahas

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-29 17:13   ` Alex Shnitman
@ 2000-08-29 19:16     ` Mark A. Greer
  2000-08-30 18:58       ` Alex Shnitman
  2000-08-30 19:02       ` Alex Shnitman
  2000-08-29 21:27     ` Mark A. Greer
  1 sibling, 2 replies; 19+ messages in thread
From: Mark A. Greer @ 2000-08-29 19:16 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


I downloaded the kernel and tried it. It starts booting, but it hangs

> right after initializing the the OpenPIC. :-( I'll download the source
> code tonight and try to look at it, although I don't have much hopes
> -- I've never done kernel hacking at that level. At some point you
> gotta learn though.
>
> Is there any book that you recommend to get me started? Any other
> docs/tips?

Oops, I should have included the sandpoint switch settings.  For this version of
the kernel, the sandpoint switches must be set as follows:

S4,S3: up, down
S5: down
S6: down (yours is probably up which is why it hung in openpic)

Try this and see if it helps.

Mark


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-29 17:13   ` Alex Shnitman
  2000-08-29 19:16     ` Mark A. Greer
@ 2000-08-29 21:27     ` Mark A. Greer
  1 sibling, 0 replies; 19+ messages in thread
From: Mark A. Greer @ 2000-08-29 21:27 UTC (permalink / raw)
  To: Alex Shnitman, linuxppc-embedded


> Is there any book that you recommend to get me started? Any other
> docs/tips?

_I_ don't know of any books that will help much for board ports.  That doesn't
mean there aren't any...

> > I haven't tested with a 7400 but it should be fairly close if it doesn't work
> > right out of the box.  That is, work without altivec.  I don't know what's
> > involved to use the altivec support in Linux.
>
> In most kernels I've seen (fsmlabs', and I think yours too) there was
> a CONFIG_ALTIVEC option. What does it do?

I haven't looked at the altivec support in linux.  Unless someone asnwers this for
you, you'll have to dig into the kernel/driver code yourself to figure it out.

Did the switch settings help?

Mark


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-29 19:16     ` Mark A. Greer
@ 2000-08-30 18:58       ` Alex Shnitman
  2000-08-30 19:20         ` Mark A. Greer
  2000-09-03  4:42         ` Bob Doyle
  2000-08-30 19:02       ` Alex Shnitman
  1 sibling, 2 replies; 19+ messages in thread
From: Alex Shnitman @ 2000-08-30 18:58 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, Mark!

On Tue, Aug 29, 2000 at 12:16:09PM -0700, you wrote the following:

> > I downloaded the kernel and tried it. It starts booting, but it hangs
> > right after initializing the the OpenPIC. :-( I'll download the source
> > code tonight and try to look at it, although I don't have much hopes
> > gotta learn though.
> >
> > Is there any book that you recommend to get me started? Any other
> > docs/tips?
>
> Oops, I should have included the sandpoint switch settings.  For
> this version of the kernel, the sandpoint switches must be set as
> follows:
>
> S4,S3: up, down
> S5: down
> S6: down (yours is probably up which is why it hung in openpic)
>
> Try this and see if it helps.

It did! The kernel boots fine now all the way through.

Thanks a lot!

Another question: what would be the best way to go about booting Linux
from the flash? Would flashing the kernel in instead of the dink32
monitor do the trick, or does dink32 do some important initializations
that are needed for the kernel to boot?


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

> *Real* programmers use
>     cat > a.out
No way, /real/ programmers use
    zcat > a.out
'cause you can type faster that way.
	-- from a Slashdot discussion

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-29 19:16     ` Mark A. Greer
  2000-08-30 18:58       ` Alex Shnitman
@ 2000-08-30 19:02       ` Alex Shnitman
  2000-08-31  0:45         ` Matt Porter
  1 sibling, 1 reply; 19+ messages in thread
From: Alex Shnitman @ 2000-08-30 19:02 UTC (permalink / raw)
  To: linuxppc-embedded


Hi again,

I'm trying to load a kernel with an initrd image. I have two questions.

First, I'm locating the kernel (via the s-records) at 400000. It then
relocates to 800000. I'm refering to this output:

DINK32_MAX >>go 400000
loaded at:     00400000 00414E20
relocated to:  00800000 00814E20
zimage at:     0040B000 00489577
relocated to:  00815000 00893577
initrd at:     00489577 00533299
relocated to:  00893577 0093D299
avail ram:     00400000 00800000

After that it boots fine.

If I try to locate it at 800000 to begin with, it fails like this:

DINK32_MAX >>go 800000
loaded at:     00800000 00814E20
zimage at:     0080B000 00889577
initrd at:     00889577 00933299
avail ram:     00400000 00800000

Linux/PPC load: root=/dev/ram
Uncompressing Linux...bad gzipped data
exit

Does that make sense to anyone? Not that it disturbs me, but I'm just
curious.

Second, I'm trying to load an initrd image. I put the compressed
filesystem image in arch/ppc/boot/ramdisk.image.gz and then did "make
zImage.initrd", which created zvmlinux.initrd which I'm loading.
However during bootup it says this:

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: registered device at major 7
loop: enabling 8 loop devices
RAMDISK: Couldn't find valid RAM disk image starting at 0.
Freeing initrd memory: 4194301k freed

Why does it look at offset 0? Isn't "make zImage.initrd" supposed to
update the ramdisk word to the correct offset?

I tried to pass offsets with the ramdisk_start parameter, but I don't
know exactly what to put there. I tried different byte offsets
(e.g. take the offset from the above relocation messages, or the
offset from objdump extracting the initrd section from
zvmlinux.initrd), but then thought that probably this parameter
expects block offsets. Now, none of these numbers divide by 1024 so I
can't make block numbers out of them.

What am I doing wrong?


--
Alex Shnitman                            | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il   +-----------------------
http://alexsh.hectic.net    UIN 188956    PGP key on web page
       E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

"Everything that can be invented has been invented."
	-- Charles Duell, head of the U.S. Patent Office, 1899

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-30 18:58       ` Alex Shnitman
@ 2000-08-30 19:20         ` Mark A. Greer
  2000-09-03  4:42         ` Bob Doyle
  1 sibling, 0 replies; 19+ messages in thread
From: Mark A. Greer @ 2000-08-30 19:20 UTC (permalink / raw)
  To: Alex Shnitman; +Cc: linuxppc-embedded


Alex Shnitman wrote:

> Hi, Mark!
>
> On Tue, Aug 29, 2000 at 12:16:09PM -0700, you wrote the following:
>
> > > I downloaded the kernel and tried it. It starts booting, but it hangs
> > > right after initializing the the OpenPIC. :-( I'll download the source
> > > code tonight and try to look at it, although I don't have much hopes
> > > gotta learn though.
> > >
> > > Is there any book that you recommend to get me started? Any other
> > > docs/tips?
> >
> > Oops, I should have included the sandpoint switch settings.  For
> > this version of the kernel, the sandpoint switches must be set as
> > follows:
> >
> > S4,S3: up, down
> > S5: down
> > S6: down (yours is probably up which is why it hung in openpic)
> >
> > Try this and see if it helps.
>
> It did! The kernel boots fine now all the way through.
>
> Thanks a lot!
>
> Another question: what would be the best way to go about booting Linux
> from the flash? Would flashing the kernel in instead of the dink32
> monitor do the trick, or does dink32 do some important initializations
> that are needed for the kernel to boot?

Yeah, at the moment, it does rely on DINK to do some initial setup (memory
controller, et. al.).  If you want, you can put that in the code yourself and
then you can get rid of DINK.  If you don't want to do that, you can still put
the kernel in flash (somewhere that doesn't overwrite DINK or the execption
vectors) as long as you have enough flash on your PPMC module.  You can then
do something like "env BOOT=<address>" to cause DINK to automatically jump to
that address--that's should be the address of the linux ppc bootloader--and
the kernel will boot up for you without your intervention.

Mark

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-31  0:45         ` Matt Porter
@ 2000-08-30 23:46           ` Dan Malek
  2000-08-31 11:13             ` Gabriel Paubert
  0 siblings, 1 reply; 19+ messages in thread
From: Dan Malek @ 2000-08-30 23:46 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-embedded


Matt Porter wrote:

> The bootloader relocation algorithm doesn't work when loaded at
> 0x800000.  Anything else will work.

Well, not exactly :-).  The code is actually written with some
assumptions because I couldn't make it do _everything_.  The download
should be located above the address where it is linked to execute.
For example, I download to 0x900000, the code relocates to 0x800000,
then uncompresses the kernel into the base of memory.

This follows the MPC8xx boot model with a larger memory window.
The MPC8xx had more constraints (smaller main memory 8 Mbyte start
up translation), so the load/execution addresses were lower in
memory.  Since the kernel is constantly growing and the 82xx had
a 16 MByte window, I just decided to move everything further up
in the address space.

Anything below the linked execution address (0x800000 in this case)
is considered fair game for allocation by the code, so it could
write over itself or other necessary information (like zImage or the
ramdisk).


> No clue here.

I am not sure the ramdisk stuff was ever tested.  I was just happy to
get the serial download of the kernel working and let NFS do the rest.
I am itching to fire up my 8240/Sandpoint (among other things :-), so
I may be able to help after the weekend.


	-- Dan

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-30 19:02       ` Alex Shnitman
@ 2000-08-31  0:45         ` Matt Porter
  2000-08-30 23:46           ` Dan Malek
  0 siblings, 1 reply; 19+ messages in thread
From: Matt Porter @ 2000-08-31  0:45 UTC (permalink / raw)
  To: linuxppc-embedded


On Wed, Aug 30, 2000 at 10:02:10PM +0300, Alex Shnitman wrote:
>
> Hi again,
>
> I'm trying to load a kernel with an initrd image. I have two questions.
>
> First, I'm locating the kernel (via the s-records) at 400000. It then
> relocates to 800000. I'm refering to this output:
>
> DINK32_MAX >>go 400000
> loaded at:     00400000 00414E20
> relocated to:  00800000 00814E20
> zimage at:     0040B000 00489577
> relocated to:  00815000 00893577
> initrd at:     00489577 00533299
> relocated to:  00893577 0093D299
> avail ram:     00400000 00800000
>
> After that it boots fine.
>
> If I try to locate it at 800000 to begin with, it fails like this:
>
> DINK32_MAX >>go 800000
> loaded at:     00800000 00814E20
> zimage at:     0080B000 00889577
> initrd at:     00889577 00933299
> avail ram:     00400000 00800000
>
> Linux/PPC load: root=/dev/ram
> Uncompressing Linux...bad gzipped data
> exit
>
> Does that make sense to anyone? Not that it disturbs me, but I'm just
> curious.

The bootloader relocation algorithm doesn't work when loaded at
0x800000.  Anything else will work.

> Second, I'm trying to load an initrd image. I put the compressed
> filesystem image in arch/ppc/boot/ramdisk.image.gz and then did "make
> zImage.initrd", which created zvmlinux.initrd which I'm loading.
> However during bootup it says this:

No clue here.

--
Matt Porter
MontaVista Software, Inc.
mporter@mvista.com

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-30 23:46           ` Dan Malek
@ 2000-08-31 11:13             ` Gabriel Paubert
  2000-08-31 15:01               ` Peter Tympanick
  0 siblings, 1 reply; 19+ messages in thread
From: Gabriel Paubert @ 2000-08-31 11:13 UTC (permalink / raw)
  To: Dan Malek; +Cc: Matt Porter, linuxppc-embedded


On Wed, 30 Aug 2000, Dan Malek wrote:

> Well, not exactly :-).  The code is actually written with some
> assumptions because I couldn't make it do _everything_.  The download
> should be located above the address where it is linked to execute.
> For example, I download to 0x900000, the code relocates to 0x800000,
> then uncompresses the kernel into the base of memory.
>
> This follows the MPC8xx boot model with a larger memory window.
> The MPC8xx had more constraints (smaller main memory 8 Mbyte start
> up translation), so the load/execution addresses were lower in
> memory.  Since the kernel is constantly growing and the 82xx had
> a 16 MByte window, I just decided to move everything further up
> in the address space.
>
> Anything below the linked execution address (0x800000 in this case)
> is considered fair game for allocation by the code, so it could
> write over itself or other necessary information (like zImage or the
> ramdisk).

Well, if you have a look at PrePboot, it solves all these kind of
problems. On my MVME2600:

- when booting from network, the zImage is loaded very low in memory,
- when booting from disk, it finds itself at top of memory (~15Mb),

what the code does is first to relocate itself where it is originally
loaded (compiled with -mrelocatable) so that it can perform a basic
analyzis of the current memory layout.

Then it moves itself up or down to the top of memory (yes it can have to
move itself down to the top, as contradictory as it seems, it actually
happens quite often), sometimes with partial overlaps, clears its bss,
relocates itself once again (until this point your have to be very careful
with what the code does), and setup a basic memory management system
taking into account firmware needs to avoid stepping on firmware's toes.

At this point, reading OF device tree, decompressing the kernel,
emulating VGA ROM bioses, etc... becomes almost trivial.

	Regards,
	Gabriel.


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-31 11:13             ` Gabriel Paubert
@ 2000-08-31 15:01               ` Peter Tympanick
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Tympanick @ 2000-08-31 15:01 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-embedded


Using the Abatron BDI2000 and bdiGDB, have you figured out a way to
implement loadable device drivers for hardware using a PowerPC device?

Thanks for your help in advance.

Peter Tympanick
Sales Engineer
Ultimate Solutions, Inc.
===============================
Development Tools for Embedded Systems
Ph: 978-455-3383
Fx: 978-926-3091
Email: ptymps@ultsol.com
WWW: http://www.ultsol.com


----- Original Message -----
From: Gabriel Paubert <paubert@iram.es>
To: Dan Malek <dan@netx4.com>
Cc: Matt Porter <mporter@mvista.com>; <linuxppc-embedded@lists.linuxppc.org>
Sent: Thursday, August 31, 2000 4:13 AM
Subject: Re: Linux on Motorola Sandpoint/PPMC7400



On Wed, 30 Aug 2000, Dan Malek wrote:

> Well, not exactly :-).  The code is actually written with some
> assumptions because I couldn't make it do _everything_.  The download
> should be located above the address where it is linked to execute.
> For example, I download to 0x900000, the code relocates to 0x800000,
> then uncompresses the kernel into the base of memory.
>
> This follows the MPC8xx boot model with a larger memory window.
> The MPC8xx had more constraints (smaller main memory 8 Mbyte start
> up translation), so the load/execution addresses were lower in
> memory.  Since the kernel is constantly growing and the 82xx had
> a 16 MByte window, I just decided to move everything further up
> in the address space.
>
> Anything below the linked execution address (0x800000 in this case)
> is considered fair game for allocation by the code, so it could
> write over itself or other necessary information (like zImage or the
> ramdisk).

Well, if you have a look at PrePboot, it solves all these kind of
problems. On my MVME2600:

- when booting from network, the zImage is loaded very low in memory,
- when booting from disk, it finds itself at top of memory (~15Mb),

what the code does is first to relocate itself where it is originally
loaded (compiled with -mrelocatable) so that it can perform a basic
analyzis of the current memory layout.

Then it moves itself up or down to the top of memory (yes it can have to
move itself down to the top, as contradictory as it seems, it actually
happens quite often), sometimes with partial overlaps, clears its bss,
relocates itself once again (until this point your have to be very careful
with what the code does), and setup a basic memory management system
taking into account firmware needs to avoid stepping on firmware's toes.

At this point, reading OF device tree, decompressing the kernel,
emulating VGA ROM bioses, etc... becomes almost trivial.

Regards,
Gabriel.


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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-08-30 18:58       ` Alex Shnitman
  2000-08-30 19:20         ` Mark A. Greer
@ 2000-09-03  4:42         ` Bob Doyle
  2000-09-04 10:37           ` Adrian Cox
  1 sibling, 1 reply; 19+ messages in thread
From: Bob Doyle @ 2000-09-03  4:42 UTC (permalink / raw)
  To: linuxppc-embedded


I have code that initializes (some of) the sandpoint hardware -
enough to get the sandpoint to copy and gunzip stuff (code etc)
from the floppy disk to memory.  I program it into the PPMC
flash memory and use it to load a proprietary OS.  The floppy
code polls the floppy controller so I don't need to have
interrupts and DMA in the bootloader.

I also have code that knows how to initialize a couple of
different VGA cards that I use.

If someone was interested in making a more useful bootloader
for linux/sandpoint I'd look into cleaning it up (removing
the proprietary stuff) and releasing the code.

Bob.

Alex Shnitman wrote:
>
> On Tue, Aug 29, 2000 at 12:16:09PM -0700, you wrote the following:
>
> > > I downloaded the kernel and tried it. It starts booting, but it hangs
> > > right after initializing the the OpenPIC. :-( I'll download the source
> > > code tonight and try to look at it, although I don't have much hopes
> > > gotta learn though.
> > >
> > > Is there any book that you recommend to get me started? Any other
> > > docs/tips?
> >
> > Oops, I should have included the sandpoint switch settings.  For
> > this version of the kernel, the sandpoint switches must be set as
> > follows:
> >
> > S4,S3: up, down
> > S5: down
> > S6: down (yours is probably up which is why it hung in openpic)
> >
> > Try this and see if it helps.
>
> It did! The kernel boots fine now all the way through.
>
> Thanks a lot!
>
> Another question: what would be the best way to go about booting Linux
> from the flash? Would flashing the kernel in instead of the dink32
> monitor do the trick, or does dink32 do some important initializations
> that are needed for the kernel to boot?

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

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

* Re: Linux on Motorola Sandpoint/PPMC7400
  2000-09-03  4:42         ` Bob Doyle
@ 2000-09-04 10:37           ` Adrian Cox
  0 siblings, 0 replies; 19+ messages in thread
From: Adrian Cox @ 2000-09-04 10:37 UTC (permalink / raw)
  To: Bob Doyle; +Cc: linuxppc-embedded


Bob Doyle wrote:

> If someone was interested in making a more useful bootloader
> for linux/sandpoint I'd look into cleaning it up (removing
> the proprietary stuff) and releasing the code.

I've got code that boots a kernel image over ethernet, but I've been
experimenting mostly on a different platform to the Sandpoint. I'm
planning a release around October, when I should have the time. The
architecture of mine is quite modular, so it should be easy to insert
things like the floppy and vga drivers, using my code as glue.

- Adrian Cox

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

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

end of thread, other threads:[~2000-09-04 10:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-28 19:55 Linux on Motorola Sandpoint/PPMC7400 Alex Shnitman
2000-08-28 20:03 ` Gabriel Paubert
2000-08-28 20:35   ` Alex Shnitman
2000-08-28 21:01     ` Gabriel Paubert
2000-08-29 16:43       ` Alex Shnitman
2000-08-28 23:14 ` Mark A. Greer
2000-08-29 17:13   ` Alex Shnitman
2000-08-29 19:16     ` Mark A. Greer
2000-08-30 18:58       ` Alex Shnitman
2000-08-30 19:20         ` Mark A. Greer
2000-09-03  4:42         ` Bob Doyle
2000-09-04 10:37           ` Adrian Cox
2000-08-30 19:02       ` Alex Shnitman
2000-08-31  0:45         ` Matt Porter
2000-08-30 23:46           ` Dan Malek
2000-08-31 11:13             ` Gabriel Paubert
2000-08-31 15:01               ` Peter Tympanick
2000-08-29 21:27     ` Mark A. Greer
2000-08-29 14:04 ` Tom Roberts

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