针对已搭建好的 IM6Q yocto平台进行uboot编译,我买的开发板是天嵌的E9开发板,不是为了做广告,主要是比较下,感觉这个开发板还比较便宜,而且发现别人写的博客,参考地址:http://blog.csdn.net/girlkoo?viewmode=contents,我的移植也是参考这个地址,我先按照这位博主移植了uboot-v2013.04_3.10.17_ga,然后,按照官方手册和之前的移植经验,进行uboot v2014.04_3.14.28_1.0.0_ga移植.
我的资源地址imx6q 针对E9平台移植资料
下载uboot也可以通过:git clone git://git.freescale.com/imx/uboot-imx.git 直接下载
下面开始uboot的移植了:
(1)进入源码目录
进入你搭建好的yocto平台,然后进入build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git,这是我的路径,你的可能会稍有不同,可以找到.
(2)查看并创建自己的分支
git branch -a
git checkout -b imx6q_v2014.04_3.14.28_1.0.0_ga remotes/origin/imx_v2014.04_3.14.28_1.0.0_ga
我的分支名称叫:imx6q_v2014.04_3.14.28_1.0.0_ga,使用远程库:remotes/origin/imx_v2014.04_3.14.28_1.0.0_ga
这个版本与freescale 官方提供版本移植
(2)针对开发板进行移植
①查找参考平台
你可以像手册一样重新定义自己的平台的名称,我就偷个懒直接使用源码中的例程了.我的平台使用
参考uboot根目录下的boards.cfg文件,查找你参考的平台
我使用的平台:mx6qsabresd
②定制DDR配置
参数如下,至于解释参考:http://blog.csdn.net/girlkoo/article/details/45420977
进入/board/freescale/imx/ddr修改mx6q_4x_mt41j128.cfg,我的全部代码如下:
/*
* Copyright (C) 2011-2014 Freescale Semiconductor, Inc.
* Jason Liu <r64343@freescale.com>
*
* SPDX-License-Identifier: GPL-2.0+
*
* Refer doc/README.imximage for more details about how-to configure
* and create imximage boot image
*
* The syntax is taken as close as possible with the kwbimage
*/
#define __ASSEMBLY__
#include <config.h>
/* image version */
IMAGE_VERSION 2
/*
* Boot Device : one of spi, sd, sata
* the board has no nand and eimnor
* spinor: flash_offset: 0x0400
* sata: flash_offset: 0x0400
* sd/mmc: flash_offset: 0x0400
*/
/* the same flash_offset as sd */
BOOT_FROM sd
#ifdef CONFIG_USE_PLUGIN
/*PLUGIN plugin-binar