Start Linux form M7_0 Failed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Start Linux form M7_0 Failed

ソリューションへジャンプ
16,834件の閲覧回数
StanleyShen
Contributor IV

Hi there

Since both start M core(APP) and A core still no good, and refer to the attatched document,

I want to start  Linux form M7_0 bootloader all lone (not include M7 APP).

I did following steps, but there was not any info output from the  UART0,

 

Could you tell me where the problem is?

Prepare images for Cortex-A53 cores

  • 1:download binaries_auto_linux_bsp33.0_s32g2_pfe.tgz and extract it 
  • 2:dd if=binaries_auto_linux_bsp33.0_s32g2_pfe/s32g274ardb2/fsl-image-auto-s32g274ardb2.sdcard of=/dev/sdc bs=1M status=progress && sync
    • (by this, SD mode startup OK)
  • 3:checkout release/bsp33.0-2020.04 and build it
  • 4:checkout arm-trusted-firmware (release/bsp33.0-2.5) and buid it (`FIP_ALIGN := 64` and unset LDFLAS because I had a "aarch64-fsl-linux-ld.bfd: unrecognized option '-Wl,-O1'" error)
  • 5:Build the ATF  and got a fip.32 the address info as blow:
    • IVT Location: SD/eMMC
    • Load address: 0x342fc580
    • Entry point: 0x34302000
  • 6:renew fip.32 

dd if=fip.s32 of=/dev/sdb skip=512 seek=512 iflag=skip_bytes oflag=seek_bytes conv=fsync,notrunc

Prepare bootloader for Cortex-A7_0 core

  • 1:load Integration_Reference_Examples bootloder to EB
  • 2:disable RM Eep MemDal CryptoDal Crypto plugin and releated options
    • (In my Env the SDHC and HSE is still abnormal)
  • 3:Bootloader(…)->Bootloader->General  Software breakpoint enable uncheck
  • 4:boot option like blow:
    • StanleyShen_0-1673437225845.pngStanleyShen_1-1673437237244.pngStanleyShen_2-1673437254729.png
  • 5:generate project and build bootloader.bin
  • 6:Generate S32G Boot Image Using S32DS IVT_TOOL
    • StanleyShen_3-1673437372927.png
  • 7:Deploy the bootloader(with IVT) and fip.32 to QSPI(NOR Flash) with s32ft.exe
    • bootlader 0x0000_0000
    • fip.32 0x0010_0000

After above operations, set RDB2 to QSPI boot mode.

 

 

 

0 件の賞賛
返信
1 解決策
16,662件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

No worries. Before going to debugging the multicore application, we would like to confirm if you can boot-up Linux from NOR Flash using the A53 core. This can be done directly from S32DS and by following Section 4 from AN13750.

The fip file that needs to be modified on the BSP provided by NXP is the fip.s32. The fip.bin is the one that needs to be flashed into NOR Flash. We can say is the "application bootloader" that you flash into the IVT of S32DS for our scenario of booting from A53. This will let us know if your files are working correctly.

Please, let us know.

元の投稿で解決策を見る

0 件の賞賛
返信
28 返答(返信)
14,809件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We may not understand the scope of your application but, why are you trying to boot the A53 core with the M7 if the M7 is not going to be used?

Also, the fip.s32 is not to be used on QSPI if it was not built to work with QSPI, there should be another fip file that was created for the QSPI interface.

The following is said in the Linux BSP User Manual [Page 25, Linux BSP 33.0 User Manual for S32G2 platforms, 07/2022]:

"For QSPI boot, configure TF-A to read the FIP image from a defined QSPI offset. Add FIP_QSPI_OFFSET= make parameter, as in the following example:

make CROSS_COMPILE=/path/to/your/toolchain/dir/bin/aarch64-none-linux-gnu- \ ARCH=aarch64 PLAT= BL33= \ FIP_QSPI_OFFSET=0x5400"

Please, let us know.

0 件の賞賛
返信
14,805件の閲覧回数
StanleyShen
Contributor IV

 

スポイラ
We may not understand the scope of your application but, why are you trying to boot the A53 core with the M7 if the M7 is not going to be used?

Because I want to start both A53 and M7 from M7, I broke down the steps, first BOOTROM>M7_ 0(bootloader)-> A53_ 0. If this is successful, then BOOTROM ->M7_ 0(bootloader)-> M7_ 0(App)

 

 

スポイラ
Also, the fip.s32 is not to be used on QSPI if it was not built to work with QSPI, there should be another fip file that was created for the QSPI interface.

 

If you look at the attachment I uploaded, you will know that the actual startup sequence I used  is BOOTROM ->M7_ 0(in Nor Flash) -> fip.32(in Nor Flash) -> u-boot(in SD), not BOOTROM ->M7_ 0(in Nor Flash) -> fip.32(in Nor Flash) -> u-boot(in Nor Flash), so,  I think configure TF-A to read the FIP image  is unnecessary.

Unfortunately, the problem returns to the point that I have been confused,

That is how to verify the following startup process in the simplest way:

QSPI startup mode

BOOTROM->M7_ 0(bootloader)->A53_ 0(FIP)->M7_ 0(APP output "hello world" to UART1)

                                                             L______-> A53(U-Boot->Linux)

I think I have basically referred to attached Multicore Application on S32G2. pdf, but still not work

0 件の賞賛
返信
14,797件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Thanks for the information.

You are referring to an attachment, but we could not find it, is the attachment the images provided above?

Taking your words "...the actual startup sequence I used  is BOOTROM ->M7_ 0(in Nor Flash) -> fip.32(in Nor Flash) -> u-boot(in SD)...", we retake our point, the fip file you are using is the same you used for your SD boot? if so, this is wrong. You should use a fip file configured to work from QSPI.

We could recommend a previous step which could be BOOTROM ->M7_ 0(in Nor Flash) -> A53(in SD). As you said, if the SD boot was OK, you will add the M7 variable to the equation, then if adding the M7 and booting the A53 from SD works, you can jump to using the NOR Flash. Just a recommendation.

Please, let us know if this information was helpful or not.

0 件の賞賛
返信
14,779件の閲覧回数
StanleyShen
Contributor IV

 - You are referring to an attachment, but we could not find it, is the attachment the images provided above?

    Sorry for this, I will attach the file .

 - we retake our point, the fip file you are using is the same you used for your SD boot? if so, this is wrong. You should use a fip file configured to work from QSPI.

I am sorry I still don't think so, pls let me explain the reason

1:refer to the GoldVIP binaries and GoldVIP document, we found the following files that you provided.

StanleyShen_0-1673600293519.png

And I dd the fsl-image-goldvip-s32g274ardb2.sdcard to SD card and burnt the boot-loader and fip.32-sdcard to QSPI Flash, the Linux can start normally in QSPI mode.

Alao I hexdumped the  fip.32-sdcard and you can the IVT image is on the 0x1000,

that is the position of  IVT in SD mode.

StanleyShen_1-1673600504863.png

2: I downloaded the u-boot and make s32g274ardb2_qspi_defconfig  and create IVT image with arm-trusted-firmware, but still NG(burnt it to NOR Flash but no any message outputed on UART0)

 

I also confirmed that this FIP file is available(no burnt linux image to QSPI)

 

NOTICE:  BL2: v2.5(release):bsp33.0-2.5-dirty
NOTICE:  BL2: Built : 08:08:26, Jan 13 2023
NOTICE:  BL2: Booting BL31


U-Boot 2020.04 (Jan 13 2023 - 16:06:18 +0800)

CPU:   NXP S32G274A rev. 2.0
Model: NXP S32G274A-RDB2
DRAM:  3.5 GiB
MMC:   FSL_SDHC: 0
Loading Environment from SPI Flash... SF: Detected mx25uw51245g with page size 256 Bytes, erase size 64 KiB, total 64 MiB
*** Warning - bad CRC, using default environment

Using external clock for PCIe0, CRNS
Configuring PCIe0 as RootComplex(x2)
Using external clock for PCIe1, CRNS
Frequency 125Mhz configured for PCIe1
Configuring PCIe1 as SGMII(x2) [XPCS0 2.5G, XPCS1 OFF]
Setting PCI Device and Vendor IDs to 0x4002:0x1957
PCIe0: Failed to get link up
Pcie0: LINK_DBG_1: 0x00000000, LINK_DBG_2: 0x00000800 (expected 0x000000d1)
DEBUG_R0: 0x00189900, DEBUG_R1: 0x08200000
PCI: Failed autoconfig bar 20
PCI: Failed autoconfig bar 24
PCIe1: Not configuring PCIe, PHY not configured
In:    serial@401c8000
Out:   serial@401c8000
Err:   serial@401c8000
Board revision: RDB2/GLDBOX Revision D
Net:   EQOS phy: rgmii @ 1

Warning: eth_eqos (eth0) using random MAC address - 12:e8:6d:ee:63:42
eth0: eth_eqos PFE: emac0: sgmii emac1: none emac2: rgmii
## No elf image at address 0xffdc92f8
PFEng firmware file '<NULL>@0x03000000:<NULL>' loading failed: -22

Hit any key to stop autoboot:  0
## No elf image at address 0xffdc9048
PFEng firmware file '<NULL>@0x03000000:<NULL>' loading failed: -22
 PFE: emac0: sgmii emac1: none emac2: rgmii
pfeng_cfg_mode_enable: Invalid PFE device
Booting from flash...
device 0 offset 0x1f0000, size 0xe00000
SF: 14680064 bytes @ 0x1f0000 Read: OK
device 0 offset 0xff0000, size 0x100000
SF: 1048576 bytes @ 0xff0000 Read: OK
device 0 offset 0x10f0000, size 0x2000000
SF: 33554432 bytes @ 0x10f0000 Read: OK
Bad Linux ARM64 Image magic!
=>
=>

 

 

So, Although It hard to say what the model is, I think the blow flow can work normally

  • QSPI mode
  • BOOTROM -> M-core bootloader(with IVT in NOR Flash) -> M-core APP

                                 |-------A-core FIP(SD-Card mode and in NOR Flash) -> A-Core U-Boot(in SD-Card)->A-Core Linux(in SD-Card)

 

Back to the question of the title

I used the UART sample of RTD, and configured the bootloader like blow:

StanleyShen_2-1673601508581.pngStanleyShen_3-1673601519971.pngStanleyShen_4-1673601536904.png

And I burnt both bootload, ATF(SD-Card and QSPI ), UART sample with windows GUI tool

the UART0 can be output normally like blow but UART0 still NG

StanleyShen_5-1673601695940.png

 

I also give the IVT compilation log. Can you give me some suggestions?

SD Mode

StanleyShen_7-1673601817499.png

QSPI Mode

StanleyShen_6-1673601799504.png

 

0 件の賞賛
返信
14,769件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for the attachment.

We do apologize for our insistence, but we want to retake the following point:

"- we retake our point, the fip file you are using is the same you used for your SD boot? if so, this is wrong. You should use a fip file configured to work from QSPI."

Below should be a capture of what is provided inside the NXP BSP 33.0 binaries folder, under the RDB2 sub-folder.

DanielAguirre_0-1673637329133.png

In which 2 fip files are provided, one for SD and one for QSPI.

For what you have been telling us, you are using the same fip file you used (and worked) on the SD interface. This should not work on the QSPI interface.

Have you tried (at this point in time) to boot up linux (without M7 into the equation) from NOR Flash?

From the first point you mentioned "...and fip.32-sdcard to QSPI Flash, the Linux can start normally in QSPI mode." and also "...I hexdumped the  fip.32-sdcard and you can the IVT image is on the 0x1000." we understand you tried this option, but it is not explicitly mentioned.

In QSPI mode, S32G looks for the IVT on 0x0, not 0x1000 [Table 137, Page 1146, S32G2 Reference Manual, Rev. 6, 11/2022], which the IVT for the fip file you are using is located, but you still got it working in QSPI mode.

DanielAguirre_1-1673637765087.png

We suspect you got your platform to boot up from the SD (not QSPI), which is expected from the steps you mentioned (and files you used).

Still, as we said before, we could not be understanding correctly your application nor configuration/set-up.

Please, let us know.

0 件の賞賛
返信
14,729件の閲覧回数
StanleyShen
Contributor IV

Hi Daniel 

In addition to the information sent last Friday that needs your help to confirm, I have a new idea and  I don't know if you can cooperate

Just refer to [Enabling Multicore Application on S32G2 .pdf] that we was attached, you should be able to compile the relevant binary files for starting A53 through M7, so can you provide the files compiled according to this document, as blow:

  • m7_ bootloader.bin(with IVI image and start fip.32(BL2))
  • m7_ bootloader.elf(with compile infomation)
  • fip.32
  • m7_ app.bin

I want to burn  these normal files, and then debug m7_ Bootloader.elf to compare with my environment.

 

Also

These attached files are compiled from my environment. I wonder if you can debug my files to see why A53 doesn't start normally

  • Burn and write bootloader_ a_ m_ Blob.bin to 0x00
  • Burn fip.s32-sdcard-self_ 0114 to 0x100000
  • Burn main.bin to 0x200000

Then with the QSPI mode and you can see the output of main.bin on serial port 1 (9600 rate)

Next, you can debug fip.s32-sdcard-self with S32G debug probe.

Thinks.

0 件の賞賛
返信
14,673件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We do apologize for the delay.

We want to step back a little bit from the whole starting up A53 with linux from the M7 core, due to it being complex to debug and difficult to explain.

We make you the following proposal, have you tried booting A53 Linux from the same A53 with QSPI interface? Has it worked for you?

This can be done directly with S32DS v3.4

This will let us know if the files you have are working for the following steps required in the multicore boot.

Please, let us know.

0 件の賞賛
返信
14,716件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your patience, we are still working on your case.

We will update you as soon as we have more information on your inquiry.

Just as a question (maybe you have already answered this), have you tried running the application without modifications? To verify if there is a problem with the instructions. The software related to this AN is provided in the S32G2 product page as AN13750SW.

Please, let us know. We want to be sure that you can run the provided application prior to making modifications.

0 件の賞賛
返信
14,648件の閲覧回数
StanleyShen
Contributor IV

Hi

Daniel

Sorry for the Chinese New Year leave.

- have you tried running the application without modifications? 

Yes, I did, but still NG,But there was one difference:

  • to disable BREAKPOINT, I  unchecked Bootloader(…)->Bootloader->General ->Software breakpoint enable, No code modification.

For confirmation, I  Re-compiled the images and provide those files  and IVT configuration

StanleyShen_0-1674562363124.png

In addition,here are two questions, please let me to confirm

  1. In AN13750, about deployment, should we have to copy two files, and is the deployed file a fip.bin file instead of a fip.s32 file?
    1. StanleyShen_0-1674562765712.png

       

  2. I tried to debug the bootloader.elf file that I attached, it stopped at HSE firmware initialization, is  there a problem here?(I think it should be because of the debugger, because I unchecked the [secure boot] at Bootloader(…)->EcuC(…)->Bootloader(…)-> Bootloader->General and the debug is OK,but start A53 still NG) 
    1. StanleyShen_1-1674563217936.png

       

Maybe I still missed something, but there is still no special progress so far. Please help me.

Thank you very much.

 

0 件の賞賛
返信
16,663件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

No worries. Before going to debugging the multicore application, we would like to confirm if you can boot-up Linux from NOR Flash using the A53 core. This can be done directly from S32DS and by following Section 4 from AN13750.

The fip file that needs to be modified on the BSP provided by NXP is the fip.s32. The fip.bin is the one that needs to be flashed into NOR Flash. We can say is the "application bootloader" that you flash into the IVT of S32DS for our scenario of booting from A53. This will let us know if your files are working correctly.

Please, let us know.

0 件の賞賛
返信
14,622件の閲覧回数
StanleyShen
Contributor IV

Hi Daniel

Thank you for your kind help,

Since I reconfigure the IVT image like blow, it seems that both A53 and M7_0 were startup OK

StanleyShen_0-1674646244018.png

StanleyShen_1-1674646251130.png

and between Linux Kernel and Cortex-M7 cores the IPC communication was OK too.

StanleyShen_2-1674646367532.png

 

  - we would like to confirm if you can boot-up Linux from NOR Flash using the A53 core. This can be done directly from S32DS and by following Section 4 from AN13750.

About this,  I still think that the content in Section 4 describes starting Linux from SD card instead of NOR Flash.

BTW,

we will soon use S32G to develop AUTOSAR AP and domain controllers, and I inquired about NXP's customer service in China. They mentioned that the support of S32G is in Europe (the Netherlands?), because there is a time difference between China and the Netherlands. Besides this forum, is there any more easy way (near-real-time) to ask you questions?

In addition,

I saw some Chinese menual in the forum. I don't know whether these menaul were made by NXP employees in China or Chinese employees in Europe?

Therefore, even in Europe, is it possible for Chinese (or Ethnic Chinese) to support China's S32G business in the future.

 

0 件の賞賛
返信
14,282件の閲覧回数
maiwl
Contributor I

 

Since I reconfigure the IVT image like blow, it seems that both A53 and M7_0 were startup OK

您好,您是通过修改M7核的Bootloader的IVT配置就启动成功了吗?烧录到norflash的是fip.s32还是fip.bin?

0 件の賞賛
返信
14,006件の閲覧回数
StanleyShen
Contributor IV

 - 您是通过修改M7核的Bootloader的IVT配置就启动成功了吗?烧录到norflash的是fip.s32还是fip.bin?

参考附件的Enabling Multicore Application on S32G2 .pdf就可以成功了,

注意烧到NORFlash的一定要是fip.bin。

0 件の賞賛
返信
13,675件の閲覧回数
shanlan123
Contributor II
老板你好,这个文档里面说IPCF组件里面有3个例子(M7_0、M7_1、M7_2各一个),但是我下载的IPCF组件里面只有2个例子(M7_0和M7_1的)。然后我发现M7_0和M7_1编译完后,内存加载地址、程序入口地址与文档上的不一样,并且M7_0的地址与fip.bin的地址有重叠。请问这个问题应该怎么处理呢?
13,452件の閲覧回数
StanleyShen
Contributor IV

抱歉,

最近太忙,都没空看论坛了。

我还是建议先按照示例,一步一步走。

所以我把我这边下载的内容也提供出来,你先参考着往下走。

0 件の賞賛
返信
13,624件の閲覧回数
KeithWANG
Contributor II
我也遇到了同样的问题。
I also encountered the same problem, anyone can support the answer ?
0 件の賞賛
返信
13,451件の閲覧回数
StanleyShen
Contributor IV

你好

具体是什么内容,有充分的内容,大家才有可能帮到你。

0 件の賞賛
返信
13,437件の閲覧回数
KeithWANG
Contributor II

我是完全按照AN13750(Enabling Multicore Application on S32G2 。。)的例程配置并且烧录的,但是从NorFlash中起M核(SW4-7 OFF)失败了,串口这段完全没有任何信息print出来,但是把SW4-7 ON后,SD卡的A核是能够起来的,这种情况我完全确定不了M核起来了没有。

I am completely following AN13750 (Enabling Multicore Application on S32G2.). But the M core (SW4-7 OFF) from NorFlash failed. There is no information print out ON the serial port. However, after SW4-7 on, the A core of SD card can be raised.

0 件の賞賛
返信
13,430件の閲覧回数
StanleyShen
Contributor IV

首先

但是从NorFlash中起M核(SW4-7 OFF)失败了,串口这段完全没有任何信息print出来

这个你是说M和这边串口没有消息打印的对吧,

你还是需要在理解一下AN13750的case,这个case的最终结果并不是所A核和M核要有东西打印,

其核心是测试IPCF来测试IPC通信是否正常(如下图)

StanleyShen_1-1679030782309.png

所以在这个case中,如果要确认M核是否起来,可以参考PDF的22页的内容,

通过Linux端的驱动发行IPC消息给M核,然后M核把同样的消息返回给Linux,

具体内容如下:

$echo 1 > /sys/kernel/ipc-shm-sample-instance0/ping
$echo 1 > /sys/kernel/ipc-shm-sample-instance1/ping
$echo 1 > /sys/kernel/ipc-shm-sample-instance2/ping
$dmesg | grep ipc-shm-sample_multi-instance
[ 462.703716] ipc-shm-sample_multi-instance: starting demo on instance 0...
[ 462.703739] ipc-shm-sample_multi-instance: INST0 ch 0 >> 19 bytes: SENDING MESSAGES: 1
[ 462.703753] ipc-shm-sample_multi-instance: INST0 ch 1 >> 32 bytes: #0 HELLO WORLD! from KERNEL
[ 462.703797] ipc-shm-sample_multi-instance: ch 0 << 19 bytes: REPLIED MESSAGES: 1
[ 462.703818] ipc-shm-sample_multi-instance: ch 1 << 32 bytes: #0 HELLO WORLD! from CORE 4
[ 462.703850] ipc-shm-sample_multi-instance: exit demo for instance 0
[ 470.935633] ipc-shm-sample_multi-instance: starting demo on instance 1...
[ 470.935653] ipc-shm-sample_multi-instance: INST1 ch 0 >> 19 bytes: SENDING MESSAGES: 1
[ 470.935667] ipc-shm-sample_multi-instance: INST1 ch 1 >> 32 bytes: #0 HELLO WORLD! from KERNEL
[ 470.935712] ipc-shm-sample_multi-instance: ch 0 << 19 bytes: REPLIED MESSAGES: 1
[ 470.935732] ipc-shm-sample_multi-instance: ch 1 << 32 bytes: #0 HELLO WORLD! from CORE 5
[ 470.935763] ipc-shm-sample_multi-instance: exit demo for instance 1

 

0 件の賞賛
返信
13,423件の閲覧回数
KeithWANG
Contributor II
非常感谢,理解。
但是在执行部分,板子的状态应该是SW10-1 ON ,SW10-2 OFF,SW-3 ON,SW4-all OFF(这就以为这是从Nor Flash起)是吗? 还是说,不用这样拨动开关,直接起SW4-7 ON,从SD卡起进入U-boot,然后在通过指令运行app? 感谢专家!
0 件の賞賛
返信