Skip to contentSkip to conversation

linuxppc_2_4_mpc5200 / 5200lite zImage

DISCUSSION Kate Alhola 2 participants 6 messages Nov 2, 2003

lore
Share & tools
lore
#0 lore raw

I just got Motorola5200 lite board and tried complie linuxppc_2_4_mpc5200 from
denx to it. When i say make bzImage it complains that __res is undefined

ppc_82xx-ld -T ../ld.script -Ttext 0x00800000 -Bstatic -o zvmlinux head.o ../common/relocate.o ../common/misc-simple.o ../common/bootinfo.o ../common/misc-common.o ../common/string.o ../common/util.o ../common/serial_stub.o mgt5100_tty.o image.o ../lib/zlib.a mgt5100_tty.o: In function `serial_init':
mgt5100_tty.o(.text+0x2): undefined reference to __res' mgt5100_tty.o(.text+0xa): undefined reference to __res'

__res is pointer to external scc buffer descriptors . Least it looks a like that it is
defined in arch/ppc/platforms/icecube.c but this code looks a like complete board initialization code so i am not sure is it right module to add defining __res

In this setup board is running original motorola debugger, no u-boot and this
reason i try make zimage where is uncompressinng headers included.

So, any suggestions or experiencies with 5200lite ?

Also i got Macraigor wiggler but saddly noticed that ocd-cmdr does not yet work with mpc5200. Any expreincies/suggestions with LOW COST OCD debugger for 5200 that can be used loading initial code to empty flash on my own board.

Kate

--

+==================================================================+
! Kate Marika Alhola  Internet Technologies International Oy       !
! [email protected]         Phone +358 400 740701 Fax   +358 9 8138715   !
! [email protected]	      http://www.iti.fi    http://www.iki.fi/kate  !
+==================================================================+

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

#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

I just got Motorola5200 lite board and tried complie linuxppc_2_4_mpc5200 from
denx to it. When i say make bzImage it complains that __res is undefined

Please "make uImage" and use U-Boot as boot loader.

Quoted 4 lines

Also i got Macraigor wiggler but saddly noticed that ocd-cmdr does not yet work with mpc5200. Any expreincies/suggestions with LOW COST OCD debugger for 5200 that can be used loading initial code to empty flash on my own board.

I recommend to use a BDI2000 - not exactly low cost, but worth every cent of it (expecially since you can alo use it for kernel and driver debugging).

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] If there was anything that depressed him more than his own cynicism, it was that quite often it still wasn't as cynical as real life.
- Terry Pratchett, _Guards! Guards!_

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

#2 lore raw
In reply to Kate Alhola
Quoted 11 lines · Kate Alhola

I just got Motorola5200 lite board and tried complie linuxppc_2_4_mpc5200 from
denx to it. When i say make bzImage it complains that __res is undefined

__res is pointer to external scc buffer descriptors . Least it looks a like that it is
defined in arch/ppc/platforms/icecube.c but this code looks a like complete
board initialization code so i am not sure is it right module to add defining __res

It looks a like that i have too much fixation from mpc8xx(x) programming in this case bd didnt stand for bufferr descriptor but board u-boot board descriptor
and in this case the mgt5100_tty.c look a like have one dependence to ppcboot, it took the ibp bus clock frequency from ppcboot bd struct even not ppc-boot configuration. I replaced it with just plain #define . Now just i should do testing ...

Kate

--

+==================================================================+
! Kate Marika Alhola  Internet Technologies International Oy       !
! [email protected]         Phone +358 400 740701 Fax   +358 9 8138715   !
! [email protected]	      http://www.iti.fi    http://www.iki.fi/kate  !
+==================================================================+

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

#3 lore raw

Re: linuxppc_2_4_mpc5200 / 5200lite zImage continued

Quoted 7 lines · Kate Alhola

and in this case the mgt5100_tty.c look a like have one dependence to ppcboot, it took the ibp bus clock frequency from ppcboot bd struct even
not ppc-boot configuration. I replaced it with just plain #define . Now just i should do testing ...

I just fixed it by comenting out setting baudrate, then it will leave it as it was after dBug. Now i get kernel booting up and initial strings coming out
but kernel crashes after initMMU ( early boot prit enabled ),
I think that i have something wrong in .config.
I did not find goog example gor 5200lite from denx tree so i made my best quess and it seems not to bee so good.

Kate
-- continues hacking ....

dBUG> dn -i zImage.icecube
Address: 0x00020000
Downloading Image 'zImage.icecube' from 195.218.81.140
..............
939645 bytes read via TFTP
dBUG> go 20000

loaded at:     00020000 001071B8
relocated to:  00800000 008E71B8
zimage at:     00805830 008E3C88
avail ram:     00400000 00800000

Linux/PPC load: console=ttyS0,9600 root=/dev/sda2
Uncompressing Linux...done.
Now booting the kernel
id mach(): doneMMU:enterMMU:hw initMMU:mapin

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

#4 lore raw

Re: linuxppc_2_4_mpc5200 / 5200lite zImage continued

Quoted 2 lines · In message <[email protected]> you wrote:

I just fixed it by comenting out setting baudrate, then it will leave it as

This is not a good idea.

Quoted 4 lines

it was after dBug. Now i get kernel booting up and initial strings coming out
but kernel crashes after initMMU ( early boot prit enabled ), I think that i have something wrong in .config.

No. It's much more likely that you missed to pass someother of the required information. You have several options: manually set up a bd_info structure with _all_ of the required information; modifying U-Boot so that you can load and start U-Boot from RAM; installing U-Boot into flash.

You can always get a tested and working configuration by performing the standard kernel build procedure:

bash$ make mrproper
bash$ make icecube_5200_config
bash$ make oldconfig
bash$ make dep
bash$ make uImage

[The "LITE5200" can be considered identical to the "IceCube" / "IceCube+" as far as the Linux kernel is affected.]

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Don't you know anything? I should have thought anyone knows that who
knows anything about anything... - Terry Pratchett, _Soul Music_

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

#5 lore raw

Re: linuxppc_2_4_mpc5200 / 5200lite zImage now working

Thank you about usefull help, it looks a like doing things in newer way may be
faster than do older way ;)

Quoted 7 lines · Wolfgang Denk

No. It's much more likely that you missed to pass someother of the required information. You have several options: manually set up a bd_info structure with _all_ of the required information; modifying U-Boot so that you can load and start U-Boot from RAM; installing U-Boot into flash.

This worked with u-boot, setting CFG_RAMBOOT made it bootting from RAM and allowed also programming u-boot to same flash as dbug so now i can start uboot from dbug and then boot linux up

Quoted 10 lines

You can always get a tested and working configuration by performing the standard kernel build procedure:

bash$ make mrproper
bash$ make icecube_5200_config
bash$ make oldconfig
bash$ make dep
bash$ make uImage

Tanks, that was also usefull

Kate

--

+==================================================================+
! Kate Marika Alhola  Internet Technologies International Oy       !
! [email protected]         Phone +358 400 740701 Fax   +358 9 8138715   !
! [email protected]	      http://www.iti.fi    http://www.iki.fi/kate  !
+==================================================================+

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