Is the dd operation necessary when writing the S32G emmc?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Is the dd operation necessary when writing the S32G emmc?

跳至解决方案
1,037 次查看
SandalWood
Contributor III

Hello, I am checking the document  Linux BSP 28.0 User Manual for S32G274A and find that when uboot writes to SD or EMMC, it has the following operations

haoluo_0-1665556738160.png

As I konw that the MBR occupies a sector, namely 512 bytes. The 446 bytes install the GRUB, followed by 64 bytes to describe the partition table, and the last 2 bytes are the end marks.

This dd operation is to put the first 256 bytes of the uboot into the GRUB that is not being used, and then place the rest after 512 bytes. 

I found that IVT tables only occupies 0xFFh bytes, and when using emmc to start, it must be at 0x1000h. So is the first dd command sudo dd if=u-boot.s32 of=${DEVSD} conv=notrunc bs=256 count=1 seek=0 necessary?I didn't go to the actual test, but just discussed the theory. I don't think this operation is necessary. Do you think my view is correct?

 

标记 (3)
0 项奖励
回复
1 解答
980 次查看
Stone_Shi
NXP Employee
NXP Employee

It should work if you skip the first dd command for the latest S32G2. 

u-boot.s32 has two IVTs:

IVT: Offset: 0x0 Size: 0x100
IVT (duplicate): Offset: 0x1000 Size: 0x100

You can consider the first dd command is for S32G2 Rev 1 which has IVT at 0 for emmc/SD.

在原帖中查看解决方案

0 项奖励
回复
1 回复
981 次查看
Stone_Shi
NXP Employee
NXP Employee

It should work if you skip the first dd command for the latest S32G2. 

u-boot.s32 has two IVTs:

IVT: Offset: 0x0 Size: 0x100
IVT (duplicate): Offset: 0x1000 Size: 0x100

You can consider the first dd command is for S32G2 Rev 1 which has IVT at 0 for emmc/SD.

0 项奖励
回复