基于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 ...
随机推荐
- iOS学习之自定义视图时,在屏幕发生旋转时触发重新布局方法
如果要对自定义的视图在屏幕旋转时重新布局,则在自定义视图中定义以下触发方法: -(void)layoutSubviews { [super layoutSubviews]; //1.获取到屏幕旋转的方 ...
- Scala学习笔记--函数式编程
一.定义 简单说,"函数式编程"是一种"编程范式"(programming paradigm),也就是如何编写程序的方法论. 它属于"结构化编程&qu ...
- 火狐的打开3D效果
最近研究网页的时候,想看看一个页面中盒子的层次问题,点击右键查看元素的后,没有发现3D效果的按钮. 在网上百度后说要什么显卡支持,以为是公司的电脑用的是集显,就没有这个功能.回去用自己的笔记本后,发现 ...
- Linux Shell Scripting Tutorial (LSST) v2.0
http://bash.cyberciti.biz/wiki/index.php?title=Main_Page
- HDU 4405 Aeroplane chess(期望)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4405 题意:从0走到n,每次走之前掷一次筛子,掷出几点就向前走几点,走到大于等于n的地方就停止.但是, ...
- Windows 8.1 Update1 6610 32位/64位下载、安装和新增功能简评
今天,微软已经确认完成Windows 8.1 2014 Update RTM正式版的开发工作,累计修复99%的已知bug.随后,微软会将Win8.1首个春季更新正式版,即Win8.1 2014 Upd ...
- SQL Server (MSSQLSERVER) 服务因 找不到指定的模块。 服务特定错误而停止。
新装了sql server 2008,发现sqlserver 服务没法起来.查看系统日志是7024如下: 事件类型: 错误 事件来源: Service Control Manager 事件种类: 无 ...
- bwlabel函数的c++实现
实验中需要用到区域联通的算法,就是类似于matlab中bwlabel的函数.网上找了找c++源码未果,bwlabel-python版用python描述了matlab中的实现方法,但是最后对标签的处理部 ...
- EditText 文本内容输入限制
实现InputFilter过滤器,需要覆盖一个叫filter的方法. public abstract CharSequence filter ( CharSequence source, int st ...
- Python 协程(gevent)
协程,又叫微线程,协程是一种用户态的轻量级线程. 协程拥有自己的寄存器上下文和栈.协程调度切换时,将寄存器上下文和栈保存到其他地方,在切回来的时候,恢复先前保存的寄存器上下文和栈.因此: 协程能保留上 ...