<?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: jffs2_scan_eraseblock() on re-imaging P1020WLAN in P-Series</title>
    <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234099#M299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please don't use the parameter "-nopad", actually when generating jffs2 filesystem, it is needed to specify "--pad" parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 09:17:03 GMT</pubDate>
    <dc:creator>yipingwang</dc:creator>
    <dc:date>2013-06-26T09:17:03Z</dc:date>
    <item>
      <title>jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234096#M296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp; Hello, &lt;/P&gt;&lt;P&gt; I am working on a &lt;STRONG&gt;P1020WLAN&lt;/STRONG&gt;-compatible board with only one NOR flash to boot it with a Linux image. Using LTIB, I build the image and put&lt;BR /&gt;three files UImage, .dtb file and root.squashfs in the flash, in the addresses determined by Freescale. I follow the instruction provided by Freescale (erasing the NOR flash , TFTP and then cp.b). When I boot the board and the kernel tries to switch to jfss2 mode, we encounter the famous errors of&amp;nbsp; &lt;STRONG&gt;jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at …. 0xdead instead&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If instead of my own root.squashfs, I use the original&amp;nbsp; root.squashfs file provided in the USB disk by Freescale for P1020WLAN (keeping the UImage and .dtb and only re-programming the root.squashfs file in the same address), it works well with no problem.&amp;nbsp; Note that using &lt;EM&gt;unsquashfs&amp;nbsp; -s&lt;/EM&gt; tool, I compared both files and all details except the size are&amp;nbsp; the same (block size, version, compression, …).&amp;nbsp; I thought may be something is wrong with my LTIB. So, I decompressed the original root.squashfs file and just recompressed it with no change using &lt;EM&gt;mksquashfs4&lt;/EM&gt;. It did not work on the board (the same jfss2 problem). I tried different switches (-nopad, -b 65536 , …), but none of them worked. &lt;/P&gt;&lt;P&gt; U-boot bootargs are the same as P1020WLAN and naturally the same for all squashfs files that I tried.&amp;nbsp; All the files have almost the&lt;BR /&gt;same size between 23 to 26 MB, so the space erased in the flash and assigned to the file is enough. &lt;/P&gt;&lt;P&gt; Note that&amp;nbsp; I can build a RamDisk image using LTIB and boot the board in RAM. So the board is OK. The flash is also OK because it works well with the original root.squashfs. So, I do not know what could be wrong .&amp;nbsp;&amp;nbsp;&amp;nbsp; I appreciate if you could kindly advise me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The details are as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="text-decoration: underline;"&gt;NOR Flash is S29GL512P . In U-boot, we can see&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bank # 1: CFI conformant FLASH (16 x 16)&amp;nbsp; Size: 64 MB in 512 Sectors&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;&amp;nbsp; &lt;SPAN style="mso-fareast-font-family: 'Liberation Serif'; mso-bidi-font-family: 'Liberation Serif';"&gt; AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x227E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="mso-fareast-font-family: 'Liberation Serif'; mso-bidi-font-family: 'Liberation Serif';"&gt; Erase timeout: 4096 ms, write timeout: 2 ms&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;&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="mso-fareast-font-family: 'Liberation Serif'; mso-bidi-font-family: 'Liberation Serif';"&gt; Buffer write timeout: 5 ms, buffer size: 1024 bytes&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;U-boot bootargs:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bootargs=root=/dev/mtdblock1 rw console=ttyS0,115200&lt;BR /&gt;init=/etc/preinit cache-sram-size=0x10000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jun 2013 00:25:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234096#M296</guid>
      <dc:creator>arashaz_</dc:creator>
      <dc:date>2013-06-22T00:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234097#M297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure "the erase block size" parameter is set correctly, in ltib run ./ltib -c, and specify an appropriate value from --- Target Image Generation-&amp;gt;jffs2 erase block size in KB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 06:53:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234097#M297</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2013-06-25T06:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234098#M298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Thank you Yiping. As explained, I build a root.squashfs image (LTIB by default does that for P1020WLAN) not a jffs2. As you may know, this idea is taken from OpenWRT. When the kernel comes up, it uses some scripts to "switch to jfss2" (mounting). Therefore, in LTIB, there is no such an option for squashfs image type. For squashfs, we have only data block size and no erase block size. I played with data block size parameter and nothing changed.&lt;/P&gt;&lt;P&gt;Thank you for your comment and if you had any idea, please advise me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 13:08:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234098#M298</guid>
      <dc:creator>arashaz_</dc:creator>
      <dc:date>2013-06-25T13:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234099#M299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please don't use the parameter "-nopad", actually when generating jffs2 filesystem, it is needed to specify "--pad" parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 09:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234099#M299</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2013-06-26T09:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234100#M300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you. It did not change. Note that in LTIB, I could not find the place where I can enable/disable padding. What I did was manually making a squashfs image using -nopad and without using it. But, it did not work.&lt;/P&gt;&lt;P&gt;I just realized that there is a script called firstboot in the bin folder of the rootfs. But, by default, the init in bootargs of the U-boot&amp;nbsp; is set to /etc/preinit. As am I am imaging the board for the first time, is not the problem related to the init configuration in bootargs? Maybe it should be set in a different way in the first boot! I appreciate if you have any comment on that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 06:34:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234100#M300</guid>
      <dc:creator>arashaz_</dc:creator>
      <dc:date>2013-06-28T06:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234101#M301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I got the following information in "P1 Tower System Module LTIB OS.pdf".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If wanting to create squashfs filesystem, please follow below command:&lt;/P&gt;&lt;P&gt;/opt/freescale/ltib/usr/bin/mksquashfs4&amp;nbsp; ./rootfs.tmp&amp;nbsp; ./release/root.squashfs&amp;nbsp; -nopad&amp;nbsp; -noappend&lt;/P&gt;&lt;P&gt;-root-owned -comp lzma -processors 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 09:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234101#M301</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2013-06-28T09:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234102#M302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Thank you. I am working on that and will let you know the result soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 04:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234102#M302</guid>
      <dc:creator>arashaz_</dc:creator>
      <dc:date>2013-07-01T04:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: jffs2_scan_eraseblock() on re-imaging P1020WLAN</title>
      <link>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234103#M303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for your support. I tried different switches with mksquashfs4 command and none of them solved the problem. However, I finally found a solution, which may also be useful for others.&amp;nbsp; &lt;/P&gt;&lt;P&gt;It seems that JFFS2 is looking for special erased blocks with a magic marker. However, when we erase the NOR flash with U-boot (erase 0x… ), by default, U-boot writes 0xFF values. JFFS2 thus generates later the error &lt;CODE&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;jffs2_scan_eraseblock(): Magic bitmask..&lt;/SPAN&gt;&lt;/CODE&gt;. &lt;/P&gt;&lt;P&gt;Instead, I first boot the board in RAM and from there, using mtd-utils (i.e.,&amp;nbsp; flash_eraseall ) I erased the flash with the switch –j&amp;nbsp; (i.e., flash_eraseall&amp;nbsp;&amp;nbsp; -j mtd3). The switch –j does the job and writes the magic marker. Then, using flashcp, I copied the root.squashfs file into the flash. The problem was resolved. I did not try, but maybe U-boot has a similar switch while erasing, which makes the flash ready for JFFS2, so no need to boot first in RAM.&amp;nbsp; This link helped me a lot:&amp;nbsp; &lt;A href="http://www.linux-mtd.infradead.org/faq/jffs2.html"&gt;http://www.linux-mtd.infradead.org/faq/jffs2.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 02:01:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/jffs2-scan-eraseblock-on-re-imaging-P1020WLAN/m-p/234103#M303</guid>
      <dc:creator>arashaz_</dc:creator>
      <dc:date>2013-07-09T02:01:02Z</dc:date>
    </item>
  </channel>
</rss>

