从本文开始,更系统的描述基于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. 初识cross apply & outer apply

    1. 2. 3.参考地址: http://blog.csdn.net/htl258/article/details/4537421

  2. Bash: how to check if a process id (PID) exists

    http://stackoverflow.com/questions/3043978/bash-how-to-check-if-a-process-id-pid-exists https://bugz ...

  3. SGU 194 Reactor Cooling

    http://acm.sgu.ru/problem.php?contest=0&problem=194 题意:m条有向边,有上下界,求最大流. 思路:原图中有u-v low[i],high[i ...

  4. 域控制器安全策略在哪里 Windows server 2008

    Start(开始)–Programs(程序)–Administrative Tools(管理工具)–Group Policy Management(策略管理器) 展开组策略管理器选择–Forest(林 ...

  5. [转]jQuery EasyUI 扩展-- 主题(Themes)

    主题(Themes)允许您改变站点的外观和感观.使用主题可以节省设计的时间,让您腾出更多的时间进行开发.您也可以创建一个已有主题的子主题. 主题生成器(Theme Builder) jQuery UI ...

  6. Hdu5126-stars(两次CDQ分治)

    题意: 简化就是有两种操作,一种是插入(x,y,z)这个坐标,第二种是查询(x1,y1,z1)到(x2,y2,z2)(x1<=x2,y1<=y2,z1<=z2)的长方体包含多少个点. ...

  7. OnlineJudge 离线题库采集

    过段时间要把以前的OJ换掉,我负责VirtualJudge的部分.需要用C与PHP写一个Linux下的VJudge. 在此之前,将以前写给自己学弟学妹用的OJ离线题库的采集程序改进了一下.支持国内一些 ...

  8. 基于Android的物理类游戏,源代码(JAVA)分享

    游戏视频DEMO:http://v.youku.com/v_show/id_XNTM5MzM1Mzg0.html?from=s1.8-1-1.2 说明:一个自己做的Android上的物理类游戏,物理引 ...

  9. Uva272.TEX Quotes

    题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  10. JAVA中的Formatter

    package com.st.day20150525; import java.util.Formatter; public class StringTest02 { /** * %[argument ...