基础信息

启动日志输出

GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:0;
TE: 270602
no sdio debug board detected

BL2 Built : 13:55:05, Jan 28 2016.
gxb g3625dd5 - xiaobo.gu@droid05

Board ID = 1
set vcck to 1100 mv
set vddee to 1000 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 diff
DDR0: 1024MB(auto) @ 912MHz(2T)-13
DDR1: 1024MB(auto) @ 912MHz(2T)-13
DataBus test pass!
AddrBus test pass!
Load fip header from eMMC, src: 0x0000c000, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010000, des: 0x01000000, size: 0x0000a9b0
Sending bl30...........................................OK.
Run bl30...
Load bl301 from eMMC, src: 0x0001c000, des: 0x01000000, size: 0x00001c20
Wait bl30...Done
Sending bl301........OK.
Run bl301...
Load bl31 from eMMC, src: 0x00020000, des: 0x10100000, size: 0x00012130


--- UART initialized after reboot ---
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3054-53e549c 2016-03-31 20:40:25 xing.xu@droid05]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef be ad de d f0 aLoad bl33 from eMMC, src: 0x00034000, des: 0x01000000, size: 0x0009fd60
d ba ef be ad de not ES chip
efuse init ops = 13
efuse init hdcp = c, cf9=7
[0.401121 Inits done]
secure task start!
high task start!
low task start!
NOTICE:  BL3-1: v1.0(debug):4c66217
NOTICE:  BL3-1: Built : 17:13:36, Jan 28 2016
INFO:    BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01-ga9e9562-dirty (May 26 2016 - 20:33:11)

DRAM:  2 GiB
Relocation Offset is: 76ed3000
register usb cfg[0][1] = 0000000077f62120
register usb cfg[0][2] = 0000000077f62140
register usb cfg[2][0] = 0000000077f62160
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=8, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC:   aml_priv->desc_buf = 0x0000000073ec3770
aml_priv->desc_buf = 0x0000000073ec5900
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
[mmc_init] mmc init success
mmc read lba=0x14000, blocks=0x400
      Amlogic multi-dtb tool
      Single dtb detected
start dts,buffer=0000000073ec7ff0,dt_addr=0000000073ec7ff0
parts: 11
00:      logo	0000000002000000 1
01:  recovery	0000000002000000 1
02:       rsv	0000000000800000 1
03:       tee	0000000000800000 1
04:     crypt	0000000002000000 1
05:      misc	0000000002000000 1
06: instaboot	0000000020000000 1
07:      boot	0000000002000000 1
08:    system	0000000040000000 1
09:     cache	0000000020000000 2
10:      data	ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
overide_emmc_partition_table: overide cache
[mmc_get_partition_table] skip partition cache.
Partition table get from SPL is :
        name                        offset              size              flag
===================================================================================
   0: bootloader                         0            400000                  0
   1: reserved                     2400000           4000000                  0
   2: cache                        6c00000          20000000                  2
   3: env                         27400000            800000                  0
   4: logo                        28400000           2000000                  1
   5: recovery                    2ac00000           2000000                  1
   6: rsv                         2d400000            800000                  1
   7: tee                         2e400000            800000                  1
   8: crypt                       2f400000           2000000                  1
   9: misc                        31c00000           2000000                  1
  10: instaboot                   34400000          20000000                  1
  11: boot                        54c00000           2000000                  1
  12: system                      57400000          40000000                  1
  13: data                        97c00000         136500000                  4
mmc read lba=0x12000, blocks=0x2
mmc read lba=0x12002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x27400000
In:    serial
Out:   serial
Err:   serial
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
      Amlogic multi-dtb tool
      Single dtb detected
Net:   Meson_Ethernet
wipe_data=successful
wipe_cache=successful
upgrade_step=2
reboot_mode=cold_boot
hpd_state=0
[CANVAS]addr=0x3f800000 width=3840, height=2160

Not find '576cvbs' mapped VIC
amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[KM]Error:f[key_manage_query_size]L504:key[usid] not programed yet
[KM]Error:f[key_manage_query_size]L504:key[deviceid] not programed yet
gpio: pin GPIOAO_3 (gpio 122) value is 1
saradc - saradc sub-system

Usage:
saradc saradc open <channel>		- open a SARADC channel
saradc close	- close the SARADC
saradc getval	- get the value in current channel
saradc get_in_range <min> <max>	- return 0 if current value in the range of current channel

Enter USB burn
Try connect time out 701, 700, 640
Hit any key to stop autoboot:  1  0
Booting...
Unknown command 'unifykey' - try 'help'
Unknown command 'unifykey' - try 'help'
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
      Amlogic multi-dtb tool
      Single dtb detected
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
reloc_addr =73f481c0
copy done
      Amlogic multi-dtb tool
      Single dtb detected
load dtb from 0x1000000 ......
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01f00fb8
   Loading Ramdisk to 73c2c000, end 73ec1388 ... OK
   Loading Device Tree to 000000001fff4000, end 000000001ffff0ab ... OK
signature:
fdt_instaboot: get header err

Starting kernel ...

uboot time: 2541079 us

从上面的输出中可以得到uboot env的起始位置, 对于后面配置fw_env.config有重要的意义

Partition table get from SPL is :
        name                        offset              size              flag
===================================================================================
   0: bootloader                         0            400000                  0
   1: reserved                     2400000           4000000                  0
   2: cache                        6c00000          20000000                  2
   3: env                         27400000            800000                  0
   4: logo                        28400000           2000000                  1
   5: recovery                    2ac00000           2000000                  1
   6: rsv                         2d400000            800000                  1
   7: tee                         2e400000            800000                  1
   8: crypt                       2f400000           2000000                  1
   9: misc                        31c00000           2000000                  1
  10: instaboot                   34400000          20000000                  1
  11: boot                        54c00000           2000000                  1
  12: system                      57400000          40000000                  1
  13: data                        97c00000         136500000                  4

uboot配置信息

baudrate=115200
bootargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.mem_address=0x20000000 ramoops.mem_size=0x
100000 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive logo=osd1,loaded,0x3f800000,576cvbs hdmimode=1080p60hz cvbsmode=57
6cvbs hdmitx= androidboot.firstboot=0 mac=c4:2f:ad:XX:XX:XX
androidboot.mac=c4:2f:ad:XX:XX:XX
bootcmd=run storeboot
bootdelay=1
bootmode_check=get_rebootmode; echo reboot_mode=${reboot_mode};if test ${reboot_mode} = factory_reset; then defenv_reserv aml_dt;setenv upgrade_step 2; save;fi;
bootup_offset=0x1080240
bootup_size=0x3f4c8
cmdline_keys=if keyman init 0x1234; then if keyman read usid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if keyman read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;if keyman read deviceid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.deviceid=${deviceid};fi;fi;
cvbsmode=576cvbs
display_bpp=16
display_color_bg=0
display_color_fg=0xffff
display_color_index=16
display_height=576
display_layer=osd1
display_width=720
dtb_mem_addr=0x1000000
edid.crcvalue=0xe2070000
ethact=Meson_Ethernet
ethaddr=00:15:18:01:81:31
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi;
fb_addr=0x3f800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=0
gatewayip=10.18.9.1
hdmimode=1080p60hz
hostname=arm_gxbb
identifyWaitTime=750
init_display=hdmitx hpd;osd open;osd clear;vout output ${outputmode};imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.mem_address=0x20000000 ramoops.mem_size=0x100000 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive
ipaddr=10.18.9.97
irremote_update=if irkey 0xe31cfb04 0xb748fb04 2500000; then echo read irkey ok!; if itest ${irkey_value} == 0xe31cfb04; then run update;else if itest ${irkey_value} == 0xb748fb04; then run update;\fi;fi;fi;
loadaddr=1080000
mac=c4:2f:ad:xx:xx:xx
netmask=255.255.255.0
outputmode=576cvbs
preboot=run factory_reset_poweroff_protect;run upgrade_check;run bootmode_check;run init_display;run storeargs;run upgrade_key;run upgrade_sadckey;run switch_b
ootmode;
reboot_mode=cold_boot
recovery_from_flash=if imgread kernel recovery ${loadaddr}; then wipeisb; bootm ${loadaddr}; fi recovery_from_sdcard=if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0
 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0
${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
set=environment variables
stderr=serial
stdin=serial
stdout=serial
storeargs=setenv bootargs ${initargs} logo=${display_layer},loaded,${fb_addr},${outputmode} hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} andro
idboot.firstboot=${firstboot}; run cmdline_keys;
storeboot=echo Booting...; if unifykey get usid; then  setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if unifykey get mac; then setenv bootargs ${
bootargs} mac=${ethaddr};fi;if imgread kernel boot ${loadaddr}; then store dtb read $dtb_mem_addr; bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else
if test ${reboot_mode} = cold_boot; then run try_auto_burn; fi;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else if itest ${upgrade_step}
== 1; then defenv_reserv; setenv upgrade_step 2; saveenv;fi;fi;
upgrade_key=if gpio input GPIOAO_3; then echo detect upgrade key; run update;fi;
upgrade_sadckey=saradc open 0; if saradc get_in_range 0 0x50; then sleep 1; if saradc get_in_range 0 0x50; then echo update by key...; run update; fi;fi;
upgrade_step=2
usb_burning=update 1000
wipe_cache=successful
wipe_data=successful

  

不同系统启动后的uboot配置

以下信息均采集于在同一个R3300L (S905L, 8G eMMC) 上运行的系统

EmuELEC 3.1 - Kernel 3.14.29

fw_env.config

EmuELEC:~ # more /etc/fw_env.config
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash

# Amlogic NAND
/dev/nand_env           0x000000        0x10000         0x10000

# Amlogic eMMC
/dev/env                0x000000        0x10000         0x10000

fw_printenv

EmuELEC:~ # fw_printenv
1080i_h=1037
1080i_w=1843
1080i_x=38
1080i_y=21
1080p_h=1037
1080p_w=1843
1080p_x=38
1080p_y=21
576i_h=576
576i_w=720
576i_x=0
576i_y=0
720p_h=691
720p_w=1229
720p_x=25
720p_y=14
baudrate=115200
boot_count=0
bootcmd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; fi; run storeboot
bootcount_check=echo bootcounts=${boot_count}; if itest ${boot_count} == 0; then setenv boot_count 1;saveenv;else if itest ${boot_count} == 1; then setenv boot_count 2;saveenv;else if itest ${boot_count} == 2; then setenv boot_count 3;saveenv;else if itest ${boot_count} == 3; then setenv boot_count 4;saveenv;else if itest ${boot_count} == 4; then run recovery_from_flash;fi;fi;fi;fi;fi
bootdelay=0
bootfromnand=0
bootfromsd=mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi
bootfromusb=usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi
bootmode_check=get_rebootmode; echo reboot_mode=${reboot_mode};if test ${reboot_mode} = factory_reset; then defenv_reserv;setenv upgrade_step 2; save;fi;
cmdline_keys=if keyman init 0x1234; then if sec_keyunify read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;fi;
cvbs_drv=0
cvbsmode=576cvbs
digitaudiooutput=HDMI&SPDIF PCM
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_index=24
display_height=1080
display_layer=osd1
display_width=1920
dtb_mem_addr=0x1000000
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi;
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=1
gatewayip=10.18.9.1
hdmimode=720p50hz
hostname=arm_gxbb
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive
ipaddr=10.18.9.97
irremote_update=if irkey 0xf8077748 0x7d824cb3 0x728ddd22 100000; then echo read irkey ok!; if itest ${irkey_value} == 0xf8077748; then run update;else if itest ${irkey_value} == 0x7d824cb3; then run update;else if itest ${irkey_value} == 0x728ddd22; then run update;
fi;fi;fi;fi;
jtag=apee
loadaddr=1080000
netmask=255.255.255.0
outputdefault=setenv outputmode 720p50hz;setenv 720p_w 1229;setenv 720p_h 691;setenv 720p_x 25;setenv 720p_y 14;setenv 1080i_w 1843;setenv 1080i_h 1037;setenv 1080i_x 38;setenv 1080i_y 21;setenv 1080p_w 1843;setenv 1080p_h 1037;setenv 1080p_x 38;setenv 1080p_y 21;setenv 576i_w 684;setenv 576i_h 547;setenv 576i_x 18;setenv 576i_y 14;
outputmode=720p50hz
preboot=run factory_reset_poweroff_protect;run upgrade_check;run bootmode_check;run init_display;run storeargs;run update_ir;run upgrade_key;run switch_bootmode;
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
screenmode=full
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
sddtb=if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi
serverip=10.18.9.113
storeargs=setenv bootargs ${initargs} logo=${display_layer},loaded,${fb_addr},${outputmode} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} quiet jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic androidboot.boardid=${boardid};run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
update_ir=if irdetect; then run update; fi
update_sar=saradc open 0;if saradc get_in_range 0x0 0x100; then run update; fi
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else if itest ${upgrade_step} == 1; then defenv_reserv; setenv upgrade_step 2; saveenv;else if itest ${upgrade_step} == 4; then defenv_reserv; run outputdefault; setenv upgrade_step 2; saveenv;fi;fi;fi;
upgrade_key=if gpio input GPIOH_6; then echo detect upgrade key; sleep 3; run update;fi;
upgrade_step=2
usb_burning=update 1000
usbdtb=if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi
wipe_cache=successful
wipe_data=successful

Armbian 19.11.3 - Kernel 5.3.0

fw_env.config  和3.14的kernel不一样, mainline kernel 不再有/dev/nand这样的设备了

root@aml:~# more /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

/dev/mmcblk0  0x27400000 0x10000 0x10000

fw_printenv

root@aml:~# fw_printenv
1080i_h=1037
1080i_w=1843
1080i_x=38
1080i_y=21
1080p_h=1037
1080p_w=1843
1080p_x=38
1080p_y=21
576i_h=576
576i_w=720
576i_x=0
576i_y=0
720p_h=691
720p_w=1229
720p_x=25
720p_y=14
baudrate=115200
boot_count=0
bootcmd=run start_autoscript; run storeboot
bootcount_check=echo bootcounts=${boot_count}; if itest ${boot_count} == 0; then setenv boot_count 1;saveenv;else if itest ${boot_count} == 1; then setenv boot_count 2;saveenv;else if itest ${boot_count} == 2; then setenv boot_count 3;saveenv;else if itest ${boot_count} == 3; then setenv boot_count 4;saveenv;else if itest ${boot_count} == 4; then run recovery_from_flash;fi;fi;fi;fi;fi
bootdelay=0
bootmode_check=get_rebootmode; echo reboot_mode=${reboot_mode};if test ${reboot_mode} = factory_reset; then defenv_reserv;setenv upgrade_step 2; save;fi;
cmdline_keys=if keyman init 0x1234; then if sec_keyunify read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;fi;
cvbs_drv=0
cvbsmode=576cvbs
digitaudiooutput=HDMI&SPDIF PCM
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_index=24
display_height=1080
display_layer=osd1
display_width=1920
dtb_mem_addr=0x1000000
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi;
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=1
gatewayip=10.18.9.1
hdmimode=720p50hz
hostname=arm_gxbb
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive
ipaddr=10.18.9.97
irremote_update=if irkey 0xf8077748 0x7d824cb3 0x728ddd22 100000; then echo read irkey ok!; if itest ${irkey_value} == 0xf8077748; then run update;else if itest ${irkey_value} == 0x7d824cb3; then run update;else if itest ${irkey_value} == 0x728ddd22; then run update;
fi;fi;fi;fi;
jtag=apee
loadaddr=1080000
netmask=255.255.255.0
outputdefault=setenv outputmode 720p50hz;setenv 720p_w 1229;setenv 720p_h 691;setenv 720p_x 25;setenv 720p_y 14;setenv 1080i_w 1843;setenv 1080i_h 1037;setenv 1080i_x 38;setenv 1080i_y 21;setenv 1080p_w 1843;setenv 1080p_h 1037;setenv 1080p_x 38;setenv 1080p_y 21;setenv 576i_w 684;setenv 576i_h 547;setenv 576i_x 18;setenv 576i_y 14;
outputmode=720p50hz
preboot=run factory_reset_poweroff_protect;run upgrade_check;run bootmode_check;run init_display;run storeargs;run update_ir;run upgrade_key;run switch_bootmode;
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
screenmode=full
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
start_autoscript=if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi; run start_emmc_autoscript
start_emmc_autoscript=if fatload mmc 1 1020000 emmc_autoscript; then autoscr 1020000; fi;
start_mmc_autoscript=if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;
start_usb_autoscript=for usbdev in 0 1 2 3; do if fatload usb ${usbdev} 1020000 s905_autoscript; then autoscr 1020000; fi; done
storeargs=setenv bootargs ${initargs} logo=${display_layer},loaded,${fb_addr},${outputmode} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} quiet jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic androidboot.boardid=${boardid};run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
update_ir=if irdetect; then run update; fi
update_sar=saradc open 0;if saradc get_in_range 0x0 0x100; then run update; fi
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else if itest ${upgrade_step} == 1; then defenv_reserv; setenv upgrade_step 2; saveenv;else if itest ${upgrade_step} == 4; then defenv_reserv; run outputdefault; setenv upgrade_step 2; saveenv;fi;fi;fi;
upgrade_key=if gpio input GPIOH_6; then echo detect upgrade key; sleep 3; run update;fi;
upgrade_step=2
usb_burning=update 1000
wipe_cache=successful
wipe_data=successful

从上面输出的对比可以看出, EmuELEC所在的系统会对uboot增加如下配置

bootcmd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; fi; run storeboot
bootfromnand=0
bootfromsd=mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi
bootfromusb=usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi
sddtb=if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi
usbdtb=if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi

Armbian会对uboot增加如下配置

bootcmd=run start_autoscript; run storeboot
start_autoscript=if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi; run start_emmc_autoscript
start_emmc_autoscript=if fatload mmc 1 1020000 emmc_autoscript; then autoscr 1020000; fi;
start_mmc_autoscript=if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;
start_usb_autoscript=for usbdev in 0 1 2 3; do if fatload usb ${usbdev} 1020000 s905_autoscript; then autoscr 1020000; fi; done

  

参考

https://blog.lvu.kr/page/12/?page=15  很详细的输出记录

12-15 08:37