s = env_get("bootdelay"); //先判断是否有bootdelay环境变量,如果没有,就使用menuconfig中配置的CONFIG_BOOTDELAY时间 bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; if (IS_ENABLED(CONFIG_OF_CONTROL)) //是否使用设备树进行配置 bootdelay = fdtdec_get_config_int(gd->fdt...
s = env_get("bootdelay"); //先判断是否有bootdelay环境变量,如果没有,就使用menuconfig中配置的CONFIG_BOOTDELAY时间 bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; if (IS_ENABLED(CONFIG_OF_CONTROL)) //是否使用设备树进行配置 bootdelay = fdtdec_get_config_int(gd->fdt...
s=env_get("bootdelay"); bootdelay=s?(int)simple_strtol(s,NULL,10) :CONFIG_BOOTDELAY; debug("### main_loop entered: bootdelay=%d\n\n",bootdelay); bootretry_init_cmd_timeout(); //暂时中断启动 //选中altbootcmd函数并返回 if(bootcount_error()) s=env_get("altbootcmd"); else //...
//在sdram中开辟一开内存空间并使env_ptr指向它 env_ptr = (env_t *)malloc (CFG_ENV_SIZE); DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr); /* * After relocation to RAM, we can always use the "memory" functions */ env_get_char = env_get_char_memor...
第一个 printenv 实现函数为do_printfenv 代码如下: 1intdo_printenv (cmd_tbl_t *cmdtp,intflag,intargc,char*argv[])2{3inti, j, k, nxt;4intrcode =0;56if(argc ==1) {/*Print all env variables*/7for(i=0; env_get_char(i) !='\0'; i=nxt+1) {8for(nxt=i; env_get_char(nx...
在设备上电后,首先敲回车,进入uboot终端模式,敲入printenv,回车,查看如下: ad402# print EnableSelinux=enforcing Irq_check_en=0 active_slot=normal arch=arm baudrate=115200 bcb_cmd=get_valid_slot; board=a1_ad402 board_name=a1_ad402 boot_part=boot ...
UBOOT:env(环境变量)env包含以下⽂件:cmd/nvedit.c common/env_common.c common/env_flags.c common/env_common.c env_htab 为环境变量的哈希表。uchar env_get_char(int index)返回(gd->env_addr+index)的字符串指针。common/env_flags.c int env_flags_validate(const ENTRY *item, const char *...
const char *bootdelay_process(void){char *s;int bootdelay;bootcount_inc();s = env_get("bootdelay"); //先判断是否有bootdelay环境变量,如果没有,就使用menuconfig中配置的CONFIG_BOOTDELAY时间bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;if (IS_ENABLED(CONFIG_OF_CONT...
askenv - get environment variables from stdin base - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootm - boot application image from memory ...
setenv -setenvironment variables showvar - printlocalhushshell variables size - determine a file's size source- run script from memory sysboot -commandto get and boot from syslinux files test- minimaltestlike /bin/sh tftpboot- boot image via network using TFTP protocol ...