VS-RK3288嵌入式板卡 U-boot 启动流程小结

bl    board_init_f -> crt0.S
    initcall_run_list(init_sequence_f) -> board_f.c
        arch_cpu_init ->
            rk_get_chiptype    //获取chip type (rk31xx, rk32xx等)
        timer_init
        env_init
        init_baud_rate
        serial_init
        print_cpuinfo    //dump cpu/pll info
        dram_init    //获取size以及end address
        setup_dram_config ->
            dram_init_banksize
        show_dram_config
ldr    pc, =board_init_r -> crt0.S
    board_init_r ->        board_r.c
        init_sequence_r    //调用init_sequence_r中的各个函数。
            board_init     rk32xx.c //设置machine type以及boot param起始地址,kernel要用到。
            initr_serial ->    board_r.c //初始化串口。
                serial_initialize
            initr_rk_storage    ->     //初始化storage
                board_storage_init ->    rk32xx.c
                    StorageInit ->    storage.c    //初始化eMMC.
                        memFunTab[memdev]->Init    //调用emmcFunOp的SdmmcInit()
                            SdmmcInit    sdmmcBoot.c    这里还会根据sd里存的信息来区分是要boot还是update.
                        StorageReadFlashInfo ->
                            gpMemFun->ReadInfo ->
                                SdmmcReadFlashInfo    sdmmcBoot.c
            initr_env    //初始化u-boot中的环境变量
            stdio_add_devices ->    //不做什么。
            console_init_r    //作为device来管理。
            board_late_init ->    rk32xx.c
                board_init_adjust_env    //初始化bootdelay, bootcmd这些env.
                load_disk_partitions ->
                    GetParam
                    ParseParam    ->    //解析parameter文件
                        ParseLine    ->    //获取各个参数选项,如machine model, cmdline等。
                            parse_cmdline ->
                                mtdpart_parse    //获取分区表信息
                rkimage_prepare_fdt     rkimage.c //从boot或者resource image读取fdt地址,resource会覆盖boot.img的fdt.
                key_init    //各种key init
                pmic_init    ->    power_rockchip.c    //多个型号pmic的init,如rk808, rk818,一旦匹配到成功的就不再尝试其他的了。
                    pmic_act8846_init    //sdk board用的是此IC。
                    pmic_rk808_init    -> pmic_rk808.c //后续项目要替换成这颗。
                        rk808_parse_dt ->
                            fdt_device_is_available    //status为disabled就没必要解析了。
                            fdt_get_i2c_info    //获取i2c address, number, 
                            rk808_i2c_probe        //detect pmic.
                            fdt_get_regulator_node    //获取pmic regulator信息
                            fdt_regulator_match    //获取regulator初始化数据
                            rk808_set_regulator_init    //设置各regulator初始化电压
                            fdtdec_decode_gpios    //获取gpio内容, pwr_hold
                        charger_init
                        i2c_init
                    pmic_rk818_init
                pwm_regulator_init ->    //pwm init.
                    pwm_regulator_parse_dt
                fg_init    //gauge init.
                SecureBootCheck    
                board_fbt_preboot ->
                    fbt_fastboot_init
                    board_fbt_get_reboot_type    //读取reboot flag
                    board_fbt_key_pressed //再次检查key有没有按下来决定进入哪种模式。
                    board_fbt_low_power_check    //电量检查,过低就充电,如果失败就直接关机.
                    fdtdec_get_int    //读取u-boot是否显示logo值
                    drv_lcd_init ->    lcd.c
                        lcd_init ->
                            lcd_ctrl_init ->    rockchip_fb.c
                                rk_fb_parse_dt ->    //从dts中解析出lcd的参数。
                                                                    rk_fb_pwr_enable    //上电
                                rkclk_lcdc_clk_set    //设置clock
                                rk_lcdc_init    //lcdc控制器初始化
                                rk_lcdc_load_screen    //根据不同的接口设置不同的配置到控制器
                            lcd_clear ->
                                lcd_logo ->    //show logo
                                    bitmap_plot ->
                                        rk_bitmap_from_resource ->
                                            show_resource_image    -> //name是logo.bmp
                                                get_content ->
                                                    get_base_offset    //先从resoure分区获取,失败的话从boot分区获取.
                                                lcd_display_bitmap_center
                    board_fbt_low_power_off    //如果是低电量而且没在充电,那就显示fail的logo,1s后关机.
                    lcd_standby
                    rk_backlight_ctrl
                    board_fbt_run_recovery    //进recovery的情况
                    board_fbt_run_recovery_wipe_data    //wipe data的情况,也是进recovery
                    board_fbt_request_start_fastboot    //进fastboot mode
                    rkloader_run_misc_cmd    //其他情况
            run_main_loop ->
                main_loop //启动kernel
                    do_bootrk ->    cmd_bootrk.c
                        rk_load_image_from_storage ->
                            rkimage_load_image    //先尝试从boot.img读取内核以及ramdisk
                            StorageReadLba    //如果boot.img没有内核则从kernel中读取
                            rkimage_load_fdt    //从resource分区中读取fdt.
                        rk_load_kernel_logo    -> //加载kernel logo
                            get_content        //图片存在resource 分区
                        rk_commandline_setenv
                        do_bootm_linux    //加载kernel,这里就是标准u-boot的做法了.        

转载注明:http://bbs.videostrong.com/             

RK3288 uboot启动流程的更多相关文章

  1. 嵌入式Linux驱动学习之路(五)u-boot启动流程分析

    这里说的u-boot启动流程,值得是从上电开机执行u-boot,到u-boot,到u-boot加载操作系统的过程.这一过程可以分为两个过程,各个阶段的功能如下. 第一阶段的功能: 硬件设备初始化. 加 ...

  2. u-boot启动流程分析(2)_板级(board)部分

    转自:http://www.wowotech.net/u-boot/boot_flow_2.html 目录: 1. 前言 2. Generic Board 3. _main 4. global dat ...

  3. 1.移植uboot-分析uboot启动流程(详解)

    本节总结: uboot启动流程如下: 1)设置CPU为管理模式 2)关看门狗 3)关中断 4)设置时钟频率   (FCLK:HCLK:PCLK=1:2:4,FCLK=120Mhz) 5)关mmu,初始 ...

  4. 海思uboot启动流程详细分析(三)【转】

    1. 前言 书接上文(u-boot启动流程分析(二)_平台相关部分),本文介绍u-boot启动流程中和具体版型(board)有关的部分,也即board_init_f/board_init_r所代表的. ...

  5. u-boot移植随笔(7):u-boot启动流程简图【转】

    转自:http://www.latelee.org/porting-uboot/u-boot-porting-bootstrap.html u-boot移植随笔:u-boot启动流程简图 画上面这张图 ...

  6. am335x uboot启动流程分析

    基本指令含义 .globl _start .globl指示告诉汇编器,_start这个符号要被链接器用到,所以要在目标文件的符号表中标记它是一个全局符号 b,bl b是不带返回的跳转  bl带返回的跳 ...

  7. imx6 uboot启动流程分析

    参考http://blog.csdn.net/skyflying2012/article/details/25804209 这里以imx6平台为例,分析uboot启动流程对于任何程序,入口函数是在链接 ...

  8. Uboot启动流程分析(三)

    1.前言 在前面的文章Uboot启动流程分析(二)中,链接如下: https://www.cnblogs.com/Cqlismy/p/12002764.html 已经对_main函数的整个大体调用流程 ...

  9. Uboot启动流程分析(二)

    1.前言 在前面的文章Uboot启动流程分析(一)中,链接如下: https://www.cnblogs.com/Cqlismy/p/12000889.html 已经简单地分析了low_level_i ...

随机推荐

  1. nginx warn an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/ while reading upstream

    最近管理的nginx发现大量的error log,log内容如下: an upstream response is buffered to a temporary file /var/cache/ng ...

  2. javascript中如何判断变量类型

    typeof 只能判断基本类型,如number.string.boolean.当遇上引用类型变量就没那么好用了,结果都是object.使用Object.prototype.toString.call( ...

  3. 怎样用Python的Scikit-Learn库实现线性回归?

    来源商业新知号网,原标题:用Python的Scikit-Learn库实现线性回归 回归和分类是两种 监督 机器 学习算法, 前者预测连续值输出,而后者预测离散输出. 例如,用美元预测房屋的价格是回归问 ...

  4. Taro之百度地图显示定位点和信息

    由于没有后台数据就随机生成点来模拟了.具体代码如下. componentDidMount = () => { const { BMap, BMAP_STATUS_SUCCESS } = wind ...

  5. Homework:奇偶性

    // 程序功能: // 要求用户从键盘输入一个整数,判断其是奇数还是偶数 #include <stdio.h> int main() { int x; printf("输入一个整 ...

  6. 区块链之Hyperledger(超级账本)Fabric v1.0 的环境搭建(更新)

    参考链接:https://blog.csdn.net/so5418418/article/details/78355868   https://blog.csdn.net/wgh1015398431/ ...

  7. linux应用之test命令详细解析

    test命令用法. 功能:检查文件和比较值 1)判断表达式 if test  (表达式为真) if test !表达式为假 test 表达式1 –a 表达式2                  两个表 ...

  8. php的trie_filter扩展安装敏感词查找

    #编译libiconv ./configure make make install #编译libdatrie-0.2.11 ./configure LDFLAGS=-L/usr/local/lib L ...

  9. 138 条 Vim 命令、操作、快捷键全集

    命令历史 以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令. 启动vim 在命令行窗口中输入以下命令即可 vim 直接启动vim vim filename 打开vim ...

  10. 2018-2019-2 《Java程序设计》结对项目阶段总结《四则运算——整数》(二)

    20175218 2018-2019-2 <Java程序设计>结对项目阶段总结<四则运算--整数> 一.需求分析 实现一个命令行程序,要求: 自动生成小学四则运算题目(加,减, ...