''Parameter''

From Linux Rockchip
(Redirected from Parameter file)
Jump to: navigation, search

The parameter file defines some settings for the rockchip bootloader.

Most important feature is kernel commandline definition. rockchip bootloader parses the commandline and determines partition layout on the boot medium. The partition sizes and offsets are counted in 512 byte sectors.

On nand the sectors are counted form the start of the logical block device provided by the rockchip driver.

On SD or eMMC the offset is counted from sector 0x2000 of the medium. The first 4MB of the SD card before sector 0x2000 contains the bootloader and is not accessible when using the rknand driver and its partitioning scheme.

Example below:


NAND Linux Boot

This is the content of a sample parameter file:

FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=ttyFIQ0,115200 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 
ip=192.168.2.6::192.168.2.1:255.255.255.0:rr:eth0 init=/sbin/init mac_addr=bc:ef:68:08:b2:fe initrd=0x62000000,0x00800000 
mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot)

Note: last line is wrapped for readability but everything from CMDLINE: should be one line

In this configuration the kernel logs messages (from startup on) to the serial console only.

It has yet to be verified whether the kernel commandline parameter ip is evaluated in recent ramdisks/initramfs scripts.

The kernel lives in NAND at sector 0x2000 and the RFS at 0xa000.

SD Card Linux Boot

FIRMWARE_VER:4.4.2
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 
mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),
0x00008000@0x0000c000(boot),0x00010000@0x00014000(recovery),0x00002000@0x00024000(backup),
0x00040000@0x00026000(cache),0x001fe000@0x00066000(userdata),0x00002000@0x00264000(metadata),
0x00002000@0x00266000(kpanic),0x00180000@0x00268000(system),0x00200000@0x003e8000(user),
-@0x005e8000(linuxroot)

Note: last line is wrapped for readability but everything from CMDLINE: should be one line

See also Radxa Rock Partitions.