[meta-xilinx] Problems booting from SD card

Edward Wingate edwingate8 at gmail.com
Thu May 14 11:01:25 PDT 2015


That was it!  Thanks Nathan.  Don't know how long that would have
taken me to figure out.

On Wed, May 13, 2015 at 8:12 PM, Nathan Rossi <nathan at nathanrossi.com> wrote:
> On Thu, May 14, 2015 at 8:03 AM, Edward Wingate <edwingate8 at gmail.com> wrote:
>> I am booting a custom zynq board from a SD card.
>> uEnv.txt contains this:
>> kernel_image=uImage
>> devicetree_image=my-board.dtb
>> ramdisk_image=my-image-my-board.cpio.gz.u-boot
>>
>> These files are all also on the SD card.
>>
>> On bootup I get this:
>> U-Boot 2015.01 (May 13 2015 - 10:34:29)
>>
>> Board:  Xilinx Zynq
>> I2C:   ready
>> DRAM:  ECC disabled 512 MiB
>> MMC:   zynq_sdhci: 0
>> SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256
>> KiB, total 128 MiB
>> *** Warning - bad CRC, using default environment
>>
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Board:  Xilinx Zynq
>> Net:   Gem.e000b000
>> reading uEnv.txt
>> 112 bytes read in 11 ms (9.8 KiB/s)
>> Importing environment from SD ...
>> Hit any key to stop autoboot:  0
>> Device: zynq_sdhci
>> Manufacturer ID: 27
>> OEM: 5048
>> Name: SD8GB
>> Tran Speed: 50000000
>> Rd Block Len: 512
>> SD version 3.0
>> High Capacity: Yes
>> Capacity: 7.4 GiB
>> Bus Width: 4-bit
>> reading uEnv.txt
>> 112 bytes read in 11 ms (9.8 KiB/s)
>> Loaded environment from uEnv.txt
>> Importing environment from SD ...
>> Copying Linux from SD to RAM...
>> reading uImage
>>  **Unable to read file uImage
>> zynq-uboot>
>>
>> It seems to be unable to read kernel file uImage.
>> The sdboot environment variable is:
>>
>> sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to
>> RAM... && load mmc 0 ${kernel_load_address} ${kernel_image} && load
>> mmc 0 ${devicetree_load_address} ${devicetree_image} && load mmc 0
>> ${ramdisk_load_address} ${ramdisk_image} && bootm
>> ${kernel_load_address} ${ramdisk_load_address}
>> ${devicetree_load_address}; fi
>>
>> But if I run each load and bootm statement individually at the u-boot
>> prompt, everything works and Linux boots:
>>
>> zynq-uboot> load mmc 0 0x2080000 uImage
>> zynq-uboot> load mmc 0 0x2000000 my-board.dtb
>> zynq-uboot> load mmc 0 0x4000000 my-image-my-board.cpio.gz.u-boot
>> zynq-uboot> bootm 0x2080000 0x4000000 0x2000000
>>
>> [Successfully boots Linux]
>>
>> I did verify all the enrivonment variables for image names and load
>> addresses are correct. It's curious things work if entered
>> individually at the prompt, but booting from SD card (and "run
>> sdboot") fails.
>>
>>  Anyone know what I can try next to fix/debug this?   Thanks for your help.
>
> Hi Edward,
>
> I have seen a similar issue like this myself. It turned out that the
> uEnv.txt had '\r\n' line endings (Windows style) instead of just '\n'.
> And so even though the file name appears correct in the printenv it
> was actually one character off. You can test it in U-Boot to see if
> the actual environment variable is set correctly without trailing
> characters by doing the load command with the variable instead of the
> expected value, e.g.:
>
> load mmc 0 0x2080000 ${kernel_image}
>
> If that fails its likely to be the issue I am describing. Check the
> uEnv.txt file with hexdump or set your editor to show non-printable
> characters.
>
> Regards,
> Nathan



More information about the meta-xilinx mailing list