Amlogic 8726 升级相关介绍

  • 格式:docx
  • 大小:237.46 KB
  • 文档页数:16

Amlogic 8726升级相关介绍

一.Amlogic uboot启动命令执行顺序:

正常启动下:

reboot_mode=charging

1. preboot=get_rebootmode; clear_rebootmode; echo reboot_mode=${reboot_mode}; if test ${reboot_mode} =

usb_burning; then tiny_usbtool 20000; fi; run upgrade_check; run switch_bootmode

2. bootcmd=run nandboot

3. nandboot=echo Booting from nand ...;run vdacswitchconfig;run nandargs;nand read boot ${loadaddr} 0

600000;hdcp prefetch nand;bootm;run recovery

vdacswitchconfig=if test ${cvbsenable} = true; then setenv vdacswitchmode cvbs;else if test ${cvbsenable} =

false;then setenv vdacswitchmode component;fi;fi

nandargs=run cvbscheck; nand read logo 0x83000000 0 800000;unpackimg 0x83000000; cp ${bootup_offset}

0x84100000 ${bootup_size}; setenv bootargs root=/dev/cardblksd2 rw rootfstype=ext3 rootwait init=/init

console=ttyS0,115200n8 logo=osd1,0x84100000,${outputtemp},full androidboot.resolution=${outputmode} nohlt

vmalloc=256m mem=1024m a9_clk_max=1512000000 vdachwswitch=${vdacswitchmode}

cvbscheck=setenv outputtemp ${outputmode};if test ${outputmode} = 480i; then if test ${cvbsenable} = true; then

setenv outputtemp 480cvbs;fi;fi; if test ${outputmode} = 576i; then if test ${cvbsenable} = true; then setenv

outputtemp 576cvbs;fi;fi

升级模式下:

reboot_mode=update

1. preboot=get_rebootmode; clear_rebootmode; echo reboot_mode=${reboot_mode}; if test ${reboot_mode} =

usb_burning; then tiny_usbtool 20000; fi; run upgrade_check; run updatekey_or_not; run switch_bootmode

2. upgrade_check=if itest ${upgrade_step} == 1; then defenv_without reboot_mode;setenv upgrade_step 2; save; fi

3. updatekey_or_not=saradc open 4;if saradc get_in_range 0x0 0x50 ;then msleep 500;if saradc get_in_range 0x0

0x50; then run update; fi; fi

update=if mmcinfo; then if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;fi;if usb start; then

if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;fi;run recovery

4. switch_bootmode=if test ${reboot_mode} = factory_reset; then run recovery;else if test ${reboot_mode} = update;

then run recovery;fi;fi

5. recovery=echo enter recovery;run nandargs;if mmcinfo; then if fatload mmc 0 ${loadaddr} recovery.img; then

bootm;fi;fi;if usb start; then if fatload usb 0 ${loadaddr} recovery.img; then bootm;fi;fi; nand read recovery ${loadaddr}

0 600000; bootm

nandargs=run cvbscheck; nand read logo 0x83000000 0 800000;unpackimg 0x83000000; cp ${bootup_offset}

0x84100000 ${bootup_size}; setenv bootargs root=/dev/cardblksd2 rw rootfstype=ext3 rootwait init=/init console=ttyS0,115200n8 logo=osd1,0x84100000,${outputtemp},full androidboot.resolution=${outputmode} nohlt

vmalloc=256m mem=1024m a9_clk_max=1512000000 vdachwswitch=${vdacswitchmode}

cvbscheck=setenv outputtemp ${outputmode};if test ${outputmode} = 480i; then if test ${cvbsenable} = true; then

setenv outputtemp 480cvbs;fi;fi; if test ${outputmode} = 576i; then if test ${cvbsenable} = true; then setenv

outputtemp 576cvbs;fi;fi

串口调试模式下uboot下用bootm命令升级顺序

#tftp 82000000 recovery.img

#bootm

1. 升级查找factory_update_param.aml文件的顺序:sdcard-->udisk

如果在sdcard中找到了文件名为factory_update_param.aml的文件,则使用该文件升级系统,如果factory_update_param.aml文件中的命令行有错,导致无法升级,也不会去再找udisk中的factory_update_param.aml文件

如果在sdcard中没有找到文件名为factory_update_param.aml的文件,就去udisk中找

2.如果同时存在两个udisk时,recovery只会挂载第0个udisk(即靠近micro usb口的那个usb口上的udisk),如果udisk0中无factory_update_param.aml文件或factory_update_param.aml文件命令行有误,recovery也不会到udisk1去找factory_update_param.aml文件

uboot是通过#define reboot_mode *((volatile unsigned long*)(P_AO_RTI_STATUS_REG1))此寄存器的值来判断是加载recovery分区还是加载boot分区(正常kernel)的

U盘升级脚本factory_update_param.aml如下:

--update_package=/udisk/g18ref-ota-20130716.zip

--wipe_data

--wipe_cache

sd卡升级脚本factory_update_param.aml如下:

--update_package=/sdcard/g18ref-ota-20130716.zip

--wipe_data

--wipe_cache

二.Amlogic升级模式

系统更新update.zip包的两种方式:

1. Android在升级系统时获得update.zip包的方式有两种。一种是离线升级,即手动拷贝升级包到SD卡(或NAND)中,通过System Update-->选择从SD卡升级。另一种是在线升级,即OTA Install(over the air)。用户通过在线下载升级包到本地,然后更新。这种方式下的update.zip包一般被下载到系统的/CACHE分区下。

2. 无论将升级包放在什么位置,在使用update.zip更新时都会重启并进入Recovery模式,然后启动recovery服务(/sbin/recovery)来安装我们的update.zip包。

业界通用的升级模式如下:

在CACHE分区中的建三个文件:

/cache/recovery/command:这个文件保存着Main system传给Recovery的命令行,每一行就是一条命令,支持一下几种的组合。

--update_package=root:path //verify install an OTA package file Main system将这条命令写入时,代表系统需要升级,在进入Recovery模式后,将该文件中的命令读取并写入BCB中,然后进行相应的更新update.zip包的操作。

--wipe_data //erase user data(and cache),then reboot。擦除用户数据。擦除data分区时必须要擦除cache分区。

--wipe_cache //wipe cache(but not user data),then reboot。擦除cache分区。

Amlogic的command文件如下:

--update_package=/sdcard/g18ref-ota-20130711.zip

--locale=en_US