Creating LS1021A u-boot image to use with SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating LS1021A u-boot image to use with SD card

Jump to solution
3,465 Views
rahulr
Contributor II

I am trying to prepare an SD card to boot LS1021A-TWR development board. The QorIQ-SDK (rev. 2) asks to program u-boot-with-spl-pbl-sd.bin to the SD card. When I run bitbake fsl-image-minimal, I get the following u-boot images.

u-boot.bin
u-boot-lpuart.bin
u-boot-ls1021atwr.bin
u-boot-nor.bin
u-boot-qspi.bin
u-boot-sdcard-ifc.bin
u-boot-sdcard-qspi.bin
u-boot-secure-boot.bin

How do I build u-boot-with-spl-pbl-sd.bin?

These are my u-boot settings in ls1021atwr.conf.

UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"

Labels (1)
1 Solution
1,715 Views
ufedor
NXP Employee
NXP Employee

The u-boot-sdcard-ifc.bin and u-boot-sdcard-qspi.bin are complete images each of which has the RCW combined with the preboot load instructions (PBI), the U-Boot secondary program loader (SPL), and the main U-Boot executable.  The only operation required is to put either image to SD card starting at block 8.

View solution in original post

4 Replies
1,716 Views
ufedor
NXP Employee
NXP Employee

The u-boot-sdcard-ifc.bin and u-boot-sdcard-qspi.bin are complete images each of which has the RCW combined with the preboot load instructions (PBI), the U-Boot secondary program loader (SPL), and the main U-Boot executable.  The only operation required is to put either image to SD card starting at block 8.

1,715 Views
rahulr
Contributor II

Thank you!

Out of curiosity, what is the u-boot-with-spl-pbl-sd.bin file? The QorIQ SDK documention mentions about, I could also see it in the ls1021atwr.conf file.

Where does bitbake/yocto recipe gets the RCW and PBI? What is the procedure if I need to change the RCW or PBI?

By the way, this is how I got the SD boot working.

1. Program the SD card from PC:

sudo dd if=u-boot-sdcard-ifc.bin of=/dev/mmcblk0 bs=512 seek=8

or

sudo dd if=u-boot-sdcard-qspi.bin of=/dev/mmcblk0 bs=512 seek=8

2. Change the LS1021A-TWR switch settings:

SW2 - 00100111

SW3 - 01100101

3. Plug the SD card to LS1021A-TWR and reset it.

0 Kudos
1,715 Views
rahulr
Contributor II

Cool, this makes lot of sense. I guess the proper way to modify the RCW is to create a yocto recipe to patch the RCW and run bitbake to build the image.

0 Kudos
1,715 Views
cswarth
Contributor III

Yes, that's probably the right way to go if you're in the NXP SDK.   Since I'm spending so much time diddling with uboot, I cloned the fsl-qoriq U-Boot Custodian Tree repo and build uboot directly, without the overhead of yocto and the NXP SDK.    I'll get back to using the NXP SDK again when I am ready to bring up linux.