Create partition table automatically form kernel in eMMC

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

Create partition table automatically form kernel in eMMC

1,952 Views
jemishpatel
Contributor I

Hi All,

We are making customize board based on IMX6Q processor.

We are using 16GB eMMC for in our board.

We want to create below partitions in our project.

1. x-loader

2. uboot

3. uboot-env

4. factory-kernel

5. kernel

6. factory-filesystem

7. filesystem

Is there anyway we can create partition table on eMMC directly from kernel or u-boot same as we were creating in NAND?

Please provide us alternative if it is not possible to do it from kernel/uboot.

Previously we were using TI's AM3505 processor based board with NAND instead of eMMC. In which we were creating partition table form kernel itself .

example:

static struct mtd_partition am3517evm_nand_partitions[] = {

/* All the partition sizes are listed in terms of NAND block size */

{

       .name           = "x-loader",

       .offset         = 0,

       .size           = 4*(SZ_128K),

       .mask_flags     = MTD_WRITEABLE

},

{

       .name           = "uboot",

       .offset         = MTDPART_OFS_APPEND,

       .size           = 14*(SZ_128K),

       .mask_flags     = MTD_WRITEABLE

},

{

       .name           = "uboot-env",

       .offset         = MTDPART_OFS_APPEND,

       .size           = 2*(SZ_128K)

},

{

       .name           = "factory-kernel",

       .offset         = MTDPART_OFS_APPEND,

       .size           = 40*(SZ_128K)

},

{

       .name           = "kernel",

       .offset         = MTDPART_OFS_APPEND,

       .size           = 40*(SZ_128K)

},

{

       .name           = "factory-filesystem",

       .offset         = MTDPART_OFS_APPEND,

       .size           = 400 * 8 * ( SZ_128K )

},

{

       .name           = "filesystem",

       .offset         = MTDPART_OFS_APPEND,

       .size           = MTDPART_SIZ_FULL,

},

};

Is there any similar method for eMMC also? Or what are the method to create partition table in eMMC.

Thanks,

Jemish

Labels (2)
0 Kudos
3 Replies

943 Views
Yuri
NXP Employee
NXP Employee

Hello,

eMMC memory configuration consists of:

- User data area (to store data) ;

- Boot area partitions (to boot the device) ;

- Replay-protected memory-block partition (RPMB)
(to manage data in an authenticated and replay-protected manner).


Both boot and RPMB area partition sizes and attributes are read-only and defined
by the memory manufacturer. Basically user data area may be configured via standard
fdisk Linux command.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

943 Views
jemishpatel
Contributor I

Hi Yuri,

First of all thanks for you reply.

I understand that we can create partition in User data area (to store data)  using standard fdisk linux command.

My question is whether is possible to create directly from kernel itself instead of using fdisk utility as we were creating for NAND (MTD device)  mentioned in my first comment.

I want clear my one doubt when you mention

>> Boot area partitions (to boot the device) ;

What does it mean ? Is it to boot for eMMC itself or to store first stage bootloader (u-boot) , kernel etc to boot for other device.

Thanks,

Jemish

0 Kudos

943 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Perhaps, it makes sense to apply mmc utils package.

Regards,

Yuri.

0 Kudos