Skip to contentSkip to conversation

u-boot for pxa255

U-Boot-Users Sharad P. Katti 3 participants 10 messages Nov 30, 2004 – Dec 6, 2004

lore
Share & tools
lore
#0 lore raw

Hi All,

I'm working on a PXA255 reference board,

I'm able to get u-boot prompt on my serial console,
I appended the kernel image with the u-boot.bin file, and write the new image onto the flash.

But when I give the address from where my kernel is starting (in the appended .bin file), I can just see the message

starting application at 0xa000ebc4....
(which is the address of the kernel )

and stops there only.

How can I check whether the bootloader and kernel are copied to the ram from the flash, as I'm not using the network features to download the image.

TIA

Signature · 1 line
Sharad P.Katti
#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

I'm able to get u-boot prompt on my serial console,
I appended the kernel image with the u-boot.bin file, and write the new image onto the flash.

Why are you doing this? Keeping the Linux kernel image separated is much more flexible.

Quoted 5 lines

But when I give the address from where my kernel is starting (in the appended .bin file), I can just see the message

starting application at 0xa000ebc4....
(which is the address of the kernel )

You must be doing something seriously wrong here. To boot a Linux kernel you have to use the "bootm" command, which never prints such a message.

Quoted 3 lines

How can I check whether the bootloader and kernel are copied to the ram from the flash, as I'm not using the network features to download the image.

If you Linux kernel image is aligned to a flash sector then the "imls" command will find and verify it. If it is not aligned you should reconsider why you are doing this (differently than the rest of the world).

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All I ask is a chance to prove that money can't make me happy.
#2 lore raw

Hi,

Since the board doesnot have the nework to test from the net, I tried that to check whether I'm doing the right thing or not.

The board has 512K of flash, onto which I'm writing the U-boot (its of 64K), and in the remaining space, I'm writing the kernel (which is around 350K, and its only for the testing).

Now to boot from the image, I'm planning to do the following,

1> Copy the Image from the flash to the RAM,
2> and then give the control to the image location in RAM (using the bootm command).

Please confirm me whether I'm doing the right thing.

Finally the board has to boot from the harddisk, and the IDE is interfaced to the CPU through GPIOs,
Is there any code in which the IDE initialization is done using the GPIOs, since we are not getting how to give the IDE_BASE_ADDR.

TIA,

best regards,

Signature · 1 line
Sharad P.Katti
#3 lore raw
Quoted 9 lines · Sharad P. Katti

Hi,

Since the board doesnot have the nework to test from the net, I tried that to check whether I'm doing the right thing or not.

The board has 512K of flash, onto which I'm writing the U-boot (its of 64K), and in the remaining space, I'm writing the kernel (which is around 350K, and its only for the testing).

Quoted 5 lines

Now to boot from the image, I'm planning to do the following,

1> Copy the Image from the flash to the RAM,
2> and then give the control to the image location in RAM (using the bootm command).

the bootm command expects a image file created from a binary with tools/mkimage. e.g.:

mkimage -n 'Kernel Ramdisk Image' -A ppc -O linux -T kernel -C none -e 00400000 -a 00400000 -d zImage.bin zImage.img

If your kernel image in the flash memory was created with the mkimage tool just start it with:
=> bootm 0xYourflashaddress

or test it with:
=> imi 0xYourflashaddress

the should produce a output similar to:
## Checking Image at 04000000 ...

    Image Name:   Kernel Ramdisk Image
    Created:      2004-11-30   9:54:16 UTC
    Image Type:   PowerPC Linux Kernel Image (uncompressed)
    Data Size:    3010560 Bytes =  2.9 MB
    Load Address: 00400000
    Entry Point:  00400000
    Verifying Checksum ... OK
Quoted 2 lines

Please confirm me whether I'm doing the right thing.

that should to the trick...

Cheers
Simon

#4 lore raw

Hi,

I followed your instructions, and after creating the zImage.bin, i write that to the flash, and then gave the address where it was written,

I got all the header contents from the image, but it is stopped after the mesg "Starting Kernel ..."

can u just give me suggestions where i went wrong, I have given the address (on flash) to the bootm command, but the control is not passed to the kernel.

TIA,

Signature · 1 line
Sharad P.Katti
#5 lore raw
Quoted 7 lines · Sharad P. Katti

Hi,

I followed your instructions, and after creating the zImage.bin, i write that to the flash, and then gave the address where it was written,

I got all the header contents from the image, but it is stopped after the mesg "Starting Kernel ..."

That could means, that the Kernel has been decompressed successfully and is most likely failing to find some memory...

just compile the Kernel with debug informations (e.g. -ggdb) and then connected to the gdb to your BDI and look where the Kernel is working.

Quoted 4 lines

can u just give me suggestions where i went wrong, I have given the address (on flash) to the bootm command, but the control is not passed to the kernel.

it ist possibel, that the board information you set for the pxa255 is not correct. Set a breakpoint to the start address of the Kernel an look at the board info structure pointer (ppc = r3) and verify if it contains the right values for your board.

Cheers,
Simon

#6 lore raw

Hi,

Since I dont have the BDI connection interface,
I cannot debug the kernel, the board is of XSCALE arch,
and has 32MB RAM, and i've given TEXT_BASE as 0xA07E0000, which is inside the 32MB, and I have put the kernel as uncompressed, and the XIP patch is already applied for that.(I'm using MVLinux 2.4.20)

I have given the entry point to the kernel as 0x00021000, and the load address is 0x00020000, and then wrote the resulting img to the flash,

options to the mkimage that i have given are,

#mkimage -n "newImg" -A arm -O linux -T kernel\
-C none -e 0x00021000 -a 0x00020000 -d zImage zImage.bin

once I boot from the target, i'm able to see the mesgs that display the header contents, and it shows the entry point address also.

Since as I mentioned, i dont have the option to connect the BDI, to my target board, how can i go about this.

best regards,

Signature · 1 line
Sharad P.Katti
#7 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

Since I dont have the BDI connection interface,

Then your next step should be to get access to a BDI2000.

Quoted 4 lines

I cannot debug the kernel, the board is of XSCALE arch,
and has 32MB RAM, and i've given TEXT_BASE as 0xA07E0000, which is inside the 32MB, and I have put the kernel as uncompressed, and the XIP patch is already applied for that.(I'm using MVLinux 2.4.20)

Are you sure you really understand what you are doing? You say that the kernel is linked for a RAM address and then say that you want to use XIP - which is a completely different thing. Why don;t you try to get a plain kernel running first, before adding more complexity like XIP?

Can you please continue this discussion on the ARM kernel mailing list? IMHO it is actually off topic here.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Either one of us, by himself, is expendable.  Both of us are not.
	-- Kirk, "The Devil in the Dark", stardate 3196.1
#8 lore raw
In reply to Sharad P. Katti
Quoted 3 lines · Sharad P. Katti

Hi,

Since I dont have the BDI connection interface,

mmh, than booting a linux will be a little difficult... but it should be possible

Quoted 14 lines

I cannot debug the kernel, the board is of XSCALE arch,
and has 32MB RAM, and i've given TEXT_BASE as 0xA07E0000, which is inside the 32MB, and I have put the kernel as uncompressed, and the XIP patch is already applied for that.(I'm using MVLinux 2.4.20)

I have given the entry point to the kernel as 0x00021000, and the load address is 0x00020000, and then wrote the resulting img to the flash,

options to the mkimage that i have given are,

#mkimage -n "newImg" -A arm -O linux -T kernel\
-C none -e 0x00021000 -a 0x00020000 -d zImage zImage.bin

Quoted 6 lines

once I boot from the target, i'm able to see the mesgs that display the header contents, and it shows the entry point address also.

Since as I mentioned, i dont have the option to connect the BDI, to my target board, how can i go about this.

You need to find the source code where the line "Starting Kernel" is printed and then add some debug code for yourself. try to find out where the kernel is working.
Have you tried the uImage createt with "make uImage" ?

Cheers,
Simon

#9 lore raw
In reply to Sharad P. Katti
Quoted 6 lines · In message <[email protected]> you wrote:

Now to boot from the image, I'm planning to do the following,

1> Copy the Image from the flash to the RAM,
2> and then give the control to the image location in RAM (using the bootm command).

No. "bootm" will automatically load the image no matter where it is. There is no need for an additional copy to RAM.

Quoted 4 lines

Finally the board has to boot from the harddisk, and the IDE is interfaced to the CPU through GPIOs,
Is there any code in which the IDE initialization is done using the GPIOs, since we are not getting how to give the IDE_BASE_ADDR.

All existing code assumes that there is a way to access the IDE controll, status and data registers. I have no idea what you mean by "using GPIOs" or how you can access an IDE controller that way.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If the hours are long enough and the pay  is  short  enough,  someone
will say it's women's work.