[U-Boot-Users] Problems with u-boot, PPChameleonEVB and MontaVista kernel

Hi all,
I'm trying to get up and running with u-boot on a PPChameleonEVB, running the MontaVista kernel.
I can successfully compile u-boot 1.0.0-pre and the kernel that came with the board (2.4.20 from the eldk), and boot the board successfully.
However, when I try to compile the MontaVista kernel, the board will not boot. Their kernel doesn't directly support the PPChameleonEVB, so I'm using the one for the IBM 405EP eval (which the PPChameleon appears to be very similar to). I'm 'manually' running make pImage to build the kernel after the MontaVista targetconf tool has run the build, and booting from vmlinux.PPCBoot using tftp.
I've been in touch with MontaVista, and they suggest re-building u-boot, but changing the definition of the bd_info struction (in include/asm-ppc/u-boot.h) to match that in the kernel. I've done this, but the boot still stops in the same place.
I've compiled u-boot in debug mode, and this is what we see:
reset
U-Boot 1.0.0-pre (Feb 24 2004 - 10:11:24)
CPU: IBM PowerPC 405EP Rev. B at 133.333 MHz (PLB=133, OPB=66, EBC=33 MHz) IIC Boot EEPROM disabled PCI async ext clock used, internal PCI arbiter enabled 16 kB I-Cache 16 kB D-Cache Board: ### No HW ID - assuming PPChameleonEVB I2C: ready DRAM: 32 MB Top of RAM usable for U-Boot at: 02000000 Reserving 182k for U-Boot at: 01fd2000 Reserving 257k for malloc() at: 01f91900 Reserving 132 Bytes for Board Info at: 01f9187c Reserving 48 Bytes for Global Data at: 01f9184c Stack Pointer at: 01f91828 New Stack Pointer is: 01f91828 Now running in RAM - U-Boot at: 01fd2000 FLASH: 4 MB U-Boot relocated to 01fd2000 NAND:Probing at 0xff000000 32 MB ### main_loop entered: bootdelay=10
### main_loop: bootcmd="run nfsargs addip addcons;bootm $(kernel_addr)" Hit any key to stop autoboot: 10 0 => run net_selc f
ENET Speed is 10 Mbps - HALF duplex connection TFTP from server 191.53.51.21; our IP address is 191.53.51.200 Filename 'vmlinux.PPCBoot'. Load address: 0x200000 Loading:
[snip tftp progress]
done Bytes transferred = 629509 (99b05 hex) ## Booting image at 00200000 ... Image Name: Linux-2.4.18_mvl30-405ep_eval Created: 2004-02-24 10:18:07 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 629445 Bytes = 614.7 kB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Current stack ends at 0x01F911D8 => set upper limit to 0x00800000 ## cmdline at 0x007FFF00 ... 0x007FFF70 bd address = 0x01F9187C memstart = 0x00000000 memsize = 0x02000000 flashstart = 0xFFFC0000 flashsize = 0x00400000 flashoffset = 0x00029B00 sramstart = 0x00000000 sramsize = 0x00000000 bootflags = 0x0000A000 procfreq = 133.333 MHz plb_busfreq = 133.333 MHz pci_busfreq = 33.333 MHz ethaddr = 00:50:C2:1E:AF:FE eth1addr = 00:50:C2:1E:AF:FD IP addr = 191.53.51.200 baudrate = 115200 bps ## Loading RAMDisk Image at ffd00000 ... Image Name: Simple Embedded Linux Framework Created: 2002-10-24 9:30:38 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1476478 Bytes = 1.4 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## initrd at 0xFFD00040 ... 0xFFE687BD (len=1476478=0x16877E) Loading Ramdisk to 01e28000, end 01f9077e ... OK ## Transferring control to Linux (at address 00000000) ...
I do have access to a BDI2000, that I've used to break into a running kernel (at start_here), but can't get it to break when I use the MontaVista kernel. From this, I assume that it's failing somewhere very early in the linux boot process.
Can anyone offer any advice?
Many thanks.
Andy

You have a load address and entry point of 0x0. You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
Chuck
-----Original Message----- From: u-boot-users-admin@lists.sourceforge.net [mailto:u-boot-users-admin@lists.sourceforge.net]On Behalf Of Andy Hawkins Sent: Tuesday, February 24, 2004 5:45 AM To: u-boot-users@lists.sourceforge.net Subject: [U-Boot-Users] Problems with u-boot, PPChameleonEVB and MontaVista kernel
Hi all,
I'm trying to get up and running with u-boot on a PPChameleonEVB, running the MontaVista kernel.
I can successfully compile u-boot 1.0.0-pre and the kernel that came with the board (2.4.20 from the eldk), and boot the board successfully.
However, when I try to compile the MontaVista kernel, the board will not boot. Their kernel doesn't directly support the PPChameleonEVB, so I'm using the one for the IBM 405EP eval (which the PPChameleon appears to be very similar to). I'm 'manually' running make pImage to build the kernel after the MontaVista targetconf tool has run the build, and booting from vmlinux.PPCBoot using tftp.
I've been in touch with MontaVista, and they suggest re-building u-boot, but changing the definition of the bd_info struction (in include/asm-ppc/u-boot.h) to match that in the kernel. I've done this, but the boot still stops in the same place.
I've compiled u-boot in debug mode, and this is what we see:
reset
U-Boot 1.0.0-pre (Feb 24 2004 - 10:11:24)
CPU: IBM PowerPC 405EP Rev. B at 133.333 MHz (PLB=133, OPB=66, EBC=33 MHz) IIC Boot EEPROM disabled PCI async ext clock used, internal PCI arbiter enabled 16 kB I-Cache 16 kB D-Cache Board: ### No HW ID - assuming PPChameleonEVB I2C: ready DRAM: 32 MB Top of RAM usable for U-Boot at: 02000000 Reserving 182k for U-Boot at: 01fd2000 Reserving 257k for malloc() at: 01f91900 Reserving 132 Bytes for Board Info at: 01f9187c Reserving 48 Bytes for Global Data at: 01f9184c Stack Pointer at: 01f91828 New Stack Pointer is: 01f91828 Now running in RAM - U-Boot at: 01fd2000 FLASH: 4 MB U-Boot relocated to 01fd2000 NAND:Probing at 0xff000000 32 MB ### main_loop entered: bootdelay=10
### main_loop: bootcmd="run nfsargs addip addcons;bootm $(kernel_addr)" Hit any key to stop autoboot: 10 0 => run net_selc f
ENET Speed is 10 Mbps - HALF duplex connection TFTP from server 191.53.51.21; our IP address is 191.53.51.200 Filename 'vmlinux.PPCBoot'. Load address: 0x200000 Loading:
[snip tftp progress]
done Bytes transferred = 629509 (99b05 hex) ## Booting image at 00200000 ... Image Name: Linux-2.4.18_mvl30-405ep_eval Created: 2004-02-24 10:18:07 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 629445 Bytes = 614.7 kB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Current stack ends at 0x01F911D8 => set upper limit to 0x00800000 ## cmdline at 0x007FFF00 ... 0x007FFF70 bd address = 0x01F9187C memstart = 0x00000000 memsize = 0x02000000 flashstart = 0xFFFC0000 flashsize = 0x00400000 flashoffset = 0x00029B00 sramstart = 0x00000000 sramsize = 0x00000000 bootflags = 0x0000A000 procfreq = 133.333 MHz plb_busfreq = 133.333 MHz pci_busfreq = 33.333 MHz ethaddr = 00:50:C2:1E:AF:FE eth1addr = 00:50:C2:1E:AF:FD IP addr = 191.53.51.200 baudrate = 115200 bps ## Loading RAMDisk Image at ffd00000 ... Image Name: Simple Embedded Linux Framework Created: 2002-10-24 9:30:38 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1476478 Bytes = 1.4 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## initrd at 0xFFD00040 ... 0xFFE687BD (len=1476478=0x16877E) Loading Ramdisk to 01e28000, end 01f9077e ... OK ## Transferring control to Linux (at address 00000000) ...
I do have access to a BDI2000, that I've used to break into a running kernel (at start_here), but can't get it to break when I use the MontaVista kernel. From this, I assume that it's failing somewhere very early in the linux boot process.
Can anyone offer any advice?
Many thanks.
Andy
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

You have a load address and entry point of 0x0. You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
The image that comes with the board (and boots fine) has the load and entry addresses both set to zero...
The image I'm trying to use is generated by running 'make pImage' in the kernel tree, and that's how it's generated...
Am I doing something wrong?
Andy

On Tue, 24 Feb 2004, Andy Hawkins wrote:
You have a load address and entry point of 0x0. You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
The image that comes with the board (and boots fine) has the load and entry addresses both set to zero...
Guys, don't confuse the load address of the pImage with the *download address*, ie. the one used for tftp. Your setting of 0/0 for the load address and entry point is correct.
However, from your initial post I gathered that your MV kernel does not have BSP support for your hardware. It is unlikely that a simple adaption of the boot info structure will be sufficient. Check out the relevant files in arch/ppc/{platforms,kernel} as well as the configure options in arch/ppc/config.in and look for things specific for your board.
Regards, Marius

Hi,
Guys, don't confuse the load address of the pImage with the
*download
address*, ie. the one used for tftp. Your setting of 0/0 for the
load
address and entry point is correct.
Thanks for clearing that up, I thought I was building the image correctly.
However, from your initial post I gathered that your MV kernel does not have BSP support for your hardware. It is unlikely that a simple adaption of the boot info structure will be sufficient. Check out
the
relevant files in arch/ppc/{platforms,kernel} as well as the
configure
options in arch/ppc/config.in and look for things specific for your board.
That's correct, there is no standard support for this board in MV.
Can anyone give me some pointers as to where to place breakpoints in the kernel to try to work out where the startup code is going wrong? As you've probably guessed, this is all a bit new to me.
Many thanks.
Andy

Yes sorry, that is what I thought I saw. The load addr is OK in the pImage. I was thinking about the tftp load addr.
Chuck
-----Original Message----- From: mag@mag.sysgo.com [mailto:mag@mag.sysgo.com]On Behalf Of Marius Groeger Sent: Tuesday, February 24, 2004 10:22 AM To: Andy Hawkins Cc: 'Chuck Meade'; u-boot-users@lists.sourceforge.net Subject: RE: [U-Boot-Users] Problems with u-boot, PPChameleonEVB and MontaVistakernel
On Tue, 24 Feb 2004, Andy Hawkins wrote:
You have a load address and entry point of 0x0. You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
The image that comes with the board (and boots fine) has the load and entry addresses both set to zero...
Guys, don't confuse the load address of the pImage with the *download address*, ie. the one used for tftp. Your setting of 0/0 for the load address and entry point is correct.
However, from your initial post I gathered that your MV kernel does not have BSP support for your hardware. It is unlikely that a simple adaption of the boot info structure will be sufficient. Check out the relevant files in arch/ppc/{platforms,kernel} as well as the configure options in arch/ppc/config.in and look for things specific for your board.
Regards, Marius
-- Marius Groeger mgroeger@sysgo.com Project Manager
SYSGO Real-Time Solutions AG | Embedded and Real-Time Software Am Pfaffenstein 14 55270 Klein-Winternheim, Germany
Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10 www.sysgo.com | www.elinos.com | www.osek.de

In message 001501c3fae5$0545a150$333335bf@cabletime.com you wrote:
The image I'm trying to use is generated by running 'make pImage' in the kernel tree, and that's how it's generated...
Am I doing something wrong?
No - except from using the wrong kernel tree.
Best regards,
Wolfgang Denk

In message IIEEICKJLNEPBBDJICNGKEBMEMAA.chuckmeade@mindspring.com Chuck Meade wrote:
You have a load address and entry point of 0x0.
...which is perfectly fine on PowerPC.
You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
Chuck, you are wrong. Load address and Entry point of 0x0000 are OK on PowerPC.
Best regards,
Wolfgang Denk

From: wd@denx.de [mailto:wd@denx.de] Sent: Tuesday, February 24, 2004 10:35 AM To: Chuck Meade Cc: Andy Hawkins; u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Problems with u-boot, PPChameleonEVB and MontaVista kernel
In message IIEEICKJLNEPBBDJICNGKEBMEMAA.chuckmeade@mindspring.com Chuck Meade wrote:
You have a load address and entry point of 0x0.
...which is perfectly fine on PowerPC.
You can't load and run Linux at 0x0. Try something more sensible like 0x400000.
Chuck, you are wrong. Load address and Entry point of 0x0000 are OK on PowerPC.
Best regards,
Wolfgang Denk
Yeah sorry about that, I was thinking one thing and typing another. I have seen so many times people downloading to 0x0 and stomping their ppc vector area, that I answered without paying enough attention to what Andy actually wrote.
I agree with Marius that the platform support code from the other board is most likely not going to work unmodified on this board. You (Andy) need to actually port the kernel to your target -- i.e. each target has target-specific support that is required. If you are having trouble bringing up the low level startup code I would also suggest acquiring a BDI2000, it can be a real help in such situations.
Chuck

In message 000b01c3fac3$50750980$333335bf@cabletime.com you wrote:
I can successfully compile u-boot 1.0.0-pre and the kernel that came with the board (2.4.20 from the eldk), and boot the board successfully.
However, when I try to compile the MontaVista kernel, the board will not boot. Their kernel doesn't directly support the PPChameleonEVB, so
Is there any special reason to use their kernel? What does it contain that you cannot find in DAVE's / our tested and working kernel tree?
I'm using the one for the IBM 405EP eval (which the PPChameleon appears to be very similar to). I'm 'manually' running make pImage to
You have to accept the fact that "similar" is not good enough. You must use a kernel which has been proted to the _exact_ matching board, or you will run into problems sooner or later - at least if you don't understand EXACTLY what you are doing (which seems not to be the case - no offence meant).
I've been in touch with MontaVista, and they suggest re-building u-boot, but changing the definition of the bd_info struction (in
Of course. You shall break compatibility to the rest of the world just to make their kernel work. What a nonsense.
I do have access to a BDI2000, that I've used to break into a running kernel (at start_here), but can't get it to break when I use the MontaVista kernel. From this, I assume that it's failing somewhere very early in the linux boot process.
Can anyone offer any advice?
Your question is a FAQ: http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel
What I cannot understand is why you are wasting your time (and ours) if you have a working kernel which you can use.
Best regards,
Wolfgang Denk

Is there any special reason to use their kernel? What does it
contain
that you cannot find in DAVE's / our tested and working kernel tree?
Well, we've decided to use the MontaVista distribution / development environment, and that integrates nicely with their kernel build tools. There may well be features that are present in the MontaVista kernel tree that we would like to use too (although I'd have to check the details). I think the general feeling is that having one source for all this is the best way to go (if we can get it to work).
You have to accept the fact that "similar" is not good enough.
You
must use a kernel which has been proted to the _exact_
matching
board, or you will run into problems sooner or later - at least
if
you don't understand EXACTLY what you are doing (which seems not
to
be the case - no offence meant).
You're absolutely right, I don't understand exactly what I'm doing :). No offence taken whatsoever. I've read through most of 'Understanding the Linux Kernel', but unfortunately it only covers the early kernel boot process for the i386 architecture. Is there any other reference that can give more information for the PowerPC?
Of course. You shall break compatibility to the rest of the
world
just to make their kernel work. What a nonsense.
I do have access to a BDI2000, that I've used to break into
a running
kernel (at start_here), but can't get it to break when I use the MontaVista kernel. From this, I assume that it's failing somewhere very early in the linux boot process.
Can anyone offer any advice?
Your question is a FAQ:
http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKer nel
I've followed the information in that FAQ. However, all it tells me to do is match up the bd_info structures, and check clock information.
What I cannot understand is why you are wasting your time (and
ours) if you
have a working kernel which you can use.
It just seems to make sense to try to keep everything (kernel, apps, development etc.) under 'one roof' (i.e. MontaVista) if at all possible.
I think whichever kernel tree we use, we're going to have to do some porting either way, so I'd appreciate some guidance as to where in the kernel I should be looking to resolve the problems we currently have (as I might need the knowledge gained when we come to adding further customisations later).
We *do* have a BDI 2000, but I think my ability to be able to debug this problem is hindered by my limited knowledge of the kernel startup code.
Any pointers on how to improve that knowledge (URLs, book and the like), with specific reference to the PowerPC processor, would be much appreciated.
Thanks to all who have replied thus far.
Andy

In message 001b01c3faed$44c266d0$333335bf@cabletime.com you wrote:
Well, we've decided to use the MontaVista distribution / development environment, and that integrates nicely with their kernel build tools.
I don't know how their system is set up, but it should be not too difficult to use a differetn kernel tree with the rest of their tools.
There may well be features that are present in the MontaVista kernel tree that we would like to use too (although I'd have to check the details). I think the general feeling is that having one source for all this is the best way to go (if we can get it to work).
Then you will either have to move all the modifications needed for the PPCHameleon board into their kernel tree (thus creating something which again is not the original MV kernel), or have MV provide a kernel extended in such way.
I've followed the information in that FAQ. However, all it tells me to do is match up the bd_info structures, and check clock information.
Yes, and this is your most pressing problem. When the parameters passed to the Linux kernel are correct you will at least get some boot messages, and see where the kernel crashes then (which it will do).
It just seems to make sense to try to keep everything (kernel, apps, development etc.) under 'one roof' (i.e. MontaVista) if at all possible.
The result of extending the MV kernel for the PPChameleon board will be something new, like any other kernel tree is something new. I know that vendors usually don't tell you or even deny the fact that the kernel source tree does NOT depend on any specific tools and is in almost all cases independend of any application code, too.
I think whichever kernel tree we use, we're going to have to do some porting either way, so I'd appreciate some guidance as to where in the kernel I should be looking to resolve the problems we currently have
I think you can use another kernel tree (like that from our CVS server) without problems. If you feel you must move our patches into the MV tree please feel free to do so - all the history and comments are available for free on our CVS server. You can extract the patches that are relevant for the PPChameleon board and try applying them to the MV tree - I don't expect any serious problems there.
Best regards,
Wolfgang Denk

Then you will either have to move all the modifications needed
for
the PPCHameleon board into their kernel tree (thus creating
something
which again is not the original MV kernel), or have MV provide
a
kernel extended in such way.
That's what I'm expecting to have to do, but unfortunately know where to look for the changes I need to make is difficult.
Yes, and this is your most pressing problem. When the
parameters
passed to the Linux kernel are correct you will at least get
some
boot messages, and see where the kernel crashes then (which it
will
do).
Well, I think I *have* matched up the two structures, but we're still not seeing anything. Where can I put breakpoints in the kernel to try to work out why we're not getting any boot messages?
I think you can use another kernel tree (like that from our
CVS
server) without problems. If you feel you must move our patches
into
the MV tree please feel free to do so - all the history and
comments
are available for free on our CVS server. You can extract the
patches
that are relevant for the PPChameleon board and try applying them
to
the MV tree - I don't expect any serious problems there.
At the risk of asking newbie questions, how would I go about doing this?
Thanks again for all the help so far, it's much appreciated.
Andy

In message 002101c3faf1$83f88330$333335bf@cabletime.com you wrote:
Well, I think I *have* matched up the two structures, but we're still not seeing anything. Where can I put breakpoints in the kernel to try to work out why we're not getting any boot messages?
Try a post-mortem dump of the log_buf contents.
Best regards,
Wolfgang Denk

I think whichever kernel tree we use, we're going to have to do some porting either way, so I'd appreciate some guidance as to where in the kernel I should be looking to resolve the problems we currently have (as I might need the knowledge gained when we come to adding further customisations later).
We *do* have a BDI 2000, but I think my ability to be able to debug this problem is hindered by my limited knowledge of the kernel startup code.
Hi again Andy, At least this time I read your question more thoroughly :)
We are becoming off-topic for the U-Boot list -- if you want to take this further, switch to the linuxppc list.
I can tell you for a start that you will need to customize your Linux .config file (make menuconfig for example) for your particular target, and you will also want to study the platform-specific code under arch/ppc/platforms. If your target is not currently supported, you will need to create that support. That means *at least* the files under arch/ppc/platforms, and the Makefile and Config.in changes needed in the tree to support selection of the new platform and its features.
I encourage you to do a search of the entire Linux tree (not case sensitive) for a word like "walnut":
find . -type f |xargs grep -i walnut
This will give you a feel for the places that platform-specifics pop up.
Hope that helps, Chuck
participants (4)
-
Andy Hawkins
-
Chuck Meade
-
Marius Groeger
-
Wolfgang Denk