MBX boot loader on a MPC8260 custom board
hi all ,
we have here a custom MPC8260 board (4 Mo flash, 32 Mo SDRAM,200 Mhz MPC8260) and we want to use the HardHat linux from Montavista. we are also using BDI-2000 probe (from ABATRON) .
the kernel we have build is based on the ADS8260 board which is quite similar to our board.
the boot-loader we use is the "mbx" boot loader which come with the Linux kernel tree.
the problem i have is :
- we load the file "zvmlinux.mbx" using the BDI2000 probe
- we take control over the MPC8260 with "ppc_82xx-gdb zvmlinux.mbx" and "target remote xx.xx.xx.xx:2001"
- we do some "stepi" and the code runs, entering function "decompress_kernel", then "serial_init" .
- at some point in this function "serial_init" , the PC (program counter) begins to count downwards !!! for exemple ( 0x400000 ... 0x3ffffc ... 0x3fff8 ... )
another point is: when debugging C source code (in emacs + gdb), we can see that the programms jumps from one point to another (some times backward) , not following the logical flow of the C source code .Is that normal ????
what could be the reason of such behaviour ??? does someone here have an idea for our problem ?????
any help is welcome,
greetings,
--
Julien Eyries
R&D engineer
Thales Broadcast & Multimedia (ex-thomcast)
email: [email protected]
fax: 33(0) 1 34 90 31 10
tel: 33(0) 1 34 90 31 01
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Dear Julien,
Quoted 3 lines · in message <[email protected]> you wrote:
the kernel we have build is based on the ADS8260 board which is quite similar to our board.
Well, is your firmware also similar to that on the ADS8260? The bootstrap loader provides the interface between firmware and kernel - so it must match BOTH sides for a given board.
Quoted 2 lines
the boot-loader we use is the "mbx" boot loader which come with the Linux kernel tree.
Ummm... did you adap this for your board?
Quoted 3 lines
- at some point in this function "
serial_init" , the PC (program counter) begins to count downwards !!! for exemple (0x400000...0x3ffffc...0x3fff8... )
This just means you crashed the CPU.
Quoted 4 lines
another point is: when debugging C source code (in emacs + gdb), we can see that the programms jumps from one point to another (some times backward) , not following the logical flow of the C source code .Is that normal ????
With optimized code, yes. The compiler does several things when optimizing which can change the order of the assembler instructions from what you might expect when reading/writing C code. The "jump around" is the consequence.
Quoted 1 line
what could be the reason of such behaviour ???
Optimization performed by the compiler.
Quoted 1 line
does someone here have an idea for our problem ?????
Well, my recommendation is to get rid of all this stuff in the mbxbot directory and use PPCBoot as firmware instead; but I'm obviously biased, and YMMV.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] "He was so narrow minded he could see through a keyhole with both eyes ..."
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Dear Wolfgang,
first let me thank you for your help
we have found the reason for our problem :
it was some specific ADS8260 code which crashe the CPU
on our board . we just had to removed it to have the kernel booting. even if we see the kernel hanging up a few time latter, while initializing the FEC , we are now very very happy to see some log messages from the kernel on the console !!!
Quoted 4 lines
Well, my recommendation is to get rid of all this stuff in the mbxbot directory and use PPCBoot as firmware instead; but I'm obviously biased, and YMMV.
Yes :-) . i had a look at PPCboot which i m sure is very cool ; and seems to support a lot of commercial boards.
anyway for the moment, it is just O.K. for us if we can do all the things we have to do, like loading our code via TFTP, debugging and so on by using our BDI-2000 probe.
Greetings,
Julien.
--
Julien Eyries
R&D engineer
Thales Broadcast & Multimedia (ex-thomcast)
email: [email protected]
fax: 33(0) 1 34 90 31 10
tel: 33(0) 1 34 90 31 01
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/