Creating additional partition in s32g274ardb2 yocto build.

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

Creating additional partition in s32g274ardb2 yocto build.

ソリューションへジャンプ
2,239件の閲覧回数
hulk101
Contributor III

Hi,

I am working with the Yocto Project to build a custom Linux image for the NXP S32G2 platform. I want to add an additional partition to the image—specifically, I need to define a new partition in the image layout that will be created during the build process. Could you guide me on where the partition table configuration is defined within the Yocto build system for S32G2? 

Additionally, are there any official documents, tutorials, or community resources that outline the steps to modify the partition layout for S32G2 using Yocto?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,547件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @hulk101,

I deeply apologize for the late reply. Carlos is out of the at the moment and I can take care of the support for now, I got somewhat lost in the tracking of this ticket. We offer support for Xen Hypervisor, which lets you create virtual partitions, please check section 24.3 Xen Hypervisor and all of its subsections, in the BSP38 user manual. Please note that this is not an NXP product, it is an open source project, all the relevant documentation is in wiki.xenproject.org, however if you encounter any problem when configuring it, please let me know and I will do my best to support you.

 

I apologize again for the late reply,

Let me know if you have any more questions 

元の投稿で解決策を見る

9 返答(返信)
2,225件の閲覧回数
carlos_o
NXP TechSupport
NXP TechSupport

Hi @hulk101 

I found the following

The class that generates de .sdcard (with the partitions) is image_types_fsl_sdcard.bbclass there the values to create a new partition as rootfs are 

carlos_o_0-1753488181248.png

 

you could try adding these parameters to your local.conf file and compiling it. The size parameters are given in KB, also to add if you want to increment the space in the original ROOTFS you could use IMAGE_ROOTFS_EXTRA_SPACE.

Let me know if this information helps

0 件の賞賛
返信
2,150件の閲覧回数
hulk101
Contributor III

Hi @carlos_o,

When I give "df -h" command, I get the output as shown in the image attached.

I want to add /testapp and /testcontainer and make it read/write and make other rootfs as read only partition. 
How can I add the /testapp and /testcontainer during the yocto build.

NOTE: I am usuing ubuntu 20.04 and linux BSP 38.0

0 件の賞賛
返信
1,985件の閲覧回数
carlos_o
NXP TechSupport
NXP TechSupport

Hi @hulk101 

the command "df -h" displays all the filesystems mounted on Linux Filesystem and their mount points, 

Could you please run the command "lsblk" and share the output you get? this to see all the filesystem (included if they are not mounted)

 

0 件の賞賛
返信
1,976件の閲覧回数
hulk101
Contributor III

Hi @carlos_o ,

I have shared the output of cat /proc/partitions.

0 件の賞賛
返信
1,962件の閲覧回数
carlos_o
NXP TechSupport
NXP TechSupport

Hi @hulk101 

To mount the partitions, you need to create the directory you want to have in your case "/testapp" and "/testcontainer"

mkdir /testapp

mkdir /testcontainer

mount -o rw /dev/mmcblk0p3 /testapp

(rw means read-write option)

mount -o ro /dev/mmcblk0p4 /testcontainer

(ro means read-only option)

these commands are assuming that the partition 3 is for testapp and partition 4 for testcontainer it will depends on your implementation.

Let me know if you have more questions

0 件の賞賛
返信
1,946件の閲覧回数
hulk101
Contributor III

Hi @carlos_o ,
 
Here mmcblk0p3 is assigned to DomU1, and mmcblk0p4 is assigned to DomU2. So when I create /testapp and /testcontainer directory and mount them to /dev/mmcblk0p3 and /dev/mmcblk0p4, the /testapp will be assigned to DomU1 and /testcontainer will be assigned to DomU2. 

I want to create these 2 partitions inside DomU1 as well as DomU2 seperately.(DomU1 will have /testappa and /testcontainer partitions and DomU2 will have /testapp and /testcontainer partitions) How can I add this?

I have attached the output for "cat /proc/partitions" command for both DomU1 and DomU2.

0 件の賞賛
返信
1,783件の閲覧回数
carlos_o
NXP TechSupport
NXP TechSupport

Hi @hulk101 

Apologies for the late reply.

You already have partitioned the mmcblk0 it is not possible to partition the mmcblk0p3 or mmcblk0p4 because this already are a partition 

An alternative could be to create a different directory on it and modify their permissions to the ones you want. 

0 件の賞賛
返信
1,730件の閲覧回数
hulk101
Contributor III

Hi @carlos_o,
Since I cannot partition the mmcblk0p3 and mmcblk0p4, is there a possibility to create virtual partition in the guest domains (domu1 and domu2).

0 件の賞賛
返信
1,548件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @hulk101,

I deeply apologize for the late reply. Carlos is out of the at the moment and I can take care of the support for now, I got somewhat lost in the tracking of this ticket. We offer support for Xen Hypervisor, which lets you create virtual partitions, please check section 24.3 Xen Hypervisor and all of its subsections, in the BSP38 user manual. Please note that this is not an NXP product, it is an open source project, all the relevant documentation is in wiki.xenproject.org, however if you encounter any problem when configuring it, please let me know and I will do my best to support you.

 

I apologize again for the late reply,

Let me know if you have any more questions