I am trying to modify the Xilinx U-boot environment variables in order to get a Mircrozed board to boot Linaro or Arch Linux from an SD card. The rootfs is on partition 2 of the sdcard in an ext4 FS and the default sdboot= commands will not work because of the ramdisk. I need to be able to autoboot and not have to manually type in the commands.
I've modifed u-boot-xlnx/include/configs/zynq_common.h with a new sdboot variable and successfully rebuilt the uboot.elf and put it into boot.bin with XSDK:
"sdboot=echo Copying Linux from SD to RAM... && mmcinfo && "
"fatload mmc 0 0x3000000 ${kernel_image} && "
"fatload mmc 0 0x2A00000 ${devicetree_image} && "
"bootm 0x3000000 - 0x2A000000"
The problem is that once u-boot comes up the sdboot variable is changed to:
sdboot=echo Copying Linux from SD to RAM... && mmcinfo && run mmc_loadbit_fat && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && fatload mmc 0 0x2000000 ${ramdisk_image} && bootm 0x3000000 0x2000000 0x2A00000
Note that the 0x2000000 is back instead of the -
I cannot find where the overwite is coming from. I tried creating a uEnv.txt file, but it gets ignored unless I stop autoboot and type "run uenvboot" which will bring in the new sdboot variable from the text file I put in there.
If I do a "env defaults -a -" command then my custom sdboot command shows up and "run sdboot" works fine at that point.
I cannot figure out how the sdboot= variable is being replaced.
I'd be happy being able to put get the uEnv.txt file to autoboot, but it doesn't seem to get picked up either.
Anybody have an idea what is going on and how to make this work ?
Thanks,
John