Creating additional partition in s32g274ardb2 yocto build.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Creating additional partition in s32g274ardb2 yocto build.

跳至解决方案
2,144 次查看
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,452 次查看
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,130 次查看
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,055 次查看
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,890 次查看
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,881 次查看
hulk101
Contributor III

Hi @carlos_o ,

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

0 项奖励
回复
1,867 次查看
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,851 次查看
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,688 次查看
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,635 次查看
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,453 次查看
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