NAND FLASH分區規劃

來源:互聯網
上載者:User
由於BOOTLOADRER、PARAMS以及核心、檔案系統都在NAND FLASH上,因此分區就得進行統一規劃。系統的NAND FLASH分區依賴於u-boot和Linux核心兩方面的設定。 U-Boot中的NAND分區    檔案:include/configs/開發板.h    這是Phy3250的參數,Phy3250採用32MB的NAND FLASH,扇區大小為16KB:189 /* Phy3250's NAND FLASH, 32MB, 16K size(Block, Sector) */190 //#define CFG_ENV_SIZE             0x4000      /* 1 block, 16K */191 //#define CFG_ENV_OFFSET       0x168000  /* Block 90       */     如下是SmartARM3250的NAND FLASH,K9F2G08,256MB,扇區大小為128K:193 /* SmartARM3250's NAND FLASH, K9F2G08, 256MB, 128K size(Block, Sector) */194 #define CFG_ENV_SIZE           0x40000       /* 2 Block, 256K */195 #define CFG_ENV_OFFSET      0x180000     /* Block 12         */   Kernel中的NAND FLASH分區    NAND FLASH規劃         分     區                                   位址範圍                        扇區範圍                    大    小                                 用     途    Bootloader             0x0000 0000 ~ 0x0018 0000         0 ~ 11                     12個扇區,1.50M                 S1L和U-Boot    param                    0x0018 0000 ~ 0x001C 0000         12~13                      2個扇區,  256K                  U-Boot參數    保留                        0x001C 0000 ~ 0x0020 0000         14~15    Linux Kernel           0x0020 0000 ~ 0x0060 0000         16~47                      32個扇區,4.00M                Linux核心    Rootfs                    0x0060 0000 ~ 0x1000 0000         48~2047                   2000個扇區,250M            Linux檔案系統                        

rootfs 2047
48
共2000扇區
Kernel 47
16
共32扇區
保留 15
14
共2扇區
param 13 12 共2扇區
Bootlloader 11
0
共12扇區

      分區實現在linux-2.6.27.8/arch/arm/mach-lpc32xx/board-smartarm3250.c中的實現代碼:153 #define BLK_SIZE (0x20000) //128KB154 static struct mtd_partition __initdata smartarm3250_nand_partition[] = {155     {156         .name   = "smartarm3250-boot",157         .offset = 0,158         .size   = (BLK_SIZE * 12)159     },160     {161         .name   = "smartarm3250-ubt-prms",162         .offset = (BLK_SIZE * 12),163         .size   = (BLK_SIZE * 2)164     },165     {166         .name   = "smartarm3250-kernel",167         .offset = (BLK_SIZE * 16),168         .size   = (BLK_SIZE * 32)169     },170     {171         .name   = "smartarm3250-rootfs",172         .offset = (BLK_SIZE * 48),173         .size   = MTDPART_SIZ_FULL174     },175 };

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.