**Page 1** **Page 1** |
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
0/ 6 0/ 6
**Rockchip Parameter File Format** **Rockchip Parameter File Format**
**Ver 1.3** **Ver 1.3**
**2013/4/15** **2013/4/15**
版本 version
日 期 Date
描 述 Description
作 者 Author
审核 Review
Ver 1.0 Ver 1.0
2011-4-11 2011-4-11
parameter 文件说明 Parameter file description
赵仪峰 Zhao Yifeng
Ver 1.1 Ver 1.1
2011-9-5 2011-9-5
完善功能文档 Complete functional documentation
赵仪峰 Zhao Yifeng
Ver 1.2 Ver 1.2
2012-10-16 2012-10-16
增加RK30 和RK292X 配置 Increase RK30 and RK292X configurations
赵仪峰 Zhao Yifeng
Ver 1.3 Ver 1.3
2013-4-15 2013-4-15
增加gpio 控制定义配置等 Increase gpio control definition configuration, etc.
赵仪峰 Zhao Yifeng
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
1/ 6 1/ 6
yB 概述 yB overview
Rockchip android 系统平台使用parameter 文件来配置一些系统参数,比如定义串口号,固件版 The Rockchip android system platform uses a parameter file to configure some system parameters, such as defining the serial port number, firmware version.
本,nand flash 分区信息等等。 Ben, nand flash partition information and so on.
Parameter 文件是非常重要的系统配置文件,最好在能了解清楚各个配置功能时再做修改,避免 The Parameter file is a very important system configuration file. It is best to modify it when you can understand each configuration function.
出现parameter 文件配置异常造成系统不能正常工作的问题。 The problem that the parameter file configuration is abnormal caused the system to not work properly.
Parameter 文件大小有限制,最大不能超过64KB。 The Parameter file size is limited and cannot exceed 64KB.
由于Parameter 的参数是由BootLoader 解析的,所以本文列出来的参数不一定适用于旧版本的 Since the parameters of the Parameter are parsed by the BootLoader, the parameters listed in this article may not be applicable to the old version.
boot loader。 Boot loader.
在文档发布时,各个平台的loader 版本如下: At the time of publication, the loader versions for each platform are as follows:
RK29xx : RK29xxLoader(L)_V2.38.bin RK29xx : RK29xxLoader(L)_V2.38.bin
RK30xx: RK30xxLoader(L)_V1.30.bin RK30xx: RK30xxLoader(L)_V1.30.bin
RK292x: RK292xLoader(L)_V1.30.bin RK292x: RK292xLoader(L)_V1.30.bin
RK3168: RK3168Loader(L)_V1.14.bin RK3168: RK3168Loader(L)_V1.14.bin
RK3188: RK3188Loader(L)_V1.14.bin RK3188: RK3188Loader(L)_V1.14.bin
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
2/ 6 2/ 6
1B1B1B **parameter** 文件预览: 1B1B1B **parameter** file preview:
下面是一个parameter 文件的内容,不同的项目,不同的平台,parameter 文件的内容会有一些 The following is the content of a parameter file, different projects, different platforms, the contents of the parameter file will have some
差异。 difference. 下例是RK30 平台的parameter 文件。 The following example is a parameter file for the RK30 platform.
2B2B2B 文件内容说明 2B2B2B file content description
1\. FIRMWARE_VER:4.0.4 1\. FIRMWARE_VER: 4.0.4
固件版本,打包updata.img 时会使用到,升级工具会根据这个识别固件版本。 The firmware version will be used when packaging updata.img, and the upgrade tool will identify the firmware version based on this.
Boot loader 会读取这个版本传递给kernel 使用。 The boot loader will read this version and pass it to the kernel for use.
2\. MACHINE_MODEL:rk30sdk 2\. MACHINE_MODEL: rk30sdk
机型,打包updata.img 使用,不同的项目,可以自己修改,用于升级工具显示。 Model, package updata.img use, different projects, you can modify it yourself, used for upgrade tool display.
3\. MACHINE_ID:007 3\. MACHINE_ID: 007
产品开发ID,可以为字符和数字组合,打包updata.img 使用,不同的项目使用不同的ID, Product development ID, which can be a combination of characters and numbers, packaged with updata.img, different projects using different IDs,
可以用于识别机器机型。 Can be used to identify machine models.
4\. MANUFACTURER:RK30SDK 4\. MANUFACTURER: RK30SDK
厂商信息,打包updata.img 使用,可以自己修改,用于升级工具显示。 Vendor information, packaged updata.img use, you can modify it yourself for the upgrade tool display.
5\. MAGIC: 0x5041524B 5\. MAGIC: 0x5041524B
MAGIC,不能修改 MAGIC, cannot be modified
6\. ATAG: 0x60000800 6\. ATAG: 0x60000800
ATAG,不能修改 ATAG, cannot be modified
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
3/ 6 3/ 6
7\. MACHINE: 3066 7\. MACHINE: 3066
内核识别用,不能修改。 The kernel is used for identification and cannot be modified.
RK29xx 识别码:MACHINE: 2929 RK29xx ID: MACHINE: 2929
RK292x 识别码:MACHINE: 2928 RK292x ID: MACHINE: 2928
8\. CHECK_MASK: 0x80 8\. CHECK_MASK: 0x80
保留,不能修改。 Reserved, cannot be modified.
9\. KERNEL_IMG: 0x60408000 9\. KERNEL_IMG: 0x60408000
内核地址,boot loader 会将内核加载到这个地址,kernel 编译地址改变时,这个值需要相应 The kernel address, the boot loader will load the kernel to this address, and when the kernel compile address changes, this value needs to be corresponding.
修改。 modify.
10 COMBINATION_KEY: 0,4,C,5,0 10 COMBINATION_KEY: 0,4,C,5,0
按键定义说明: Button definition description:
按键类型为:0 = 普通按键, 1 = AD 按键 The button type is: 0 = normal button, 1 = AD button
GPIO 定义:上例中定义的是GPIO 4 C5 GPIO definition: GPIO 4 C5 is defined in the above example.
判断电平:0 = 低电平,1=高电平 Judging level: 0 = low level, 1 = high level
AD 定义(通道,下限值,上限值):上例中, **1**表示ADC 通道1, **8**表示下限值为80, **20**表 AD definition (channel, lower limit, upper limit): In the above example, **1** means ADC channel 1, **8** means the lower limit is 80, **20**
示上限值为200,也就是AD 值在80~200 内的按键都认为是COMBINATION_KEY。 The upper limit is 200, that is, the buttons with AD values between 80 and 200 are considered to be COMBINATION_KEY.
Combination 按键定义,可以定义多个,用户可以根据实际机型定义按键。 The Combination button definition can be defined multiple times, and the user can define the button according to the actual model.
功能说明: Function Description:
1、按住recovery 按键并接USB 开机,进loader rockusb 升级模式。 1\. Press and hold the recovery button and connect the USB to boot, enter the loader rockusb upgrade mode.
2、按住recovery 按键不接USB 开机,3S 左右会引导recovery.img。 2\. Press and hold the recovery button and do not connect to USB to boot. 3S will guide recovery.img.
3、按住combination 按键开机,会引导recovery.img,进android 的recovery 模式,用户 3, press and hold the combination button to boot, will guide recovery.img, into the android recovery mode, the user
可以根据菜单选择操作。 You can select an operation based on the menu.
11\. CMDLINE: 11\. CMDLINE:
console=ttyFIQ0 androidboot.console=ttyFIQ0, 串口定义。 Console=ttyFIQ0 androidboot.console=ttyFIQ0, serial port definition.
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
4/ 6 4/ 6
_initrd=0x62000000,0x00800000_ , 第一个参数是 _boot.img_ 加载到 _sdram_ 的位置,第二个参数为 _Initrd=0x62000000,0x00800000_ , the first parameter is the location where _boot.img is_ loaded into _sdram_ , the second parameter is
_ramdisk_ 的大小,目前 _ramdisk_ 大小没有限制。 _ramdisk_ size, there is no limit _ramdisk_ size.
MTD 分区 : MTD partition :
mtdparts= rk29xxnand :0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x000 Mtdparts= rk29xxnand :0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x000
02000@0x00008000(boot),0x00004000@0x0000A000(recovery),0x00080000@0x0000E000(syst 02000@0x00008000(boot), 0x00004000@0x0000A000(recovery), 0x00080000@0x0000E000(syst
em),0x00082000@0x0008E000(backup),0x0003a000@0x00110000(cache),0x00100000@0x0014 Em),0x00082000@0x0008E000(backup),0x0003a000@0x00110000(cache),0x00100000@0x0014
a000(userdata),0x00002000@0x0024a000(kpanic),-@0x0024c000(user) A000(userdata), 0x00002000@0x0024a000(kpanic), -@0x0024c000(user)
分区定义说明: Partition definition description:
为了兼容性,RK30xx、RK29xx 和RK292x 都是用 rk29xxnand做标识。 For compatibility, the RK30xx, RK29xx and RK292x are all identified by rk29xxnand .
单个分区说明: Single partition description:
例如:0x00002000@0x00008000(boot),@符号之前的数值是分区大小,@符号之后的数 For example: 0x00002000@0x00008000(boot), the value before the @ symbol is the partition size, the number after the @ symbol
值是分区的起始位置,括号里面的字符是分区的名字。 The value is the starting position of the partition, and the characters in the brackets are the names of the partitions. 所有数值的单位是sector,1 个sector The unit of all values is sector, 1 sector
为512Bytes.上例中,boot 分区起始位置为0x8000 sectors 位置,大小为0x2000 sectors(4MB). It is 512 bytes. In the above example, the boot partition starts at 0x8000 sectors and has a size of 0x2000 sectors (4MB).
目前flash 最大的block 是4MB(0x2000 sectors),所以每个分区需要4MB 对齐,也就是 Currently the largest block of flash is 4MB (0x2000 sectors), so each partition needs 4MB alignment, which is
每个分区都必须为4MB 的整数倍大小。 Each partition must be an integer multiple of 4MB.
Backup 及之前的分区为固件区,在linux 系统里是只读的,在确定大小后,后续升级时 Backup and the previous partition are firmware areas, which are read-only in the Linux system. After the size is determined, subsequent upgrades are performed.
不能修改分区大小。 The partition size cannot be modified.
Backup 之后的分区在linux 系统里是可读写的。 The partition after Backup is readable and writable in the Linux system. 在后续升级时可以调整分区大小,调整 You can adjust the partition size and adjust during subsequent upgrades.
分区大小后需要进android 的recovery 系统格式化cache 等分区。 After the partition size, you need to enter the android recovery system to format the cache and other partitions.
12\. GPIO 控制信息 12\. GPIO Control Information
例如: E.g:
**PWR_HLD:0,0,C,7,1 //**控制**GPIO0C7**输出高电平 **PWR_HLD: 0,0,C,7,1 //** Control **GPIO0C7** output high level
**PWR_HLD:0,0,C,7,2 //**控制**GPIO0C7**输出低电平 **PWR_HLD: 0,0,C,7,2 //** Control **GPIO0C7** output low level
**PWR_HLD:0,0,A,0,3 //**配置**PWR_HLD**为**GPIO0A0,**在**Loader**需要锁定电源时,输出高电平 **PWR_HLD: 0,0,A,0,3 //** Configure **PWR_HLD** to **GPIO0A0** , output high level when **Loader** needs to lock power
锁定电源 Locking power supply
GPIO 控制信息和PWR_HLD 管脚定义信息复用,因此定义GPIO 控制信息后,最后一条需要配 The GPIO control information and the PWR_HLD pin definition information are multiplexed, so after defining the GPIO control information, the last one needs to be configured.
置真正的PWR_HLD 引脚,不然loader 不会锁定电源。 Set the real PWR_HLD pin, otherwise the loader will not lock the power.
代码不会配置 **IOMUX** ,被配置为特殊功能的**IO**是不可以控制的,这些**IO**有: **SD0** , **SD1** , **NAND** The code does not configure **IOMUX** , and the **IO** configured for special functions cannot be controlled. These **IOs** are: **SD0** , **SD1** , **NAND**
**FLASH** (不包含**D8~D15** ), **SPI0** , **UART2**等使用到的**IO** 。 **FLASH** (excluding **D8~D15** ), **IO** used by **SPI0** , **UART2,** etc.
定义格式和COMBINATION_KEY 的GPIO 定义类似,只有最后一个字节(电平判断)不同。 The definition format is similar to the GPIO definition of COMBINATION_KEY, except that the last byte (level determination) is different.
电平判断解释: Level judgment explanation:
**1** := 解析parameter 时,输出高电平 **1** := Output high level when parsing parameter
**2** := 解析parameter 时,输出低电平 **2** := Output low when parsing parameter
**3** := 在Loader 需要控制电源时,输出高电平 **3** := Output high level when Loader needs to control power
**0** := 在Loader 需要控制电源时,输出低电平 **0** := Output low when Loader needs to control power
福州瑞芯微电子有限公司 Fuzhou Ruixin Microelectronics Co., Ltd.
内部资料,不得扩散 Internal information, no diffusion
5/ 6 5/ 6
常见问题和解决办法 Common problems and solutions
1、 system 分区修改为ext3 格式时,parameter 的mtd 分区怎么定义? 1\. When the system partition is modified to ext3 format, how is the mtd partition of the parameter defined?
Ext3 为可写文件系统,那么system 分区需要定义在backup 分区之后。 Ext3 is a writable file system, so the system partition needs to be defined after the backup partition.
2、怎么增加一个mtd 分区? 2\. How to add an mtd partition?
在parameter MTD 分区中按住分区定义格式增加分区,如果在系统中需要可写的,那么要把分区 In the parameter MTD partition, press and hold the partition definition format to increase the partition. If you need to be writable in the system, then you need to partition
定义在backup 分区之后,只读的,那么分区定义在backup 分区之前。 Defined after the backup partition, read-only, then the partition is defined before the backup partition.
3、由于系统固件变大,backup 分区起始位置和大小变大后整个系统不正常怎么处理? 3\. As the system firmware becomes larger, how can the entire system be abnormal after the start position and size of the backup partition become larger?
Backup 分区之前的区域为只读区域,为保证系统固件可靠性和稳定性,这个区域有做特殊处理, The area before the Backup partition is a read-only area. To ensure the reliability and stability of the system firmware, this area has special handling.
在第一次升级固件后就不可以把分区改大(改小不会有问题),所以在开发阶段定义分区大小时尽量 After upgrading the firmware for the first time, you can't change the partition size (it will not be a problem if you change it), so try to define the partition size during the development phase.
预留足够空间。 Reserve enough space.
出现问题的机器,需要按住recovery 按键进loader rockusb 升级模式,等待10 秒后,用量产工具 For the problematic machine, you need to press and hold the recovery button to enter the loader rockusb upgrade mode, wait 10 seconds, the production tool
或者用户工具的修复模式升级固件,也可以用开发工具的擦除idb 功能低格flash 后再升级固件。 Or the user tool's repair mode to upgrade the firmware, you can also use the development tool's erase idb function to lower the flash and then upgrade the firmware.
针对这个问题,目前新发布的SDK 使用新的解决方案,buckup 分区不再备份system.img,当 In response to this problem, the newly released SDK currently uses a new solution, and the buckup partition no longer backs up system.img.
system.img 分区变大时,就不会有这个问题。 When the system.img partition becomes larger, there is no such problem.
下例是2928 的定义: The following example is the definition of 2928:
Recovery 是32MB,backup 分区是64MB,data 分区是1GB,system 分区是512MB。 Recovery is 32MB, the backup partition is 64MB, the data partition is 1GB, and the system partition is 512MB.