<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20171022173417318376 { }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>I have mounted JFFS2 successfully, according to the return value. </div><div>Yes, it takes some time to do the mounting work.</div>
<div><br></div><div>But, when I downloaded a file like "test.txt" into flash via FTP and restarted the system, error came up.</div><div><br></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01FC0028: 0xE5DF instead<br><5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01FC002C: 0xE5DF instead<br><5>JFFS2: Further such events for this erase block will not be printed<br><5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01FD0000: 0x000C instead<br><5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01FD0004: 0xB0B1 instead<br><5>JFFS2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x01FD0008: 0x0054 instead<br><5>JFFS2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes<br><5>JFFS2: empty_blocks 0, bad_blocks 0, c->nr_blocks 510<br>mount failed.<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Everything worked well, after erasing the whole flash. But errors came up without erasing it. </span></div><div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Best wishes,</div><div>xuelin.tian@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian</a></div><div><b>Date:</b> 2017-10-21 22:07</div><div><b>To:</b> <a href="mailto:sebastian.huber@embedded-brains.de">Sebastian Huber</a></div><div><b>CC:</b> <a href="mailto:users@rtems.org">users</a></div><div><b>Subject:</b> Re: Filesystem in RTEMS</div></div></div><div><div class="FoxDiv20171022173417318376"><div>> There is no general purpose flash framework in RTEMS (like MTD on Linux). The JFFS2 uses therefore a framework independent interface. You have to provide functions for the basic flash operations read, program and erase > yourself. You should test these operations separately.<br>><br>> The first mount of JFFS2 on a completely erased flash may take a while since it is erased block by block and then the clean markers are programmed.<br>> <br>> http://www.linux-mtd.infradead.org/faq/jffs2.html#L_clmarker<br><br>I have already tested my flash operations, they all worked well. Now, I use the same handle (an instance based on Xilinx BSP) to access to the hardware. And I just have one little question here, what is the appropriate block size for the JFFS2? The size of page is 256B, and size of segment is either 4KB or 64KB. <br><br>> We have a filesystem guide:<br>> <br>> https://docs.rtems.org/branches/master/filesystem/index.html<br>><br>> Unfortunately it is out dated and incomplete. Maybe you can help to improve it.</div><div><includetail><div> </div><div>Sure, I am willing to do that, after fully understanding the file system in RTEMS.</div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Sebastian Huber"<sebastian.huber@embedded-brains.de>;</div><div><b>Date: </b> Sat, Oct 21, 2017 06:52 PM</div><div><b>To: </b> "xuelin tian"<xuelin.tian@qkmtech.com>; <wbr></div><div><b>Cc: </b> "users"<users@rtems.org>; <wbr></div><div><b>Subject: </b> Re: Filesystem in RTEMS</div></div><div> </div><div style="position:relative;">----- Am 21. Okt 2017 um 2:17 schrieb xuelin tian xuelin.tian@qkmtech.com:<br><br>> I followed the example (testsuites/fstests/jffs2_support/fs_support.c), and some<br>> error came up, like<br>> "undefined reference to rtems_jffs2_initialize",<br>> "undefined reference to rtems_jffs2_compressor_zlib_compress", and<br>> "undefined reference to rtems_jffs2_compressor_zlib_decompress"<br>> I have no clue here. Do I have to give my own implementation of these functions<br>> here? I can exploit the default functions for jffs2 entry table and compress, I<br>> think.<br><br>In order to use JFFS2 with compression you have to add "-ljffs2 -lz" to your linker command line.<br><br>> <br>> And I have a little confused about the model of device driver in rtems, since I<br>> get stuck for a few days.<br>> First, a deivce descriptor (rtems_fdisk_device_desc) should be given, including<br>> some handlers defined in rtems_fdisk_driver_handlers, and device configuration<br>> (rtems_flashdisk_config).<br>> Then, I need to register (or initialize) my flash device into rtems dynamically<br>> or statically, with my own initialize, open, close functions.<br>> Last, the JFFS2 should be set up based on the registered device driver. The<br>> block size need to be equal to the page size of flash, and the read, write,<br>> erase operations should invoke the corresponding functions defined in<br>> rtems_fdisk_driver_handlers.<br>> <br>> Am I correct in this whoe process?<br><br>There is no general purpose flash framework in RTEMS (like MTD on Linux). The JFFS2 uses therefore a framework independent interface. You have to provide functions for the basic flash operations read, program and erase yourself. You should test these operations separately.<br><br>The first mount of JFFS2 on a completely erased flash may take a while since it is erased block by block and then the clean markers are programmed.<br><br>http://www.linux-mtd.infradead.org/faq/jffs2.html#L_clmarker<br><br>We have a filesystem guide:<br><br>https://docs.rtems.org/branches/master/filesystem/index.html<br><br>Unfortunately it is out dated and incomplete. Maybe you can help to improve it.</div></div><!--<![endif]--></includetail></div><st-div id="__selection-translator__"> <st-div class="__st-box__" style="display: none; position: fixed; z-index: 99999; left: 0px; top: 0px; transform: translateX(660px) translateY(363px);"> <st-header> <st-span class="st-icon-pin" title="固定"></st-span> <st-span class="st-icon-down-open" title="展开"></st-span> <st-span class="st-icon-cog" title="设置"></st-span> </st-header> <st-div class="__query-form__" style="display: none;"> <st-div> <textarea placeholder="输入要翻译的句子或单词"></textarea> </st-div> <st-div> <select> <option value="">自动判断</option> <option value="zh">中文</option><option value="zh-CN">中文(简体)</option><option value="zh-HK">中文(香港)</option><option value="zh-TW">中文(繁体)</option><option value="en">英语</option><option value="ja">日语</option><option value="ko">朝鲜语</option><option value="de">德语</option><option value="fr">法语</option><option value="ru">俄语</option><option value="th">泰语</option><option value="af">南非语</option><option value="ar">阿拉伯语</option><option value="az">阿塞拜疆语</option><option value="be">比利时语</option><option value="bg">保加利亚语</option><option value="ca">加泰隆语</option><option value="cs">捷克语</option><option value="cy">威尔士语</option><option value="da">丹麦语</option><option value="dv">第维埃语</option><option value="el">希腊语</option><option value="eo">世界语</option><option value="es">西班牙语</option><option value="et">爱沙尼亚语</option><option value="eu">巴士克语</option><option value="fa">法斯语</option><option value="fi">芬兰语</option><option value="fo">法罗语</option><option value="gl">加里西亚语</option><option value="gu">古吉拉特语</option><option value="he">希伯来语</option><option value="hi">印地语</option><option value="hr">克罗地亚语</option><option value="hu">匈牙利语</option><option value="hy">亚美尼亚语</option><option value="id">印度尼西亚语</option><option value="is">冰岛语</option><option value="it">意大利语</option><option value="ka">格鲁吉亚语</option><option value="kk">哈萨克语</option><option value="kn">卡纳拉语</option><option value="kok">孔卡尼语</option><option value="ky">吉尔吉斯语</option><option value="lt">立陶宛语</option><option value="lv">拉脱维亚语</option><option value="mi">毛利语</option><option value="mk">马其顿语</option><option value="mn">蒙古语</option><option value="mr">马拉地语</option><option value="ms">马来语</option><option value="mt">马耳他语</option><option value="nb">挪威语(伯克梅尔)</option><option value="nl">荷兰语</option><option value="ns">北梭托语</option><option value="pa">旁遮普语</option><option value="pl">波兰语</option><option value="pt">葡萄牙语</option><option value="qu">克丘亚语</option><option value="ro">罗马尼亚语</option><option value="sa">梵文</option><option value="se">北萨摩斯语</option><option value="sk">斯洛伐克语</option><option value="sl">斯洛文尼亚语</option><option value="sq">阿尔巴尼亚语</option><option value="sv">瑞典语</option><option value="sw">斯瓦希里语</option><option value="syr">叙利亚语</option><option value="ta">泰米尔语</option><option value="te">泰卢固语</option><option value="tl">塔加路语</option><option value="tn">茨瓦纳语</option><option value="tr">土耳其语</option><option value="ts">宗加语</option><option value="tt">鞑靼语</option><option value="uk">乌克兰语</option><option value="ur">乌都语</option><option value="uz">乌兹别克语</option><option value="vi">越南语</option><option value="xh">班图语</option><option value="zu">祖鲁语</option> </select> <st-div class="__exchange__"> <st-span class="st-icon-exchange"></st-span> </st-div> <select> <option value="">自动选择</option> <option value="zh">中文</option><option value="zh-CN">中文(简体)</option><option value="zh-HK">中文(香港)</option><option value="zh-TW">中文(繁体)</option><option value="en">英语</option><option value="ja">日语</option><option value="ko">朝鲜语</option><option value="de">德语</option><option value="fr">法语</option><option value="ru">俄语</option><option value="th">泰语</option><option value="af">南非语</option><option value="ar">阿拉伯语</option><option value="az">阿塞拜疆语</option><option value="be">比利时语</option><option value="bg">保加利亚语</option><option value="ca">加泰隆语</option><option value="cs">捷克语</option><option value="cy">威尔士语</option><option value="da">丹麦语</option><option value="dv">第维埃语</option><option value="el">希腊语</option><option value="eo">世界语</option><option value="es">西班牙语</option><option value="et">爱沙尼亚语</option><option value="eu">巴士克语</option><option value="fa">法斯语</option><option value="fi">芬兰语</option><option value="fo">法罗语</option><option value="gl">加里西亚语</option><option value="gu">古吉拉特语</option><option value="he">希伯来语</option><option value="hi">印地语</option><option value="hr">克罗地亚语</option><option value="hu">匈牙利语</option><option value="hy">亚美尼亚语</option><option value="id">印度尼西亚语</option><option value="is">冰岛语</option><option value="it">意大利语</option><option value="ka">格鲁吉亚语</option><option value="kk">哈萨克语</option><option value="kn">卡纳拉语</option><option value="kok">孔卡尼语</option><option value="ky">吉尔吉斯语</option><option value="lt">立陶宛语</option><option value="lv">拉脱维亚语</option><option value="mi">毛利语</option><option value="mk">马其顿语</option><option value="mn">蒙古语</option><option value="mr">马拉地语</option><option value="ms">马来语</option><option value="mt">马耳他语</option><option value="nb">挪威语(伯克梅尔)</option><option value="nl">荷兰语</option><option value="ns">北梭托语</option><option value="pa">旁遮普语</option><option value="pl">波兰语</option><option value="pt">葡萄牙语</option><option value="qu">克丘亚语</option><option value="ro">罗马尼亚语</option><option value="sa">梵文</option><option value="se">北萨摩斯语</option><option value="sk">斯洛伐克语</option><option value="sl">斯洛文尼亚语</option><option value="sq">阿尔巴尼亚语</option><option value="sv">瑞典语</option><option value="sw">斯瓦希里语</option><option value="syr">叙利亚语</option><option value="ta">泰米尔语</option><option value="te">泰卢固语</option><option value="tl">塔加路语</option><option value="tn">茨瓦纳语</option><option value="tr">土耳其语</option><option value="ts">宗加语</option><option value="tt">鞑靼语</option><option value="uk">乌克兰语</option><option value="ur">乌都语</option><option value="uz">乌兹别克语</option><option value="vi">越南语</option><option value="xh">班图语</option><option value="zu">祖鲁语</option> </select> </st-div> <st-div> <select> <option value="YouDao">有道翻译</option> <option value="BaiDu">百度翻译</option> <option value="Bing">必应翻译</option> <option value="Google">谷歌翻译</option> <option value="GoogleCN">谷歌翻译(国内)</option> </select> <st-div class="__action-list__"> <st-div class="__button__ __btn-translate__">翻译 <st-span class="st-icon-down-dir"></st-span> </st-div> <st-div class="__expand__"> <st-div class="__button__">朗读</st-div> <st-div class="__button__">复制</st-div> </st-div> </st-div> </st-div> </st-div> <st-div class="__translate-result__" style="display: none;">正在查询,请稍候……</st-div> <st-div class="__translate-result__"> <st-div style="display: none;"> <st-span></st-span> <st-span class="__retry__">重试</st-span> </st-div> <st-div> <st-div class="__phonetic__"> <st-span style="display: none;"></st-span> <st-span class="__copy-and-read__"> <st-span>朗读</st-span> <st-span style="display: none;">复制</st-span> </st-span> </st-div> <st-div style="display: none;"> <st-ul> </st-ul> <st-div class="__copy-and-read__"> <st-span class="__copy-and-read__">复制</st-span> </st-div> </st-div> <st-div style="display: none;"> <st-div class="__copy-and-read__"> <st-span class="__copy-and-read__">朗读</st-span> <st-span class="__copy-and-read__">复制</st-span> </st-div> </st-div> </st-div> </st-div> <st-footer> <st-span style="display: none;">via <a target="_blank" href=""></a></st-span> </st-footer> </st-div> <st-div class="__st-btn__" style="display: block; position: fixed; z-index: 99999; left: 0px; top: 0px; transform: translateX(660px) translateY(363px);">译</st-div> </st-div></div></div></blockquote>
</body></html>