1、了解uboot
 阅读uboot源码顶层目录下的README.TXT可以提取如下信息:
     made to support booting of Linux images.   //引导内核程序
     make <board_name>_defconfig :see boards.cfg for supported names
     check the file doc/README.scrapyard for a list of no longer supported boards
    
     lowlevel_init(): essential init to permit execution to reach board_init_f()
                    //底层硬件相关的初始化,没有global_data 和 BSS
     board_init_f():set up the machine ready for running board_init_r():
                   //有global_data,栈位于SRAM,清除bss段
     board_init_r(): main execution, common code   
                   //有global_data 和 BSS,主要的执行程序,初始化SDRAM和UART
  
配置选项:
       配置文件在"include/configs/<board_name>.h"
      一般不要使能icache和dcache(configuration option CONFIG_CMD_CACHE)
单板初始化设置:
  - CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
  - CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
  - CONFIG_BOARD_LATE_INIT:    Call board_late_init()
  - CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()  
修改源代码之后要相应地更新<board>/u-boot.lds*
底层硬件相关的配置:
在Makefile中需要配置CROSS_COMPILE
 
如果uboot没有支持我们所用的单板:
1.1、在boards.cfg中为你的单板添加新的配置选项,可以使用已经存在的单板作为参考;
1.2、新建一个目录以支持你的单板,单板目录下至少包含Makefilea, <board>.c, flash.c and u-boot.lds; 
1.3、为你的单板创建一个新的配置文件include/configs/<board>.h;
1.4、如果你是移植U-Boot到你的CPU, 也创建一个新的目录支持你CPU的特定程序
1.5、运行make <board>_defconfig
1.6、make
1.7、调试并且解决问题
Monitor Commands:
常用的:
    md - memory display
  mm - memory modify (auto-incrementing)
  nm - memory modify (constant address)
  mw - memory write (fill)
  nand - NAND memory operations (see doc/README.nand)
  erase - erase FLASH memory
  flinfo - print FLASH memory information
  bdinfo - print Board Info structure
  iminfo - print header information for application image
  coninfo - print console devices and informations
  bootm - boot application image from memory
  tftpboot- boot image via network using TFTP protocol
          and env variables "ipaddr" and "serverip"
          (and eventually "gatewayip")
不常用:
  cp - memory copy
    go - start application at address 'addr'
  run - run commands in an environment variable
  bootp - boot image via network using BootP/TFTP protocol
  bootz   - boot zImage from memory
  tftpput - upload a file via network using TFTP protocol
  rarpboot- boot image via network using RARP/TFTP protocol
  diskboot- boot from IDE devicebootd   - boot default, i.e., run 'bootcmd'
  loads - load S-Record file over serial line
  loadb - load binary file over serial line (kermit mode)
  cmp - memory compare
  crc32 - checksum calculation
  i2c - I2C sub-system
  sspi - SPI utility commands
  base - print or set address offset
  printenv- print environment variables
  setenv - set environment variables
  saveenv - save environment variables to persistent storage
  protect - enable or disable FLASH write protection
  ide - IDE sub-system
  loop - infinite loop on address range
  loopw - infinite write loop on address range
  mtest - simple RAM test
  icache - enable or disable instruction cache
  dcache - enable or disable data cache
  reset - Perform RESET of the CPU
  echo - echo args to console
  version - print monitor version
  help - print online help
 
环境变量的设置:
setenv: 设置环境变量
printenv: 打印环境变量
saveenv: 保存环境变量
设置列表:baudrate、bootdelay、bootcmd、bootargs、bootfile、ipaddr、serverip
uImage format:New uImage format (FIT) 、Old uImage format 
引导内核会打印内核相关信息:
     Checking Image at 40100000 ...
    Image Name:  2.2.13 for initrd on TQM850L
    Image Type:  PowerPC Linux Kernel Image (gzip compressed)
    Data Size:  335725 Bytes = 327 kB = 0 MB
    Load Address: 00000000
    Entry Point:  0000000c
    Verifying Checksum ... OK  
 
 

u-boot-2016.01移植(一)的更多相关文章

  1. [官方软件] Easy Sysprep v4.3.29.602 【系统封装部署利器】(2016.01.22)--skyfree大神

    [官方软件] Easy Sysprep v4.3.29.602 [系统封装部署利器](2016.01.22) Skyfree 发表于 2016-1-22 13:55:55 https://www.it ...

  2. ok6410 u-boot-2012.04.01移植六完善MLC NAND支持

    继ok6410 u-boot-2012.04.01移植四.五后,开发板基本已支持MLC NAND,支持DM9000.但是通过NAND命令更新u-boot到NAND,还存在问题,需要根据u-boot的n ...

  3. ok6410 u-boot-2012.04.01移植七完善u-boot移植(u-boot移植结束)

    继ok6410 u-boot-2012.04.01移植六后,开发板已支持MLC NAND.DM9000等.但还需要完善比如环境变量.mtdpart分区.裁剪.制作补丁等.下面的工作就是完善移植的u-b ...

  4. ok6410 u-boot-2012.04.01移植五支持DM9000

    继ok6410 u-boot-2012.04.01移植四后,开发板基本已支持MLC NAND,但还有一些细节地方修改,这节增加DM9000支持,通过网卡tftp程序到内存,接着通过NAND命令写到NA ...

  5. ok6410 u-boot-2012.04.01移植二修改源码支持单板

    继ok6410 u-boot-2012.04.01移植一后修改代码,对ok6410单板初始化,主要包括时钟.串口.NAND.DDR等初始化.这些工作在以前的裸板程序都写了,直接拿来用.我觉得先写裸板程 ...

  6. 黑马_13 Spring Boot:01.spring boot 介绍&&02.spring boot 入门

    13 Spring Boot: 01.spring boot 介绍&&02.spring boot 入门 04.spring boot 配置文件 SpringBoot基础 1.1 原有 ...

  7. uboot-2012.04.01移植编译前准备

    一:准备移植1.从下面的官网下载uboot-2012.04.012.建立sourceinsight工程 a.解压并在E:\colin weidongshan\transplant_u-boot-201 ...

  8. Cheatsheet: 2016 01.01 ~ 01.31

    Mobile An Introduction to Cordova: Basics Web Angular 2 versus React: There Will Be Blood How to Bec ...

  9. spring boot学习01【搭建环境、创建第一个spring boot项目】

    1.给eclipse安装spring boot插件 Eclipse中安装Spring工具套件(STS): Help -> Eclipse Marketplace... 在Search标签或者Po ...

随机推荐

  1. ElasticSearch索引快照

    参考文档:https://www.elastic.co/guide/en/elasticsearch/reference/5.1/modules-snapshots.html 备份数据之前,要创建一个 ...

  2. gamemakerstudio:鼠标输入

    标准鼠标输入常量: mb_left 按下鼠标左键 mb_middle 按下鼠标中键 (这可能不是在所有目标平台上都有效) mb_right 按下鼠标右键 mb_none 没有按下任何鼠标键 mb_an ...

  3. matlab 中“newff” 函数的参数设置

    matlab 中"newff" 函数的使用方法技巧|和各参数的意义 先来一个简单的源程序让大家练习一下: % Here input P and targets T define a ...

  4. django模型详解(四)

    1 概述 (1)概述 : Django对各种数据库提供了很好的支持,Django为这些数据库提供了统一的调用API,根据不同的业务需求选择不同的数据库 (2)定义模型 模型,属性,表,字段间的关系 一 ...

  5. Vue2自定义指令改变DOM值后未刷新data中绑定属性的值

    标签(空格分隔): Vue 自定义指令用于过滤输入框,只允许输入数字: Vue.directive('numberOnly', { bind: function (el, binding) { el. ...

  6. 3.GlusterFS 企业分布式存储的搭建

    3.1 硬件要求 一般选择 2U 机型,磁盘 SATA 盘 4TB,如果 IO 要求比较高,可以采购 SSD 固态硬盘.为了充分保证系统的稳定性和性能,要求所有 glusterfs 服务器硬件配置尽量 ...

  7. mysql导入csv格式文件

    今天测试导入csv格式文件,虽然简单但是如果不注意还是会出现错误,而且mysql在某些方面做的确实对新手不是很友好,记录一下:创建一个csv格式文件:[mysql@xxx1 ycrdb]$ more ...

  8. 7 - py面向对象一条龙服务

    Python从设计之初就已经是一门面向对象的语言,在python里所有东西皆是对象. 下面通过一个实例来说明什么是面向对象. 引子 你是一家公司的员工,公司现在要开发一款“人狗战争”的游戏,人狗战争肯 ...

  9. March 16 2017 Week 11 Thursday

    Adventure may hurt you, but monotony will kill you. 也许冒险会让你受伤,但一成不变会让你灭亡. The very theme of the univ ...

  10. nodejs理解

    一.nodejs介绍 nodejs主要体现在事件机制和异步IO,nodejs是事件驱动的: nodejs作用:js的运行环境.操作文件.链接数据库: nodejs在执行js是单线程的,但不是nodej ...