Creating GPT based partitioned image using WIC on IMX6QSABRE-SD board

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

Creating GPT based partitioned image using WIC on IMX6QSABRE-SD board

3,489 Views
Riz
Contributor III

Hi,

I am trying to create a GPT based partition table using WIC for my imx6qsabresd board.

In the meta-freescale layer, I could see that all the partition specifications in .wks file are for the --ptable  msdos and not GPT.

 

Example wks file from meta-freescale, (imx-uboot.wks)

part u-boot --source rawcopy --sourceparams="file=u-boot.imx" --ondisk mmcblk --no-table --align 1
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096

bootloader --ptable msdos

 

And when specifying the ptable as GPT in WKS as "bootloader --ptable gpt", the board never boots.

After some analysis, I came to know that the imx6 boards have a condition that the bootloader should always boot from 1k address, and obviously since the GPT partition table/header is bigger than that it doesn't boot.

So, Is there any way we can create a GPT based partition scheme within WKS for imx6?

I think we may need to split the protective MBR, GPT primary header and array in order to fit the bootloader at 1k. An example or reference for this would help...


Thank you.

 

@gusarambula

0 Kudos
4 Replies

2,348 Views
flixm
Contributor I

Actually using GPT on i.MX6 is possible but requires awareness that the GPT needs to be relocated. The information about the relocation is stored just before 1 KiB boundary allowing to place the primary GPT after the bootloader. Genimage (https://github.com/pengutronix/genimage) is able to handle this case.

0 Kudos

3,453 Views
Riz
Contributor III

Hi Gustavo,

Thank you for your response.

Firstly, I would like to stick to the usage of GPT rather than msdos since I want to make use of uuid's for partition identification.

And for your comment,

"Alternatively, GPT as a newer standard has several new options and one of them allows you to have a smaller declaration on the GPT location (512) that points to the full GPT declaration on another location of the disk. That way you can point to a disk space after the bootloader (which has to be fixed at location 1k) effectively jumping over it. We do not have an example of this application but GPT documentation should allow you to build this setup."

Yes, I had the similar idea in my mind.

But my question here is, does WIC support such scenario ?
or can we make use of currently provided wic options to do similar lay-outing as you have described...?

May be someone has tried it already on i.MX6?

 

Regards,
Riz

 

0 Kudos

3,427 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Riz,

WIC does allow to use GTP partitioning, but I haven't seen a dual GPT application using WIC. It should be possible but you would need to manually add the second GPT instance after the bootloader.

The i.MX6 SABRE images do not enable even GPT in NXP's BSPs and I haven't seen applications from third parties that use GPT (perhaps precisely because they would require additional work on the partition setup).

My apologies for the inconvenience.

Regards,
Gustavo

0 Kudos

3,462 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Riz,

As you mentioned the i.MX6 Processors ROM looks for the bootloader at address location 1K. Since this directive is in ROM there is no way to change it.

I haven't seen any GPT implementations on the i.MX6 processors, perhaps due to the resulting partition table being too big. I would recommend using the regular msdos partition table if possible, for ease.

Alternatively, GPT as a newer standard has several new options and one of them allows you to have a smaller declaration on the GPT location (512) that points to the full GPT declaration on another location of the disk. That way you can point to a disk space after the bootloader (which has to be fixed at location 1k) effectively jumping over it. We do not have an example of this application but GPT documentation should allow you to build this setup.

My apologies for the inconvenience. I hope that this helps!


Regards,

Gustavo

0 Kudos