对嵌入式linux分区的研究

2611

在我使用的MT7620 Openwrt系统中

分区有

bootloader 用于存放Uboot

env  用于存放环境参数

factory 用户存放 MAC地址,无线功率校正参数(听说的)

firmware 系统固件

 

 

MT7620A Uboot相关参数:

MT7620分区,默认大小为:

#define CFG_BOOTLOADER_SIZE 0x30000
#define CFG_CONFIG_SIZE 0x10000
#define CFG_FACTORY_SIZE 0x10000
#define CFG_ENV_SIZE        0x1000

因开启了dual image支持,因此相应地址为:

#define PHYS_FLASH_START	0xBC000000 /* Flash Bank #2 */
#define PHYS_FLASH_1		0xBC000000 /* Flash Bank #1 */

#define CFG_FLASH_BASE		PHYS_FLASH_1

#define CFG_BOOTLOADER_SIZE	0x30000
#define CFG_CONFIG_SIZE		0x10000
#define CFG_FACTORY_SIZE	0x10000

#define CFG_ENV_ADDR		(CFG_FLASH_BASE + CFG_BOOTLOADER_SIZE)
#define CFG_FACTORY_ADDR	(CFG_FLASH_BASE + CFG_BOOTLOADER_SIZE + CFG_CONFIG_SIZE)
#define CFG_KERN_ADDR		(CFG_FLASH_BASE + (CFG_BOOTLOADER_SIZE + CFG_CONFIG_SIZE + CFG_FACTORY_SIZE))
#ifdef DUAL_IMAGE_SUPPORT

#define CFG_ENV_SECT_SIZE	CFG_CONFIG_SIZE
#define CFG_ENV_SIZE		0x1000

#define CFG_KERN_SIZE		(0x800000 - (CFG_BOOTLOADER_SIZE + CFG_CONFIG_SIZE + CFG_FACTORY_SIZE))

 

1条评论

留下一个答复

Please enter your comment!
Please enter your name here