按照蜗窝科技的步骤执行

一、有关硬件描述的填空题

1)CPU上电后,从哪种设备(       BOOTROM         )的哪个地址(        0x0000_0000       )开始执行。

2)用(                )方式,可以让CPU进入USB download(或者UART download)模式。 no

3)进入USB download之后,设备使用哪个USB接口(        )和主机通信。no

4)进入download模式后,哪一段地址范围(通常为SRAM)可以用来执行程序:(                )~(                ),size有多大(                )。

5)用什么协议(                )可以通过USB将bin文件上传到指定的地址。no

6)用什么协议(                )可以让CPU跳转到到指定地址继续执行。no

二、基本符号的定义

Board                ->  ql10_demo
Vendor              ->  fmsh
Machine(SoC)    ->  fmql10
Arch                  ->  arm
CPU                  ->  armv7

三、目录结构及K从Kconfig的确定

1)在board/目录中创建“fmsh/ql10_demo” 目录,并提供Kconfig和Makefile文件

mkdir -p board/fmsh/ql10_demo
touch board/fmsh/ql10_demo/Kconfig
touch board/fmsh/ql10_demo/Makefile

2)在arch/arm/Kconfig中,添加配置菜单
config TARGET_QL10_DEMO
       bool "Support fmsh ql10 demo board"
       select CPU_V7A
       select SUPPORT_SPL
       select SPL
       help
         Support for ql10 demo board platform based on fmsh  ql10 Psoc,
         with 4xA7 CPU, 1GB DDR.

endchoice

source "board/fmsh/ql10_demo/Kconfig"

3)根据符号定义,在board/fmsh/ql10_demo/Kconfig中,添加如下配置项:
if TARGET_QL10_DEMO

config SYS_BOARD
    default "ql10_demo"

config SYS_VENDOR
    default "fmsh"

config SYS_SOC
    default "fmql10"

config SYS_CONFIG_NAME
    default "ql10_demo"
endif

vi doc/README.kconfig
以上README中有大致的流程

Conversion from boards.cfg to Kconfig
-------------------------------------

Prior to Kconfig, boards.cfg was a primary database that contained Arch, CPU,
SoC, etc. of all the supported boards.  It was deleted when switching to
Kconfig.  Each field of boards.cfg was converted as follows:

Status      ->  "S:" entry of MAINTAINERS
 Arch        ->  CONFIG_SYS_ARCH defined by Kconfig  
 CPU         ->  CONFIG_SYS_CPU defined by Kconfig
 SoC         ->  CONFIG_SYS_SOC defined by Kconfig
 Vendor      ->  CONFIG_SYS_VENDOR defined by Kconfig
 Board       ->  CONFIG_SYS_BOARD defined by Kconfig
 Target      ->  File name of defconfig (configs/<target>_defconfig)
 Options     ->  CONFIG_SYS_EXTRA_OPTIONS defined by Kconfig
 Maintainers ->  "M:" entry of MAINTAINERS

################# tips ####################

1.Arch       arm

arch/arm/Kconfig中

config SYS_ARCH
    default "arm"

2.CPU        armv7

arch/arm/Kconfig

config SYS_CPU
    default "armv7" if CPU_V7A

3.SoC        fmql10

Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc> 其实并没有这个目录

4.Vendor     fmsh

Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
         and board/<vendor>/<board>/*

5.Board      ql10_demo

Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
         (or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)

6.Target     ql10_demo

Define CONFIG_SYS_CONFIG_NAME="target" to include
         include/configs/<target>.h

Add configs/<target>_defconfig

Tips to add/remove boards
-------------------------

When adding a new board, the following steps are generally needed:

[1] Add a header file include/configs/<target>.h
 [2] Make sure to define necessary CONFIG_SYS_* in Kconfig:
       Define CONFIG_SYS_CPU="cpu" to compile arch/<arch>/cpu/<cpu>
       Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc>
       Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
         and board/<vendor>/<board>/*
       Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
         (or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
       Define CONFIG_SYS_CONFIG_NAME="target" to include
         include/configs/<target>.h
 [3] Add a new entry to the board select menu in Kconfig.
     The board select menu is located in arch/<arch>/Kconfig or
     arch/<arch>/*/Kconfig.
 [4] Add a MAINTAINERS file
     It is generally placed at board/<board>/MAINTAINERS or
     board/<vendor>/<board>/MAINTAINERS
 [5] Add configs/<target>_defconfig

When removing an obsolete board, the following steps are generally needed:

[1] Remove configs/<target>_defconfig
 [2] Remove include/configs/<target>.h if it is not used by any other boards
 [3] Remove board/<vendor>/<board>/* or board/<board>/* if it is not used
     by any other boards
 [4] Update MAINTAINERS if necessary
 [5] Remove the unused entry from the board select menu in Kconfig
 [6] Add an entry to doc/README.scrapyard

根据README的描述,定义上述配置项之后,u-boot会编译如下的目录:

Define CONFIG_SYS_CPU="cpu" to compile arch//cpu/
        arch/arm/cpu/armv8
        Q:并没有看到CONFIG_SYS_CPU的定义?
        A:在“arm/Kconfig”中定义,“default "armv8" if ARM64”,这就是为什么在上面Target定义中“select ARM64”的原因。

Define CONFIG_SYS_SOC="soc" to compile arch//cpu//
        arch/arm/cpu/armv8/s900
        Q:如果该目录不存在,是否还会编译?
        A:应该不会。

Define CONFIG_SYS_VENDOR="vendor" to compile board//common/* and board///*
        board/actions/common/*
        board/actions/bubblegum/*

Define CONFIG_SYS_CONFIG_NAME="target" to include include/configs/.h
        include/configs/bubblegum.h

4)创建该板子有关的配置头文件

include/configs/ql10_demo.h

#ifndef __QL10_DEMO_H
#define __QL10_DEMO_H

#endif

5)使用menuconfig,生成.config,并保存为ql10_demo_defconfig

cd ~/work/x_project/u-boot

make menuconfig

配置Architecture和Target:

Architecture select (ARM architecture)  --->

ARM architecture  --->
    Target select (Support Bubblegum 96Board)  --->

关闭Command line interface配置项下面所有的内容:

Command line interface  --->

其它暂时用默认值,保存退出,得到.config文件,然后另存为ql10_demo_defconfig

cp .config configs/ql10_demo_defconfig

四、尝试编译一次

转载于:https://www.cnblogs.com/idyllcheung/p/11377395.html

uboot移植之迷雾解码相关推荐

  1. X-007 FriendlyARM tiny4412 u-boot移植之内存初始化

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  2. U-Boot移植教程之二:移植

    内容来自 韦东山<嵌入式Linux应用开发完全手册> 一.U-Boot移植 开发板smdk2410的配置适用于大多数S3C2410单板,或是只需要极少的修改即可使用.但是目前U-Boot中 ...

  3. u-boot移植重要问题说明

    u-boot移植重要问题说明 一.从SD卡拷贝BL2到内存的函数 函数名字叫copy_uboot_to_ram,位置在board/samsung/real210/mmc_boot.c 其中有这个一部分 ...

  4. X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件

    X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件 <<<<<<<<<<<<<< ...

  5. linux mpc boot 串口初始化,uboot移植阶段二--3串口终结篇

    2011-03-20 23:00:37 前天U-boot移植串口后,能成功显示数据. 今天的主要目的是再次进行U-boot移植.看是否成功.花了40分钟,很顺利. 接着就是要把之前有问题的U-boot ...

  6. 嵌入式linux开发环境 cpu,嵌入式Linux开发环境的搭建之:U-Boot移植-嵌入式系统-与非网...

    5.2  U-Boot移植 5.2.1  Bootloader介绍 1.概念 简单地说,Bootloader就是在操作系统内核运行之前运行的一段程序,它类似于PC机中的BIOS程序.通过这段程序,可以 ...

  7. u-boot移植随笔:u-boot的内存分布图

    花了两天时间来专门研究u-boot的内存分布,这个图网上已经有了,但只是大致图形,没有详细.深入解析.所以自己就专门画了图,添加一些东西. 此外,还专门测试了一下u-boot下全局变量.未初始化变量等 ...

  8. u-boot移植随笔:u-boot shell与ASCII码

    u-boot移植随笔:u-boot shell与ASCII码 前几天让u-boot的shell更接近"shell",发现可以使用Ctrl-p等等来控制,心里总在想它们是怎么实现的, ...

  9. u-boot移植随笔:自定义u-boot命令点灯

    u-boot移植随笔:自定义u-boot命令点灯 前几天一不小心在CSDN论坛上发帖散分,同时许诺完成点灯就结账,经过努力,终于可以在u-boot的shell中输入自定义的命令来点灯了.下面简单讲一下 ...

  10. u-boot移植随笔:让u-boot shell支持tab、命令历史

    u-boot移植随笔:让u-boot shell支持tab.命令历史 前两天一直在想一个问题,u-boot的shell怎么不支持命令自动补齐,命令历史呢?由于受linux的shell影响,只要其它的& ...

最新文章

  1. 无线网***工具进攻方法及防范技巧
  2. 人体上身各部位图_【肝货】画好人体结构,你还需要了解这些
  3. powerdesigner自动生成代码的修改
  4. Spring Data JPA初使用 *****重要********
  5. 加分进了字节,MySQL真yyds!
  6. 视觉SLAM——2D-2D:对极几何
  7. flask response响应
  8. 每年都有人问“IT行业还能再火几年”,现实给出最好的答案
  9. linux 桥接stp原理,Linux操作系统网桥源码框架初步分析
  10. 存储过程传递参数时出现类型转换错误!如:varchar转换为int时出错
  11. 离散时间信号处理第三版英文版课后习题答案
  12. 5. JanusGraph Schema和数据类型
  13. 流程控制 case分支
  14. 聊聊nacos server的PushService
  15. 为什么要做数据分析?数据分析给企业带来了什么?
  16. 【牛客网】C/C++牛客网专项刷题(04)
  17. Win10 下搭建PHP开发环境(自定义方式)
  18. 2022年3月语音合成(TTS)和语音识别(ASR)论文月报
  19. 大学数学建模大赛是用计算机,全国大学生数学建模大赛
  20. 字节跳动三场技术面+HR面,掌握这些知识点再也不怕面试通不过!

热门文章

  1. 申请POSITIVESSL ev证书需要了解哪些
  2. 06-图3 六度空间 (30分)
  3. 利用Matlab筛选给定条件的数据
  4. 人工智能培训学校学哪些内容
  5. Offset is outside the bounds of the DataView
  6. windows资源管理器经常出现无响应 window语言栏不见了
  7. ASA防火墙基本操作
  8. coreldraw x7怎样设置禁网_cdr怎么优化? coreldraw x7优化设置的详细教程
  9. 如果在遨游浏览器里设置Bing(必应)搜索为默认搜索
  10. 服务器配置高点网站打开速度,网站打开速度慢,你必须要解决的事?