基于cygwin构建u-boot(一)环境搭建
从本文开始,更系统的描述基于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(一)环境搭建的更多相关文章
- spring boot 开发环境搭建(Eclipse)
Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...
- 基于kubuntu的C/C++开发环境搭建
基于kubuntu的环境搭建 系统: kubuntu 14.04 中文输入法: SICM ibus fcitx:sougou 中文输入法的安装比较复杂,由于各种的不兼容,可能会出现各种的问题: 终端配 ...
- Android开发自学笔记(基于Android Studio1.3.1)—1.环境搭建(转)
一.引言 本套学习笔记的开发环境是Windows 10 专业版和Android Studio 的最新版1.3.1. Android Studio 是一个Android开发环境,基于Intelli ...
- Nginx配置多个基于域名的虚拟主机+实验环境搭建+测试
标签:Linux 域名 Nginx 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://xpleaf.blog.51cto.com/9 ...
- 基于SkyWalking的分布式跟踪系统 - 环境搭建
前面的几篇文章我们聊了基于Metrics的监控Prometheus,利用Prometheus和Grafana可以全方位监控你的服务器及应用的性能指标,在出现异常时利用Alertmanager告警及时通 ...
- 基于python的App UI自动化环境搭建
Android端Ui 自动化环境搭建 一,安装JDK.SDK 二,添加环境变量 Widows:1.系统变量→新建 JAVA_HOME 变量E:\Java\jdk1.7.0 jdk安装目录 2.系统变量 ...
- 基于【 centos7】五 || GitLab环境搭建
一.基于Docker部署GitLab环境搭建 1.下载镜像 docker pull beginor/gitlab-ce:11.0.1-ce.0 2.创建GitLab 的配置 (etc) . 日志 (l ...
- 基于Typescript和Jest刷题环境搭建与使用
写在前面 前几个月在公司用vue3和ts写项目,想巩固一下基础,于是我想起了去年基于JavaScript和Jest搭建的刷题环境,不如,给它搞个加强版,结合Typescript和Jest 搞一个刷题环 ...
- (转)微信公众平台开发之基于百度 BAE3.0 的开发环境搭建(采用 Baidu Eclipse)
原文传送门(http://blog.csdn.net/bingtianxuelong/article/details/17843111) 版本说明: V1: 2014-2-13 ...
随机推荐
- Ftp不能登陆的解决方法
ftp登陆不了是很经常碰到的事,很多人常常是不加分析就发贴询问.老实说,这样既浪费自己时间,又浪费别人精力,还常常不能得到满意的回答.因此每一位希望从ftp站点发现资源的朋友都有必要学会分析登陆失败的 ...
- uiautomator <一> 编译运行
uiautomator testcase 一.新建Java工程 二.导入lib包 android.jar 和 uiautomator.jar ,选中点击右键Add to buildPath 三.新建测 ...
- replace 全局替换 和 数组去空
<script> /*var str = 'a,b,dhhhh,d'; str = str.replace(/h/g,'j'); alert(str);*/ </script> ...
- [POJ] 2456 Aggressive cows (二分查找)
题目地址:http://poj.org/problem?id=2456 最大化最小值问题.二分牛之间的间距,然后验证. #include<cstdio> #include<iostr ...
- win7 x64 jdk1.7.0_51
1:我的 jdk与jre默认安装在:D:\Program Files\Java 2:配置环境变量(系统变量): (1)新建JAVA_HOME (2)新建CLASSPATH (3)编辑Path,%JAV ...
- 浅谈WebView的使用 js alert
http://blog.csdn.net/liuhe688/article/details/6549263 WebView是Android中一个非常实用的组件,它和Safai.Chrome一样都是基于 ...
- MySQL脚本
一. move.sql use items set @endTime=(select DATE_SUB(now(),INTERVAL 3 MONTH)); REPLACE INTO new_items ...
- c++ 06
一.下标操作符 A a (...); cout << a[3] << endl; cout << a.operator[] (3) << endl; c ...
- Linux服务器SNMP常用OID (转)
原文地址:http://www.haiyun.me/archives/linux-snmp-oid.html 收集整理一些Linux下snmp常用的OID,用做服务器监控很不错. 服务器负载: 1 2 ...
- 【BBST 之伸展树 (Splay Tree)】
最近“hiho一下”出了平衡树专题,这周的Splay一直出现RE,应该删除操作指针没处理好,还没找出原因. 不过其他操作运行正常,尝试用它写了一道之前用set做的平衡树的题http://codefor ...