<?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>i.MX ProcessorsのトピックRe: How to access nand or emmc storage from linux</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788655#M122236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JimmyChan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response and I got the relevant information.&lt;/P&gt;&lt;P&gt;I have a question though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does emmc version affects its flashing? I have emmc version 5 as reported by u-boot and it already have two partitions written on it mmcblk0bootp0 and mmcblk0bootp1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I flashed whole android on emmc using fsl script, tried to boot from nand and read partition table but u-boot cannot identify 'boot' gpt partition table (how ever it is there on doing mmc part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to change the permission to write and then overwriting&amp;nbsp;&lt;SPAN&gt;mmcblk0bootp0 and mmcblk0bootp1&amp;nbsp;&lt;/SPAN&gt;partitions but still they are intact.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a know issue or probably I am doing something wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2018 05:56:53 GMT</pubDate>
    <dc:creator>mrigendra_chaub</dc:creator>
    <dc:date>2018-10-22T05:56:53Z</dc:date>
    <item>
      <title>How to access nand or emmc storage from linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788653#M122234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a i.mx6 based board running using buildroot and linux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to access nand and emmc storages from sd card's rootfs but the underlying subsystem and commands are not very clear to me.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This board have two storages nand and emmc. The nand has full rootfs and&amp;nbsp;bootimage on itself.&lt;/P&gt;&lt;P&gt;Booting from SD card gives below log.&lt;BR /&gt;From the boot logs I can see the nand and emmc partition getting detected&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;[ 3.440294] 5 ofpart partitions found on MTD device gpmi-nand&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.446084] Creating 5 MTD partitions on "gpmi-nand":&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.451148] 0x000000000000-0x000000200000 : "boot"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.456431] 0x000000200000-0x000000500000 : "scratch"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.461632] 0x000000500000-0x000000b00000 : "kernel"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.467091] 0x000000b00000-0x000001100000 : "recovery"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.472521] 0x000001100000-0x000010000000 : "rootfs"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; [ 3.481312] gpmi-nand 112000.gpmi-nand: driver registered.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and emmc&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;[ 4.318175] mmcblk0: p1 p2&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can see the devices for nand are registered and shown in `/dev/mtd*` but not mounted.&lt;BR /&gt;Now I am using `nand and mmc-utils` provided by buildroot.&lt;BR /&gt;I am trying to write some data on nand like this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;nandwrite -b 1 -n /dev/mtd0 -p /test.txt&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;error log&lt;/P&gt;&lt;P&gt;https:/pastebin.com/raw/FZdk2hUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried flash erase command,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;flash_erase /dev/mtd0&lt;/P&gt;&lt;P&gt;flash_erase: error!: no start erase block specified&lt;BR /&gt; flash_erase: error!: no erase block count specified&lt;BR /&gt; flash_erase: error!: Try `--help' for more information&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Can anyone tell the correct way/steps to be followed in case of nand, sd interaction. I followed this thread&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://unix.stackexchange.com/questions/99476/how-can-i-flash-erase-mtd0"&gt;https://unix.stackexchange.com/questions/99476/how-can-i-flash-erase-mtd0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Similarly I am not able to flash, or do anything with emmc.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;mmc status get /dev/mmcblk0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; SEND_STATUS response: 0x00000900&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This looks ok, but how to really write or erase mmc? There are many commands associated with mmc , and not know which should I use,&lt;/P&gt;&lt;P&gt;&lt;A href="https://manpages.debian.org/unstable/mmc-utils/mmc.1.en.html"&gt;https://manpages.debian.org/unstable/mmc-utils/mmc.1.en.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are the prerequisites for this?&lt;/P&gt;&lt;P&gt;Any hint or direction would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2018 13:38:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788653#M122234</guid>
      <dc:creator>mrigendra_chaub</dc:creator>
      <dc:date>2018-10-13T13:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to access nand or emmc storage from linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788654#M122235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which BSP are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the device name of mmc/SD in Linux is /dev/mmcblkx. The NAND is /dev/mtdx. The "x" is the 0,1,2,3.&lt;/P&gt;&lt;P&gt;You can take the script in mfgtool for reference because it is using the Linux commands to program the images to the storage media. For example: attached is the ucl2.xml in L4.1.15_2.0.0-ga_mfg-tools. You can get the tool from here : &lt;A class="link-titled" href="https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-software-and-development-tool:IMX_SW" title="https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-software-and-development-tool:IMX_SW"&gt;i.MX Software|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the eMMC part of the script is under "&amp;lt;LIST name="eMMC" desc="Choose eMMC as media"&amp;gt;" in the ucl2.xml.&lt;/P&gt;&lt;P&gt;For the NAND part of the script is under "&amp;lt;LIST name="NAND Flash" desc="Choose NAND as media"&amp;gt;" in the ucl2.xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script, there are two parts. One is “BootStrap" and the other part is "Updater".&lt;/P&gt;&lt;P&gt;The "BootStrap" part is loading the firmware to the DDR. The firmware is a small linux system which include bootloader, kernel and ramfs. So you can ignore this part of script.&lt;/P&gt;&lt;P&gt;The "Updater" part is the script to program the images to the media. So, you can read this part of script for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 07:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788654#M122235</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2018-10-19T07:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to access nand or emmc storage from linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788655#M122236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JimmyChan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response and I got the relevant information.&lt;/P&gt;&lt;P&gt;I have a question though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does emmc version affects its flashing? I have emmc version 5 as reported by u-boot and it already have two partitions written on it mmcblk0bootp0 and mmcblk0bootp1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I flashed whole android on emmc using fsl script, tried to boot from nand and read partition table but u-boot cannot identify 'boot' gpt partition table (how ever it is there on doing mmc part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to change the permission to write and then overwriting&amp;nbsp;&lt;SPAN&gt;mmcblk0bootp0 and mmcblk0bootp1&amp;nbsp;&lt;/SPAN&gt;partitions but still they are intact.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a know issue or probably I am doing something wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 05:56:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788655#M122236</guid>
      <dc:creator>mrigendra_chaub</dc:creator>
      <dc:date>2018-10-22T05:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to access nand or emmc storage from linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788656#M122237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand your question. Would you show me the steps or more details about the issue you met? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 03:28:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-nand-or-emmc-storage-from-linux/m-p/788656#M122237</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2018-10-24T03:28:53Z</dc:date>
    </item>
  </channel>
</rss>

