Is the dd operation necessary when writing the S32G emmc?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the dd operation necessary when writing the S32G emmc?

Jump to solution
204 Views
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?

 

Tags (3)
0 Kudos
1 Solution
147 Views
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.

View solution in original post

0 Kudos
1 Reply
148 Views
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 Kudos