按照蜗窝科技的步骤执行

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

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              ->  fmxx
Machine(SoC)    ->  fmql10
Arch                  ->  arm
CPU                  ->  armv7

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

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

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

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

endchoice

source "board/fmxx/ql10_demo/Kconfig"

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

config SYS_BOARD
    default "ql10_demo"

config SYS_VENDOR
    default "fmxx"

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     fmxx

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

四、尝试编译一次

uboot移植之迷雾解码的更多相关文章

  1. u-boot移植 II

    下面是韦老师的uboot移植攻略: A. 开发板的相关拷贝与修改 1. 在board文件夹下面, 将原来的smdk2410复制为100ask24x0目录, 并将smdk2410.c改名为100ask2 ...

  2. 基于mini2440的uboot移植(一)

    一.移植环境 虚拟机:ubuntu12.04 uboot源码:u-boot-2008.10.tar.bz2 交叉编译:arm-linux-gcc-4.4.3 简单的记录下编译uboot的过程,要想具体 ...

  3. u-boot移植总结(四)u-boot-2010.09框架分析

    (一)本次移植是基于FL2440,板子的基本硬件: CPU 型号为S3C2440,基于ARM920T,指令集ARMV4,时钟主频400MHz SDRAM H57V2562GTR-75C 2片*32MB ...

  4. 【转】uboot移植(一)BootLoader基本概念

    原文网址:http://blog.chinaunix.net/uid-25445243-id-3869348.html 一.BootLoader简介1.1.嵌入式Linux软件结构与分布 在一般情况下 ...

  5. U-BOOT 移植到友善之臂mini2440

    U-BOOT 移植到友善之臂mini2440 开发环境:ubuntu 10.10 编译器:友善之臂mini2440光盘自带arm-linux-gcc 4.4.3 一. 在denx官网下载源码,我所用版 ...

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

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

  7. X-004 FriendlyARM tiny4412 uboot移植之点亮指路灯

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

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

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

  9. tiny4412 --Uboot移植(5) DDR3内存

    开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位 工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-g ...

随机推荐

  1. functional-page-navigator 组件

    functional-page-navigator 组件:是一个非常强大的组件,用于跳转插件的功能页 functional-page-navigator组件的属性: version:类型 字符串 跳转 ...

  2. 如何修改linux 用户登录后默认目录

    1.linux用户登录后默认目录是在/etc/passwd文件设置的.如下图所示,一共显示了四行数据,其中第一行的/root即为root用户登录后的默认目录,第二行daemon用户的默认目录是/usr ...

  3. 嵌入式Linux之虚拟内存地址空间布局(Virtual Memory Space)

    虚拟内存地址空间 Linux内核属于微内核的范畴,内核控制计算机的硬件资源,运行在特权模式:用户态应用程序运行在普通用户模式,无法直接访问硬件资源,必须依托于内核提供的资源,如CPU资源.Memory ...

  4. Linux内核调试方法总结之内核通知链

    Linux内核通知链notifier 1.内核通知链表简介(引用网络资料)    大多数内核子系统都是相互独立的,因此某个子系统可能对其它子系统产生的事件感兴趣.为了满足这个需求,也即是让某个子系统在 ...

  5. skip a transaction in goldengate

    skip a transaction in goldengate [oracle@db ]$ ggsci Oracle GoldenGate Command Interpreter for Oracl ...

  6. DSP处理器和ARM处理器的区别以及各自应用在那些领域

    由于工作经常接触到各种多核的处理器,如TI的达芬奇系列芯片拥有1个DSP核3个ARM核.那么DSP处理器和ARM处理器各自有什么区别,各自适合那些领域? DSP:digital signal proc ...

  7. C# winform OpenFileDialog用法

    https://jingyan.baidu.com/article/e52e36156fa6d240c60c51c8.html 详情看看这个.

  8. 002-使用Spring实现读写分离(MySQL实现主从复制)

    一. 背景 一般应用对数据库而言都是“读多写少”,也就说对数据库读取数据的压力比较大主库,负责写入数据,我们称之为:写库:从库,负责读取数据,我们称之为:读库: 1. 读库和写库的数据一致:2. 写数 ...

  9. template标签就相当于React中的fragment

    template标签就相当于React中的fragment

  10. 测开之路九十一:css常用的选择器

    一:全局选择器:* 二:标签选择器,如给所有p标签加个背景色 三:id选择器:# ,如给id为id_01的元素加一个框 四:类选择器:. 如设置一个类选择器为blue,当有标签引用blue的时候,背景 ...