Programming U-Boot to SD card

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming U-Boot to SD card

Jump to solution
1,783 Views
Contributor II

We use QorIQ_SDK_LS1021A_0.4 SDK for LS1021A processor.

I would like to ask :

Where is the u-boot-with-spl-pbl.bin file mentioned in the Freescale Linux LS1021A SDK v0.4, Rev. A, Jul 2015 manual (page 73)

Regards

Victor

Labels (1)
0 Kudos
1 Solution
83 Views
NXP Employee
NXP Employee

The binary for programming into sd card is u-boot.bin (\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git\). you can open it in a hex editor and you will see that this binary contains rcw+pbi+uboot. Also, in this folder you can find the elf file, in case you need to debug u-boot.

In spl folder, you can find the spl elf file in case you need to debug u-boot secondary program loader.

Adrian

View solution in original post

0 Kudos
13 Replies
83 Views
NXP Employee
NXP Employee

After U-Boot sdcard build complete, u-boot-with-spl-pbl.bin should be available in \Freescale-Linux-SDK-for-LS1021A-Rev2-v0.4-20150803-yocto\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git\spl\

Adrian

0 Kudos
83 Views
Contributor II

HI Adrian,

Thank you for your answer.

I did not find the u-boot-with-spl-pbl.bin file because the \Freescale-Linux-SDK-for-LS1021A-Rev2-v0.4-20150803-yocto\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git folder does  not content the spl directory on my computer.

Could you give more explanation what "U-boot sdcard build" is?

Regards

Victor

0 Kudos
83 Views
NXP Employee
NXP Employee

Did you select sdcard for UBOOT_CONFIG in ls1021atwr.conf (\Freescale-Linux-SDK-for-LS1021A-Rev2-v0.4-20150803-yocto\meta-fsl-arm\conf\machine\)?

Using UBOOT_CONFIG ??= "sdcard", uboot will be build for sdcard and spl folder will be available in uboot folder.

Adrian

0 Kudos
83 Views
Contributor II

Yes, I changed the config file. After that I was able to find the SPL directory.

However I did not received the expected file (u-boot-with-spl-pbl.bin). I received the files:

u-boot-spl

u-boot-spl.bin

u-boot-spl.pbl

Which file from this list should I use to program my SD card?

Regards

Victor

0 Kudos
84 Views
NXP Employee
NXP Employee

The binary for programming into sd card is u-boot.bin (\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git\). you can open it in a hex editor and you will see that this binary contains rcw+pbi+uboot. Also, in this folder you can find the elf file, in case you need to debug u-boot.

In spl folder, you can find the spl elf file in case you need to debug u-boot secondary program loader.

Adrian

View solution in original post

0 Kudos
83 Views
Contributor II

Thank you Adrian,

Regards

Victor

0 Kudos
83 Views
Contributor IV

Hi, I am also having trouble getting u-boot-with-spl-pbl.bin.

I edited meta-fsl-arm/conf/machine/ls1021atwr.conf to use UBOOT_CONFIG ??= "sdcard".  I then ran bitbake u-boot -c cleansstate and bitbake u-boot with no errors.  However the folder tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-ls1/2014.07-r0/git is still empty.

Are there any other steps necessary to make u-boot-with-spl-pbl.bin?

Thank you,

Josh

0 Kudos
83 Views
NXP Employee
NXP Employee

Hi Josh,

Try the following steps:

bitbake -c cleansstate u-boot

bitbake -c patch u-boot

bitbake -c compile -f u-boot

Adrian

83 Views
Contributor IV

Hi Adrian,

Thank you for the help.  With those commands I am able to build u-boot with spl.  However, after writing the new binary image to the SD card, I am unable to see any console prompt from u-boot.

These are the steps I have done so far:

Edit meta-fsl-arm/conf/machine/ls1021atwr.conf to use UBOOT_CONFIG ??= "sdcard"

$ cd build_ls1021atwr_release/

$ bitbake -c cleansstate u-boot

$ bitbake -c patch u-boot

$ bitbake -c compile -f u-boot

$ cd tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-ls1/2014.07-r0/git/

$ sudo dd if=u-boot.bin of=/dev/sdN bs=512 seek=8 && sync

$ umount /dev/sdN1

The DIP switch SW2 is set to 00101111 and SW3 is 01100001.  J19/J20 are both shorted to 2:3. 

Doing a hexdump of u-boot.bin shows the eSDHC preable word AA 55 AA 55 at address 0x1000 (LSA1021A Reference Manual rev E pgs 252 & 266).

This discussion (https://community.freescale.com/thread/371771) has attached a working u-boot_prebuilt.bin. After extracting and running through the same steps as above, I was able to get a u-boot prompt.  So that confirms that my switches are in the correct position and u-boot is getting written to the card.  I suspect that my u-boot.bin is still not being built correctly.

Are there any other steps required to make u-boot boot on SD?

Thank you,

Josh

0 Kudos
83 Views
NXP Employee
NXP Employee

Hi Josh,

Could you provide info about the SDK version you are using and CPU revision?

Adrian

0 Kudos
83 Views
Contributor IV

Hello Adrian,

From your suggestion, I re-downloaded the QorIQ SDK v1.8 SOURCE SDK from Freescale's website and rebuilt u-boot following the previous steps.  This time I had no problems. 

Thank you very much for the help,

Josh

0 Kudos
83 Views
NXP Employee
NXP Employee

Hello Victor Mazin,

There is a similar question on the target previously, please check if help:

how do i get u-boot-with-spl-pbl.bin?


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
83 Views
Contributor II

Hi Lunmin,

Thank  you for your answer.  I followed your recommendation from the previous discussion:

1. Change the config in /meta-fsl-arm/conf/machine/ls1021atwr.conf

    “ UBOOT_CONFIG ??= "sdcard"

2. $bitbake u-boot -c cleansstate

    $bitbake u-boot

However I did not received the expected file (u-boot-with-spl-pbl.bin). I received the files:

u-boot-spl

u-boot-spl.bin

u-boot-spl.pbl

Which file from this list should I use to program my SD card?

Regards

Victor

0 Kudos