How to modify RCW and recompile into the boot image ls1021a

cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify RCW and recompile into the boot image ls1021a

1,217 Views
jiye
Contributor V

Hi,

I have a standalone ls1021a and eMMC. I want to know

(1)

How am I able to create a boot image which contains RCW,PBL and uboot using LSDK1906. Once this is done how am I able to change settings of the RCW and recompile back into the boot image ? This boot image is for me to burn into the eMMC

 

or

(2)if there is a way to just compile the RCW file directly ,how to generate this file and then change some settings and then  add it into the boot image binary

Labels (1)
11 Replies

658 Views
Pavel
NXP TechSupport
NXP TechSupport

The first 72 bytes contains PBL preamble and RCW.

Have a great day,
Pavel Chubakov

0 Kudos

658 Views
Pavel
NXP TechSupport
NXP TechSupport

This .img file contains rcw. See the first codes in this .img file using a hex editor or binary viewer.

See attached snapshot.

Have a great day,
Pavel Chubakov

0 Kudos

658 Views
jiye
Contributor V

which codes translate into RCW in the attachment

0 Kudos

658 Views
Pavel
NXP TechSupport
NXP TechSupport
  1. See the AN5184 about programming u-boot to eMMC/SD card using CodeWarrior for ARMv7 Flash programmer:

https://www.nxp.com/docs/en/application-note/AN5184.pdf

 

See also CodeWarrior for ARMv7 Release Note:

https://www.nxp.com/docs/en/release-note/CW-ARMv7-RN.pdf

 

2 and 3. The the following command can be used for RCW building:

flex-builder -c rcw -m ls1021atwr -b sd

 

See RCW using the following path:

/LSDK_1909/flexbuild_lsdk1909/packages/firmware/rcw/ls1021atwr

 

Usually we change RCW in the u-boot source folder:

/LSDK_1909/flexbuild_lsdk1909/packages/firmware/u-boot/board/freescale/ls1021atwr

 

Find .cfg files in this folder.

Use the following command for u-boot building:

flex-builder -c uboot -m ls1021atwr -b sd

Have a great day,
Pavel Chubakov

658 Views
dana_xiong
Contributor I

Hi Pavel,

In /LSDK_1906/flexbuild_lsdk/packages/firmware/u-boot/board/freescale/ls1043ardb folder ,

modify ls1043ardb_rcw_sd.cfg file ,

use '"flex-builder -i mkfw -m ls1043ardb -b sd" command to recompile

find the modification failed 

How to compile the modify .cfg file?

Thanks & Best Regards !

Dana Xiong

0 Kudos

658 Views
jiye
Contributor V

Hi Pavel ,

I successfully built the uboot_ls1021atwr_sdcard_qspi.bin, how am I able to combine this and rcw image into uboot.img

0 Kudos

658 Views
jiye
Contributor V

(1)what is the difference between uboot.bin and uboot.img

(2)also after I successfully create the uboot folder where I can find the uboot.bin?

(3)also under the 

/LSDK_1909/flexbuild_lsdk1909/packages/firmware/u-boot/board/freescale/ls1021atwr

I see the following file which is used for my ls1021a standalnoe prototype.

dcu.c

Kconfig

ls1021atwr.c

ls102xa_pbi.cfg

ls102xa_rcw_sd_ifc.cfg

ls102xa_rcw_sd_qspi.cfg

MAINTAINERS

Makefile

psci.S

README

0 Kudos

658 Views
Pavel
NXP TechSupport
NXP TechSupport

See attached file. This file is available in LSDK 1909 folder.

Use the following command for build all firmware:

  flex-builder -m ls1043ardb -a arm64         # automatically build all firmware, linux, apps components and lsdk rootfs for ls1043ardb

 

Find .img file using the following path after the "flex-builder -i mkfw -m ls1021atwr -b sd" command:

LSDK_1909/flexbuild_lsdk1909/build/images/firmware_ls1021atwr_uboot_sdboot.img

Have a great day,
Pavel Chubakov

0 Kudos

658 Views
jiye
Contributor V

Hi Pavel,

I think I did no clarify clearly in the beginning. I only have a standalone ls1021a, eMMC, DDR and JTAG interface I do not have SD card slot in my new design board. I know flex-builder -i mkfw -m ls1021atwr -b sd"  will generate all image files but that are for the SD card image which is used by the TWR-LS1021a eva board.

(1) Can I use the firmware_ls1021atwr_uboot_sdboot.img to flash into the eMMC by using tools such as CodeWarrior?

(2) Can I change the RCW settings and recompile the binary and create a new boot image by using what mean?

(3) Where can I find the RCW file what format is it and how to recompile it into the uboot image

0 Kudos

658 Views
Pavel
NXP TechSupport
NXP TechSupport

Use the following commands for installing LSDK 1906 under Ubuntu 18.

  1. sudo apt-get install git
  2. tar xvzf flexbuild_lsdk1906.tgz
  3. source setup.env
  4. flex-builder -i mkrfs -a arm32
  5. flex-builder -c linux -a arm32
  6. Find the LS1021a RCW in u-boot source folder. Use the following path:

/LSDK_1906/flexbuild_lsdk1906/packages/firmware/u-boot/board/freescale/ls1021atwr

Change the LS1021a RCW for your task.

  1. Use the following command for building .img file for booting from SD card:

flex-builder -i mkfw -m ls1021atwr -b sd

 

Find the firmware_ls1021atwr_uboot_sdboot.img file using the following path:

/LSDK_1906/flexbuild_lsdk1906/build/images/ This file contains RCW, PBL, u-boot, microcodes , kernel, .dtb and root file system.

 

Write this file using offset 8 on your MMC.

Have a great day,
Pavel Chubakov

 

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

0 Kudos

658 Views
jiye
Contributor V

is the

flex-builder -i mkfw -m ls1021atwr -b sd

apply for eMMC too ?

Also again this is what I have under /flexbuild_lsdk1906/packages/firmware

pastedImage_1.png

I do not have anything called u-boot folder under this folder how to generate that folder here

0 Kudos