LS1043A eMMC GPT parititioning and boot process

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

LS1043A eMMC GPT parititioning and boot process

666件の閲覧回数
bhargavjayswal
Contributor III

Dear NXP  Team,

We currently use the LS1043ARDB for development, where our custom board only has eMMC as the boot device.

From samsung emmc 16GiB (KLMAG1JETD-B041) datasheet, it support hardware partitioning and initially consists of below partition from manufacturer.

Boot Partition 1                  :   4  MiB
Boot Partition 2                 :    4  MiB
RPMB                                  :    4  MiB
User Data Area (UDA)     :    less than 16 GiB 


According to "qoriq-wks-base.inc" file available in layer-scape SDK, "sd2_sd.pbl" image locate at block number 0x8 (which is 4KiB offset) as below diagram.

# short-description: Create eMMC/SD card image with a boot partition

# The disk layout (in blocks) used is:
# blocks KiB
#      0x0      +-----------------------+ 0x0
#                   |           MBR / GPT                |
#      0x8      +-----------------------+ 0x4
#                   |        RCW + PBI + BL2         |
# 0x100        +-----------------------+ 0x80
#                   |          PFE firmware            |
# 0x800      +-----------------------+ 0x400
#                   |    FIP (BL31+BL32+BL33)    |
# 0x2800    +-----------------------+ 0x1400
#                   |    U-Boot Env variables   |
# 0x3000    +-----------------------+ 0x1800
#                   |    Secureboot headers   |
# 0x4000    +-----------------------+ 0x2000
#                   |        DDR PHY FIP                |
# 0x4800    +-----------------------+ 0x2400
#                   |     DPAA1 FMAN ucode      |
#  0x5000   +-----------------------+ 0x2800
#                   |           DPAA2-MC              |
# 0x6800    +-----------------------+ 0x3400
#                   |           DPAA2 DPL               |
# 0x7000    +-----------------------+ 0x3800
#                   |            DPAA2 DPC            |
# 0x7800    +-----------------------+ 0x3c00
#                   |       Device tree (UEFI)      |
# 0x8000    +-----------------------+ 0x4000
#                   |                Kernel                 |
# 0x10000   +-----------------------+ 0x8000
#                   |               Ramdisk              |
#                  +-----------------------+

 

As far as I understand, the table above only works for SD card, not eMMC, and below are my questions about the LS1043A processor.

 

Query 1: 

Does BL1(boot ROM firmware) support booting from eMMC boot partition 1 when "bl2_sd.pbl" (RCW + PBI + BL2) is located in its block 0x8 (offset 4KiB) ?

Query 2:

If "bl2_sd.pbl" boots from eMMC boot partition 1, does eMMC UDA (user data area) partition support GPT partitioning?

Query 3:

where GPT partition table is located ? Is it stored at starting block of UDA partition? In Samsung EMMC case,  UDA hardware partition block start at 24576 (0x6000) and offset is 12 MiB.

 

Regards,

Bhargav Jayswal

タグ(2)
0 件の賞賛
返信
3 返答(返信)

507件の閲覧回数
SebastianG
NXP TechSupport
NXP TechSupport

Hi @bhargavjayswal,

Apologies for the delayed response,

I still working on your queries, regarding to your first question yes, its supporting 

Regards

0 件の賞賛
返信

438件の閲覧回数
bhargavjayswal
Contributor III

Dear @SebastianG , Thank you for support. 

It means that LS1043A ROM code (BL1) looks for sd2_sd.pbl , only at eMMC Bootparition1.  ROM code does not support to boot from UDA, RMPB or bootpartition2.

As per my knowledge, in kernel EMMC chip detect as below in some of the SOC.

bootparititon1   :  /dev/mmcblk0boot0

bootpartition2  :  /dev/mmcblk0boot1

RPMB                   :  /dev/mmcblk0rmpb

UDA :                   : /dev/mmcblk0

Where GPT partition in UDA detected by driver using GPT table  /dev/mmcblk0p1 , /dev/mmcblk0p2 ...  /dev/mmcblk0p128. 

So from your reply and as per my understating, GPT must an should locate at UDA hardware partition. In  samsung emmc 16GiB (KLMAG1JETD-B041) case,  UDA hardware partition block start at 24576 (0x6000) and offset is 12 MiB. 

So GPT table must an should be locate at block 24576 (0x6000) and offset is 12 MiB. Kindly please confirm this.

Also request you to confirm that how much space we need to reserved for GPT table. Is GPT table backup locate at END of UDA then at which offset it get store.

Reagards,

Bhargav J

 

0 件の賞賛
返信

409件の閲覧回数
bhargavjayswal
Contributor III

Dear @SebastianG ,

 

As I am working in details of GPT table, u-boot and kernel  states that it always look for GPT at start of dev partition. SECTOR 0 for MBR and SECTOR 1 for GPT.

From EMMC perspective in u-boot driver detect four device and switching between EMMC sub device can be done as below.

UDA:

=> mmc dev 0 0

BOOT PART-1 

=> mmc dev 0 1

BOOT PART-2

=> mmc dev 0 2

RPMB: 

=> mmc dev 0 4

 

On u-boot console, when I run "mmc part" after selecting UDA using command "mmc dev 0 0", it prints GPT partition table.

But When I run "mmc part" after  "mmc dev 0 1", "mmc dev 0 2" and  "mmc dev 0 3",  uboot thought error message on console.

 

So just waiting for confirmation that my understanding is correct that GPT table store at very First and Second block of UDA hardware partition. For 128 partition we require 17 KiB space at START of UDA Sector and GPT backup stores at END of UDA. 

 

It might be common practice is to leave at least 1 MiB of unallocated space before the backup GPT and after main GPT, though the exact amount might vary depending on the system and expected partition changes.

 

Regards,

Bhargav J

0 件の賞賛
返信