Because Bootloadrer, params, and the kernel, and file systems are all in NAND flash, zoning has to be unified planning. The NAND flash partition of the system relies on both the u-boot and the Linux kernel settings.
the NAND partition in the U-bootFile: include/configs/Development Board. H This is the Phy3250 parameter, PHY3250 uses 32MB NAND FLASH with a sector size of 16KB:
189/* Phy3250 ' NAND FLASH, 32MB, 16K size (block, sector)/190//#define CFG_ENV_SIZE 0x4000/* 1 bloc K, 16K/191//#define Cfg_env_offset 0x168000/* Block 90 * *
The following are SMARTARM3250 's NAND flash,k9f2g08,256mb, with a sector size of 128K:
193/* SmartARM3250 ' 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 * *
NAND flash partitions in kernel
NAND Flash Planning
Partition address range sector range size with Way
Bootloader 0x0000 0000 ~ 0x0018 0000 0 ~ 11 12 sectors, 1.50M s1l and U-boot
param 0x0018 0000 ~ 0x001c 0000 12~13 2 Sectors, 256K U-boot parameter
Reserved 0x001c 0000 ~ 0x0020 0000 14~15
Linux Kernel 0x0020 0000 ~ 0x0060 0000 16~47 32 Sectors, 4.00M Linux kernel
Rootfs 0x0060 0000 ~ 0x1000 0000 48~2047 2000 Sectors, 250M Linux file system
Rootfs |
2047
48 |
Total 2000 Sectors |
Kernel |
47
16 |
Total 32 Sectors |
Keep |
15
14 |
Total 2 Sectors |
Param |
13
12 |
Total 2 Sectors |
Bootlloader |
11
0 |
Total 12 sectors |
Implementation code for partition implementation in LINUX-2.6.27.8/ARCH/ARM/MACH-LPC32XX/BOARD-SMARTARM3250.C: 153 #define BLK_SIZE (0x20000)//128KB 154 static struct mtd_partition __initdata smartarm3250_nand_partition[] = { {156 &NBS P. name = "Smartarm3250-boot", 157 . offset = 0, 158 , . Size = (Blk_size *) 159 }, 160 {161 . Name = "Smartarm 3250-ubt-prms ", 162 . Offset = (Blk_size *), 163 . SIZE = (Blk_size * 2) 164 }, 165 {166 . Name = "Smartarm3250-kerne L ", 167 . Offset = (Blk_size *), . SIZE = (Blk_size * 169 }, 170 {171 . Name = "Smartarm3250-rootfs", 172 &nb Sp Offset = (Blk_size *), 173 . SIZE = Mtdpart_siz_full 174 }, 175};