从本文开始,更系统的描述基于cygwin构建u-boot。

之前《痛苦的版本对齐》系列,对于cygwin环境下Sourcery CodeBench,u-boot-1.1.6的构建有侧面的说明,本文主要是对u-boot-2010.09进行说明

一、编译环境

1、cygwin环境参数如下(cygcheck -c),仅截取核心模块。

 $ cygcheck -c
Cygwin Package Information
Package Version Status
bash 4.1.- OK
binutils 2.22.- OK
coreutils 8.15- OK
cygutils 1.4.- OK
cygwin 1.7.- OK
gawk 4.0.- OK
gcc4-core 4.5.- OK
libgcc1 4.5.- OK
make 3.82.- OK
sed 4.2.- OK
tar 1.25- OK

2、编译工具链,

CodeSourcery G++ Lite 2009q1-203,

http://www.codesourcery.com/,目前,已经为mentor graphics公司的http://www.mentor.com/embedded-software/codesourcery

下载,lite-edition。基于GCC的版本为 gcc-4.3.3

linux下版本:arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

windows下版本:arm-2009q1-203-arm-none-linux-gnueabi-i686-mingw32.tar.bz2

在 cygwin窗口下,需要 配置环境变量,set CYGPATH=D:/cygwin/bin/cygpath

注释:原因参见《痛苦的版本对齐(2) 和时间的相关性》http://www.cnblogs.com/yvivid/p/3541142.html

3、u-boot版本:

从u-boot官网上下载,u-boot-2010.09

下载链接:ftp://ftp.denx.de/pub/u-boot/

4、上述版本状态,是我尝试的,如果是其他情况,需要自己确认。

二、说在前面

1、可以先在Linux系统下验证。

1)由于u-boot版本是在linux下维护的,虽然支持cygwin,但根据我的验证,问题仍然较多。

2)可以通过虚拟机构建,如VirtualBox。

3)上面版本组合,我已经验证

2、U-boot产品开发,建议在linux系统下进行。

cygwin下,u-boot还是有各种细节问题需要解决(本系列会介绍),但如果要成熟快速开发,Linux是首选。

三、初次验证(首次运行的失败,cygwin路径问题)

1、编译命令及错误信息

 D:\cygwin\u-boot-2010.09\u-boot-2010.09>set CYGPATH=D:/cygwin/bin/cygpath

 D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi- distclean

 D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi- omap1610inn_config
Configuring for omap1610inn board... D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi-
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
include/autoconf.mk.dep:1: *** multiple target patterns.  Stop.

2、原因
参见《痛苦的版本对齐(3) cygwin下的路径引用》http://www.cnblogs.com/yvivid/p/3546649.html

【原因】make 无法处理异常的冒号 (autoconf.mk.dep中,由于gcc工具产生的windows路径导致)

尝试修改解决

找到 autoconf.mk.dep文件,如下:

  include/autoconf.mk: include/common.h \
/u-boot-2010.09/u-boot-2010.09/include/config.h \
/u-boot-2010.09/u-boot-2010.09/include/config_defaults.h \
/u-boot-2010.09/u-boot-2010.09/include/configs/omap1610inn.h \
/u-boot-2010.09/u-boot-2010.09/include/config_cmd_default.h \
/u-boot-2010.09/u-boot-2010.09/include/configs/omap1510.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/arch/sizes.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/config.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/bitops.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/types.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/bitops.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/proc/system.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/config.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/types.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/posix_types.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/stddef.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/posix_types.h \
/u-boot-2010.09/u-boot-2010.09/include/linux/string.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/string.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/ptrace.h \
/u-boot-2010.09/u-boot-2010.09/include/asm/proc/ptrace.h \
d:/cygwin/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3./include/stdarg.h \

找到 autoconf.mk.dep的构建(在主文件夹Makefile中)

可以增加 sed 处理: sed -i 's/d:\//\/cygdrive\/d\//g' $@

 $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
@$(XECHO) Generating $@ ; \
set -e ; \
: Generate the dependancies ; \
$(CC) -x c -DDO_DEPS_ONLY -M $(HOSTCFLAGS) $(CPPFLAGS) \
-MQ $(obj)include/autoconf.mk include/common.h > $@
sed -i 's/d:\//\/cygdrive\/d\//g' $@

3、还是错误,而且,从distclean都开始错误。

 D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi- distclean
include/autoconf.mk.dep:: *** multiple target patterns. Stop. D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi- omap1610inn_config
include/autoconf.mk.dep:: *** multiple target patterns. Stop. D:\cygwin\u-boot-2010.09\u-boot-2010.09>make CROSS_COMPILE=D:/cygwin/arm-2009q1/bin/arm-none-linux-gnueabi-
include/autoconf.mk.dep:: *** multiple target patterns. Stop.

4、分析并解决,

由于 Makefile会 sinclude autoconf.mk.dep,而多余的冒号:直接导致makefile严重的语法错误,而无法执行。

所以需要手动删除 include文件夹下的autoconf.mk.dep,

再编译,该模块就可以通过该错误告警了。

===【未完待续】===

基于cygwin构建u-boot(一)环境搭建的更多相关文章

  1. spring boot 开发环境搭建(Eclipse)

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  2. 基于kubuntu的C/C++开发环境搭建

    基于kubuntu的环境搭建 系统: kubuntu 14.04 中文输入法: SICM ibus fcitx:sougou 中文输入法的安装比较复杂,由于各种的不兼容,可能会出现各种的问题: 终端配 ...

  3. Android开发自学笔记(基于Android Studio1.3.1)—1.环境搭建(转)

    一.引言    本套学习笔记的开发环境是Windows 10 专业版和Android Studio 的最新版1.3.1. Android Studio 是一个Android开发环境,基于Intelli ...

  4. Nginx配置多个基于域名的虚拟主机+实验环境搭建+测试

    标签:Linux 域名 Nginx 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://xpleaf.blog.51cto.com/9 ...

  5. 基于SkyWalking的分布式跟踪系统 - 环境搭建

    前面的几篇文章我们聊了基于Metrics的监控Prometheus,利用Prometheus和Grafana可以全方位监控你的服务器及应用的性能指标,在出现异常时利用Alertmanager告警及时通 ...

  6. 基于python的App UI自动化环境搭建

    Android端Ui 自动化环境搭建 一,安装JDK.SDK 二,添加环境变量 Widows:1.系统变量→新建 JAVA_HOME 变量E:\Java\jdk1.7.0 jdk安装目录 2.系统变量 ...

  7. 基于【 centos7】五 || GitLab环境搭建

    一.基于Docker部署GitLab环境搭建 1.下载镜像 docker pull beginor/gitlab-ce:11.0.1-ce.0 2.创建GitLab 的配置 (etc) . 日志 (l ...

  8. 基于Typescript和Jest刷题环境搭建与使用

    写在前面 前几个月在公司用vue3和ts写项目,想巩固一下基础,于是我想起了去年基于JavaScript和Jest搭建的刷题环境,不如,给它搞个加强版,结合Typescript和Jest 搞一个刷题环 ...

  9. (转)微信公众平台开发之基于百度 BAE3.0 的开发环境搭建(采用 Baidu Eclipse)

    原文传送门(http://blog.csdn.net/bingtianxuelong/article/details/17843111) 版本说明:     V1:         2014-2-13 ...

随机推荐

  1. android中handler使用应该注意的问题(解决由handler引起的OOM内存泄漏)

    最近,在项目过程中频繁的使用handler处理一些ui线程上的操作,以及使用handler的postdealy.然而使用过后却不对handler进行处理,进而产生了内存溢出现象,通过google,发现 ...

  2. Keil "RECURSIVE CALL TO SEGMENT"彻底解决

    我们在做菜单程序或通过函数指针调用函数时,如果被调用的函数中有包含了常量字符串,那么经常会出现这样的的错误提示:"RECURSIVE CALL TO SEGMENT"意思是&quo ...

  3. pyqt QTableWidget例子学习(重点)

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQ ...

  4. OpenVPN莫名其妙断线的问题及其解决

    1.问题 不得不说,这是一个OpenVPN的问题,该问题几乎每个使用OpenVPN的人都碰到过,也有很多人在网上发问,然而一直都没有人能给出解决办法,甚至很多帖子上表示因为这个问题而放弃了使用Open ...

  5. Working with Numbers in PL/SQL(在PL/SQL中使用数字)

    This article gives you all the information you need in order to begin working with numbers in your P ...

  6. Laravel 安装指南

    http://www.golaravel.com/article/laravel-installation-guide/ http://laravel.com/api/4.1/ http://ding ...

  7. debian安装mysql

    http://thirteen-tw.blogspot.com/2008/09/debian-mysql-server.html 安裝MySQL-Server debian:~# apt-get in ...

  8. kaggle之识别谷歌街景图片中的字母

    https://github.com/lijingpeng/kaggle/tree/master/competitions/image_recognize 识别谷歌街景图片中的字母 street-vi ...

  9. UISegmentedControl判断点击第几项

    UISegmentedControl 关于UISegmentedControl判断当前点击的是第几项,找了很久,终于再老外的博客上找到了,在委托中 UISegmentedControl *Seg=se ...

  10. js中的eval方法转换对象时,为何一定要加上括号?

    待转换的是一个Json字符串: {'name':'新欢'} 而使用如下这种方式调用则会抛出语法异常, eval("{'name':'新欢'}"); 必须加上括号才行 eval(&q ...