* MPC8xx: wrong zimage_start
@ 1999-06-02 12:06 Wolfgang Denk
1999-06-02 13:49 ` Magnus Damm
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 1999-06-02 12:06 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I think I need some help... I'm trying to port Linux to a "non-stan-
dard" MPC860 board. Obviously, it does not provide the same
environment as the EPPC-Bug on the MBX860 boards.
I'm running into problems when it comes to decompressiong and
starting the kernel; here is what I see on the console (I've added
some debugging code):
decompress_kernel: load_addr 00010000 num_words 0003F510 cksum 96CF6339 &residual 01FFFDD8
loaded at: 00010000 0010D440
relocated to: 00100000 001FD440
board data at: 01FFFDD8 01FFFE00
relocated to: 00000100 00000128
zimage at: 00017000 0006B2F3
avail ram: 001FD440 00600000
Linux/PPC load: console=tty0 console=ttyS0,115200n8
gunzip: dst 0 dstlen 0x400000 zimage_start 00017000 zimage_size 000542F3
Uncompressing Linux... bad gzipped data
00017000 : 3D29C000 A3E90000 7C0006AC 48000010
00017010 : A0093C82 541F043E 7C0006AC 3D20C000
00017020 : A0093CAC 5400043E 7C0006AC 2C800000
00017030 : 4186001C 31202010 5529043E 3D29C000
00017040 : B1690000 7C0006AC 4800000C B1693C90
00017050 : 7C0006AC 3D20C000 A0093CAC 5400043E
00017060 : 7C0006AC 2C800000 4186001C 31202020
00017070 : 5529043E 3D29C000 B3E90000 7C0006AC
00017080 : 4800000C B3E93CA0 7C0006AC 3D20C000
00017090 : A0093CAC 5400043E 7C0006AC 2C800000
000170A0 : 41860020 31202004 5529043E 3D29C000
000170B0 : 38000010 98090000 7C0006AC 48000010
000170C0 : 38000010 98093C84 7C0006AC 3D20C000
000170D0 : A0093CAC 5400043E 7C0006AC 2C800000
000170E0 : 41860020 31202005 5529043E 3D29C000
000170F0 : 38000010 98090000 7C0006AC 48000010
Searching [0x4000 - 0x1000000]...
at 004E7C00 : 1F8B0808 DC0D5337 0203766D 6C696E75
......looks good...done.
I'm booting from flash memory; zImage is at 40700000, so I start with
a `go 40710000'; I have 32 MB RAM and created a faked "bd_info"
struct at the end of RAM. Everything seems to be fine, but the
compressed image is not where it is expected to be: objdump says
-> objdump -h zvmlinux
zvmlinux: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00004fa0 00100000 00100000 00010000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000618 00104fa0 00104fa0 00014fa0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000314 00106000 00106000 00016000 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .bss 0000bbbc 00107000 00107000 00017000 2**2
ALLOC
4 image 0005421a 00000000 00000000 00017000 2**0
CONTENTS, READONLY
so the value of 00017000 for zimage_start looks good. I've added some
code to search for the real position in memory, and found it to sit
at 004E7C00 instead.
Hmmm... I guess that EPPC-Bug might be doing some magic things to the
ELF file which I am still missing.
Can anybody see what I'm doing wrong, or at least give me a few hints
where to look?
Thanks in advance,
Wolfgang
--
Phone: (+49)-8142-4596-87 Fax: -88 Home: -86 Email: wd@denx.muc.de
Any time things appear to be going better, you have overlooked some-
thing.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MPC8xx: wrong zimage_start
1999-06-02 12:06 MPC8xx: wrong zimage_start Wolfgang Denk
@ 1999-06-02 13:49 ` Magnus Damm
1999-06-02 16:51 ` Heinz Blaettner
0 siblings, 1 reply; 5+ messages in thread
From: Magnus Damm @ 1999-06-02 13:49 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-dev@lists.linuxppc.org
> Hi,
Hi there!
> I think I need some help... I'm trying to port Linux to a "non-stan-
> dard" MPC860 board.
I've ported linux to a few custom 860 boards.
> Obviously, it does not provide the same
> environment as the EPPC-Bug on the MBX860 boards.
I am with you.
> Can anybody see what I'm doing wrong, or at least give me a few hints
> where to look?
Well, I havn't had any trouble like that.
I started loading a 'vmlinux' to address 0 and started at address 0x0c.
That was just because I didn't like the things that was done in the
boot-code for the zImage.
The MBX board reads some stuff from the NVRAM and does a few wierd
things.
I've made a port to an ADS board from motorola, I've sent the patches to
Dan Malek.
I use the embedded-2.2.5 tarball, what code do you use?
My patches are for the embedded-2.2.5 code.
I've got a bootrom that loads a zImage or vmlinux from ATA-flash or
romdisk.
That might be a good start.
Another thing - remember to read the errata for the 860.
Revisions before C tend to have some problems.
And 860T has still (B3) got problems.
Good luck! /
magnus
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MPC8xx: wrong zimage_start
@ 1999-06-02 15:06 kd
0 siblings, 0 replies; 5+ messages in thread
From: kd @ 1999-06-02 15:06 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
Hello,
I am seeing the same thing here. The zImage start is calculated in
arch/ppc/mbxboot/misc.c
in function decompress kernel. I have not found out the solution to the
problem but a quick hack is
to hardcode the offset to the zImage by inserting the line
zimage_start = 0xfe120000; //The position of my zImage in flash rom
instead of the calculations of zimage_start (around line 286)
This is of course not a solution, but allowed me to carry on with the
actual task of porting _Linux_ to my
custom board.
Hope this helps,
K.D.
Wolfgang Denk <wd@denx.muc.de> on 06/02/99 12:06:05 PM
To: linuxppc-dev@lists.linuxppc.org
cc: (bcc: Kári Davíðsson/Flaga hf/IS)
Subject: MPC8xx: wrong zimage_start
[-- Attachment #2: Type: text/plain, Size: 3447 bytes --]
Hi,
I think I need some help... I'm trying to port Linux to a "non-stan-
dard" MPC860 board. Obviously, it does not provide the same
environment as the EPPC-Bug on the MBX860 boards.
I'm running into problems when it comes to decompressiong and
starting the kernel; here is what I see on the console (I've added
some debugging code):
decompress_kernel: load_addr 00010000 num_words 0003F510 cksum 96CF6339
&residual 01FFFDD8
loaded at: 00010000 0010D440
relocated to: 00100000 001FD440
board data at: 01FFFDD8 01FFFE00
relocated to: 00000100 00000128
zimage at: 00017000 0006B2F3
avail ram: 001FD440 00600000
Linux/PPC load: console=tty0 console=ttyS0,115200n8
gunzip: dst 0 dstlen 0x400000 zimage_start 00017000 zimage_size
000542F3
Uncompressing Linux... bad gzipped data
00017000 : 3D29C000 A3E90000 7C0006AC 48000010
00017010 : A0093C82 541F043E 7C0006AC 3D20C000
00017020 : A0093CAC 5400043E 7C0006AC 2C800000
00017030 : 4186001C 31202010 5529043E 3D29C000
00017040 : B1690000 7C0006AC 4800000C B1693C90
00017050 : 7C0006AC 3D20C000 A0093CAC 5400043E
00017060 : 7C0006AC 2C800000 4186001C 31202020
00017070 : 5529043E 3D29C000 B3E90000 7C0006AC
00017080 : 4800000C B3E93CA0 7C0006AC 3D20C000
00017090 : A0093CAC 5400043E 7C0006AC 2C800000
000170A0 : 41860020 31202004 5529043E 3D29C000
000170B0 : 38000010 98090000 7C0006AC 48000010
000170C0 : 38000010 98093C84 7C0006AC 3D20C000
000170D0 : A0093CAC 5400043E 7C0006AC 2C800000
000170E0 : 41860020 31202005 5529043E 3D29C000
000170F0 : 38000010 98090000 7C0006AC 48000010
Searching [0x4000 - 0x1000000]...
at 004E7C00 : 1F8B0808 DC0D5337 0203766D 6C696E75
......looks good...done.
I'm booting from flash memory; zImage is at 40700000, so I start with
a `go 40710000'; I have 32 MB RAM and created a faked "bd_info"
struct at the end of RAM. Everything seems to be fine, but the
compressed image is not where it is expected to be: objdump says
-> objdump -h zvmlinux
zvmlinux: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00004fa0 00100000 00100000 00010000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000618 00104fa0 00104fa0 00014fa0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000314 00106000 00106000 00016000 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .bss 0000bbbc 00107000 00107000 00017000 2**2
ALLOC
4 image 0005421a 00000000 00000000 00017000 2**0
CONTENTS, READONLY
so the value of 00017000 for zimage_start looks good. I've added some
code to search for the real position in memory, and found it to sit
at 004E7C00 instead.
Hmmm... I guess that EPPC-Bug might be doing some magic things to the
ELF file which I am still missing.
Can anybody see what I'm doing wrong, or at least give me a few hints
where to look?
Thanks in advance,
Wolfgang
--
Phone: (+49)-8142-4596-87 Fax: -88 Home: -86 Email: wd@denx.muc.de
Any time things appear to be going better, you have overlooked some-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MPC8xx: wrong zimage_start
1999-06-02 13:49 ` Magnus Damm
@ 1999-06-02 16:51 ` Heinz Blaettner
1999-06-03 9:22 ` Magnus Damm
0 siblings, 1 reply; 5+ messages in thread
From: Heinz Blaettner @ 1999-06-02 16:51 UTC (permalink / raw)
To: Magnus Damm; +Cc: linuxppc-dev@lists.linuxppc.org
Hi Magnus
On 02-Jun-99 Magnus Damm wrote:
>
> Another thing - remember to read the errata for the 860.
> Revisions before C tend to have some problems.
> And 860T has still (B3) got problems.
>
Please give me a hint where to find the errata sheets ?.
What problems about the 860T ? Because we choose that device :-(
thanks
heinz
___________________________________________________
Larkinson's Law:
All laws are basically false.
___________________________________________________
Heinz Blaettner / BinTec Communications AG
fon: +49 911 96 73-0 / Suedwestpark 94
fax: +49 911 688 0725 / D-90449 Nuernberg
E-Mail: heinz@bintec.de / http://www.bintec.de
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MPC8xx: wrong zimage_start
1999-06-02 16:51 ` Heinz Blaettner
@ 1999-06-03 9:22 ` Magnus Damm
0 siblings, 0 replies; 5+ messages in thread
From: Magnus Damm @ 1999-06-03 9:22 UTC (permalink / raw)
To: Heinz Blaettner; +Cc: linuxppc-dev@lists.linuxppc.org
> Hi Magnus
Hi there!
> Please give me a hint where to find the errata sheets ?.
You can find the 860 errata at motorolas website:
http://www.mot.com/netcomm/aesop/mpc8XX/860/860err.pdf
It contains a 860T specific part.
When I got my 860T didn't this errata contain any 860T specific
information at all.
> What problems about the 860T ? Because we choose that device :-(
First of all, the B revision contains the serious bug that makes it
impossible to use the
fec and the cpm at the same time. great.
They don't mention the B revision in that errata. My FADS860T had that
chip when I got it.
I've got a B3 and that one still contains the CPU7 bug that makes
datacache corruption
when writing to sprs.
I've got a workaround from Dan that I've applied to my embedded-2.2.5
head.S.
The workaround works fine, now I'm stuck with some minor fec.c problem.
Hope this helps! /
Magnus
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-06-03 9:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-02 12:06 MPC8xx: wrong zimage_start Wolfgang Denk
1999-06-02 13:49 ` Magnus Damm
1999-06-02 16:51 ` Heinz Blaettner
1999-06-03 9:22 ` Magnus Damm
-- strict thread matches above, loose matches on Subject: below --
1999-06-02 15:06 kd
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).