How to use Flex-builder

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

How to use Flex-builder

Jump to solution
2,947 Views
notshure
Contributor IV

Hello everyone,
I would like to create the file "firmware_ls1043ardb_sdboot.img" which must be loaded on the SD card using a RCW modified by me.

Flex-builder works with a lot of files (RCW, U-boot,...), different for each board and compiles them all together based on the type of command launched.

The command that allows me to compile all the files for a specific board and get the ".img " is the following:

"$flex-builer -i mkfw -m ls1043ardb -b sd"

But I want to change RCW, change the working frequency and disable core (core 1, core 2, core 3 ) of the processor.

From what I seem to have understood every time I run the command, it goes to check the file

<flexbuild> / configs / board / <machine> / manifest

An excerpt from the first part of manifest:

machine="ls1043ardb"

# default RCW
rcw_nor="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600.bin"
rcw_nor_sec="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sben.bin"
rcw_sd="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot.bin"
rcw_sd_sec="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot_sben.bin"
rcw_nand="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_nandboot.bin"
rcw_nand_sec="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_nandboot_sben.bin"

uefi_nor="firmware/uefi/ls1043ardb/LS1043ARDB_EFI_NORBOOT.fd"
device_tree="linux/kernel/arm64/LS/fsl-ls1043a-rdb-sdk.dtb"

BOOT_TYPE="sd nor nand"
BOOTLOADER_TYPE="uboot uefi"

UBOOT_CONFIG="ls1043ardb_tfa_defconfig ls1043ardb_tfa_SECURE_BOOT_defconfig"


# RCW/PBL+BL2 image
COMPOSITE_IMG1_FILE_sd="firmware/atf/ls1043ardb/bl2_sd.pbl"
COMPOSITE_IMG1_FILE_sd_sec="firmware/atf/ls1043ardb/bl2_sd_sec.pbl"
COMPOSITE_IMG1_FILE_nor="firmware/atf/ls1043ardb/bl2_nor.pbl"
COMPOSITE_IMG1_FILE_nor_sec="firmware/atf/ls1043ardb/bl2_nor_sec.pbl"
COMPOSITE_IMG1_FILE_nand="firmware/atf/ls1043ardb/bl2_nand.pbl"

# BL33 fip image
COMPOSITE_IMG2_FILE="firmware/atf/ls1043ardb/fip_uboot.bin"
COMPOSITE_IMG2_FILE_sec="firmware/atf/ls1043ardb/fip_uboot_sec.bin"
COMPOSITE_IMG2_FILE_uefi="firmware/atf/ls1043ardb/fip_uefi.bin"

# bootloader UEFI environment variable
COMPOSITE_IMG3_FILE_uefi="firmware/uefi/ls1043ardb/LS1043ARDBNV_EFI_NORBOOT.fd"

I have to change this line rcw_sd="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot.bin" to rcw_sd="firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1200_sdboot.bin"  to run the board at 1.2GHz.

Not only that, inside the file rcw_1200_sdboot.bin I have to go write:

.pbi
write 0x01ee0094, 0x0000000e
.ebd

to disable cores.

the file rcw_1200_sdboot.bin is in this path:

flexbuild_lsdk2108/components/firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1200_sdboot.bin

Once the RCW file has been modified, rerun the command $ flex-builer -i mkfw -m ls1043ardb -b sd and wait for the .img file to be generated.

Finally I insert the SD card formatted in Fat16 format

and I run the following command to load the file on the sd card:

sudo dd if=firmware_lx2160ardb_rev2_uboot_sdboot.img of=/dev/sdb bs=512 seek=8

Are the steps described up to here correct?

 

 

0 Kudos
1 Solution
2,911 Views
notshure
Contributor IV

ok i solved the problem

View solution in original post

0 Kudos
5 Replies
2,935 Views
yipingwang
NXP TechSupport
NXP TechSupport

These steps described by you are correct.

0 Kudos
2,924 Views
notshure
Contributor IV

Hi, thanks for your reply.

Although the procedure seems right, I am having problems.

I get nothing at all (via USB console), I don't see U-Boot.

I'm doing the steps in the most standard way without editing any files. I want to get an .img file capable of starting u-boot on my ls1043a platform.

So I download flex-builder from your site:www.nxp.com/lsdk.

I perform the following steps:

$ tar xvzf flexbuild_<version>.tgz
$ cd flexbuild_<verison>
$ source setup.env
$ flex-builder -h

After that I run the command:

$ flex-builder -i mkfw -m ls1043ardb -b sd

Which after a while gives me the following outputs:

firmware_ls1043ardb_sdboot.img

firmware_ls1043ardb_sdboot_secure.img

linux_LS_arm64_signature.itb

lsdk2108_yocto_tiny_LS_arm64.itb

rootfs_lsdk2108_yocto_tiny_arm64.cpio.gz

I'm only interested in: firmware_ls1043ardb_sdboot.img

I'm going to save the .img file in SD using the following command:

sudo dd if=firmware_ls1043ardb_sdboot.img of=/dev/sdb1 bs=512 seek=8

I use a USB adapter to insert SD card into my PC. I am running Ubuntu 20.04 through a virtual machine.

The writing seems to have been successful.

But when I try to boot from SD (set de DIP switches for SD boot), I don't see anything on the console.

I don't see Uboot starting.

I cannot understand where I am wrong. Having not changed anything, uboot should start without problems.

0 Kudos
2,923 Views
notshure
Contributor IV

Probably I am wrong to write the .img file into the SD card. Is there an alternative way to write the SD card, or to verify that it was written correctly?

0 Kudos
2,912 Views
notshure
Contributor IV

ok i solved the problem

0 Kudos
1,665 Views
artem_shimko
Contributor II

Hello,

Could you please describe how you solved it? I faced with the same issue.

0 Kudos