what is the problem on building m7 bootloader by append_m7.sh ?

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

what is the problem on building m7 bootloader by append_m7.sh ?

Jump to solution
1,383 Views
fengxianeric
Contributor IV

I am using nxp repo ttps://github.com/nxp-auto-linux/m7-sample.git to build boot sample.

Already compiled pass for m7.bin and m7.map, but failed when to run append_m7.sh, 

eric@eric-VirtualBox:~/myspace/nxp/s32g3/m7-sample$ ls -l
total 756
-rwxrwxr-x 1 eric eric   6629 5月  30 14:11 append_m7.sh
drwxrwxr-x 2 eric eric   4096 5月  30 15:09 build
drwxrwxr-x 2 eric eric   4096 5月  30 14:11 include
-rw-rw-r-- 1 eric eric   1428 5月  30 14:11 LICENSE.BSD
-rw-rw-r-- 1 eric eric    973 5月  30 14:11 Makefile
-rw-rw-r-- 1 eric eric    663 5月  30 14:11 project.lds
-rw-rw-r-- 1 eric eric   1069 5月  30 14:11 Readme.md
drwxrwxr-x 2 eric eric   4096 5月  30 14:11 src
-rw------- 1 eric eric      0 5月  31 15:31 tmp.W1Q9LL
-rw-r--r-- 1 eric eric 719040 5月  31 15:28 u-boot-qspi-2020.04-r0.bin
lrwxrwxrwx 1 eric eric     26 5月  31 15:31 u-boot.s32 -> u-boot-qspi-2020.04-r0.bin
-rw-rw-r-- 1 eric eric  13312 5月  31 15:31 u-boot.s32.m7
eric@eric-VirtualBox:~/myspace/nxp/s32g3/m7-sample$ ./append_m7.sh -i u-boot.s32 -b build/m7.bin -m build/m7.map
Error: M7 entry point is not correctly set to work with IVT u-boot.s32
Current M7 entry point is 0x3408e000, while expected is 0xd65ee580
eric@eric-VirtualBox:~/myspace/nxp/s32g3/m7-sample$ 

------------------

Please correct me, thanks.

 

0 Kudos
Reply
1 Solution
1,217 Views
nxf92355
NXP Employee
NXP Employee

Hi Eric Li

If you use bsp35.0 then you should use m7 boot sample repo souce code from branch release/bsp35.0 .

please read Readme.md file first from branch release/bsp35.0 of m7-sample. there are two  commands will generate `u-boot.s32.m7` file which has to be placed on SDCard. one is for  normal u-boot and another is for ARM Trusted Firmware.

Note that bsp35.0 will not have u-boot.s32. now TF-A (ARM Trusted Firmware) is mandatory. you can use the file fip.s32 instead of u-boot.s32

as in readme.md

## ARM Trusted Firmware
         make CROSS_COMPILE=arm-none-eabi- A53_BOOTLOADER=fip.s32

[1] append_m7.sh will need u-boot.s32 as input, do you mean it refer to u-boot-qspi-2020.04-r0.bin?

=> well,in file readme.md of branch release/bsp35.0 of m7-sample there are no such type of command. it will generate u-boot.s32.m7 file which has to be placed on SDCard. but as answer of this question let  
      me explain from branch release/bb_0.5.0

         append_m7.sh -i <IVT binary> -b <m7 binary from this project> -m <m7 map file from this project>

      <IVT binary>  mean the binary which contain ivt table. here u-boot.s32 can take as input which contain
      ivt, while u-boot-qspi-2020.04-r0.bin does not contain ivt

[2] How does the u-boot-qspi-2020.04-r0.bin file ---> fip.s32-qspi file ?

=> The image u-boot-qspi-2020.04-r0.bin is  file generated by u-boot does not contain IVT or dtb, while
     fip.s32-qspicontains ivt, dtb
     and also it generated by trusted firmware. arm-trusted-firmware will handle this.you can see at  
     /tmp/work/s32g274ardb2-fsl-linux/arm-trusted-firmware/2.5-r0/build/

   Hope this may helps you, let us know if more quary

 

Regards ,

Tushar

View solution in original post

0 Kudos
Reply
5 Replies
1,344 Views
nxf92355
NXP Employee
NXP Employee

Hi Eric Li

Hope you are doing well

Can you tell which bsp branch  you are using for m7-sample ?

 

Regards ,

Tushar

Tags (1)
0 Kudos
Reply
1,333 Views
fengxianeric
Contributor IV

eric@eric-VirtualBox:~/myspace/nxp/s32g3/m7-sample$ git branch
* release/bb_bsp0.5.0

0 Kudos
Reply
1,316 Views
nxf92355
NXP Employee
NXP Employee

Hi Eric Li

The u-boot binary  u-boot.s32 -> u-boot-qspi-2020.04-r0.bin you are using is compiled by bsp0.5.0 ?

if not please use m7-sample branch as per u-boot binary(u-boot-qspi-2020.04-r0.bin ) that you have build .

for that change the branch of m7-sample as per version of u-boot-qspi-2020.04-r0.bin and then compile.

let us know for more quarry.

 

Regards ,

Tushar

0 Kudos
Reply
1,268 Views
fengxianeric
Contributor IV

Thanks caring question, let me clarify this further,

firstly my present bsp35.0;

secondly m7 boot sample repo souce code branch is release/bb_bsp0.5.0 (welcome correct me if existed problems);

thirdly I compiled u-boot-qspi-2020.04-r0.bin from bsp35.0;

Then next 2 questions coming,

[1]   append_m7.sh will need u-boot.s32 as input, do you mean it refer to u-boot-qspi-2020.04-r0.bin?

[2]  How does the u-boot-qspi-2020.04-r0.bin file ---> fip.s32-qspi file ? 

Thanks again

0 Kudos
Reply
1,218 Views
nxf92355
NXP Employee
NXP Employee

Hi Eric Li

If you use bsp35.0 then you should use m7 boot sample repo souce code from branch release/bsp35.0 .

please read Readme.md file first from branch release/bsp35.0 of m7-sample. there are two  commands will generate `u-boot.s32.m7` file which has to be placed on SDCard. one is for  normal u-boot and another is for ARM Trusted Firmware.

Note that bsp35.0 will not have u-boot.s32. now TF-A (ARM Trusted Firmware) is mandatory. you can use the file fip.s32 instead of u-boot.s32

as in readme.md

## ARM Trusted Firmware
         make CROSS_COMPILE=arm-none-eabi- A53_BOOTLOADER=fip.s32

[1] append_m7.sh will need u-boot.s32 as input, do you mean it refer to u-boot-qspi-2020.04-r0.bin?

=> well,in file readme.md of branch release/bsp35.0 of m7-sample there are no such type of command. it will generate u-boot.s32.m7 file which has to be placed on SDCard. but as answer of this question let  
      me explain from branch release/bb_0.5.0

         append_m7.sh -i <IVT binary> -b <m7 binary from this project> -m <m7 map file from this project>

      <IVT binary>  mean the binary which contain ivt table. here u-boot.s32 can take as input which contain
      ivt, while u-boot-qspi-2020.04-r0.bin does not contain ivt

[2] How does the u-boot-qspi-2020.04-r0.bin file ---> fip.s32-qspi file ?

=> The image u-boot-qspi-2020.04-r0.bin is  file generated by u-boot does not contain IVT or dtb, while
     fip.s32-qspicontains ivt, dtb
     and also it generated by trusted firmware. arm-trusted-firmware will handle this.you can see at  
     /tmp/work/s32g274ardb2-fsl-linux/arm-trusted-firmware/2.5-r0/build/

   Hope this may helps you, let us know if more quary

 

Regards ,

Tushar

0 Kudos
Reply