S32G Bootloader Customzition

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

S32G Bootloader Customzition

S32G Bootloader Customzition

This doc explain how to modify the bootloader to boot linux&mcal, to solve the conflict between bootloader, mcal and linux

 

本文说明在S32G2 RDB2板上如何定制开发Bootloader,本文示例主要实现功能是:

  • Bootloader启动一个M核,MCAL驱动测试程序,本文分别测试了MCU,DIO,UART的MCAL驱动示例代码。
  • Bootloader同时启动A53 Linux

目录

1    需要的软件,工具,文档与说明... 3

1.1  软件与工具... 3

1.2  参考文档... 3

1.3  开发说明... 3

2    测试软件安装编译说明... 4

2.1  安装RTD_MCAL驱动... 4

2.2  编译MCAL驱动测试程序(以MCU为例) 5

2.3  优化重排M7 demo镜像及与MPU设置的配合... 5

2.4  去掉CLOCK INIT. 7

2.5  去掉MCU相关INIT. 8

2.6  DIO MCAL程序去掉PORT INIT. 9

2.7  UART MCAL程序去掉PORT INIT. 10

2.8  UART MCAL程序修改CLOCK TREE.. 10

2.9  解决中断冲突... 11

2.10 准备A53 Linux镜像... 12

3    Bootloader工程说明... 13

3.1  关掉XRDC支持... 13

3.2  关掉eMMC/SD支持(可选) 14

3.3  关掉secure boot(可选) 14

3.4  增加MCAL驱动所需要的PORT的初始化... 15

3.5  解决Bootloader,MCAL与Linux的clock冲突... 17

3.6  配置A53 Boot sources: 34

3.7  配置M7 Boot sources: 35

3.8  关闭调试软断点:... 36

3.9  编译Bootloader工程... 37

3.10 制造Bootloader的带IVT的镜像... 38

3.11 烧写镜像... 41

4    测试... 42

4.1  硬件连接... 42

4.2  MCU MCAL+Linux测试过程... 42

4.3  DIO MCAL+Linux测试过程... 43

4.4  UART MCAL+Linux测试过程... 43

5    Bootloader源代码说明... 43

6    Bootloader定制说明... 45

6.1  QSPI NOR驱动说明... 45

6.2  eMMC/SDcard启动支持... 46

6.3  DDR初始化... 46

6.4  Secure Boot支持... 46

7    调试说明... 46

7.1  Bootloader的调试... 46

7.2  MCAL驱动的调试... 46

 

add one more doc to explain how to modify atf to boot on G3.

Labels (1)
Attachments
Comments

Hi John,

just curious - is this document available in english ?

Best Regards,

Viktor

uploaded

Thanks a lot for the english version !

Hi John,

Do you have manual for S32G3 bootloader?

Thank you a lot!

which is the same way, just change the bootloader project version to G3.

Hi John

I upload the boot loader to QSPI at address 0 and fip.bin to QSPI at address 0x100000, the probe message is as follow:

NOTICE: Reset status: Power-On Reset
NOTICE: BL2: v2.5(release):bsp37.0-2.5
NOTICE: BL2: Built : 16:13:38, Nov 2 2023
Warning: Instruction at BL33_ENTRYPOINT (0xffaa0000) is 0x0, which is not a B or BL!
NOTICE: BL2: Booting BL31

Why should upload fip.bin to qspi? and the fip.bin seems can't be booted

Thank you!

 

Hi John

I also tried on S32G3EVB, the console can't probe information.

 

Hi @Johnli,
    您好!

    目前正在使用S32,您发布的文档对我帮助很大,非常感谢!

    请教您个问题,关于A53相关的clk(core和外设),ATF、uboot、linux三部分之间是什么关系?从您的文档上看,时钟的初始化都是在ATF中,那之后的uboot和linux只是使用者吗,还是说uboot和linux也会重新配置时钟?我的理解,linux也会建立时钟树,但是linux设备树中没有看到。这部分不是很清楚,烦请您帮忙解惑。如果有相关的文档,希望您能分享下。

谢谢!

1: 看一下时钟相关文档S32G_Supplemental_documentation_on_resolving_clock_conflicts_V1-2023.07.03.pdf

2: linux的时钟初始化与配置,是需要传到ATF里的,所以代码在ATF中。

Hi @Johnli 
    您好!非常感谢~

    再请教您个问题。我在您分享文档中以及EB中,经常看到 "Under MCU Control",这个是什么作用?我在RM中没有找到相关描述。您能帮忙解答下吗?

谢谢!

就是本工程mcu模块不操作此时钟的意思,在eb中可以查看一个配置项的properties

Hi @Johnli 
    您好!

    在ATF中,部分时钟为什么没有定义具体的时钟值,如下图红框中。像这种时钟,系统如何确定最终的时钟值?我跟了下ARM_PLL_VCO的相关寄存器,发现该时钟的大小和允许的最大值相同。

aiweixin_2-1702467022664.png

谢谢!

check:

doc&project explain the G3 bootloader customizaiton(similar with G2) to run logger demo https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/S32G-Bootloader-G3-Customization/ta-p/176952...
after bootloader, how to solve the clock conflict to boot ATF https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/S32G-Bootloader-Customzition/ta-p/1519838
100% helpful (2/2)
Version history
Last update:
‎07-03-2023 04:10 AM
Updated by: