U-boot(六):命令体系,环境变量,iNand/SD卡驱动

本文探讨210的uboot命令体系、黄金变量及iNand/SD卡驱动相关知识。介绍了uboot命令体系的位置、参数、函数,命令解析和执行过程,管理命令集及查找命令方法。还阐述了uboot环境变量的优先级、存储及相关命令,以及iNand/SD驱动的初始化和注册等内容。

        本文主要探讨210的uboot命令体系,黄金变量,iNand/SD卡驱动相关知识。

命令体系

        uboot命令体系
                
位置:uboot/common/
                参数:uboot命令支持传递参数(argc,argv)
                函数:xxx命令的实现算数为do_xxx

/*
 * Use puts() instead of printf() to avoid printf buffer overflow
 * for long help messages
 */
int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
	int i;
	int rcode = 0;

	if (argc == 1) {	/*show list of commands */

		int cmd_items = &__u_boot_cmd_end -
				&__u_boot_cmd_start;	/* pointer arith! */
		cmd_tbl_t *cmd_array[cmd_items];
		int i, j, swaps;

		/* Make array of commands from .uboot_cmd section */
		cmdtp = &__u_boot_cmd_start;
		for (i = 0; i < cmd_items; i++) {
			cmd_array[i] = cmdtp++;
		}

		/* Sort command list (trivial bubble sort) */
		for (i = cmd_items - 1; i > 0; --i) {
			swaps = 0;
			for (j = 0; j < i; ++j) {
				if (strcmp (cmd_array[j]->name,
					    cmd_array[j + 1]->name) > 0) {
					cmd_tbl_t *tmp;
					tmp = cmd_array[j];
					cmd_array[j] = cmd_array[j + 1];
					cmd_array[j + 1] = tmp;
					++swaps;
				}
			}
			if (!swaps)
				break;
		}

		/* print short help (usage) */
		for (i = 0; i < cmd_items; i++) {
			const char *usage = cmd_array[i]->usage;

			/* allow user abort */
			if (ctrlc ())
				return 1;
			if (usage == NULL)
				continue;
			puts (usage);
		}
		return 0;
	}
	/*
	 * command help (long version)
	 */
	for (i = 1; i < argc; ++i) {
		if ((cmdtp = find_cmd (argv[i])) != NULL) {
#ifdef	CFG_LONGHELP
			/* found - print (long) help info */
			puts (cmdtp->name);
			putc (' ');
			if (cmdtp->help) {
				puts (cmdtp->help);
			} else {
				puts ("- No help available.\n");
				rcode = 1;
			}
			putc ('\n');
#else	/* no long help available */
			if (cmdtp->usage)
				puts (cmdtp->usage);
#endif	/* CFG_LONGHELP */
		} else {
			printf ("Unknown command '%s' - try 'help'"
				" without arguments for list of all"
				" known commands\n\n", argv[i]
					);
			rcode = 1;
		}
	}
	return rcode;
}

        命令解析和执行

                uboot二阶段初始化完成进入main_loop循环,main_loop执行一次为一条命令的获取,解析,执行(run_command)的过程

/* main_loop() can return to retry autoboot, if so just run it again. */
    for (;;) {
        main_loop ();
    }


                run_command

                        控制台命令获取 
                        命令解析(parse_line)为命令和参数
                        执行命令:用函数指针方式调用命令函数

/****************************************************************************
 * returns:
 *    1  - command executed, repeatable
 *    0  - command executed but not repeatable, interrupted commands are
 *         always considered not repeatable
 *    -1 - not executed (unrecognized, bootd recursion or too many args)
 *           (If cmd is NULL or "" or longer than CFG_CBSIZE-1 it is
 *           considered unrecognized)
 *
 * WARNING:
 *
 * We must create a temporary copy of the command since the command we get
 * may be the result from getenv(), which returns a pointer directly to
 * the environment data, which may change magicly when the command we run
 * creates or modifies environment variables (like "bootp" does).
 */

int run_command (const char *cmd, int flag)
{
    cmd_tbl_t *cmdtp;
    char cmdbuf[CFG_CBSIZE];    /* working copy of cmd        */
    char *token;            /* start of token in cmdbuf    */
    char *sep;            /* end of token (separator) in cmdbuf */
    char finaltoken[CFG_CBSIZE];
    char *str = cmdbuf;
    char *argv[CFG_MAXARGS + 1];    /* NULL terminated    */
    int argc, inquotes;
    int repeatable = 1;
    int rc = 0;

#ifdef DEBUG_PARSER
    printf ("[RUN_COMMAND] cmd[%p]=\"", cmd);
    puts (cmd ? cmd : "NULL");    /* use puts - string may be loooong */
    puts ("\"\n");
#endif

    clear_ctrlc();        /* forget any previous Control C */

    if (!cmd || !*cmd) {
        return -1;    /* empty command */
    }

    if (strlen(cmd) >= CFG_CBSIZE) {
        puts ("## Command too long!\n");
        return -1;
    }

    strcpy (cmdbuf, cmd);

    /* Process separators and check for invalid
     * repeatable commands
     */

#ifdef DEBUG_PARSER
    printf ("[PROCESS_SEPARATORS] %s\n", cmd);
#endif
    while (*str) {

        /*
         * Find separator, or string end
         * Allow simple escape of ';' by writing "\;"
         */
        for (inquotes = 0, sep = str; *sep; sep++) {
            if ((*sep=='\'') &&
                (*(sep-1) != '\\'))
                inquotes=!inquotes;

            if (!inquotes &&
                (*sep == ';') &&    /* separator        */
                ( sep != str) &&    /* past string start    */
                (*(sep-1) != '\\'))    /* and NOT escaped    */
                break;
        }

        /*
         * Limit the token to data between separators
         */
        token = str;
        if (*sep) {
            str = sep + 1;    /* start of command for next pass */
            *sep = '\0';
        }
        else
            str = sep;    /* no more commands for next pass */
#ifdef DEBUG_PARSER
        printf ("token: \"%s\"\n", token);
#endif

        /* find macros in this token and replace them */
        process_macros (token, finaltoken);

        /* Extract arguments */
        if ((argc = parse_line (finaltoken, argv)) == 0) {
            rc = -1;    /* no command at all */
            continue;
        }

        /* Look up command in command table */
        if ((cmdtp = find_cmd(argv[0])) == NULL) {
            printf ("Unknown command '%s' - try 'help'\n", argv[0]);
            rc = -1;    /* give up after bad command */
            continue;
        }

        /* found - check max args */
        if (argc > cmdtp->maxargs) {
            printf ("Usage:\n%s\n", cmdtp->usage);
            rc = -1;
            continue;
        }

#if defined(CONFIG_CMD_BOOTD)
        /* avoid "bootd" recursion */
        if (cmdtp->cmd == do_bootd) {
#ifdef DEBUG_PARSER
            printf ("[%s]\n", finaltoken);
#endif
            if (flag & CMD_FLAG_BOOTD) {
                puts ("'bootd' recursion detected\n");
                rc = -1;
                continue;
            } else {
                flag |= CMD_FLAG_BOOTD;
            }
        }
#endif

        /* OK - call function to do the command */
        if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) {
            rc = -1;
        }

        repeatable &= cmdtp->repeatable;

        /* Did the user stop this? */
        if (had_ctrlc ())
            return -1;    /* if stopped then not repeatable */
    }

    return rc ? rc : repeatable;
}

/****************************************************************************/

#if defined(CONFIG_CMD_RUN)
int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
    int i;

    if (argc < 2) {
        printf ("Usage:\n%s\n", cmdtp->usage);
        return 1;
    }

    for (i=1; i<argc; ++i) {
        char *arg;

        if ((arg = getenv (argv[i])) == NULL) {
            printf ("## Error: \"%s\" not defined\n", argv[i]);
            return 1;
        }
#ifndef CFG_HUSH_PARSER
        if (run_command (arg, flag) == -1)
            return 1;
#else
        if (parse_string_outer(arg,
            FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0)
            return 1;
#endif
    }
    return 0;
}

        uboot管理命令集

        uboot每个命令对应cmd_tbl_t结构体的一个实例,输入命令结构体实例中查找对应的结构体,找到后调用命令函数执行命令

struct cmd_tbl_s {
    char        *name;        /* Command Name            */
    int        maxargs;    /* maximum number of arguments    */
    int        repeatable;    /* autorepeat allowed?        */
                    /* Implementation function    */
    int        (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
    char        *usage;        /* Usage message    (short)    */
#ifdef    CFG_LONGHELP
    char        *help;        /* Help  message    (long)    */
#endif
#ifdef CONFIG_AUTO_COMPLETE
    /* do auto completion on the arguments */
    int        (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[]);
#endif
};
typedef struct cmd_tbl_s    cmd_tbl_t;

                name:命令名称
                maxargs:命令最多接收参数
                repeatable:命令是否可重复执行(回车重复上条命令)
                cmd:命令对应函数,使用函数指针调用命令
                usage:命令短介绍
                help:命令长介绍
                complete:命令自动补(函数指针)


        uboot命令结构体实例附加特定段属性(用户自定义段),链接时将带有该段属性内容链接在一起排列(类似命令结构体数组)
        uboot重定位时将该段整体加载到DDR中,段起始和结束地址(链接地址在u-boot.lds)对应命令集开始和结束地址

   

__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;


         U_BOOT_CMD宏(uboot/common/command.h)

#define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \
cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage, help}
U_BOOT_CMD(
    version,    1,        1,    do_version,
    "version - print monitor version\n",
    NULL
);


 宏被替换为:

cmd_tbl_t __u_boot_cmd_version __attribute__ ((unused,section (".u_boot_cmd"))) = {#name, maxargs, rep, cmd, usage, help}

find_cmd

        查找命令

/***************************************************************************
 * find command table entry for a command
 */
cmd_tbl_t *find_cmd (const char *cmd)
{
    cmd_tbl_t *cmdtp;
    cmd_tbl_t *cmdtp_temp = &__u_boot_cmd_start;    /*Init value */
    const char *p;
    int len;
    int n_found = 0;

    /*
     * Some commands allow length modifiers (like "cp.b");
     * compare command name only until first dot.
     */
    len = ((p = strchr(cmd, '.')) == NULL) ? strlen (cmd) : (p - cmd);

    for (cmdtp = &__u_boot_cmd_start;
         cmdtp != &__u_boot_cmd_end;
         cmdtp++) {
        if (strncmp (cmd, cmdtp->name, len) == 0) {
            if (len == strlen (cmdtp->name))
                return cmdtp;    /* full match */

            cmdtp_temp = cmdtp;    /* abbreviated command ? */
            n_found++;
        }
    }
    if (n_found == 1) {            /* exactly one match */
        return cmdtp_temp;
    }

    return NULL;    /* not found or ambiguous command */
}

                find_cmd函数是在uboot命令集中查找命令并返回命令结构体指针,未找到返回NULL

环境变量

        uboot环境变量(uboot/common/env_common.c)
    
            优先级:环境变量为空则使用代码中环境变量(代码中定义了环境变量的值),不为空则使用环境变量
                machid(机器码定义在x210_sd.h)为2456,可在定义处修改重编译或修改环境变量(set) 
                SD卡中有变量分区用于存储环境变量,uboot运行时将环境变量读到DDR中,save时将环境变量保存到SD卡
                default_environment初始化环境变量(默认),二阶段SD卡的env分区crc校验通过,env_relocate读取SD卡环境变量覆盖default_environment,后面使用的都为SD卡环境变量
默认环境变量存储在default_environment字符数组,大小为CFG_ENV_SIZE(16kb)相邻环境变量用'\0'分隔

void env_crc_update (void)
{
    env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
}

void env_relocate (void)
{
    DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
        gd->reloc_off);

#ifdef CONFIG_AMIGAONEG3SE
    enable_nvram();
#endif

#ifdef ENV_IS_EMBEDDED
    /*
     * The environment buffer is embedded with the text segment,
     * just relocate the environment pointer
     */
    env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
    DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#else
    /*
     * We must allocate a buffer for the environment
     */
    env_ptr = (env_t *)malloc (CFG_ENV_SIZE);
    DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#endif

    if (gd->env_valid == 0) {
#if defined(CONFIG_GTH)    || defined(CFG_ENV_IS_NOWHERE)    /* Environment not changable */
        puts ("Using default environment\n\n");
#else
        puts ("*** Warning - bad CRC, using default environment\n\n");
        show_boot_progress (-60);
#endif
        set_default_env();
    }
    else {
        env_relocate_spec ();
    }
    gd->env_addr = (ulong)&(env_ptr->data);

#ifdef CONFIG_AMIGAONEG3SE
    disable_nvram();
#endif
}


/************************************************************************
 * Default settings to be used when no valid environment is found
 */
#define XMK_STR(x)    #x
#define MK_STR(x)    XMK_STR(x)

#if defined(CONFIG_S3C6410) || defined(CONFIG_S3C6430) || defined(CONFIG_S5P6440) || defined(CONFIG_S5PC100) || defined(CONFIG_S5PC110) || defined(CONFIG_S5P6442)
uchar default_environment[CFG_ENV_SIZE] = {
#else
uchar default_environment[] = {
#endif
#ifdef    CONFIG_BOOTARGS
    "bootargs="    CONFIG_BOOTARGS            "\0"
#endif
#ifdef    CONFIG_BOOTCOMMAND
    "bootcmd="    CONFIG_BOOTCOMMAND        "\0"
#endif
#if 0    /* for fast booting */
    "verify="        MK_STR(no)                    "\0"
#endif
#ifdef    CONFIG_MTDPARTITION
    "mtdpart="    CONFIG_MTDPARTITION        "\0"
#endif
#ifdef    CONFIG_RAMBOOTCOMMAND
    "ramboot="    CONFIG_RAMBOOTCOMMAND        "\0"
#endif
#ifdef    CONFIG_NFSBOOTCOMMAND
    "nfsboot="    CONFIG_NFSBOOTCOMMAND        "\0"
#endif
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
    "bootdelay="    MK_STR(CONFIG_BOOTDELAY)    "\0"
#endif
#if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
    "baudrate="    MK_STR(CONFIG_BAUDRATE)        "\0"
#endif
#ifdef    CONFIG_LOADS_ECHO
    "loads_echo="    MK_STR(CONFIG_LOADS_ECHO)    "\0"
#endif
#ifdef    CONFIG_ETHADDR
    "ethaddr="    MK_STR(CONFIG_ETHADDR)        "\0"
#endif
#ifdef    CONFIG_ETH1ADDR
    "eth1addr="    MK_STR(CONFIG_ETH1ADDR)        "\0"
#endif
#ifdef    CONFIG_ETH2ADDR
    "eth2addr="    MK_STR(CONFIG_ETH2ADDR)        "\0"
#endif
#ifdef    CONFIG_ETH3ADDR
    "eth3addr="    MK_STR(CONFIG_ETH3ADDR)        "\0"
#endif
#ifdef    CONFIG_IPADDR
    "ipaddr="    MK_STR(CONFIG_IPADDR)        "\0"
#endif
#ifdef    CONFIG_SERVERIP
    "serverip="    MK_STR(CONFIG_SERVERIP)        "\0"
#endif
#ifdef    CFG_AUTOLOAD
    "autoload="    CFG_AUTOLOAD            "\0"
#endif
#ifdef    CONFIG_PREBOOT
    "preboot="    CONFIG_PREBOOT            "\0"
#endif
#ifdef    CONFIG_ROOTPATH
    "rootpath="    MK_STR(CONFIG_ROOTPATH)        "\0"
#endif
#ifdef    CONFIG_GATEWAYIP
    "gatewayip="    MK_STR(CONFIG_GATEWAYIP)    "\0"
#endif
#ifdef    CONFIG_NETMASK
    "netmask="    MK_STR(CONFIG_NETMASK)        "\0"
#endif
#ifdef    CONFIG_HOSTNAME
    "hostname="    MK_STR(CONFIG_HOSTNAME)        "\0"
#endif
#ifdef    CONFIG_BOOTFILE
    "bootfile="    MK_STR(CONFIG_BOOTFILE)        "\0"
#endif
#ifdef    CONFIG_LOADADDR
    "loadaddr="    MK_STR(CONFIG_LOADADDR)        "\0"
#endif
#ifdef  CONFIG_CLOCKS_IN_MHZ
    "clocks_in_mhz=1\0"
#endif
#if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
    "pcidelay="    MK_STR(CONFIG_PCI_BOOTDELAY)    "\0"
#endif
#ifdef  CONFIG_EXTRA_ENV_SETTINGS
    CONFIG_EXTRA_ENV_SETTINGS
#endif
    "\0"
};

        环境变量命令(cmd_nvedit.c)

                printenv

/************************************************************************
 * Command interface: print one or all environment variables
 */

int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])

{
    int i, j, k, nxt;
    int rcode = 0;

    if (argc == 1) {        /* Print all env variables    */
        for (i=0; env_get_char(i) != '\0'; i=nxt+1) {
            for (nxt=i; env_get_char(nxt) != '\0'; ++nxt)
                ;
            for (k=i; k<nxt; ++k)
                putc(env_get_char(k));
            putc  ('\n');

            if (ctrlc()) {
                puts ("\n ** Abort\n");
                return 1;
            }
        }

        printf("\nEnvironment size: %d/%ld bytes\n",
            i, (ulong)ENV_SIZE);

        return 0;
    }

    for (i=1; i<argc; ++i) {    /* print single env variables    */
        char *name = argv[i];

        k = -1;

        for (j=0; env_get_char(j) != '\0'; j=nxt+1) {

            for (nxt=j; env_get_char(nxt) != '\0'; ++nxt)
                ;
            k = envmatch((uchar *)name, j);
            if (k < 0) {
                continue;
            }
            puts (name);
            putc ('=');
            while (k < nxt)
                putc(env_get_char(k++));
            putc ('\n');
            break;
        }
        if (k < 0) {
            printf ("## Error: \"%s\" not defined\n", name);
            rcode ++;
        }
    }
    return rcode;
}

                        argc=1打印所有环境变量出来,argc不为1,打印参数环境变量

                setenv

                        遍历DDR中环境变量,存在则修改,不存在则新建,环境变量为baudrate、ipaddr等全局变量在修改时,同时也需修改gd

int _do_setenv (int flag, int argc, char *argv[])

{
    int   i, len, oldval;
    int   console = -1;
    uchar *env, *nxt = NULL;
    char *name;
    bd_t *bd = gd->bd;

    uchar *env_data = env_get_addr(0);

    if (!env_data)    /* need copy in RAM */
        return 1;

    name = argv[1];

    if (strchr(name, '=')) {
        printf ("## Error: illegal character '=' in variable name \"%s\"\n", name);
        return 1;
    }

    /*
     * search if variable with this name already exists
     */
    oldval = -1;
    for (env=env_data; *env; env=nxt+1) {
        for (nxt=env; *nxt; ++nxt)
            ;
        if ((oldval = envmatch((uchar *)name, env-env_data)) >= 0)
            break;
    }

    /*
     * Delete any existing definition
     */
    if (oldval >= 0) {
#ifndef CONFIG_ENV_OVERWRITE

        /*
         * Ethernet Address and serial# can be set only once,
         * ver is readonly.
         */
        if (
#ifdef CONFIG_HAS_UID
        /* Allow serial# forced overwrite with 0xdeaf4add flag */
            ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) ||
#else
            (strcmp (name, "serial#") == 0) ||
#endif
            ((strcmp (name, "ethaddr") == 0)
#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
             && (strcmp ((char *)env_get_addr(oldval),MK_STR(CONFIG_ETHADDR)) != 0)
#endif    /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
            ) ) {
            printf ("Can't overwrite \"%s\"\n", name);
            return 1;
        }
#endif

        /* Check for console redirection */
        if (strcmp(name,"stdin") == 0) {
            console = stdin;
        } else if (strcmp(name,"stdout") == 0) {
            console = stdout;
        } else if (strcmp(name,"stderr") == 0) {
            console = stderr;
        }

        if (console != -1) {
            if (argc < 3) {        /* Cannot delete it! */
                printf("Can't delete \"%s\"\n", name);
                return 1;
            }

            /* Try assigning specified device */
            if (console_assign (console, argv[2]) < 0)
                return 1;

#ifdef CONFIG_SERIAL_MULTI
            if (serial_assign (argv[2]) < 0)
                return 1;
#endif
        }

        /*
         * Switch to new baudrate if new baudrate is supported
         */
        if (strcmp(argv[1],"baudrate") == 0) {
            int baudrate = simple_strtoul(argv[2], NULL, 10);
            int i;
            for (i=0; i<N_BAUDRATES; ++i) {
                if (baudrate == baudrate_table[i])
                    break;
            }
            if (i == N_BAUDRATES) {
                printf ("## Baudrate %d bps not supported\n",
                    baudrate);
                return 1;
            }
            printf ("## Switch baudrate to %d bps and press ENTER ...\n",
                baudrate);
            udelay(50000);
            gd->baudrate = baudrate;
#if defined(CONFIG_PPC) || defined(CONFIG_MCF52x2)
            gd->bd->bi_baudrate = baudrate;
#endif

            serial_setbrg ();
            udelay(50000);
            for (;;) {
                if (getc() == '\r')
                      break;
            }
        }

        if (*++nxt == '\0') {
            if (env > env_data) {
                env--;
            } else {
                *env = '\0';
            }
        } else {
            for (;;) {
                *env = *nxt++;
                if ((*env == '\0') && (*nxt == '\0'))
                    break;
                ++env;
            }
        }
        *++env = '\0';
    }

#ifdef CONFIG_NET_MULTI
    if (strncmp(name, "eth", 3) == 0) {
        char *end;
        int   num = simple_strtoul(name+3, &end, 10);

        if (strcmp(end, "addr") == 0) {
            eth_set_enetaddr(num, argv[2]);
        }
    }
#endif


    /* Delete only ? */
    if ((argc < 3) || argv[2] == NULL) {
        env_crc_update ();
        return 0;
    }

    /*
     * Append new definition at the end
     */
    for (env=env_data; *env || *(env+1); ++env)
        ;
    if (env > env_data)
        ++env;
    /*
     * Overflow when:
     * "name" + "=" + "val" +"\0\0"  > ENV_SIZE - (env-env_data)
     */
    len = strlen(name) + 2;
    /* add '=' for first arg, ' ' for all others */
    for (i=2; i<argc; ++i) {
        len += strlen(argv[i]) + 1;
    }
    if (len > (&env_data[ENV_SIZE]-env)) {
        printf ("## Error: environment overflow, \"%s\" deleted\n", name);
        return 1;
    }
    while ((*env = *name++) != '\0')
        env++;
    for (i=2; i<argc; ++i) {
        char *val = argv[i];

        *env = (i==2) ? '=' : ' ';
        while ((*++env = *val++) != '\0')
            ;
    }

    /* end is marked with double '\0' */
    *++env = '\0';

    /* Update CRC */
    env_crc_update ();

    /*
     * Some variables should be updated when the corresponding
     * entry in the enviornment is changed
     */

    if (strcmp(argv[1],"ethaddr") == 0) {
        char *s = argv[2];    /* always use only one arg */
        char *e;
        for (i=0; i<6; ++i) {
            bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0;
            if (s) s = (*e) ? e+1 : e;
        }
#ifdef CONFIG_NET_MULTI
        eth_set_enetaddr(0, argv[2]);
#endif
        return 0;
    }

    if (strcmp(argv[1],"ipaddr") == 0) {
        char *s = argv[2];    /* always use only one arg */
        char *e;
        unsigned long addr;
        bd->bi_ip_addr = 0;
        for (addr=0, i=0; i<4; ++i) {
            ulong val = s ? simple_strtoul(s, &e, 10) : 0;
            addr <<= 8;
            addr  |= (val & 0xFF);
            if (s) s = (*e) ? e+1 : e;
        }
        bd->bi_ip_addr = htonl(addr);
        return 0;
    }
    if (strcmp(argv[1],"loadaddr") == 0) {
        load_addr = simple_strtoul(argv[2], NULL, 16);
        return 0;
    }
#if defined(CONFIG_CMD_NET)
    if (strcmp(argv[1],"bootfile") == 0) {
        copy_filename (BootFile, argv[2], sizeof(BootFile));
        return 0;
    }
#endif

#ifdef CONFIG_AMIGAONEG3SE
    if (strcmp(argv[1], "vga_fg_color") == 0 ||
        strcmp(argv[1], "vga_bg_color") == 0 ) {
        extern void video_set_color(unsigned char attr);
        extern unsigned char video_get_attr(void);

        video_set_color(video_get_attr());
        return 0;
    }
#endif    /* CONFIG_AMIGAONEG3SE */

    return 0;
}

                saveenv

int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
    extern char * env_name_spec;

    printf ("Saving Environment to %s...\n", env_name_spec);

    return (saveenv() ? 1 : 0);
}

int saveenv(void)
{
#if defined(CONFIG_S5PC100) || defined(CONFIG_S5PC110) || defined(CONFIG_S5P6442)
    if (INF_REG3_REG == 2)
        saveenv_nand();
    else if (INF_REG3_REG == 3)
        saveenv_movinand();
    else if (INF_REG3_REG == 1)
        saveenv_onenand();
    else if (INF_REG3_REG == 4)
        saveenv_nor();
#elif    defined(CONFIG_SMDK6440)
    if (INF_REG3_REG == 3)
        saveenv_nand();
    else if (INF_REG3_REG == 4 || INF_REG3_REG == 5 || INF_REG3_REG == 6)
        saveenv_nand_adv();
    else if (INF_REG3_REG == 0 || INF_REG3_REG == 1 || INF_REG3_REG == 7)
        saveenv_movinand();
#else   // others
    if (INF_REG3_REG == 2 || INF_REG3_REG == 3)
        saveenv_nand();
    else if (INF_REG3_REG == 4 || INF_REG3_REG == 5 || INF_REG3_REG == 6)
        saveenv_nand_adv();
    else if (INF_REG3_REG == 0 || INF_REG3_REG == 7)
        saveenv_movinand();
    else if (INF_REG3_REG == 1)
        saveenv_onenand();
#endif
    else
        printf("Unknown boot device\n");

    return 0;
}
int saveenv_movinand(void)
{
#if defined(CONFIG_CMD_MOVINAND)
        movi_write_env(virt_to_phys((ulong)env_ptr));
        puts("done\n");

        return 1;
#else
    return 0;
#endif    /* CONFIG_CMD_MOVINAND */
}

void movi_write_env(ulong addr)
{
    movi_write(raw_area_control.image[2].start_blk,
           raw_area_control.image[2].used_blk, addr);
}
typedef struct raw_area {
    uint magic_number; /* to identify itself */
    uint start_blk; /* compare with PT on coherency test */
    uint total_blk;
    uint next_raw_area; /* should be sector number */
    char description[16];
    member_t image[15];
} raw_area_t;

                        raw_area_control是uboot中规划iNnad/SD卡的原始分区表


                 getenv和getenv_r
                        getenv不可重入,getenv_r可重入
                        getenv函数是返回环境变量在DDR的地址,getenv_r复制DDR环境变量给buf,getenv_r更安全

/************************************************************************
 * Look up variable from environment,
 * return address of storage for that variable,
 * or NULL if not found
 */

char *getenv (char *name)
{
    int i, nxt;

    WATCHDOG_RESET();

    for (i=0; env_get_char(i) != '\0'; i=nxt+1) {
        int val;

        for (nxt=i; env_get_char(nxt) != '\0'; ++nxt) {
            if (nxt >= CFG_ENV_SIZE) {
                return (NULL);
            }
        }
        if ((val=envmatch((uchar *)name, i)) < 0)
            continue;
        return ((char *)env_get_addr(val));
    }

    return (NULL);
}
int getenv_r (char *name, char *buf, unsigned len)
{
    int i, nxt;

    for (i=0; env_get_char(i) != '\0'; i=nxt+1) {
        int val, n;

        for (nxt=i; env_get_char(nxt) != '\0'; ++nxt) {
            if (nxt >= CFG_ENV_SIZE) {
                return (-1);
            }
        }
        if ((val=envmatch((uchar *)name, i)) < 0)
            continue;
        /* found; copy out */
        n = 0;
        while ((len > n++) && (*buf++ = env_get_char(val++)) != '\0')
            ;
        if (len == n)
            *buf = '\0';
        return (n);
    }
    return (-1);
}

iNand/SD驱动(start_armboot)

        cpu目录下驱动相关文件用于初始化soc内部关于iNand/SD控制器,drivers下用于初始化iNand/SD的内部控制器

        mmc_initialize(uboot/drivers/mmc/mmc.c)

int mmc_initialize(bd_t *bis)
{
    struct mmc *mmc;
    int err;

    INIT_LIST_HEAD(&mmc_devices);
    cur_dev_num = 0;

    if (board_mmc_init(bis) < 0)
        cpu_mmc_init(bis);

#if defined(DEBUG_S3C_HSMMC)
    print_mmc_devices(',');
#endif

#ifdef CONFIG_CHECK_X210CV3
    mmc = find_mmc_device(1);//lqm
#else
    mmc = find_mmc_device(0);
#endif
    if (mmc) {
        err = mmc_init(mmc);
        if (err)
            err = mmc_init(mmc);
        if (err) {
            printf("Card init fail!\n");
            return err;
        }
    }
    printf("%ldMB\n", (mmc->capacity/(1024*1024/(1<<9))));
    return 0;
}
int cpu_mmc_init(bd_t *bis)
{
#ifdef CONFIG_S3C_HSMMC
    setup_hsmmc_clock();
    setup_hsmmc_cfg_gpio();
    return smdk_s3c_hsmmc_init();
#else
    return 0;
#endif
}
int smdk_s3c_hsmmc_init(void)
{
    ......

    #ifdef USE_MMC0
    err = s3c_hsmmc_initialize(0);
    if(err)
        return err;
    #endif

    ......

    #ifdef USE_MMC2
    err = s3c_hsmmc_initialize(2);
    if(err)
        return err;
    #endif

    ......
}
static int s3c_hsmmc_initialize(int channel)
{
    struct mmc *mmc;

    mmc = &mmc_channel[channel];

    sprintf(mmc->name, "S3C_HSMMC%d", channel);
    mmc->priv = &mmc_host[channel];
    mmc->send_cmd = s3c_hsmmc_send_command;
    mmc->set_ios = s3c_hsmmc_set_ios;
    mmc->init = s3c_hsmmc_init;

    mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
    mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS;
#if defined(USE_MMC0_8BIT) || defined(USE_MMC2_8BIT)
    mmc->host_caps |= MMC_MODE_8BIT;
#endif

    mmc->f_min = 400000;
    mmc->f_max = 52000000;

    mmc_host[channel].clock = 0;

    switch(channel) {
    case 0:
        mmc_host[channel].ioaddr = (void *)ELFIN_HSMMC_0_BASE;
        break;
    case 1:
        mmc_host[channel].ioaddr = (void *)ELFIN_HSMMC_1_BASE;
        break;
    case 2:
        mmc_host[channel].ioaddr = (void *)ELFIN_HSMMC_2_BASE;
        break;
#ifdef USE_MMC3
    case 3:
        mmc_host[channel].ioaddr = (void *)ELFIN_HSMMC_3_BASE;
        break;
#endif
    default:
        printk("mmc err: not supported channel %d\n", channel);
    }
    
    return mmc_register(mmc);
}
struct mmc {
    struct list_head link;
    char name[32];
    void *priv;
    uint voltages;
    uint version;
    uint f_min;
    uint f_max;
    int high_capacity;
    uint bus_width;
    uint clock;
    uint card_caps;
    uint host_caps;
    uint ocr;
    uint scr[2];
    uint csd[4];
    uint cid[4];
    ushort rca;
    uint tran_speed;
    uint read_bl_len;
    uint write_bl_len;
    u32 capacity;
    struct mmc_ext_csd    ext_csd;    /* mmc v4 extended card specific */
    block_dev_desc_t block_dev;
    int (*send_cmd)(struct mmc *mmc,
            struct mmc_cmd *cmd, struct mmc_data *data);
    void (*set_ios)(struct mmc *mmc);
    int (*init)(struct mmc *mmc);
};


                setup_hsmmc_clock初始化SoC中MMC控制器时钟
                setup_hsmmc_cfg_gpio配置SoC中MMC控制器GPIO
                smdk_s3c_hsmmc_init通过USE_MMCx来调用s3c_hsmmc_initialize函数
                s3c_hsmmc_initialize定义并且实例化struct mmc类型对象(成员为驱动相关配置)
                mmc_register进行mmc设备的注册.即将struct mmc使用链表连接到mmc_devices全局变量中


        find_mmc_device

struct mmc *find_mmc_device(int dev_num)
{
    struct mmc *m;
    struct list_head *entry;

    list_for_each(entry, &mmc_devices) {
        m = list_entry(entry, struct mmc, link);

        if (m->block_dev.dev == dev_num)
            return m;
    }

    printf("MMC Device %d not found\n", dev_num);

    return NULL;
}

                通过mmc设备编号在系统中查找对应mmc设备


        mmc_init

int mmc_init(struct mmc *host)
{
    int err;

    err = host->init(host);

    if (err)
        return err;

    /* Reset the Card */
    err = mmc_go_idle(host);

    if (err)
        return err;

    /* Test for SD version 2 */
    err = mmc_send_if_cond(host);

    /* Now try to get the SD card's operating condition */
    err = mmc_send_app_op_cond(host);

    /* If the command timed out, we check for an MMC card */
    if (err == TIMEOUT) {
        err = mmc_send_op_cond(host);

        if (err)
            return UNUSABLE_ERR;
    } else
        if (err)
            return UNUSABLE_ERR;

    return mmc_startup(host);
}

                mmc卡初始化,通过向mmc卡发送命令码初始化SD卡/iNand内部控制器

demo:

        自定义uboot命令

cmd_author.c

#include <common.h>
#include <command.h>
 
int do_author (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
 
        if(argc ==2)
        {
                if(!strcmp(argv[1],"1"))
                {
                        printf("uboot community\n");
                }
                else if(!strcmp(argv[1],"2"))
                {
                        printf("blog.csdn.cxb\n");
                }
                else
                {
                        printf("%s\n",cmdtp->help);
                }
 
        }
        else
        {
                printf("%s\n",cmdtp->help);
        }
 
 
        return 0;
}
 
 
U_BOOT_CMD(
        author, 2,      1,      do_author,
        "author - author 1/2",
        "author - author 1/2"
);

添加流程

cd uboot/common/

vim cmd_author.c


vim Makefile

COBJS-y += cmd_author.o

cd ..

./mk &>/dev/null &


cd sd_fusing

./sd_fusing3.sh /dev/sdb

结果示例:

[107]HELLO! BOOT0 is starting! [110]BOOT0 commit : 4f5e01ed0b [113]set pll start [115]fix vccio detect value:0xc0 [122]periph0 has been enabled [125]set pll end [127][pmu]: bus read error [129]board init ok [131]get_pmu_exist() = -1 [134]DRAM BOOT DRIVE INFO: V0.33 [137]DRAM CLK = 792 MHz [139]DRAM Type = 3 (2:DDR2,3:DDR3) [143]DRAMC ZQ value: 0x7b7bfb [145]DRAM ODT value: 0x42. [148]ddr_efuse_type: 0x0 [151]DRAM SIZE =512 M [153]dram_tpr4:0x0 [155]PLL_DDR_CTRL_REG:0xf8004100 [158]DRAM_CLK_REG:0xc0000000 [161][TIMING DEBUG] MR2= 0x18 [168]DRAM simple test OK. [171]rtc standby flag is 0x0, super standby flag is 0x0 [176]dram size =512 [179]card no is 2 [180]sdcard 2 line count 4 [183][mmc]: mmc driver ver 2021-05-21 14:47 [192][mmc]: Wrong media type 0x0, but host sdc2, try mmc first [198][mmc]: ***Try MMC card 2*** [222][mmc]: RMCA OK! [224][mmc]: mmc 2 bias 0 [227][mmc]: MMC 5.1 [229][mmc]: HSSDR52/SDR25 4 bit [232][mmc]: 50000000 Hz [234][mmc]: 7456 MB [236][mmc]: ***SD/MMC 2 init OK!!!*** [332]Loading boot-pkg Succeed(index=0). [335]Entry_name = u-boot [342]Entry_name = optee [347]Entry_name = dtb [349]tunning data addr:0x430003e8 [353]Jump to second Boot. M/TC: OP-TEE version: e9372c9c-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #2 Sat Mar 19 11:09:45 UTC 2022 arm U-Boot 2018.05-gaf00d2d (Feb 16 2023 - 11:35:33 +0000) Allwinner Technology [00.409]CPU: Allwinner Family [00.412]Model: sun8iw20 [00.414]DRAM: 512 MiB [00.417]Relocation Offset is: 1cec0000 [00.445]secure enable bit: 0 E/TC:0 tee_read_fdt:433 fine node /firmware/optee failed with FDT_ERR_NOTFOUND [00.457]smc_tee_inform_fdt failed with: -65536[00.461]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [00.467]gic: sec monitor mode [00.470]flash init start [00.472]workmode = 0,storage type = 2 [00.476][mmc]: mmc driver ver uboot2018:2021-08-26 16:30:00 [00.482][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.507][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 4 [00.514]sunxi flash init ok [00.516]line:714 init_clocks __clk_init: clk pll_periph0x2 already initialized register fix_factor clk error [00.526]drv_disp_init request pwm success, pwm7:pwm7:0x2000c00. [00.541]drv_disp_init finish [00.543]boot_gui_init:start partno erro : can't find partition Reserve0 [00.552]Get Reserve0 partition number fail! [00.556]set disp.dev2_output_type fail. using defval=0 hdmi hpd out, force open? [00.564]boot_gui_init:finish partno erro : can't find partition bootloader 54 bytes read in 1 ms (52.7 KiB/s) [00.577]bmp_name=bootlogo.bmp size 38454 38454 bytes read in 1 ms (36.7 MiB/s) [00.593]Loading Environment from SUNXI_FLASH... OK [00.617]Item0 (Map) magic is bad [00.620]the secure storage item0 copy0 magic is bad [00.636]Item0 (Map) magic is bad [00.639]the secure storage item0 copy1 magic is bad [00.643]Item0 (Map) magic is bad [00.646]usb burn from boot delay time 0 weak:otg_phy_config [00.658]usb prepare ok [01.461]overtime [01.464]do_burn_from_boot usb : no usb exist List file under ULI/factory ** Unrecognized filesystem type ** root_partition is rootfs set root to /dev/mmcblk0p5 [01.479]update part info [01.481]update bootcmd [01.484]change working_fdt 0x5be7fe70 to 0x5be5fe70 [01.489][mmc]: no mmc-hs400-1_8v! [01.492][mmc]: delete mmc-hs200-1_8v from dtb [01.496][mmc]: get max-frequency ok 50000000 Hz [01.516]update dts Hit any key to stop autoboot: 0 [01.628]no vendor_boot partition is found Android's image name: h133-p1 [01.640]Starting kernel ... [01.643][mmc]: mmc exit start [01.662][mmc]: mmc 2 exit ok [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.61 (liuzhi@server-compile) (arm-openwrt-linux-muslgnueabi-gcc.bin (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) 6.4.1, GNU ld (GNU Binutils) 2.27) #3 SMP PREEMPT Tue Oct 21 02:01:56 UTC 2025 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: sun8iw20 [ 0.000000] printk: bootconsole [earlycon0] enabled [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 8 MiB at 0x5f800000 [ 0.000000] On node 0 totalpages: 131072 [ 0.000000] Normal zone: 1024 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 131072 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.0 [ 0.000000] percpu: Embedded 15 pages/cpu s30796 r8192 d22452 u61440 [ 0.000000] pcpu-alloc: s30796 r8192 d22452 u61440 alloc=15*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:private@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun8iw20p1 boot_type=2 androidboot.boot_type=2 gpt=1 uboot_message=2018.05-gaf00d2d(02/16/2023-11:35:33) mbr_offset=1032192 disp_reserve=8294400,0x5bee8d40 androidboot.dramsize=512 [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 490144K/524288K available (7168K kernel code, 386K rwdata, 1900K rodata, 1024K init, 174K bss, 25952K reserved, 8192K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x338/0x554 with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.008019] Switching to timer-based delay loop, resolution 41ns [ 0.014194] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.023949] Console: colour dummy device 80x30 [ 0.028432] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.038804] pid_max: default: 32768 minimum: 301 [ 0.043594] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.050930] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.059338] CPU: Testing write buffer coherency: ok [ 0.064599] /cpus/cpu@0 missing clock-frequency property [ 0.069937] /cpus/cpu@1 missing clock-frequency property [ 0.075283] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.081572] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.088263] rcu: Hierarchical SRCU implementation. [ 0.093599] smp: Bringing up secondary CPUs ... [ 0.099407] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.099565] smp: Brought up 1 node, 2 CPUs [ 0.109377] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.115557] CPU: All CPU(s) started in SVC mode. [ 0.120753] devtmpfs: initialized [ 0.136209] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.144434] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.154309] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.161629] pinctrl core: initialized pinctrl subsystem [ 0.168285] NET: Registered protocol family 16 [ 0.174504] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.219593] rtc_ccu: sunxi ccu init OK [ 0.225744] ccu: sunxi ccu init OK [ 0.229572] r_ccu: sunxi ccu init OK [ 0.280133] iommu: Default domain type: Translated [ 0.285257] sunxi iommu: irq = 24 [ 0.289741] SCSI subsystem initialized [ 0.293934] usbcore: registered new interface driver usbfs [ 0.300010] usbcore: registered new interface driver hub [ 0.305466] usbcore: registered new device driver usb [ 0.311043] mc: Linux media interface: v0.10 [ 0.315443] videodev: Linux video capture interface: v2.00 [ 0.322270] Advanced Linux Sound Architecture Driver Initialized. [ 0.329147] Bluetooth: Core ver 2.22 [ 0.332883] NET: Registered protocol family 31 [ 0.337341] Bluetooth: HCI device and connection manager initialized [ 0.343745] Bluetooth: HCI socket layer initialized [ 0.348632] Bluetooth: L2CAP socket layer initialized [ 0.353719] Bluetooth: SCO socket layer initialized [ 0.358955] pwm module init! [ 0.363280] g2d 5410000.g2d: Adding to iommu group 0 [ 0.368805] G2D: rcq version initialized.major:250 [ 0.374297] input: sunxi-keyboard as /devices/virtual/input/input0 [ 0.381991] clocksource: Switched to clocksource arch_sys_counter [ 0.397314] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 0.418941] NET: Registered protocol family 2 [ 0.424293] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.432921] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.440708] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.447973] TCP: Hash tables configured (established 4096 bind 4096) [ 0.454516] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.461071] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.468320] NET: Registered protocol family 1 [ 0.475345] Initialise system trusted keyrings [ 0.480008] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 0.495599] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.501649] ntfs: driver 2.1.32 [Flags: R/W]. [ 0.536001] Key type asymmetric registered [ 0.540120] Asymmetric key parser 'x509' registered [ 0.545466] io scheduler mq-deadline registered [ 0.549998] io scheduler kyber registered [ 0.554148] atomic64_test: passed [ 0.559190] [DISP]disp_module_init [ 0.563186] disp 5000000.disp: Adding to iommu group 0 [ 0.569588] display_fb_request,fb_id:0 [ 0.591601] [DISP]disp_module_init finish [ 0.596426] sunxi_sid_init()551 - insmod ok [ 0.601062] pwm-regulator: supplied by regulator-dummy [ 0.607802] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator [ 0.618174] uart uart0: get regulator failed [ 0.622514] uart uart0: uart0 supply uart not found, using dummy regulator [ 0.629722] uart0: ttyS0 at MMIO 0x2500000 (irq = 34, base_baud = 1500000) is a SUNXI [ 0.637600] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n [ 0.645591] printk: console [ttyS0] enabled [ 0.645591] printk: console [ttyS0] enabled [ 0.654482] printk: bootconsole [earlycon0] disabled [ 0.654482] printk: bootconsole [earlycon0] disabled [ 0.666177] uart uart1: get regulator failed [ 0.670974] uart uart1: uart1 supply uart not found, using dummy regulator [ 0.679005] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI [ 0.688855] misc dump reg init [ 0.693755] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9 [ 0.700974] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed! [ 0.708615] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 0.715942] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 0.723365] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1) [ 0.729893] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power. [ 0.736828] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1) [ 0.744565] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=209 assert=1 [ 0.752416] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1 [ 0.760513] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled [ 0.768198] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power. [ 0.774967] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1) [ 0.782494] sunxi-rfkill soc@3000000:rfkill@0: get gpio bt_rst failed [ 0.790533] [ADDR_MGT] addr_mgt_probe: module version: v1.0.9 [ 0.797688] [ADDR_MGT] addr_mgt_probe: success. [ 0.804256] libphy: Fixed MDIO Bus: probed [ 0.808851] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.816192] sunxi-ehci: EHCI SUNXI driver [ 0.821105] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.828111] sunxi-ohci: OHCI SUNXI driver [ 0.833247] usbcore: registered new interface driver uas [ 0.839279] usbcore: registered new interface driver usb-storage [ 0.846105] usbcore: registered new interface driver ums-alauda [ 0.852817] usbcore: registered new interface driver ums-cypress [ 0.859594] usbcore: registered new interface driver ums-datafab [ 0.866390] usbcore: registered new interface driver ums_eneub6250 [ 0.873390] usbcore: registered new interface driver ums-freecom [ 0.880163] usbcore: registered new interface driver ums-isd200 [ 0.886858] usbcore: registered new interface driver ums-jumpshot [ 0.893744] usbcore: registered new interface driver ums-karma [ 0.900322] usbcore: registered new interface driver ums-onetouch [ 0.907232] usbcore: registered new interface driver ums-realtek [ 0.914025] usbcore: registered new interface driver ums-sddr09 [ 0.920699] usbcore: registered new interface driver ums-sddr55 [ 0.927394] usbcore: registered new interface driver ums-usbat [ 0.934010] usbcore: registered new interface driver idmouse [ 0.941188] sunxi_gpadc_init,2145, success [ 0.946136] sunxi_gpadc_setup: get channel scan data failed [ 0.952672] input: sunxi-gpadc0 as /devices/virtual/input/input1 [ 0.960626] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1 [ 0.972810] sunxi-rtc 7090000.rtc: registered as rtc0 [ 0.978588] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3) [ 0.987509] sunxi-rtc 7090000.rtc: sunxi rtc probed [ 0.993401] i2c /dev entries driver [ 0.997746] IR NEC protocol handler initialized [ 1.003357] sunxi cedar version 1.1 [ 1.007445] sunxi-cedar 1c0e000.ve: Adding to iommu group 0 [ 1.013728] VE: install start!!! [ 1.013728] [ 1.019293] VE: cedar-ve the get irq is 41 [ 1.019293] [ 1.025794] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval) [ 1.025794] [ 1.035068] VE: install end!!! [ 1.035068] [ 1.041073] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.050330] usbcore: registered new interface driver btusb [ 1.056504] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10 [ 1.063734] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1 [ 1.070114] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1 [ 1.076675] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled! [ 1.076675] [ 1.085353] [XR_BT_LPM] bluesleep_probe: uart_index(1) [ 1.093399] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator [ 1.104667] sunxi-mmc 4022000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.114620] sunxi-mmc 4022000.sdmmc: ***ctl-spec-caps*** 308 [ 1.121009] sunxi-mmc 4022000.sdmmc: No vmmc regulator found [ 1.127359] sunxi-mmc 4022000.sdmmc: No vqmmc regulator found [ 1.133801] sunxi-mmc 4022000.sdmmc: No vdmmc regulator found [ 1.140231] sunxi-mmc 4022000.sdmmc: No vd33sw regulator found [ 1.146776] sunxi-mmc 4022000.sdmmc: No vd18sw regulator found [ 1.153313] sunxi-mmc 4022000.sdmmc: No vq33sw regulator found [ 1.159839] sunxi-mmc 4022000.sdmmc: No vq18sw regulator found [ 1.166421] sunxi-mmc 4022000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 1.176013] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.199721] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.210477] random: fast init done [ 1.222019] sunxi-mmc 4022000.sdmmc: detmode:alway in(non removable) [ 1.229152] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.233385] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.250799] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8 [ 1.251806] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.257022] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 1.269944] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.274929] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 1.292986] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 1.299422] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 1.305988] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 1.312538] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 1.319085] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.319088] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 1.319570] sunxi-mmc 4020000.sdmmc: Got CD GPIO [ 1.330808] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.354222] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail [ 1.360912] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.361957] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.372108] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 1.403255] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.403797] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.426544] sunxi-mmc 4020000.sdmmc: failed to get DS26_SDR12 used default [ 1.445644] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.447112] sunxi-mmc 4020000.sdmmc: detmode:gpio irq [ 1.455431] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.461612] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.471035] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.480786] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8 [ 1.490378] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.496561] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 1.512610] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B [ 1.512613] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 1.512620] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 1.530662] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B [ 1.537097] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 1.555443] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 1.555452] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing MMC-HS(SDR20) dt B [ 1.573871] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing MMC-DDR52 dt B [ 1.573874] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 1.573881] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 1.598481] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 1.598486] mmc0: new DDR MMC card at address 0001 [ 1.599792] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB [ 1.618170] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.629374] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (244:0) [ 1.629589] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 1.646419] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 [ 1.652068] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 1.663196] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.663287] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.695313] sunxi-mmc 4021000.sdmmc: detmode:manually by software [ 1.702472] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RE !! [ 1.703404] usbcore: registered new interface driver usbhid [ 1.715504] usbhid: USB HID core driver [ 1.715773] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RE !! [ 1.719800] exFAT: Version 1.3.0 [ 1.730188] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.741941] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.744285] usbcore: registered new interface driver snd-usb-audio [ 1.757904] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.758693] sunxi-daudio 2034000.daudio: regulator missing or invalid [ 1.770024] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.777754] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1 [ 1.777754] [ 1.801741] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.808453] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.815112] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.821759] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.821789] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 1.828421] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0 [ 1.828471] sun8iw20-pinctrl 2000000.pinctrl: pin PF2 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:162 [ 1.863205] sun8iw20-pinctrl 2000000.pinctrl: pin-162 (2000000.pinctrl:162) status -22 [ 1.872084] [AUDIOCODEC][sunxi_codec_parse_params][2463]:gpio-spk set failed, SPK not work! [ 1.881461] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 1.894240] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 1.903130] [AUDIOCODEC][sunxi_codec_parse_params][2482]:gpio-spk-pwr set failed, SPK not work! [ 1.913349] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished [ 1.922743] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present! [ 1.932576] [SNDCODEC][sunxi_card_init][583]:card init finished [ 1.939801] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok [ 1.950943] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input2 [ 1.963065] [SNDCODEC][sunxi_card_dev_probe][832]:register card finished [ 1.972356] NET: Registered protocol family 10 [ 1.978445] Segment Routing with IPv6 [ 1.982624] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch [ 1.990093] NET: Registered protocol family 17 [ 1.995160] 8021q: 802.1Q VLAN Support v1.8 [ 2.000619] Registering SWP/SWPB emulation handler [ 2.006401] Loading compiled-in X.509 certificates [ 2.014094] HDMI 2.0 driver init start! [ 2.018416] boot_hdmi=false [ 2.021591] ERROR: can not get hdmi_cts_compatibility [ 2.027294] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 2.034365] HDMI2.0 module init end [ 2.058130] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.070945] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.086212] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1008000 KHz [ 2.094668] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 1008000000 (-34) [ 2.136291] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 912000 KHz [ 2.147105] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present! [ 2.156620] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok [ 2.168117] get ehci0-controller wakeup-source is fail. [ 2.174176] sunxi ehci0-controller don't init wakeup source [ 2.180440] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c816a0, 0x:e08d6000, irq_no:36 [ 2.192477] [sunxi-ehci0]: Not init ehci0 [ 2.197413] get ohci0-controller wakeup-source is fail. [ 2.203428] sunxi ohci0-controller don't init wakeup source [ 2.209690] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c81930 [ 2.219373] [sunxi-ohci0]: Not init ohci0 [ 2.224323] get ehci1-controller wakeup-source is fail. [ 2.230304] sunxi ehci1-controller don't init wakeup source [ 2.236609] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c81bc0, 0x:e08df000, irq_no:38 [ 2.248952] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 2.262468] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 2.269731] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 2.279758] sunxi-ehci 4200000.ehci1-controller: irq 56, io mem 0x04200000 [ 2.312015] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 2.319836] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect [ 2.329084] hub 1-0:1.0: USB hub found [ 2.333405] hub 1-0:1.0: 1 port detected [ 2.338828] get ohci1-controller wakeup-source is fail. [ 2.344862] sunxi ohci1-controller don't init wakeup source [ 2.351129] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c81e50 [ 2.361124] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 2.373522] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 2.380800] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 2.390815] sunxi-ohci 4200400.ohci1-controller: irq 57, io mem 0x04200400 [ 2.467039] hub 2-0:1.0: USB hub found [ 2.471307] hub 2-0:1.0: 1 port detected [ 2.476591] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.489410] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.498967] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.511813] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.524430] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.533387] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.545398] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.546218] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.553815] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.562966] clk: Not disabling unused clocks [ 2.572190] cfg80211: failed to load regulatory.db [ 2.576966] ALSA device list: [ 2.585676] #0: audiocodec [ 2.588910] #1: sndhdmi [ 2.591863] alloc_fd: slot 0 not NULL! [ 2.600261] VFS: Mounted root (squashfs filesystem) readonly on device 179:5. [ 2.612762] devtmpfs: mounted [ 2.618215] Freeing unused kernel memory: 1024K [ 2.652032] [HDMI receive params]: tv mode: 0xa format:0x0 data bits:0x0 eotf:0x4 cs:0x101 dvi_hdmi:2 range:2 scan:0 aspect_ratio:8 [ 2.665531] Run /sbin/init as init process [ 2.732070] usb 1-1: new high-speed USB device number 2 using sunxi-ehci [ 2.945257] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.958279] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.958594] init: Console is alive [ 2.971312] init: - watchdog - [ 2.974936] init: - preinit - /dev/by-name/UDISK already format by ext4 [ 3.451478] mount_root: mounting /dev/root [ 3.456814] mount_root: loading kmods from internal overlay [ 3.520695] block: attempting to load /etc/config/fstab [ 3.748208] disp_al_manager_apply ouput_type:0 [ 3.753590] disp_al_hdmi_cfg [ 3.756836] [DISP] disp_device_attached_and_enable,line:233: [ 3.756841] attached ok, mgr0<-->dev0 [ 3.767347] [DISP] disp_device_attached_and_enable,line:236: [ 3.767356] type:4,mode:10,fmt:rgb,bits:8bits,eotf:4,cs:257 dvi_hdmi:2, range:2 scan:0 ratio:8 e2fsck 1.42.12 (29-Aug-2014) /dev/by-name/UDISK: recovering journal Setting free blocks count to 1823993 (was 1823994) /dev/by-name/UDISK: clean, 50/473280 files, 66670/1890663[ 3.909609] random: procd: uninitialized urandom read (4 bytes read) blocks [ 3.911152] EXT4-fs (mmcblk0p8): mounted filesystem with ordered data mode. Opts: [ 3.930966] block: extroot: UUID match (root: 7b6709b9-ccc4c4ae-e8b740a9-30e51a3e, overlay: 7b6709b9-ccc4c4ae-e8b740a9-30e51a3e) [ 3.955677] mount_root: switched to extroot [ 3.970003] procd: - early - [ 3.973449] procd: - watchdog - [ 4.034437] random: procd: uninitialized urandom read (4 bytes read) [ 4.167578] procd: - watchdog - [ 4.171419] procd: - ubus - [ 4.175260] procd (1): /proc/1185/oom_adj is deprecated, please use /proc/1185/oom_score_adj instead. [ 4.215925] random: ubusd: uninitialized urandom read (4 bytes read) [ 4.278566] procd: - init - Please press Enter to activate this console. [ 4.938628] fuse: init (API version 7.31) \FF
12-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值