基于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 ...
随机推荐
- python functools.wraps装饰器模块
# -*-coding=utf-8 -*-#实现一个函数执行后计算执行时间的功能 __author__ = 'piay' import time, functools def foo(): ''' 定 ...
- 树莓派 wheezy安装与远程登录配置
一.准备工作 1:wheezy系统镜像 2:Win32DiskImager-0.9.5-install 3:SDFormatter 4:SD卡 我用的是8G 二.安装系统 流程:SDFormatter ...
- bzoj3431 [Usaco2014 Jan]Bessie Slows Down
Description [Brian Dean, 2014] Bessie the cow is competing in a cross-country skiing event at the wi ...
- Check whether a given Binary Tree is Complete or not 解答
Question A complete binary tree is a binary tree in which every level, except possibly the last, is ...
- Android 开发笔记-Eclipse中文乱码
使用eclipse时经常中文乱码网上搜罗了下解决办法: 使用Eclipse编辑文件经常出现中文乱码或者文件中有中文不能保存的问题,Eclipse提供了灵活的设置文件编码格式的选项,我们可以通过设置 ...
- C#中,表达式的计算遵循一个规律:从左到右依次计算。
int i = 0; int j = (i++)+(i++)=(i++)+i=i+++i=i+++i++=1;
- 反转int型数字
如 321 反转 123 120 反转21 注意处理最后的零,以及负数情况 ,最后就是溢出情况了 /** * @param {number} x * @return {number} */ var r ...
- Java动态 遍历List 时删除List特征元素 异常问题 及解决方案总结
首先.这是一个极其简单的问题,大牛可忽略.新手可能会遇到,Java中遍历某个List 时删除该List元素 会抛出异常. 这一个简单的问题再高手严重不值一提,但新手可能会比較困惑,用哪种方式能够安全有 ...
- Cocos2d-x 3.0rc0版本号项目的创建和部署
<1>执行setup.py 依照提示.加入你须要加入的环境变量 <2>创建项目批处理文件Create-Cocos2d-x 3.0-Project.bat 内容例如以下: @ec ...
- Android系统进程Zygote启动过程的源代码分析
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6768304 在Android系统中,所有的应用 ...