Error opening file : u-boot-with-spl-pbl.bin

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

Error opening file : u-boot-with-spl-pbl.bin

2,358 Views
rashmitharamesh
Contributor III

Hi,

When i try to execute ./uni_pbi <file>

I am getting the following error:

rashmitha@rashmitha-VirtualBox:~/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/sysroots/x86_64-linux/usr/bin/cst$ ./uni_pbi /home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/sysroots/x86_64-linux/usr/bin/cst/input_files/uni_pbi/ls1046/input_pbi_sd_secure

#----------------------------------------------------#
#------- -------- -------- -------#
#------- CST (Code Signing Tool) Version 2.0 -------#
#------- -------- -------- -------#
#----------------------------------------------------#
gd.boot_src SD_BOOTInput File Name : u-boot-with-spl-pbl.bin
Error in opening the file: u-boot-with-spl-pbl.bin

Also,

The folder /home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/u-boot-qoriq/2016.09+fslgit-r0/git/ls1046ardb_qspi_config DOES NOT conatin u-boot-with-spl-pbl.bin

Thanks,

Rashmitha

@chitra

Labels (1)
0 Kudos
10 Replies

1,913 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Rashmitha Ramesh Nair ,

The file cst/input_files/uni_pbi/ls1046/input_pbi_sd_secure is used to sign SD u-boot, SD u-boot is deployed in

QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/u-boot-qoriq/2016.09+fslgit-r0/git/ls1046ardb_sdcard_config/u-boot-with-spl-pbl.bin.

Please use cst/input_files/uni_sign/ls1046/qspi/ to sign images to generate secure boot headers.

You could refer to https://community.nxp.com/docs/DOC-332248.

Thanks,

Yiping

0 Kudos

1,913 Views
rashmitharamesh
Contributor III

Hi Yiping,

Thanks for the document. It is helpful.

Questions 1:

I am having a query regarding ESBC validating Boot script. 

I referred to your post :https://community.nxp.com/docs/DOC-102268#targetText=ESBC%20validates%20a%20file%20called,images%20l... 

and it says

  "Boot script is a text file which contains u-boot commands".

I am unable to understand which file it is. Because, Modified U-Boot which contains all initializations and routine tests are already a part of ESBC/Modified U-Boot/Trusted U-Boot.

Question 2:

Also,

In Section 2.2 Generate RSA keys and Signing Images to Create CSF Header with CST tool

e. Generate CSF header for kernel.itb.

I dont have kernel.itb in my folder

I tried building kernel image using instructions in how to generat kernel.itb file with kernel Image &amp; kernel.dtb files  

As per your suggestions,

1.I tried changing image paths

2.Updated missing files in earlier path mentioned

3.Instead of Image.gz, Tried placing "Image-ls1046ardb.bin

Make is failing. Could you suggest a source from where i can download the itb file

FATAL ERROR: Couldn't open "./home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/4.1-r0/build/arch/arm64/boot/Image.gz": No such file or directory
mkimage: Can't read kernel-ls1046a-rdb.itb.tmp: Invalid argument

Question 3:

And,

Could you please tell me why is kernel and ppa image CSF Header generation required.

Question 4:

Will bitbake fsl-image-full or fsl-image-core help in building kernel.itb missing in build_ls1046ardb/tmp/deploy/images

Thanks,

Rashmitha

chitra.amzarewale@utas.utc.com

 

0 Kudos

1,913 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. Please refer to the following example of bootscript

Bootscript is a U-Boot script image. Steps to create bootscript are given below :
a. Create a text file bootscript.txt with following commands.
esbc_validate <uImage CSF Header address>
esbc_validate <dtb CSF Header address>
esbc_validate <rootfs CSF Header address>
bootm <uImage Address> <rootfs address> <dtb address>

2. Please execute the following commands to generate kernel.itb

$bitbake fsl-image-kernelitb

3. PPA is validated by u-boot, Kernel image is validated in the bootscript

4. Please refer to meta-freescale/recipes-fsl/images/fsl-image-kernelitb.bb, fsl-image-kernelitb includes fsl-image-core.

Thanks,

Yiping

0 Kudos

1,913 Views
rashmitharamesh
Contributor III

Hi Yiping,

Thanks for your answers, My errors are solved.

I am having some queries which i am not able to convey properly through questions here.

Is it possible for us to have a WebEx session or could you suggest some other way to connect where we can interact real-time? 

I followed and successfully completed section 

2.2 Generate RSA keys and Signing Images to Create CSF Header with CST tool

But

Question 1:

I am not able to understand where am I supposed to provide my custom made ESBC/Modified U-Boot/Trusted U-Boot which i built using Code Warrior

Question 2:

Currently my ESBC includes setting of RCW values AND other U-Boot functionalities in a single project.

Should i be splitting Setting RCW and other U-Boot functionalities?

Question 3:

If there is a split needed as asked in question 2, Should CSF Header be generated for the RCW file(.elf/.bin)?

Question 4:

I would like to know the functionality of kernel and ppa image. Is it mandatory to have both ? 

If yes, is there a need to customize the kernel and ppa image?

Thanks,

Rashmitha

chitra.amzarewale@utas.utc.com

0 Kudos

1,913 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. We recommend users to build u-boot in SDK not in CodeWarrior.

2. It's needed to split them.

3. No need to generate CSF Header for RCW.

4. It's mandatory to have both, no need to customize them.

Thanks,

Yiping

0 Kudos

1,913 Views
rashmitharamesh
Contributor III

1. Where should I provide my file for building?

Could you provide path where the source file should be placed?

Also,

When i execute bitbake u-boot, I am getting the following error

DEBUG: Executing python function sysroot_cleansstate
DEBUG: Python function sysroot_cleansstate finished
DEBUG: Executing shell function do_configure
cp: cannot stat 'defconfig': No such file or directory
WARNING: /home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/4.1-r0/temp/run.do_configure.13829:1 exit 1 from
cp defconfig .config
ERROR: Function failed: do_configure (log file is located at /home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/4.1-r0/temp/log.do_configure.13829)

Error is because of :

cp ${KERNEL_DEFCONFIG} .config

in file linux-qoriq_4.1.bb

I tried replacing KERNEL_DEFCONFIG with path of one of the defconfig file

cp ${/home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/4.1-r0} .config

It says bad substitution.

Thanks

Rashmitha

chitra.amzarewale@utas.utc.com

0 Kudos

1,913 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please execute "$ bitbake u-boot -c patch -f", u-boot source code will be provided in

build_<board>/tmp/work/<board>-fsl-linux/u-boot-qoriq/2016.09+fslgit-r0/git/

0 Kudos

1,913 Views
rashmitharamesh
Contributor III

Thanks Yiping.

Question 1:

As per my project requirements i might not be able to continue with recommended path of using bitbake for compiling u-boot.

So, could you suggest how Code warrior Project compiled .bin/elf file can be used to generate qspi-secure-uboot.bin in yocto environment?

Question 2:

Is there a way in Code warrior itself to change Uboot_config = Qspi-secure-boot

Question 3:

Although I found the git folder which contains all U-boot source code

I am not able to understand if i should use "start" insidearm/cpu/armv8 because the changes that i make, have no influence at the time of bitbake.

I have attached by My Code Warrior Project folder structure. Could you suggest a way to directly import this into GIT folder

OR

Where should the files specific to each folder should be placed?

1.png2.png

Thanks,

Rashmitha

chitra.amzarewale@utas.utc.com

0 Kudos

1,913 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Rashmitha,

Please refer to the following app note for building u-boot using CodeWarrior.

Building Uboot using CodeWarrior for ARMv8 

CodeWarrior is not recommended be used to compile u-boot, you could use Linux SDK to modify and compile u-boot.

$bitbake u-boot -c cleansstate

$bitbake u-boot -c patch

Go to folder build_<board>/tmp/work/<board>-fsl-linux/u-boot-qoriq/2016.09+fslgit-r0/git/ to modify u-boot source.

$bitbake u-boot

Thanks,

Yiping

0 Kudos

1,913 Views
rashmitharamesh
Contributor III

Thanks Yiping,

I am now able to edit the source files.

However, i had a question regarding branching in assembly file

If I have two files start.S and setupTB.S

if i want to do "BL       setupTB" in start.S, how do I do it?

I have done ".global setupTB" in setupTB.S

and both the files are placed in same folder, but i am getting an error saying 

arch/arm/cpu/armv8/start.o: In function `_start':
| /home/rashmitha/QorIQ-SDK-V2.0-20160527-yocto/build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/u-boot-qoriq/2016.09+fslgit-r0/git/ls1046ardb_qspi_SECURE_BOOT_config/../arch/arm/cpu/armv8/start.S:26: undefined reference to `setupTB'

The approach i am using now does not give any errors when i compile using Code Warrior

Thanks,

Rashmitha

chitra.amzarewale@utas.utc.com

0 Kudos