On Thu, Jul 23, 2009 at 6:46 PM, Kulkarni, Mayuri
<Mayuri.Kulkarni@xxxxxxx> wrote:
Hi,
I have the following problem definition for u-boot usage for Petalinux running on Microblaze soft CPU:
- I have a system without flash wherein I am copying the Petelinux kernel image.ub into memory through xmd and then invoking u-boot. Now if I have another kernel image at a second location in memory, I want u-boot to let me choose which image to boot.
u-boot can boot an image from any address - you just change the value passed to the "bootm" command.
How that value is derived is up to you. u-boot has some basic scripting and conditional execution capabilities - see the manual at
www.denx.com
- After this stage, is it possible to programmatically change the default image from which u-boot can boot? I want to be able to copy an upgraded kernel image either into the flash or memory and make u-boot use the upgraded image the next time the system
reboots.
I thought you just said you have a system without flash?
Anyway, with flash, you could adjust the uboot environment with "setenv", then use "saveenv" to save it to flash. Next time u-boot starts, it gets the saved environment.
Without flash, you'll need something like a DIP switch on the board, and have u-boot query that to make its decision about which image to boot.
I have checked the auto-boot script but don’t see how we can change the script or issue a u-boot setenv-like command through another process in a running system.
The problem seems to be your lack of persistent storage more than anything else. We've configured u-boot in PetaLinux to cover the most standard situations - what you are describing is far from standard, but likely to be achievable in some way.
It would help to know more about what you are trying to achieve, in the broader sense. There is almost certainly an easier way to do whatever it is you are trying to achieve.
Regards,
John
--