<?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: mxc_nand.c driver in uBoot in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209812#M12414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mike!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Which RedBoot version from Ka-Ro did you use for adopting flash_header.S?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I took a look into hal_platform_setup.h of version v1.5.0 (2010-06-16) and it includes lots of code lines that are not included in your patch. I just want to get sure, that I'm using the same file version to get a deeper understanding of porting u-boot.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Rooney&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2012 18:05:06 GMT</pubDate>
    <dc:creator>Rooney</dc:creator>
    <dc:date>2012-05-14T18:05:06Z</dc:date>
    <item>
      <title>mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209791#M12393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to get uBoot working from NAND on an i.MX53 (actually a Karo TX53 module).&amp;nbsp; I've got it starting up okay and the FEC works, but I'm finding a few problems with the NAND driver.&lt;/P&gt;
&lt;P&gt;Specifically while uBoot thinks it can read and write okay, when booting Linux the JFFS system reports lots and lots of CRC errors and fails to mount.&amp;nbsp; JFFS is fine when if I use RedBoot to write the flash.&lt;/P&gt;
&lt;P&gt;So I'm not entirely sure if the uBoot mxc_nand.c supports this NAND device (Samsung K9F1G08U0A, 128MB, 2k pages).&amp;nbsp; Specifically I notice in the uBoot mxc_nand driver that it doesn't appear to have the ECC layouts used by the Linux Kernel version of this same driver (struct nand_ecclayout nandv2_hw_eccoob_largepage is missing for example).&amp;nbsp; Also the driver has the following unhelpful code which appears to make the BBT non-standard such that RedBoot and Linux don't see it and vice versa:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/* keep compatible for bbt table with old soc */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#ifdef CONFIG_MX53&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bbt_mirror_descr.offs = BAD_BLK_MARKER_OOB_OFFS + 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bbt_main_descr.offs = BAD_BLK_MARKER_OOB_OFFS + 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bbt_mirror_descr.veroffs = bbt_mirror_descr.offs + 4;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bbt_main_descr.veroffs = bbt_main_descr.offs + 4;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This is with uBoot taken from Freescale's L2.6.35_11.09.01_ER BSP fwhich itself looks to be pretty old.&amp;nbsp; However, the mainline uboot imx git tree (git://&lt;A rel="nofollow" href="http://www.denx.de/git/u-boot-imx.git" target="_top"&gt;www.denx.de/git/u-boot-imx.git&lt;/A&gt;), while much much neater, appears to have an older drivers for the mxc_nand controller.&lt;/P&gt;
&lt;P&gt;I was wondering if anyone else has had success with NAND access from uboot on an i.MX53, and which flash device and software version they used?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 10:03:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209791#M12393</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-02-10T10:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209792#M12394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I found the function mxc_nand_bi_swap() is swapping a byte or data into the OOB area of each 2k page.&amp;nbsp; I'm not sure why, but it only does this for large page NAND.&lt;/P&gt;
&lt;P&gt;Removing this function has improved the situation and I can read and write to the NAND from uBoot and boot Linux without ECC errors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 18:36:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209792#M12394</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-02-10T18:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209793#M12395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I'm using a TX53 from Karo as well (TX53-1331) and I would prefer to use u-boot instead of red boot that is preinstalled on the module.&lt;/P&gt;
&lt;P&gt;Can you provide the source code that is working for the TX53?&lt;/P&gt;
&lt;P&gt;Or have you written a patch so the U-Boot version &lt;SPAN class="mw-headline" id="U-Boot_2009.08"&gt;U-Boot 2009.08&lt;/SPAN&gt; can be used (included in &lt;I&gt;L2.6.35_11.09.01_ER_source_bundle.tar.gz&lt;/I&gt;)?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Rooney&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Mar 2012 20:37:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209793#M12395</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-17T20:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209794#M12396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rooney,&lt;/P&gt;
&lt;P&gt;What I did was take the uBoot 2009.08 + Freescale patches from the Freescale BSP (u-boot-v2009.08-imx_11.09.01.tar.bz2) and then get it working on the TX53, using RedBoot to load it into RAM and then execute (with the 'go' command).&amp;nbsp; I based the config on the mx53_evk, and made small changes for the UART pins etc...&lt;/P&gt;
&lt;P&gt;Once running from RAM was working, I merged across the DCD/FCB setup block from the Karo Redboot sources into the tweaked config cloned from the Freescale mx53_evk.&amp;nbsp; This was surprisingly easy, and once done I binary compared the NAND header block from the Karo Redboot binary with the built uBoot, then checked all the clocks were correct once uBoot had started and ran some tests.&lt;/P&gt;
&lt;P&gt;This was for the Karo TX53-8020/8030 (it's a build switch to change between the two), so you'd need to dig out and patch the FCB setup from the Redboot code for the 1331 and patch that.&lt;/P&gt;
&lt;P&gt;I've attached the patch I produced for the 8030 - the stuff from Redboot which you'll need to change should be obvious from the original eCOS copyright notices (GPLv2+ so the same as uBoot).&lt;/P&gt;
&lt;P&gt;Let me know how you get on.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2012 11:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209794#M12396</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-18T11:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209795#M12397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, that's still seems to be lots of work...&lt;/P&gt;
&lt;P&gt;How could you do the porting without a schematic? Just looking to the sources? I tried to get one from Karo, but no chance!!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Must the binary for the NAND flash have a defined format or header to work correctly?&lt;/P&gt;
&lt;P&gt;Just a few general questions:&lt;/P&gt;
&lt;P&gt;# U-Boot is executed from NAND or DDR? In other words, is u-boot copied from NAND to DDR and then executed from DDR?&lt;/P&gt;
&lt;P&gt;# If U-Boot is executed from NAND and the i.MX53 QSB boot loader uses the same UART as the TX53, shouldn't u-boot display at least some messages on the uart, even if no adoptations has been done? The i.MX53 QSB board seems to be very similar to the TX53-1331.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Rooney&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2012 14:08:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209795#M12397</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-18T14:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209796#M12398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Hmm, that's still seems to be lots of work...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you have a good head start in the patch I've supplied.&amp;nbsp; It's probably a day's work or so.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;P&gt;How could you do the porting without a schematic? Just looking to the sources? I tried to get one from Karo, but no chance!!&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ha - yes, we've asked about schematics before, but no luck which seems odd given that Karo probably just based their design on a Freescale reference.&lt;/P&gt;
&lt;P&gt;Anyway, the RedBoot sources have everything you need in them, and the linux board file have some of the pin configurations, though these will be the same across the TX53 module I think.&amp;nbsp; Specifically though I didn't actually reverse engineer the RedBoot code - I took the flash header in one chunk and made sure it was identical.&amp;nbsp; This header sets up the essential peripheral pins, clocks and timings, so you don't have to do much after that.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;P&gt;Must the binary for the NAND flash have a defined format or header to work correctly?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To boot from NAND, yes.&amp;nbsp; The format is given in the i.MX53 Reference Manual.&amp;nbsp; Again though, I took flash_header.S from the RedBoot sources and patched it into uBoot, replacing the flash header provided by Freescale for their boards.&amp;nbsp; If you compare flash_header.S from my patch to the similar file packages/hal/arm/mx53/karo/current/include/hal_platform_setup.h you'll see what I mean.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;P&gt;# U-Boot is executed from NAND or DDR? In other words, is u-boot copied from NAND to DDR and then executed from DDR?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;DDR.&amp;nbsp; It is copied from NAND into the DDR by the i.MX53 ROM boot loader which uses the header block on the NAND image to determine what and how much to copy, as well as the DDR controller register values to setup the RAM prior to that.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;P&gt;# If U-Boot is executed from NAND and the i.MX53 QSB boot loader uses the same UART as the TX53, shouldn't u-boot display at least some messages on the uart, even if no adoptations has been done? The i.MX53 QSB board seems to be very similar to the TX53-1331.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The NAND header block contains critical DDR timings and clock setup.&amp;nbsp; So if the NAND header block is wrong/bad, you won't see anything.&amp;nbsp; If you undefine CONFIG_FLASH_HEADER and define&lt;SPAN class="st"&gt; SKIP_LOW_LEVEL_INIT in uBoot, you can build a uBoot without the NAND header which you can load into memory and use 'go'&lt;/SPAN&gt; from RedBoot to execute.&amp;nbsp; If that doesn't display anything, your uBoot is definitely bad and needs fixing.&amp;nbsp; That said, I think the TX53-1331 and 8020/30 are the same in this respect, so it might just work with my patch.&lt;/P&gt;
&lt;P&gt;Checking over my changes again, to get the NAND header right, I think you probably need to start by updating include/configs/tx53.h, using TX53-1x31.ecc from the RedBoot sources for guidance.&amp;nbsp; Specifically I think you need to change least these defines to these values:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;CPU_CLOCK 1000&lt;/LI&gt;
&lt;LI&gt;CONFIG_TX53_SDRAM_TYPE DDR3&amp;nbsp; /* same as 8030 */&lt;/LI&gt;
&lt;LI&gt;CONFIG_SYS_PLL2_FREQ 333&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* same as 8030 */&lt;/LI&gt;
&lt;LI&gt;PHYS_SDRAM_1_SIZE&amp;nbsp; (1024 * 1024 * 1024)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;After that, if you build uBoot.bin and open it in a hex editor (okteta is my favourite) you should see 'FCB' in bytes 4-6, followed by some magic numbers and lots of blanks.&amp;nbsp; If you compare that to a RedBoot image for your module, it should be much the same.&amp;nbsp; If it isn't, recheck the values you've configured.&lt;/P&gt;
&lt;P&gt;It's also possible to use the hex editor to copy values from the RedBoot binary to the uBoot one, although beware that there are a couple of values that should differ e.g. image_len.&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2012 14:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209796#M12398</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-18T14:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209797#M12399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are so great!!!!!&lt;/P&gt;
&lt;P&gt;Thanks for that really helpful information.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I compared the TX53-1x31.ecc and TX53-8x30.ecc file from RedBoot (version 2012-01-02) and they are identical, so I did not further adoption to tx53.h except the environments (TFTP/NFS boot) and the defines you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;First compiling U-Boot fails with the error: "no rule to make target..."&lt;/P&gt;
&lt;P&gt;So I had to add the following lines to the Makefile located in the top directory of U-Boot:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;tx53_config :unconfig&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(MKCONFIG) $(@:_config=) arm arm_cortexa8 tx53 karo mx53&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Flashed the bootloader into the NAND and rebooted... U-Boot started successfully and loaded the kernel. Currently the kernel is for the MX53 QSB board, so loading stops somewhere during initialisation. I need to recompile für the TX53 and I'm expecting that it works!!!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Rooney&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 08:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209797#M12399</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-19T08:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209798#M12400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Rooney,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;May I ask?&lt;/P&gt;
&lt;P&gt;In your final uboot board header file, what was the value of this define?&lt;/P&gt;
&lt;P&gt;CONFIG_FLASH_HEADER_OFFSET&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 21:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209798#M12400</guid>
      <dc:creator>PeterThoeming</dc:creator>
      <dc:date>2012-03-23T21:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209799#M12401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I didn't changed anything to the patch file of Mike.&lt;/P&gt;
&lt;P&gt;The CONFIG_FLASH_HEADER_OFFSET is defined as follows in configs/tx53.h:&lt;/P&gt;
&lt;P&gt;#define CONFIG_FLASH_HEADER_OFFSET 0x400&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;There are still some open issues I'm facing when using u-boot:&lt;/P&gt;
&lt;P&gt;# Error "bad block table found at page..."&lt;/P&gt;
&lt;P&gt;# Warning "bad CRC, using default environment"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I will do further investigation on that. If there a news, I post them here.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Rooney&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 18:23:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209799#M12401</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-24T18:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209800#M12402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;CITE&gt;Rooney said:&lt;/CITE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?xg_source=activity#4103961Comment64493"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;There are still some open issues I'm facing when using u-boot:&lt;P&gt;# Error "bad block table found at page..."&lt;/P&gt;
&lt;P&gt;# Warning "bad CRC, using default environment"&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Use the "saveenv" command in uBoot to write the environment to Flash.&amp;nbsp; Then you won't get this message.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 18:45:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209800#M12402</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-24T18:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209801#M12403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that already, but still the same error.&lt;/P&gt;
&lt;P&gt;But maybe there is a problem with my board. Flashing the u-boot via the build-in USB bootstrap loader of the processor fails very very often.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 18:50:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209801#M12403</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-24T18:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209802#M12404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find the USB bootstrap unreliable too.&amp;nbsp; In my case I think it's just the loader app being flaky as it fails sometimes on every device.&lt;/P&gt;
&lt;P&gt;Anyway, when booting I get the following:&lt;/P&gt;
&lt;P&gt;Boot Device: NAND&lt;BR /&gt;DRAM:&amp;nbsp; 512 MB&lt;BR /&gt;NAND:&amp;nbsp; Manufacturer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Samsung (0xec)&lt;BR /&gt;Device Code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0xf1&lt;BR /&gt;Cell Technology&amp;nbsp;&amp;nbsp; : SLC&lt;BR /&gt;Chip Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 128 MiB&lt;BR /&gt;Pages per Block&amp;nbsp;&amp;nbsp; : 64&lt;BR /&gt;Page Geometry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 2048+64&lt;BR /&gt;ECC Strength&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 4 bits&lt;BR /&gt;ECC Size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 512 B&lt;BR /&gt;Data Setup Time&amp;nbsp;&amp;nbsp; : 15 ns&lt;BR /&gt;Data Hold Time&amp;nbsp;&amp;nbsp;&amp;nbsp; : 12 ns&lt;BR /&gt;Address Setup Time: 20 ns&lt;BR /&gt;GPMI Sample Delay : 6 ns&lt;BR /&gt;tREA&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; : Unknown&lt;BR /&gt;tRLOH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Unknown&lt;BR /&gt;tRHOH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Unknown&lt;BR /&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : K9F1F08&lt;BR /&gt;Bad block table found at page 65472, version 0x01&lt;BR /&gt;Bad block table found at page 65408, version 0x01&lt;BR /&gt;nand_read_bbt: Bad block at 0x000000880000&lt;/P&gt;
&lt;P&gt;It's worth double checking you have the same flash device and values.&lt;/P&gt;
&lt;P&gt;Also worth checking the block holding the environment isn't bad, or marked bad.&amp;nbsp; I think it would print something if that were the case when writing the env though.&amp;nbsp; For me it looks like this:&lt;/P&gt;
&lt;P&gt;U-Boot &amp;gt; saveenv&lt;BR /&gt;Saving Environment to NAND...&lt;BR /&gt;Erasing Nand...&lt;BR /&gt;Erasing at 0x80000 -- 100% complete.&lt;BR /&gt;Writing to Nand... done&lt;BR /&gt;U-Boot &amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 19:30:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209802#M12404</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-24T19:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209803#M12405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes it takes up to 10 minutes till I get the loader flashed!!! My current setup is not ideal at the moment. As the Advanced Toolkit v1.71 from Freescale is not working on Window 7, I'm using a VM with Win XP... Don't blame me using Windows when developing Linux applications ;-)&lt;/P&gt;
&lt;P&gt;The flash tool provided by Karo for linux does not support TX53, so I have to use Windows to flash at least u-boot.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Did you already run the kernel successfully, loaded by u-boot? Which kernel do you use?&lt;/P&gt;
&lt;P&gt;I just compiled 2.6.39.4 using the patch from Karo, but I'm pretty sure that there must be adopted something to work correctly.&lt;/P&gt;
&lt;P&gt;The following is listed during boot:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Creating 6 MTD partitions on "mxc_nand":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000000000000-0x000000040000 : "RedBoot"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000000040000-0x000004080000 : "wince"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000004080000-0x000007080000 : "pstorage"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000007080000-0x000007f60000 : "unallocated"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000007f60000-0x000007f7f000 : "FIS directory"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0x000007f7f000-0x000007f80000 : "RedBoot config"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;RedBoot message, during U-Boot? That is really strange :-) I will have to take a closer look on that by searching through the code.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;However, currently I get a panic when using NFS:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;VFS: Mounted root (nfs filesystem) on device 0:13.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;devtmpfs: mounted&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Freeing init memory: 168K&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;INFO: task swapper:1 blocked for more than 120 seconds.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"echo 0 &amp;gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;swapper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D c02fff10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0x00000000&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kernel panic - not syncing: hung_task: blocked tasks&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c003c5e4&amp;gt;] (unwind_backtrace+0x0/0xfc) from [&amp;lt;c02ff7a4&amp;gt;] (panic+0x5c/0x18c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c02ff7a4&amp;gt;] (panic+0x5c/0x18c) from [&amp;lt;c0080c8c&amp;gt;] (check_hung_task+0x94/0xa4)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c0080c8c&amp;gt;] (check_hung_task+0x94/0xa4) from [&amp;lt;c0080ea4&amp;gt;] (check_hung_uninterruptible_tasks+0x10c/0x138)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c0080ea4&amp;gt;] (check_hung_uninterruptible_tasks+0x10c/0x138) from [&amp;lt;c0080f18&amp;gt;] (watchdog+0x48/0x50)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c0080f18&amp;gt;] (watchdog+0x48/0x50) from [&amp;lt;c0062fc4&amp;gt;] (kthread+0x84/0x8c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[&amp;lt;c0062fc4&amp;gt;] (kthread+0x84/0x8c) from [&amp;lt;c00389cc&amp;gt;] (kernel_thread_exit+0x0/0x8)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 19:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209803#M12405</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-24T19:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209804#M12406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mike!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I know, it's a little bit off-topic, but which kernel are you using for the TX53?&lt;/P&gt;
&lt;P&gt;Which patch do you use to patch the mainline kernel? 2.6.39-rc6 or 3.0.0 provided by Karo?&lt;/P&gt;
&lt;P&gt;How do you build the root filesystem? Debootstrap? BusyBox?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I tried to install the tool-chain provided by karo (on Starterkit CD), but it fails on Debian Squeeze 6.0.3 and Ubuntu 10.04 complaining something like this:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed (bad class -- [], [^] or [)/[^&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed (bad class -- [], [^] or [)/[^&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/usr/bin/install: cannot stat `/var/tmp/build-toolchain-4.4.1-armv7a-soft/arm-cortexa8-linux-gnueabi/bootstrap-eglibc/gnu/lib-names.h': No such file or directory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;make[1]: *** [/usr/local/arm/cross-gcc-4.4.1-armv7a-soft/i686-pc-linux-gnu/arm-cortexa8-linux-gnueabi/sys-root/usr/include/gnu/lib-names.h] Error 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;make[1]: Leaving directory `/home/spiderman/starterkit/tool-chain/cross-eglibc/libc'&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;make: *** [install-headers] Error 2&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I'm not sure if my system is the problem or the stuff provided by Karo is not that mature as it should.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So I tried to use the &lt;I&gt;gcc-4.3-arm-linux-gnueabi&lt;/I&gt; compiler, installed via apt-get. Compiling the patched kernel 2.6.39-rc6 succeeds, but if I use NFS for my root filesystem it fails with &lt;EM&gt;request_module: runaway loop modprobe binfmt-464c&lt;/EM&gt; (see my last post).&lt;/P&gt;
&lt;P&gt;The filesystem has been created as follows using debootstrap:&lt;BR /&gt;&lt;EM&gt;sudo debootstrap --arch armel --include="lynx,nano,wget,udev" --foreign lucid rootfs&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;The filesystem is definitely correct, because it works if using the i.MX53 QSB. Can the error be caused due to different kernel versions? I use 2.6.35 on the i.MX53 QSB and 2.6.39-rc6 on the TX53.&lt;BR /&gt;&lt;BR /&gt;I googled several hours to find a solution for the binfmt-464c error, but couldn't find any usefull information. It is stated at several sources, that there is a problem between 32 bit guest and 64 bit host, but my host is 32 bit and target as well. This seems very strange!!&lt;BR /&gt;&lt;BR /&gt;Do you have any ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your help!!!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Mar 2012 15:41:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209804#M12406</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-25T15:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209805#M12407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a short update...&lt;BR /&gt;&lt;BR /&gt;The Karo Toolchain is now running on my system (tested on Ubuntu 10.04), had to install the following packages. They were not mentioned in the README file of the toolchain, but somewhere in a PDF for the VM that is provided by Karo.&lt;BR /&gt;&lt;BR /&gt;But the binfmt-464c error still exists. Shouldn't be the filesystem "nearly" independent of the used kernel? Why does it work with i.MX53 QSB and not with TX53?&lt;BR /&gt;&lt;BR /&gt;autoconf&lt;BR /&gt;autoconf-archive&lt;BR /&gt;automake&lt;BR /&gt;autotools-dev&lt;BR /&gt;bison&lt;BR /&gt;bzip2&lt;BR /&gt;fakeroot&lt;BR /&gt;flex&lt;BR /&gt;gawk&lt;BR /&gt;gettext&lt;BR /&gt;gperf&lt;BR /&gt;libc6-dev&lt;BR /&gt;libgmp3-dev&lt;BR /&gt;libmpfr-dev&lt;BR /&gt;libncurses-dev&lt;BR /&gt;libstdc++6-4.4-dev&lt;BR /&gt;libtool&lt;BR /&gt;linux-libc-dev&lt;BR /&gt;lynx&lt;BR /&gt;make&lt;BR /&gt;mtd-utils&lt;BR /&gt;pkg-config&lt;BR /&gt;tcl-dev&lt;BR /&gt;texi2html&lt;BR /&gt;tk-dev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 07:53:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209805#M12407</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-03-26T07:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209806#M12408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rooney said:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sometimes it takes up to 10 minutes till I get the loader flashed!!! My current setup is not ideal at the moment. As the Advanced Toolkit v1.71 from Freescale is not working on Window 7, I'm using a VM with Win XP... Don't blame me using Windows when developing Linux applications ;-)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The flash tool provided by Karo for linux does not support TX53, so I have to use Windows to flash at least u-boot.&lt;BR /&gt;&lt;BR /&gt;I asked their support (actually the UK reseller DirectInsight) about that and they helpfully got me a version of flash_program that does work.&amp;nbsp; I think this went into their BSP update, although for my part I have to use the following command:&lt;BR /&gt;&lt;BR /&gt;./flash_program -P mx53 -U -m tx53-v3-meminit.txt -i&lt;BR /&gt;&lt;BR /&gt;The meminit file is somewhere in the recent BSPs too, but in a different directory to where you'd expect.&amp;nbsp; This works okay via USB, but sometimes fails or crashes, although that maybe because ./flash_program is built for Debian with a slightly different libusb to on my Fedora machine.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Did you already run the kernel successfully, loaded by u-boot? Which kernel do you use?&lt;BR /&gt;&lt;BR /&gt;Yep.&amp;nbsp; I took the kernel from the Karo BSP.&amp;nbsp; This is already patched, but was missing the tx53_defconfig file for some reason.&amp;nbsp; They do include a patch of their changes (which has already been applied to the sources) which does have the defconfigs in it, so I grabbed that and built, then modified the config from there (e.g. adding Thumb binary support &amp;amp; removing some device drivers).&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I just compiled 2.6.39.4 using the patch from Karo, but I'm pretty sure that there must be adopted something to work correctly.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following is listed during boot:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Creating 6 MTD partitions on "mxc_nand":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000000000000-0x000000040000 : "RedBoot"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000000040000-0x000004080000 : "wince"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000004080000-0x000007080000 : "pstorage"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000007080000-0x000007f60000 : "unallocated"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000007f60000-0x000007f7f000 : "FIS directory"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x000007f7f000-0x000007f80000 : "RedBoot config"&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RedBoot message, during U-Boot? That is really strange :-) I will have to take a closer look on that by searching through the code.&lt;BR /&gt;&lt;BR /&gt;Disable RedBoot cmdline partition parsing and add in the mtd cmdline parsing.&amp;nbsp; Then you should get the partition scheme as defined in uBoot, which makes thing easier (see drivers/mtd/cmdlinepart.c).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 08:33:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209806#M12408</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-26T08:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209807#M12409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;CITE&gt;Rooney said:&lt;/CITE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64725#4103961Comment64601"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I know, it's a little bit off-topic, but which kernel are you using for the TX53?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Karo's.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64725#4103961Comment64601"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Which patch do you use to patch the mainline kernel? 2.6.39-rc6 or 3.0.0 provided by Karo?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I just unpacked Karo's sources (3.0.0) and built that.&amp;nbsp; They provide a patch, but it's already been applied to their source bundle.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64725#4103961Comment64601"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;How do you build the root filesystem? Debootstrap? BusyBox?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I do it with some Makefiles I wrote, but it's simple enough.&amp;nbsp; Basically I use the CodeSoucery Lite toolchain, and take the sysroot from that as per their instructions.&amp;nbsp; Then I build busybox and install that into my staging directory with the sysroot.&amp;nbsp; I also cross-compile and install a bunch of other libs and apps into the same stage, before using a loop mount to create the JFFS2 rootfs image.&amp;nbsp; I could NFS mount the root too I guess, but I'm past needing that now.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64725#4103961Comment64601"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I tried to install the tool-chain provided by karo (on Starterkit CD), but it fails on Debian Squeeze 6.0.3 and Ubuntu 10.04 complaining something like this:&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;They provide a ready configured VirtualBox machine for this too - maybe give that a go?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64725#4103961Comment64601"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;I'm not sure if my system is the problem or the stuff provided by Karo is not that mature as it should.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;The Karo stuff is pretty good in my experience, but all the Linux distros vary greatly, so making something work across them all is tough going!&amp;nbsp; Little differences on some OSes can trip scripts up and make subtle bugs e.g. Ubuntu uses Dash not Bash as the default shell - it's *almost* Bash, but not quite :D&lt;/DIV&gt;
&lt;DIV class="xg_user_generated"&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Do you have any ideas?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try their rootfs with your kernel first.&amp;nbsp; Once that works, try their kernel with your rootfs.&amp;nbsp; That should work out broadly where the problem is.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 08:41:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209807#M12409</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-26T08:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209808#M12410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;
&lt;P&gt;In regards to a part of an earlier response you made that I've "snipped" out of this thread (see below).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Had Redboot source not been available for use to form your u-boot header properly (DCD/FCB) for a specific NAND FLASH part specific to the board you are using, how would you have crafted/formed a complete FCB within your u-boot binary header?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Would it be handcrafted and then added into the make-flow through assembly? Perhaps in the flash_header.S file for my board.&lt;/P&gt;
&lt;P&gt;I'm working on trying to make the MX50 EVK u-boot from NAND FLASH, but the header is not correct, so I'm hoping to learn the fastest way to create such a header file.&lt;/P&gt;
&lt;P&gt;Unfortunately, Freescale has not suggested or provided much information that states exactly how that is done.&lt;/P&gt;
&lt;P&gt;Thanks in advance for any tip you may have.&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Pete&lt;BR /&gt; &lt;BR /&gt; &lt;CITE&gt;Michael McTernan said:&lt;/CITE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64493&amp;amp;xg_source=msg_com_forum#4103961Comment63755"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Hi Rooney,&lt;/P&gt;
&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;
&lt;P&gt;Once running from RAM was working, I merged across the DCD/FCB setup block from the Karo Redboot sources into the tweaked config cloned from the Freescale mx53_evk.&amp;nbsp; This was surprisingly easy, and once done I binary compared the NAND header block from the Karo Redboot binary with the built uBoot, then checked all the clocks were correct once uBoot had started and ran some tests.&lt;/P&gt;
&amp;lt;snip&amp;gt;
&lt;P&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:36:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209808#M12410</guid>
      <dc:creator>PeterThoeming</dc:creator>
      <dc:date>2012-03-26T12:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209809#M12411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;CITE&gt;Peter Thoeming said:&lt;/CITE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?xg_source=activity&amp;amp;id=4103961%3ATopic%3A59059&amp;amp;page=2#4103961Comment64300"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;In regards to a part of an earlier response you made that I've "snipped" out of this thread (see below).&lt;/P&gt;
&lt;P&gt;Had Redboot source not been available for use to form your u-boot header properly (DCD/FCB) for a specific NAND FLASH part specific to the board you are using, how would you have crafted/formed a complete FCB within your u-boot binary header?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I would have found the closest Freescale reference, then noted which parameters needed changing for the DDR and updated the code with those values.&amp;nbsp; Basically it would be digging in the datasheets and i.MX53 reference manual to work out which registers need poking with each parameter.&amp;nbsp; The problem is that if the values are off, you probably won't boot or will crash shortly afterwards as the external RAM needs setting up correctly.&lt;/P&gt;
&lt;P&gt;If you have a decent JTAG to hand, I think you can speed things up a bit by using that to bootstrap the chip in different configurations by basically poking the registers you would setup using DCD.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?xg_source=activity&amp;amp;id=4103961%3ATopic%3A59059&amp;amp;page=2#4103961Comment64300"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Would it be handcrafted and then added into the make-flow through assembly? Perhaps in the flash_header.S file for my board.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;Yeah - check the patch.&amp;nbsp; The .S file is pretty straight forward and is basically a data section laid out as described in the Freescale reference manual without too much code.&amp;nbsp; There's some use of macros and labels to make the addresses work (that's all from Karo), but it isn't necessary.&amp;nbsp; You could make a spreadsheet compute the DCD if you wanted.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?xg_source=activity&amp;amp;id=4103961%3ATopic%3A59059&amp;amp;page=2#4103961Comment64300"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;I'm working on trying to make the MX50 EVK u-boot from NAND FLASH, but the header is not correct, so I'm hoping to learn the fastest way to create such a header file.&lt;/P&gt;
&lt;P&gt;Unfortunately, Freescale has not suggested or provided much information that states exactly how that is done.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The very fastest way is to hang off someone else's coat tails I'm afraid!&amp;nbsp; What are you booting from, or is it a new design?&amp;nbsp; If it boots, at some point your chip is getting the correct configuration register values from somewhere, so finding that should give you a big clue as to what values are needed in the DCD/FCB.&lt;/P&gt;
&lt;P&gt;I'd also harang Freescale for more support if possible - it's not like NAND boot is an exotic requirement these days, and the chips are designed to do it!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:52:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209809#M12411</guid>
      <dc:creator>Michael_McTerna</dc:creator>
      <dc:date>2012-03-26T12:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: mxc_nand.c driver in uBoot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209810#M12412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks. I'm working on an MX50 EVK, so I'll compare and contrast and make educated changes, but I'll examine your patch-file to see what was done. I'm fairly certain the MX50 and MX53 will use a similar header...&lt;BR /&gt; &lt;BR /&gt; &lt;CITE&gt;Michael McTernan said:&lt;/CITE&gt;&lt;/P&gt;
&lt;BLOCKQUOTE cite="http://imxcommunity.org/forum/topics/mxc-nand-c-driver-in-uboot?commentId=4103961%3AComment%3A64563&amp;amp;xg_source=msg_com_forum#4103961Comment64563"&gt;&lt;DIV&gt;&lt;DIV class="xg_user_generated"&gt;&lt;P&gt;The very fastest way is to hang off someone else's coat tails I'm afraid!&amp;nbsp; What are you booting from, or is it a new design?&amp;nbsp; If it boots, at some point your chip is getting the correct configuration register values from somewhere, so finding that should give you a big clue as to what values are needed in the DCD/FCB.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 14:04:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-nand-c-driver-in-uBoot/m-p/209810#M12412</guid>
      <dc:creator>PeterThoeming</dc:creator>
      <dc:date>2012-03-26T14:04:57Z</dc:date>
    </item>
  </channel>
</rss>

