[U-Boot-Users] u-boot for pxa255

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

In message eae046ff04113000585c0654fd@mail.gmail.com 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.
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.
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

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,

Sharad P. Katti wrote:
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).
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
Please confirm me whether I'm doing the right thing.
that should to the trick...
Cheers Simon

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,

Sharad P. Katti wrote:
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.
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

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,

In message eae046ff04120604512f2fc069@mail.gmail.com you wrote:
Since I dont have the BDI connection interface,
Then your next step should be to get access to a BDI2000.
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

Sharad P. Katti wrote:
Hi,
Since I dont have the BDI connection interface,
mmh, than booting a linux will be a little difficult... but it should be possible
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.
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

In message eae046ff04113002393bdde623@mail.gmail.com 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.
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
participants (3)
-
Sharad P. Katti
-
Simon Sudler
-
Wolfgang Denk