<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 嵌入式Linux開發(fā)環(huán)境的搭建之:U-Boot移植

          嵌入式Linux開發(fā)環(huán)境的搭建之:U-Boot移植

          作者: 時間:2013-09-13 來源:網(wǎng)絡(luò) 收藏

          本文引用地址:http://www.ex-cimer.com/article/257139.htm

          (9)提供nandflash相關(guān)宏定義(include/configs/fs2410.h),具體參考源碼。

          (10)加入NandFlash設(shè)備(include/linux/mtd/nand_ids.h)

          staticstructnand_flash_devnand_flash_ids[]=

          {

          ......

          {SamsungKM29N16000,NAND_MFR_SAMSUNG,0x64,21,1,2,0x1000,0},

          {SamsungK9F1208U0M,NAND_MFR_SAMSUNG,0x76,26,0,3,0x4000,0},

          {Samsungunknown4Mb,NAND_MFR_SAMSUNG,0x6b,22,0,2,0x2000,0},

          ......

          {NULL,}

          };

          (11)設(shè)置NandFlash環(huán)境(common/env_nand.c)

          intnand_legacy_rw(structnand_chip*nand,intcmd,

          size_tstart,size_tlen,

          size_t*retlen,u_char*buf);

          externstructnand_chipnand_dev_desc[CFG_MAX_NAND_DEVICE];

          externintnand_legacy_erase(structnand_chip*nand,

          size_tofs,size_tlen,intclean);

          /*infoforNANDchips,definedindrivers/nand/nand.c*/

          externnand_info_tnand_info[CFG_MAX_NAND_DEVICE];

          ......

          #else/*!CFG_ENV_OFFSET_REDUND*/

          intsaveenv(void)

          {

          ulongtotal;

          intret=0;

          puts(ErasingNand...);

          if(nand_legacy_erase(nand_dev_desc+0,

          CFG_ENV_OFFSET,CFG_ENV_SIZE,0))

          {

          return1;

          }

          puts(WritingtoNand...);

          total=CFG_ENV_SIZE;

          ret=nand_legacy_rw(nand_dev_desc+0,0x00|0x02,CFG_ENV_OFFSET,

          CFG_ENV_SIZE,total,(u_char*)env_ptr);

          if(ret||total!=CFG_ENV_SIZE)

          {

          return1;

          }

          puts(donen);

          returnret;

          ......

          #else/*!CFG_ENV_OFFSET_REDUND*/

          voidenv_relocate_spec(void)

          {

          #if!defined(ENV_IS_EMBEDDED)

          ulongtotal;

          intret;

          total=CFG_ENV_SIZE;

          ret=nand_legacy_rw(nand_dev_desc+0,0x01|0x02,CFG_ENV_OFFSET,

          CFG_ENV_SIZE,total,(u_char*)env_ptr);

          c語言相關(guān)文章:c語言教程


          linux相關(guān)文章:linux教程



          上一頁 1 2 3 4 5 下一頁

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();