<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to format partitions in sdcard image  in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702420#M109136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer to&amp;nbsp; &lt;BR /&gt;AndroidSDCARDMirrorCreator&lt;BR /&gt;&lt;A href="https://community.freescale.com/docs/DOC-329596"&gt;https://community.freescale.com/docs/DOC-329596&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2017 05:34:07 GMT</pubDate>
    <dc:creator>BiyongSUN</dc:creator>
    <dc:date>2017-08-25T05:34:07Z</dc:date>
    <item>
      <title>How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702418#M109134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking at generating my own IMAGE_FSTYPES=sdcard image. I have copied the 'meta-fsl-arm/classes/image_types_fsl.bbclass' class and modified it slightly so that there are three partitions rather than two. &amp;nbsp;I am looking to include a third partition which is formatted as FAT (vfat) so that files can be added onto the sdcard so that they do not sit alongside files in the boot partition or the root file system.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made additions to the 'generate_imx_sdcard()` function where I create&amp;nbsp;a new partition:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;generate_imx_sdcard () {&lt;BR /&gt; # Create partition table&lt;BR /&gt; parted -s ${SDCARD} mklabel msdos&lt;BR /&gt; parted -s ${SDCARD} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})&lt;BR /&gt; parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Line below is the new partition I have added&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;parted -s ${SDCARD} unit KiB mkpart primary fat32 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE \+ ${THIRD_PARTITION})&lt;/STRONG&gt;&lt;BR /&gt; parted ${SDCARD} print&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have ensured that the total sdcard side accommodates this by including this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;IMAGE_CMD_sdcard () {&lt;BR /&gt; if [ -z "${SDCARD_ROOTFS}" ]; then&lt;BR /&gt; bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined."&lt;BR /&gt; exit 1&lt;BR /&gt; fi&lt;/P&gt;&lt;P&gt;# Align boot partition and calculate total SD card image size&lt;BR /&gt; BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)&lt;BR /&gt; BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})&lt;BR /&gt; SDCARD_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT} &lt;STRONG&gt;+ ${&lt;SPAN style="background-color: #f6f6f6;"&gt;THIRD_PARTITION&lt;/SPAN&gt;}&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question/problem that I have is, how do I format this newly created partition? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that a regular method of doing this would be something along the lines of:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;mkfs.vfat -n "Partition Name" /dev/sdd&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Where I supply a device, however I am unsure how to go about this in Yocto? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 05:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702418#M109134</guid>
      <dc:creator>brendanta</dc:creator>
      <dc:date>2017-08-21T05:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702419#M109135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can format this partition with "mkfs.vfat /dev/sdd" shell command later, after Yocto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Victor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 07:00:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702419#M109135</guid>
      <dc:creator>b36401</dc:creator>
      <dc:date>2017-08-22T07:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702420#M109136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer to&amp;nbsp; &lt;BR /&gt;AndroidSDCARDMirrorCreator&lt;BR /&gt;&lt;A href="https://community.freescale.com/docs/DOC-329596"&gt;https://community.freescale.com/docs/DOC-329596&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 05:34:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702420#M109136</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2017-08-25T05:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702421#M109137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; That is currently the solution I am doing however I am after a more complete solution with the .bbclass file handling formatting and partitioning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 01:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702421#M109137</guid>
      <dc:creator>brendanta</dc:creator>
      <dc:date>2017-11-06T01:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702422#M109138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The link is now 404 so if you have&amp;nbsp;experience customizing the format please share.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 15:36:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/702422#M109138</guid>
      <dc:creator>jbirdvegas</dc:creator>
      <dc:date>2019-06-03T15:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to format partitions in sdcard image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/1688434#M209323</link>
      <description>&lt;P&gt;Can someone explain all the steps in detail&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 10:29:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-format-partitions-in-sdcard-image/m-p/1688434#M209323</guid>
      <dc:creator>lakshaypiplani</dc:creator>
      <dc:date>2023-07-14T10:29:20Z</dc:date>
    </item>
  </channel>
</rss>

