<?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: iMX28 NAND Flash with Yocto</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420211#M63372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were able to make it work. Could you share the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2015 17:22:22 GMT</pubDate>
    <dc:creator>alejandrolozan1</dc:creator>
    <dc:date>2015-05-20T17:22:22Z</dc:date>
    <item>
      <title>iMX28 NAND Flash with Yocto</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420208#M63369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run a custom Yocto image from the imx28's nand flash.&lt;/P&gt;&lt;P&gt;I'm using a custom Hardware based on imx28evk, it needs changes on the imxbootlets (patching battery...). On that recipe, I specify the boot mode (I include the whole file):&lt;BR /&gt;echo "noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi" &amp;gt; linux_prep/cmdlines/${IMXBOOTLETS_MACHINE}.txt&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Other changes that I have done is chaging "UBOOT_CONFIG ??= "sd"" to "UBOOT_CONFIG = "nand" on file: sources/meta-fsl-arm/conf/machine/imx28evk.conf&lt;/P&gt;&lt;P&gt;After compiling this way the image, I uncompress the tar.gz file into a folder, and create te ubifs with this command:&lt;BR /&gt; mkfs.ubifs -x none -m 2048 -e 126976 -c 1888 -r Folder/ rootfs.ubifs&lt;/P&gt;&lt;P&gt;I will need this ubifs to burn it on the mtd1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In mtd0 I need to burn the boot partition (/build/tmp/deploy/image/imx28evk/zImage-imx28evk.linux.sb).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With these two files, I use mtd-utils in order to burn them on to the nand flash, these are the commands that I use:&lt;BR /&gt;$ mknod /dev/mtd0 c 90 0&lt;/P&gt;&lt;P&gt;$ kobs-ng init zImage-imx28evk.linux.sb&lt;/P&gt;&lt;P&gt;$ flash_eraseall /dev/mtd1&lt;/P&gt;&lt;P&gt;$ mknod /dev/ubi_ctrl c 10 60&lt;/P&gt;&lt;P&gt;$ ubiattach /dev/ubi_ctrl -m 1 -d 0&lt;/P&gt;&lt;P&gt;$ mknod /dev/ubi0 c 250 0&lt;/P&gt;&lt;P&gt;$ mknod /dev/ubi0_0 c 252 1&lt;/P&gt;&lt;P&gt;$ ubimkvol /dev/ubi0 -N rootfs0 -m&lt;/P&gt;&lt;P&gt;$ ubiupdate /dev/ubi0_0 rootfs.ubifs&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I achieved to boot from mtd0, but it fails trying&amp;nbsp; to find root=ubi0:rootfs0.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I forgetting anything or doing something wrong? What more do I have to change on Yocto in order to have an usefull Nand image?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335954"&gt;imx-bootlets_10.12.01.bbappend.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 15:03:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420208#M63369</guid>
      <dc:creator>xavigarcía</dc:creator>
      <dc:date>2015-05-11T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: iMX28 NAND Flash with Yocto</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420209#M63370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share the bootlog?&lt;/P&gt;&lt;P&gt;To me it seems that your steps are ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 May 2015 23:53:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420209#M63370</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2015-05-16T23:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: iMX28 NAND Flash with Yocto</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420210#M63371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 20:23:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420210#M63371</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2015-05-19T20:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: iMX28 NAND Flash with Yocto</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420211#M63372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were able to make it work. Could you share the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 17:22:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420211#M63372</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2015-05-20T17:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: iMX28 NAND Flash with Yocto</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420212#M63373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excuse me Alejandro, I have been busy all this time...&lt;BR /&gt;Finally I managed to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem was on the kernel driver for nand in kernel 3.17.2, it didn't create the partitions so Linux was using all the NandFlash space instead of creating a first partition (mtd0) for boot and another for rootfs.&lt;BR /&gt;I have made a patch that changes the driver configuration and create both partitions on NandFlash, so I can use them with no problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patch:&lt;/P&gt;&lt;P&gt;&amp;gt;From 2e3339c6865f9214744bbe6f6c6db6ce33b7d169 Mon Sep 17 00:00:00 2001&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From: jmalvarez &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:jmalvarez@dezac.es"&gt;jmalvarez@dezac.es&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Date: Mon, 18 May 2015 15:40:06 +0200&lt;/P&gt;&lt;P&gt;Subject: [PATCH] Particiones MTD nand flash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt; drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 33 +++++++++++++++++++++++++++++++--&lt;/P&gt;&lt;P&gt; 1 file changed, 31 insertions(+), 2 deletions(-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c&lt;/P&gt;&lt;P&gt;index 959cb9b..1943511 100644&lt;/P&gt;&lt;P&gt;--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c&lt;/P&gt;&lt;P&gt;+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c&lt;/P&gt;&lt;P&gt;@@ -1698,12 +1698,17 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)&lt;/P&gt;&lt;P&gt;&amp;nbsp; struct mtd_part_parser_data ppdata = {};&lt;/P&gt;&lt;P&gt;&amp;nbsp; int ret;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+//JM para particiones en nand-flash&lt;/P&gt;&lt;P&gt;+ struct mtd_partition&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; partitions[2];&lt;/P&gt;&lt;P&gt;+ static char&amp;nbsp; *chip_0_boot_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "gpmi-nfc-0-boot";&lt;/P&gt;&lt;P&gt;+ static char&amp;nbsp; *general_use_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "gpmi-nfc-general-use";&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* init current chip */&lt;/P&gt;&lt;P&gt;&amp;nbsp; this-&amp;gt;current_chip = -1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* init the MTD data structures */&lt;/P&gt;&lt;P&gt;&amp;nbsp; mtd-&amp;gt;priv = chip;&lt;/P&gt;&lt;P&gt;- mtd-&amp;gt;name = "gpmi-nand";&lt;/P&gt;&lt;P&gt;+ mtd-&amp;gt;name = "gpmi-nand-init";&lt;/P&gt;&lt;P&gt;&amp;nbsp; mtd-&amp;gt;owner = THIS_MODULE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */&lt;/P&gt;&lt;P&gt;@@ -1760,7 +1765,31 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)&lt;/P&gt;&lt;P&gt;&amp;nbsp; chip-&amp;gt;scan_bbt(mtd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ppdata.of_node = this-&amp;gt;pdev-&amp;gt;dev.of_node;&lt;/P&gt;&lt;P&gt;- ret = mtd_device_parse_register(mtd, NULL, &amp;amp;ppdata, NULL, 0);&lt;/P&gt;&lt;P&gt;+//JM ret = mtd_device_parse_register(mtd, NULL, &amp;amp;ppdata, NULL, 0);&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ /*&lt;/P&gt;&lt;P&gt;+ * We partition the medium like so:&lt;/P&gt;&lt;P&gt;+ *&lt;/P&gt;&lt;P&gt;+ * +------+----------------------------------------------------+&lt;/P&gt;&lt;P&gt;+ * | Boot |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; General Use&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/P&gt;&lt;P&gt;+ * +------+----------------------------------------------------+&lt;/P&gt;&lt;P&gt;+ */&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ /* Chip 0 Boot */&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ partitions[0].name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = chip_0_boot_name;&lt;/P&gt;&lt;P&gt;+ partitions[0].offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;/P&gt;&lt;P&gt;+ partitions[0].size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 160 * SZ_128K; //0x1400000;&amp;nbsp; //JM&amp;nbsp; rom-&amp;gt;boot_area_size_in_bytes;&lt;/P&gt;&lt;P&gt;+ partitions[0].mask_flags = 0;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ /* General Use */&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ partitions[1].name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = general_use_name;&lt;/P&gt;&lt;P&gt;+ partitions[1].offset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 160 * SZ_128K; //0x1400000;&amp;nbsp; //JM&amp;nbsp; rom-&amp;gt;boot_area_size_in_bytes;&lt;/P&gt;&lt;P&gt;+ partitions[1].size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = MTDPART_SIZ_FULL;&lt;/P&gt;&lt;P&gt;+ partitions[1].mask_flags = 0;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ ret = mtd_device_parse_register(mtd, NULL, &amp;amp;ppdata, partitions, 2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (ret)&lt;/P&gt;&lt;P&gt;&amp;nbsp; goto err_out;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;-- &lt;/P&gt;&lt;P&gt;1.9.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 14:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX28-NAND-Flash-with-Yocto/m-p/420212#M63373</guid>
      <dc:creator>xavigarcía</dc:creator>
      <dc:date>2015-05-21T14:02:31Z</dc:date>
    </item>
  </channel>
</rss>

