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?
已解决! 转到解答。
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
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
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
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
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)
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
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.
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.
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