How to build only RCW+PBL image in Yocto

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

How to build only RCW+PBL image in Yocto

Jump to solution
2,894 Views
amarnathmb
Contributor III

Hi Everyone,

Is there any way to build an image having only RCW+PBI in Yocto?

I have a custom board with T2080RDB reference design, and my Boot location is NAND flash.

As per the 9.1.3 of Freescale Linux SDK v1.8 boot is a two stage process, first stage RCW and PBI will be loaded in CPC and initializes DDR, then load second stage UBoot in to DDR.

After going through the git directory codes i found that .u-boot-with-spl.bin.cmd file inside T2080RDB_NAND folder has the command to merge u-boot-with-spl.bin (RCW+PBI) and u-boot.bin into single uboot image. I tried to remove the merging part from the command file, but failed to find success because the .u-boot-with-spl.bin.cmd file is auto-generated.

What i'm trying to do is to boot vxWorks bootrom instead of second stage UBoot, since vxWorks 6.9 doesn't support NAND boot. So i will use Uboot RCW and PBI to load vxWorks bootrom into DDR. I don't know how much of this is feasible, but i need to give a try. I'm new to U-Boot and Linux, can anyone help me to build an image having only RCW+PBI in Yocto?

Thanks in advance for all your help.

Regards,

Amar

Labels (1)
1 Solution
1,646 Views
bpe
NXP Employee
NXP Employee

RCW and PBL command sequences for all supported boards are generated

by the package called 'rcw'. Follow instructions given at the link

below to unpack the package and inspect the source:

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-891F9B61-E7D5-46C2-9BFA-6...

Note that in NAND boot scenario, PBI does not initialize DDR, it only

fetches SPL to CPC and transfers control to it. DDR initialization

is done by SPL. More details can be found in u-Boot source:

board/freescale/t208xrdb/README

doc/README.pblimage


Have a great day,
Platon

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

View solution in original post

7 Replies
1,646 Views
pranavmadhu
Contributor IV

Hi Amar,

To prepare pbl and u-boot for NAND flash, first you should make the UBOOT_CONFIG ??= "qspi" in conf/machine/<machine name>.conf file.

Now from build directory, clean and compile u-boot, you will get the rcw+pbl and u-boot in seperate. The size of u-boot for NAND flash will be less than that of SD card u-boot, due to the absence of pbl & rcw.

0 Kudos
1,646 Views
amarnathmb
Contributor III

Hi Pranav,

Thanks for your reply, I'm using Yocto project for building u-boot. When i give bitbake compile command it automatically builds u-boot-spl.bin and u-boot-spl.pbl as separate files. The u-boot-spl.pbl file contains rcw+pbi.

As mentioned in earlier post, i want to boot vxWorks bootrom from NAND flash, but unfortunately vxWorks doesn't support booting from NAND. So what i have done is to use u-boot SPL to load vxWorks bootrom from NAND in to RAM and then execute. I have succeed in copying vxWorks bootrom in to RAM using uboot spl and start executing it, but it hangs while jumping into the first C code function (usrInit). But when i load the same bootrom image from uboot console using go and bootvx commands it works fine and gives me  vxWorks bootrom console.

Regards,

Amar

0 Kudos
1,646 Views
pranavmadhu
Contributor IV

Hi,

I'm not sure but in the link below, it is said that T2080RDB do not support vxWorks BSP.

T2080RDB: bootrom boot problem from NAND Flash

What I understand is that the bootrom is usually written in the internal flash, and it is also having a checksum. Please correct me if I'm wrong. And what I think is that the bootrom fails to point to usrinit as checksum fails I'm not confient about this reply, sorry.

0 Kudos
1,646 Views
amarnathmb
Contributor III

Hi Pranav,

Thanks for your input. Checksum won't be a problem since i'm using bootrom Uncompressed binary file, all instructions are in opcode form. One more thing i'm able to load the same file successfully from Uboot console. Problem is that we can't change our hardware here, so this is the only method in-front of us to boot vxWorks bootrom.

Regards,

Amar

1,646 Views
amarnathmb
Contributor III

Hi,

With SPL from Uboot and vxWorks bootrom_uncmp.bin both placed in NAND flash, i'm able to execute bootrom_uncmp.bin from DDR, but it hangs after jumping to usrInit().

I'm able to load bootrom_uncmp (.ELF) from uboot using bootvx command and bootrom_uncmp.bin using go command, but don't know why bootrom_uncmp.bin fails in the above scenario. Can anyone please help me out.

Regards,

Amar

0 Kudos
1,647 Views
bpe
NXP Employee
NXP Employee

RCW and PBL command sequences for all supported boards are generated

by the package called 'rcw'. Follow instructions given at the link

below to unpack the package and inspect the source:

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-891F9B61-E7D5-46C2-9BFA-6...

Note that in NAND boot scenario, PBI does not initialize DDR, it only

fetches SPL to CPC and transfers control to it. DDR initialization

is done by SPL. More details can be found in u-Boot source:

board/freescale/t208xrdb/README

doc/README.pblimage


Have a great day,
Platon

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

1,645 Views
amarnathmb
Contributor III

Hi Platon,

Thanks for your quick reply, that was really helpful.

From the code in spl.c i found that it is loading UBoot to DDR from a specific offset in NAND. So what i have planned to do is, write bootrom_uncomp (excluding DDR initialization) explicitly at that offset and check.

Regards,

Amar

0 Kudos